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.
The implementations for cadd, csub etc. need to be adjusted accordingly.
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
Fixedsupported 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 tou128just likei64.Fixed<NonZeroU64>. Same as before except it also has a niche.The implementations for
cadd,csubetc. need to be adjusted accordingly.