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

log10 generate wrong odd result when input is a float type number equal to pow(1.0, a negative even number) #44

Open
a5632645 opened this issue Jun 9, 2024 · 0 comments

Comments

@a5632645
Copy link

a5632645 commented Jun 9, 2024

Snipaste_2024-06-09_16-48-34

When input is 1.0 to a negative even float type number, gcem::log10 return a wrong negative odd number.

Eg: gcem::log10(0.01) = -1.0f, should be -2.0f

Tested with 1e-2f to 1e-26f, only the 1e-22f is right.
In double and long double type, this also happens to 1e-12 and 1e-14.

Envrioment: MSVC 14.41.33901, C++20 std
GCE-Math version 1.18.0

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

No branches or pull requests

1 participant