Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose IS_INF and IS_NAN in API #4

Open
nemequ opened this issue Feb 18, 2020 · 1 comment
Open

Expose IS_INF and IS_NAN in API #4

nemequ opened this issue Feb 18, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@nemequ
Copy link

nemequ commented Feb 18, 2020

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.

@artyom-beilis
Copy link
Owner

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 artyom-beilis added the enhancement New feature or request label Feb 18, 2020
@artyom-beilis artyom-beilis self-assigned this Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants