itchyny / gojq

Pure Go implementation of jq
MIT License
3.3k stars 119 forks source link

Tests fail for s390x in Fedora since 0.12.15 #247

Closed mikelolasagasti closed 7 months ago

mikelolasagasti commented 7 months ago

Tests fail for 0.12.15 in Fedora for s390x arch. Tested for rawhide, F41 & F40. Builds for 0.12.14 are fine.

--- FAIL: TestCliRun (1.14s)
    --- FAIL: TestCliRun/exp,_exp10,_exp2,_expm1_functions (0.00s)
        cli_test.go:87: standard output:
              strings.Join({
                "[1,0.606530659,2.718281828,0.22313016,7.389056098,22026.46579480",
                "6,2.6881171418161356e+43]\n[1,0.316227766,10,0.031622776,100,1000",
                "0000000,1",
            -   ".0000000000000002",
                "e+100]\n[1,0.707106781,2,0.35355339,4,1024,1.2676506002282294e+30",
                "]\n[0,-0.393469341,1.718281828,-0.77686984,6.389056098,22025.4657",
                "94806,2.6881171418161356e+43]\n",
              }, "")

    --- FAIL: TestCliRun/atan2/2,_hypot/2_functions (0.00s)
        cli_test.go:87: standard output:
              strings.Join({
                "[0,1.5707963267948966,0,0.785398163397448",
            -   "3",
            +   "4",
                ",3.141592653589793,2.819842099193151]\n[0,3.75,12,5,6.25,13,16,16",
                ".433578429544795,20]\n",
              }, "")

FAIL
exit status 1
itchyny commented 7 months ago

Could you paste the result of the following command?

gojq -n -c '[range(0; 100; 10) | exp10 * 1000000000 | floor / 1000000000]'
mikelolasagasti commented 7 months ago
$ /builddir/build/BUILDROOT/gojq-0.12.15-1.fc41.s390x/usr/bin/gojq -n -c '[range(0; 100; 10) | exp10 * 1000000000 | floor / 1000000000]'
[1,10000000000,99999999999999980000,1.0000000000000002e+30,1e+40,1e+50,1e+60,9.999999999999999e+69,1e+80,1e+90]
itchyny commented 7 months ago

Thank you, I fixed the tests.