float16 icon indicating copy to clipboard operation
float16 copied to clipboard

Expose IS_INF and IS_NAN in API

Open nemequ opened this issue 5 years ago • 1 comments

These are useful, please expose them.

Since it would be better not to leak implementation details, I'd suggest that instead of macros you use f16_isnan and f16_isinf functions to match the standard C functions. It might also be nice to have f16_fpclassify and f16_isnormal too.

nemequ avatar Feb 18 '20 04:02 nemequ

In this case I think macros is better this stuff like f16_isinf(x) (((x) & 0x7FFF)==0x7C00) and since there is no C++ style inline functions in C it would rather be better to use macro.

artyom-beilis avatar Feb 18 '20 19:02 artyom-beilis