#positive #negative #numbers #operations #zero #witness #output

numwit

witness types and operations for numbers which are positive or negative (but not zero)

1 unstable release

0.1.0 Jan 12, 2023

#5 in #witness

MIT/Apache

23KB
426 lines

numwit

Witness types and operations for numbers which are Positive or Negative, but not zero.

Operation LHS RHS Output Assignable?
Add Positive Positive Positive Yes
Negative Negative Negative Yes
Positive Negative ? No
Negative Positive ? No
Positive impl Unsigned Positive Yes
Negative impl Unsigned ? No
Sub Positive Positive ? No
Negative Negative ? No
Positive Negative Positive Yes
Negative Positive Negative Yes
Positive impl Unsigned ? No
Negative impl Unsigned Negative Yes
Mul Positive Positive Positive Yes
Negative Negative Positive No
Positive Negative Negative No
Negative Positive Negative Yes
Positive impl Unsigned ? No
Negative impl Unsigned ? No
Div Positive Positive Positive Yes
Negative Negative Positive No
Positive Negative Negative No
Negative Positive Negative Yes
Positive impl Unsigned Positive Yes
Negative impl Unsigned Negative Yes
Neg Positive Negative
Negative Positive

License: MIT or Apache-2.0

Dependencies

~0.8–1.5MB
~32K SLoC