Re:FloatX: A C++ Library for Customized Floating-Point Arith...
by jcranmer on Wednesday January 08, 2020 @12:14AM
(#21988557)
Emulating narrower using larger floating-point arithmetic can be dodgy, since you open yourself up to double rounding scenarios. For the IEEE 754 types (half, single, double, and quad), it is the case that the primitive operations (+, -, *, /, sqrt) are all correctly rounded if you emulated it by converting to the next size up, doing the math, and converting it down. For non-IEEE 754 types (such as bfloat16, or the x87 80-bit type), this is not the case, so double rounding is a possible concern.
[ Parent
| on HN ]
There are no comments on this comment yet.