You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ go run cmd/gojq/main.go -n '2147483647 as $maxHalfInt | -1 % ($maxHalfInt, $maxHalfInt+1)'
-1
2147483647
Im not that familiar with modulus math but the comment for *big.Int Mod might be a clue:
Mod sets z to the modulus x%y for y != 0 and returns z. If y == 0, a division-by-zero run-time panic occurs. Mod implements Euclidean modulus (unlike Go); see DivMod for more details.
The text was updated successfully, but these errors were encountered:
$ go run cmd/gojq/main.go -n '2147483647 as $maxHalfInt | -1 % ($maxHalfInt, $maxHalfInt+1)' -1 2147483647
Im not that familiar with modulus math but the comment for *big.Int Mod might be a clue:
The text was updated successfully, but these errors were encountered: