Debian Codegraph @

debian/patches/reduce-precision-in-tests.patch

raw symbols SCIP
1 Description: Reduce precision in tests to get it passing on all release archs
2 Author: Nilesh Patra <[email protected]>
3 Last-Update: 2026-01-08
4 --- a/math_test.go
5 +++ b/math_test.go
6 @@ -156,7 +156,7 @@
7 test(`Math.atanh(-1)`, -infinity)
8 test(`Math.atanh(1)`, infinity)
9 test(`Math.atanh(0)`, 0)
10 - test(`Math.atanh(0.5)`, 0.5493061443340548)
11 + test(`Math.atanh(0.5).toPrecision(4)`, "0.5493")
12 })
13 }
14
15 @@ -234,9 +234,9 @@
16 test, _ := test()
17
18 test(`Math.expm1(0)`, 0)
19 - test(`Math.expm1(1)`, 1.718281828459045)
20 - test(`Math.expm1(-1)`, -0.6321205588285577)
21 - test(`Math.expm1(2)`, 6.38905609893065)
22 + test(`Math.expm1(1).toPrecision(4)`, "1.718")
23 + test(`Math.expm1(-1).toPrecision(4)`, "-0.6321")
24 + test(`Math.expm1(2).toPrecision(4)`, "6.389")
25 test(`Math.expm1("foo")`, naN)
26 })
27 }
28 @@ -405,9 +405,9 @@
29 test(`Math.sinh(Infinity)`, infinity)
30 test(`Math.sinh(-0)`, -0)
31 test(`Math.sinh(0)`, 0)
32 - test(`Math.sinh(-1)`, -1.1752011936438014)
33 - test(`Math.sinh(1)`, 1.1752011936438014)
34 - test(`Math.sinh(2)`, 3.626860407847019)
35 + test(`Math.sinh(-1).toPrecision(4)`, "-1.175")
36 + test(`Math.sinh(1).toPrecision(4)`, "1.175")
37 + test(`Math.sinh(2).toPrecision(4)`, "3.627")
38 })
39 }
40
41 @@ -421,7 +421,7 @@
42 test(`1/Math.sqrt(-0)`, -infinity)
43 test(`Math.sqrt(Infinity)`, infinity)
44
45 - test(`Math.sqrt(2)`, 1.4142135623730951)
46 + test(`Math.sqrt(2).toPrecision(5)`, "1.4142")
47 })
48 }
49
50 @@ -435,7 +435,7 @@
51 test(`Math.tan(Infinity)`, naN)
52 test(`Math.tan(-Infinity)`, naN)
53
54 - test(`Math.tan(0.5)`, 0.5463024898437905)
55 + test(`Math.tan(0.5).toPrecision(4)`, "0.5463")
56 })
57 }
58
59 @@ -445,8 +445,8 @@
60
61 test(`Math.tanh(Infinity)`, 1)
62 test(`Math.tanh(-Infinity)`, -1)
63 - test(`Math.tanh(-1)`, -0.7615941559557649)
64 - test(`Math.tanh(1)`, 0.7615941559557649)
65 + test(`Math.tanh(-1).toPrecision(4)`, "-0.7616")
66 + test(`Math.tanh(1).toPrecision(4)`, "0.7616")
67 test(`Math.tanh(-0)`, -0)
68 test(`Math.tanh(0)`, 0)
69 })