4 ms·
the version of this I've really wanted is hardware support for integers mod 2^64-1 with 0x1000000000000000 as a nan value. the addition and subtraction and divi
by adgjlsfhk1 3y ago
the version of this I've really wanted is hardware support for integers mod 2^64-1 with 0x1000000000000000 as a nan value. the addition and subtraction and division would be trivial. multiplication would be a tiny bit more complicated, but should be relatively doable.
there are 3 main advantages with this system
1. ability to properly represent zero division or overflow without flags/exceptions
2. abs(x) is always greater than 0
3. a mix of these and regular Ints could be used with the Chinese remainder theorem to provide faster (almost) 128 bit math.
- adgjlsfhk1 3y agoI would also be in favor of doing this for floating point (get rid of +-Inf, and -0.0 and make the only NaN value be the bitwise negation of 0.0).