-
-
Notifications
You must be signed in to change notification settings - Fork 119
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
Non-integer decimal numbers lose precision #216
Comments
This is related to the issue #212 and will be resolved by the |
@itchyny for clarity, that would solve the pass thru part but not doing operations? For reference @matthewdale did a draft PR for decimal support in the fq fork wader#1 but i'm a bit reluctant to add more difference to upstream unless it can be done in a easy rebase-able and maintainable way |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Parsing a non-integer decimal number with more than about 16 digits will truncate the precision of the number to the what can be represented by a
float64
:In comparison,
jq
will preserve all of the decimal precision for non-arithmetic operations (e.g..
andtojson
):gojq
currently supports arbitrary precision for integer values, including integer arithmetic operations. It would be great if it also supported arbitrary precision for non-integer decimal values for "passthrough" operations, and possibly arithmetic operations.The text was updated successfully, but these errors were encountered: