-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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 result when logging subnormal floating-point number to console. #17500
Labels
util
Issues and PRs related to the built-in util module.
Comments
ealmansi
changed the title
Incorrect result when logging subnormal floating point number to console.
Incorrect result when logging subnormal floating-point number to console.
Dec 6, 2017
cc @jpdjere |
FWIW, the output in the Chrome and Node.js REPL differ here: > -5e-324
-0
> ' ' + -5e-324
' -5e-324' Google Chrome 65.0.3286.0: -5e-324
-5e-324
' ' + -5e-324
" -5e-324" |
2 tasks
mscdex
added
util
Issues and PRs related to the built-in util module.
v8.x
and removed
v8.x
labels
Dec 7, 2017
This already got fixed by #17507 Closing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Logging a subnormal floating-point number to console prints
-0
instead of the correct number when passed as first argument toconsole.log
. It prints the correct number if passed in as the second argument.Steps to reproduce:
Expected output:
Actual output:
Additional info:
I tested this code sample and can confirm incorrect output for versions 8.9.1, 8.9.2, and 9.x.
The same code sample produces the expected output in version 8.3.
The text was updated successfully, but these errors were encountered: