Skip to content

feat(u32): add conditional negation - #79

Open
brenorb wants to merge 1 commit into
solving-bitcoin:mainfrom
brenorb:feat/u32-conditional-negate
Open

brenorb wants to merge 1 commit into
solving-bitcoin:mainfrom
brenorb:feat/u32-conditional-negate

Conversation

@brenorb

@brenorb brenorb commented Sep 11, 2026

Copy link
Copy Markdown

Summary

  • add u32_conditional_negate for normalized sign routing over the byte-word representation
  • accept any nonzero condition while preserving the zero branch
  • cover boundary words and hostile non-boolean conditions
  • record policy-produced script, stack, and static opcode metrics

Validation

  • cargo test --locked arithmetic::u32::stack::tests::test_u32_conditional_negate
  • cargo test --locked --test primitive_metrics
  • python3 tools/kb.py validate
  • cargo fmt --check
  • git diff --check

The full repository test suite was intentionally not run; the focused primitive and metric checks pass. The local executor does not expose a useful dynamic opcode counter, so the documentation reports 52 static non-push opcodes instead.

@brenorb
brenorb force-pushed the feat/u32-conditional-negate branch from 85b0330 to 3b43474 Compare September 11, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant