diff options
author | deadprogram <[email protected]> | 2023-12-08 18:45:07 +0100 |
---|---|---|
committer | Ron Evans <[email protected]> | 2023-12-09 07:47:27 +0100 |
commit | 2ee4d9aaa13a0e5ad8a754b6989c41faa7a6d08d (patch) | |
tree | 2e0cc20aff0cad50e6f1e1de6b8707460e42efb0 /testdata | |
parent | b58b7c59ae81cb2d1679395d89abc099759bb3a9 (diff) | |
download | tinygo-2ee4d9aaa13a0e5ad8a754b6989c41faa7a6d08d.tar.gz tinygo-2ee4d9aaa13a0e5ad8a754b6989c41faa7a6d08d.zip |
builder/picolib: add needed file for compiling math functions with error support.
Thanks to @aykevl for actually finding and providing this fix, I really just
reported the problem and tested the fix.
Signed-off-by: deadprogram <[email protected]>
Diffstat (limited to 'testdata')
-rw-r--r-- | testdata/math.go | 1 | ||||
-rw-r--r-- | testdata/math.txt | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/testdata/math.go b/testdata/math.go index eceb39f3c..58b19096a 100644 --- a/testdata/math.go +++ b/testdata/math.go @@ -39,6 +39,7 @@ func main() { println(" remainder:", math.Remainder(n, n+0.2)) println(" sin: ", math.Sin(n)) println(" sinh: ", math.Sinh(n)) + println(" sqrt: ", float32(math.Sqrt(float64(n)))) println(" tan: ", math.Tan(n)) println(" tanh: ", math.Tanh(n)) println(" trunc: ", math.Trunc(n)) diff --git a/testdata/math.txt b/testdata/math.txt index 473ca4fe1..8c8da627a 100644 --- a/testdata/math.txt +++ b/testdata/math.txt @@ -31,6 +31,7 @@ n: +3.000000e-001 remainder: -2.000000e-001 sin: +2.955202e-001 sinh: +3.045203e-001 + sqrt: +5.477226e-001 tan: +3.093362e-001 tanh: +2.913126e-001 trunc: +0.000000e+000 @@ -67,6 +68,7 @@ n: +1.500000e+000 remainder: -2.000000e-001 sin: +9.974950e-001 sinh: +2.129279e+000 + sqrt: +1.224745e+000 tan: +1.410142e+001 tanh: +9.051483e-001 trunc: +1.000000e+000 @@ -103,6 +105,7 @@ n: +2.600000e+000 remainder: -2.000000e-001 sin: +5.155014e-001 sinh: +6.694732e+000 + sqrt: +1.612452e+000 tan: -6.015966e-001 tanh: +9.890274e-001 trunc: +2.000000e+000 @@ -139,6 +142,7 @@ n: -1.100000e+000 remainder: -2.000000e-001 sin: -8.912074e-001 sinh: -1.335647e+000 + sqrt: NaN tan: -1.964760e+000 tanh: -8.004990e-001 trunc: -1.000000e+000 @@ -175,6 +179,7 @@ n: -3.100000e+000 remainder: -2.000000e-001 sin: -4.158066e-002 sinh: -1.107645e+001 + sqrt: NaN tan: +4.161665e-002 tanh: -9.959494e-001 trunc: -3.000000e+000 @@ -211,6 +216,7 @@ n: -3.800000e+000 remainder: -2.000000e-001 sin: +6.118579e-001 sinh: -2.233941e+001 + sqrt: NaN tan: -7.735561e-001 tanh: -9.989996e-001 trunc: -3.000000e+000 |