-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
Incorrect return values for pow(-1,nan) and tgamma(-inf) (IDFGH-5559) #7282
Comments
@dpgeorge I think I found the issue with the |
It's been fixed, but only very recently: https://sourceware.org/git/?p=newlib-cygwin.git;a=commit;h=bb25dd1b0f39f343b764fd0db861cb9a30441407 |
@dpgeorge we should have a fix for this issue very soon, as we will be upgrading toolchains to 2022r1. |
Closes espressif#7282 TODO Closes
@dpgeorge Note that the fix for |
OK, thanks for fixing! |
Environment
Problem Description
The return value of
pow(-1, NAN)
andtgamma(-INFINITY)
are incorrect (according to standard C function semantics).Expected Behavior
pow(-1, NAN)
should returnNAN
; see https://pubs.opengroup.org/onlinepubs/9699919799/functions/pow.htmltgamma(-INFINITY)
should returnNAN
; see https://pubs.opengroup.org/onlinepubs/9699919799/functions/tgamma.htmlActual Behavior
pow(-1, NAN)
returns-1.000
tgamma(-INFINITY)
returnsINFINITY
Steps to reproduce / code
Create a simple program (eg based on hello_world) and add these lines:
Then compile, flash, run, and inspect output.
The text was updated successfully, but these errors were encountered: