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

Increase float precision #449

Merged
merged 1 commit into from
Nov 28, 2018
Merged

Increase float precision #449

merged 1 commit into from
Nov 28, 2018

Conversation

vektah
Copy link
Collaborator

@vektah vektah commented Nov 26, 2018

Even though floats internally were being stored as float64, they were being encoded using "%f", which limits the outgoing precision to 6 decimal places.

This swaps over to use "%g" which will show up to 17 decimal places, and fall back to scientific notation when the exponent gets large.

Fix #424

I have:

  • Added tests covering the bug / feature (see testing)

@vektah vektah merged commit e4bad0e into master Nov 28, 2018
@vektah vektah deleted the increase-float-precision branch November 28, 2018 01:54
cgxxv pushed a commit to cgxxv/gqlgen that referenced this pull request Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants