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

scalbnf should wrap ldexpf #518

Open
ZERICO2005 opened this issue Nov 8, 2024 · 0 comments
Open

scalbnf should wrap ldexpf #518

ZERICO2005 opened this issue Nov 8, 2024 · 0 comments

Comments

@ZERICO2005
Copy link
Contributor

float scalbnf(float x, int exp) should wrap float ldexpf(float x, int exp) instead of doing x * exp2f((float)exp). These functions are equivalent because FLT_RADIX == 2.

This could be fixed by having scalbnf as an alias to ldexpf. Similar thing for scalblnf(float x, long exp) apart from casting long to int.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant