diff --git a/builder/picolibc.go b/builder/picolibc.go index 91ad27be..ab49ba5a 100644 --- a/builder/picolibc.go +++ b/builder/picolibc.go @@ -337,6 +337,12 @@ var picolibcSourcesLarge = []string{ "libm/common/math_err_may_uflow.c", "libm/common/math_err_check_uflow.c", "libm/common/math_err_check_oflow.c", + "libm/common/math_errf_divzerof.c", + "libm/common/math_errf_invalidf.c", + "libm/common/math_errf_may_uflowf.c", + "libm/common/math_errf_oflowf.c", + "libm/common/math_errf_uflowf.c", + "libm/common/math_errf_with_errnof.c", "libm/common/math_inexact.c", "libm/common/math_inexactf.c", "libm/common/log.c", diff --git a/testdata/math.go b/testdata/math.go index eceb39f3..58b19096 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 473ca4fe..8c8da627 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