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

Floating point printing bug whack-a-mole #33463

Closed
StefanKarpinski opened this issue Oct 3, 2019 · 3 comments · Fixed by #33520
Closed

Floating point printing bug whack-a-mole #33463

StefanKarpinski opened this issue Oct 3, 2019 · 3 comments · Fixed by #33520
Assignees
Labels
display and printing Aesthetics and correctness of printed representations of objects.
Milestone

Comments

@StefanKarpinski
Copy link
Member

See #33185 (comment):

The value "0.025621074" is being printed as "0.025621" and not "0.0256211" in the nightly.

@StefanKarpinski StefanKarpinski added the display and printing Aesthetics and correctness of printed representations of objects. label Oct 3, 2019
@JeffBezanson JeffBezanson added this to the 1.4 milestone Oct 3, 2019
@simonbyrne
Copy link
Contributor

I’ve been looking over the Ryu code, I think I have an idea for how to do this.

@simonbyrne
Copy link
Contributor

Another thing I noticed today is that we need some more checks on Float16 behavior, i.e.

julia> Float16(65504)
Float16(65500.0)

julia> sprint(show, Float16(65504); context=:compact => true)
"65500.0"

On 1.2

julia> Float16(65504)
Float16(6.55e4)

julia> sprint(show, Float16(65504); context=:compact => true)
"65504.0"

@simonbyrne
Copy link
Contributor

c.f. #24651 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display and printing Aesthetics and correctness of printed representations of objects.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants