You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've thought about it, and it would be a nice feature, but I'm afraid to complicate things while all FixedPoint instances are generated by a macro. I want to reconsider this idea after moving to const generics.
Sometimes it is obvious that a number cannot be negative (or zero). It is also true of fixed point numbers.
Given this, it would be nice if
Fixed
supported using the extra bit for the precision, e.g.Fixed<u64>
which itself starts from zero, and doesn't carry the sign bit. Internally promotes tou128
just likei64
.Fixed<NonZeroU64>
. Same as before except it also has a niche.The implementations for
cadd
,csub
etc. need to be adjusted accordingly.The text was updated successfully, but these errors were encountered: