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

Fix compact float printing when output contains exactly 6 digits #36819

Merged
merged 1 commit into from
Jul 27, 2020

Conversation

quinnj
Copy link
Member

@quinnj quinnj commented Jul 27, 2020

This was really just a regression when switching from grisu -> ryu
algorithm for float printing. The fix is just putting @vtjnash's
code

for the grisu fix into the ryu branch.

Can perhaps still be included in 1.5?

This was really just a regression when switching from grisu -> ryu
algorithm for float printing. The fix is just putting [@vtjnash's
code](5d2a0ec#diff-22819a3d47074bbe6530dfef9c94969cR75)
for the grisu fix into the ryu branch.
@quinnj quinnj merged commit bb90d64 into master Jul 27, 2020
@quinnj quinnj deleted the jq/36234 branch July 27, 2020 16:37
@quinnj quinnj mentioned this pull request Aug 3, 2020
25 tasks
@andreasnoack
Copy link
Member

@quinnj What is the reason for switching to scientific notation when the first digit is non-zero?

julia> sprint(show, 666666.049, context=:compact => true)
"666666.0"

julia> sprint(show, 666666.05, context=:compact => true)
"6.66666e5"

julia> sprint(show, 666667.049, context=:compact => true)
"666667.0"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants