You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docs explain that only round-nearest-even is supported, which
is fine for all the normal operators, but a bit more problematic for
float -> int conversion where it is likely we need more control.
Given the lack of math.h, people will reach for int x=(int)f;, but the implementation
applies RNE, so we lose compatibility with C which expects RTZ, and code will
silently break. This can be problematic for things like special functions, where
there is often table-lookup for coefficients based on an integer/fractional split.
If the altera float->fixed IP supports a dynamic rounding config, could that
be used to support both RTZ and RNE (and RDN & RDU)?
If not, it would be helpful to add modes to the existing elf checker somehow,
so that people know if an unsupported rounding mode had crept in.
The text was updated successfully, but these errors were encountered:
The docs explain that only round-nearest-even is supported, which
is fine for all the normal operators, but a bit more problematic for
float -> int conversion where it is likely we need more control.
Given the lack of math.h, people will reach for
int x=(int)f;
, but the implementationapplies RNE, so we lose compatibility with C which expects RTZ, and code will
silently break. This can be problematic for things like special functions, where
there is often table-lookup for coefficients based on an integer/fractional split.
If the altera float->fixed IP supports a dynamic rounding config, could that
be used to support both RTZ and RNE (and RDN & RDU)?
If not, it would be helpful to add modes to the existing elf checker somehow,
so that people know if an unsupported rounding mode had crept in.
The text was updated successfully, but these errors were encountered: