1 Commits
Author SHA1 Message Date
fhgffy afa23a53cd Keep the sign of zero when negating a number literal (#3662)
Since jq 1.8.0, negating a number literal computed 0 - x, so -0 and
0 | -. printed 0 while (0+0) | -. printed -0.

Flip the sign bit with decNumberCopyNegate() instead, so -0 prints -0
again as it did in jq 1.7, and -(-0) is still 0.
2026-10-20 22:16:56 +09:00