4 ms·
Unfortunately it's 32nds of a 100th, so they still don't work in floats (because floats are stored normalised, as 1.x in binary). Eg. 117.125
by jleahy 7y ago
Unfortunately it's 32nds of a 100th, so they still don't work in floats (because floats are stored normalised, as 1.x in binary).
Eg. 117.125
- andreareina 7y agoIs it? The NY Fed site says it's 32nds of a dollar: > • Prices are quoted in 32nds of a dollar. > [...] Note and bond prices are quoted in dollars and fractions of a dollar. By market convention, the normal fraction used for Treasury security prices is 1/32.
- jleahy 7y agoRight, but the price is about 100, not 1. If you had a price of 1.25 then you could represent this as a float as (binary) 1.01. However if you have 117.25 then that's (decimal) 1.83203125 * 2^-6. You can see how you quickly run out of bits.