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

Ryu: add support for maximum significant digits #33520

Merged
merged 8 commits into from
Oct 17, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add tests for printing subnormals
  • Loading branch information
simonbyrne committed Oct 16, 2019
commit fb7865e413b50f38f770c4fede5b3216a8f00cb1
5 changes: 5 additions & 0 deletions test/ryu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,11 @@ end # exp
@test stringcompact(1.015625) == "1.01562"
@test stringcompact(1.046875) == "1.04688"
@test stringcompact(0.025621074) == "0.0256211"

# subnormals
@test stringcompact(eps(0.0)) == "5.0e-324"
@test stringcompact(eps(0f0)) == "1.0f-45"
@test stringcompact(eps(Float16(0.0))) == "6.0e-8"
end

end # Ryu