saxbophone / arby

Arbitrary precision arithmetic in C++, even at compile-time
https://saxbophone.com/arby/
Mozilla Public License 2.0
8 stars 1 forks source link

Add Signed Integer type #29

Open saxbophone opened 2 years ago

saxbophone commented 2 years ago

For those who insist that they need negative numbers.

Probably will implement as sign-magnitude with the magnitude reusing arby::Uint.

The type will probably be called arby::Sint.

saxbophone commented 2 years ago

On the other hand, it might be more in-keeping with number theory to rename arby::Uint to arby::Natural and call the signed type arby::Integer

saxbophone commented 1 year ago

Make sure that it can be correctly constructed from both uintmax_t and intmax_t: https://codereview.stackexchange.com/questions/283562/api-design-for-implementing-nan-unknown-values-for-custom-numeric-type