-
Notifications
You must be signed in to change notification settings - Fork 83
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
regression (jaq 1.6 gave correct answer) #240
Comments
Tried to minimize it down a bit: $ jaq -n '1e20/2 | floor, trunc'
9223372036854775807
5e19
$ jq -n '1e20/2 | floor, trunc'
5e+19
5e+19
$ gojq -n '1e20/2 | floor, trunc'
50000000000000000000
50000000000000000000 with |
I currently do not know why jaq 1.6 seems to output the correct answer, but when you change As a rule of thumb: When you treat numbers that might not fit into machine-size integers, then use |
I wonder if this was also due to #219 lol? |
@null-dev, your hypothesis looks quite plausible! |
Presumably there's an explanation for why jaq 1.6 gave the correct
answer for a particular problem at
https://rosettacode.org/wiki/Sum_multiples_of_3_and_5#jq (reproduced
below), whereas jaq 2.0.0 gives a very different (incorrect) answer,
but is it a sufficiently good one?
##########################
The text was updated successfully, but these errors were encountered: