Closed gussmith23 closed 5 years ago
I messaged Bill to see what he has to say about it -- hopefully this compromise is still useful.
yes, using float64 to visualize the bins of lower-precision float/posit16 is totally reasonable I'm pretty sure that JS is just all doubles? Like literally everyhthing, including integers, is a float64? which should make your life easier, because I think it will work up to modeling 32-bit things
This was easier than expected. I just computed the rounding tie-points, which is either the arithmetic or geometric mean between two posits (based on whether you're rounding an exponent or fraction bit). See calculateRoundingTiePoint
.
The way I'm thinking about doing this is somewhat of a compromise on the "ideal" solution. The "ideal" (read: impossible) solution is to, for any given posit, give the lowest and highest real numbers that will round to this number. The reals are continuous, though, so this is impossible as stated. The way I think we can do it (fairly easily) is to compute the lowest and highest float32s that will round to the number.