-
Notifications
You must be signed in to change notification settings - Fork 1
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
wrong output for 1000.fmt("%e") and 1_000_000.fmt("%e") #4892
Comments
From @grondilu$ perl6 --version $ perl6 -e 'printf "%e\n", $_ for 1, 10, 100 ... 1_000_000;' Outputs for 1_000 and 1_000_000 are not what they should. |
From @lizmat
I assume this is some kind of roundoff error when using floating point calculations to determine to go to the next power: $ 6 'printf "%e\n",$_ for 11, 110, 1100 ... 1_100_000' seems pretty ok, but then the value is not near the boundary. This seems to be happening inside nqp::sprintf , and thus is really an NQP bug, or an underlying math lib bug. This reminds me of a bug my navigator has: when the distance gets below 10 km, it will show one digit of accuracy (like in 9.9). However, the cutoff point is wrong, because if the value is still 9.95 km or above, it will round to 10, and thus show 10.0 for a little while. Not sure whether this anything to do with it. Liz |
The RT System itself - Status changed from 'new' to 'open' |
Migrated from rt.perl.org#126968 (status was 'open')
Searchable as RT126968$
The text was updated successfully, but these errors were encountered: