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: preserve numerical precision on unary negation #3242

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

itchyny
Copy link
Contributor

@itchyny itchyny commented Jan 30, 2025

This commit fixes #2704.

 $ ./jq -n '[1234567890987654321,-1234567890987654321 | tojson]'
[
  "1234567890987654321",
  "-1234567890987654321"
]

@itchyny itchyny added the bug label Jan 30, 2025
@itchyny itchyny added this to the 1.8 release milestone Jan 30, 2025
@itchyny itchyny force-pushed the unary-negation-preserve-precision branch from 14eb4a8 to ed38840 Compare January 30, 2025 12:00
@itchyny itchyny changed the title fix: preserve numerical precision on unary negation (fix #2704) fix: preserve numerical precision on unary negation Jan 30, 2025
@itchyny itchyny force-pushed the unary-negation-preserve-precision branch 3 times, most recently from 20a5e0a to 1e58b2f Compare February 2, 2025 15:55
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.

bug: preservation of literal numbers
1 participant