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 <ron@hybridgroup.com>
Этот коммит содержится в:
родитель
b58b7c59ae
коммит
2ee4d9aaa1
3 изменённых файлов: 13 добавлений и 0 удалений
|
@ -337,6 +337,12 @@ var picolibcSourcesLarge = []string{
|
||||||
"libm/common/math_err_may_uflow.c",
|
"libm/common/math_err_may_uflow.c",
|
||||||
"libm/common/math_err_check_uflow.c",
|
"libm/common/math_err_check_uflow.c",
|
||||||
"libm/common/math_err_check_oflow.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_inexact.c",
|
||||||
"libm/common/math_inexactf.c",
|
"libm/common/math_inexactf.c",
|
||||||
"libm/common/log.c",
|
"libm/common/log.c",
|
||||||
|
|
1
testdata/math.go
предоставленный
1
testdata/math.go
предоставленный
|
@ -39,6 +39,7 @@ func main() {
|
||||||
println(" remainder:", math.Remainder(n, n+0.2))
|
println(" remainder:", math.Remainder(n, n+0.2))
|
||||||
println(" sin: ", math.Sin(n))
|
println(" sin: ", math.Sin(n))
|
||||||
println(" sinh: ", math.Sinh(n))
|
println(" sinh: ", math.Sinh(n))
|
||||||
|
println(" sqrt: ", float32(math.Sqrt(float64(n))))
|
||||||
println(" tan: ", math.Tan(n))
|
println(" tan: ", math.Tan(n))
|
||||||
println(" tanh: ", math.Tanh(n))
|
println(" tanh: ", math.Tanh(n))
|
||||||
println(" trunc: ", math.Trunc(n))
|
println(" trunc: ", math.Trunc(n))
|
||||||
|
|
6
testdata/math.txt
предоставленный
6
testdata/math.txt
предоставленный
|
@ -31,6 +31,7 @@ n: +3.000000e-001
|
||||||
remainder: -2.000000e-001
|
remainder: -2.000000e-001
|
||||||
sin: +2.955202e-001
|
sin: +2.955202e-001
|
||||||
sinh: +3.045203e-001
|
sinh: +3.045203e-001
|
||||||
|
sqrt: +5.477226e-001
|
||||||
tan: +3.093362e-001
|
tan: +3.093362e-001
|
||||||
tanh: +2.913126e-001
|
tanh: +2.913126e-001
|
||||||
trunc: +0.000000e+000
|
trunc: +0.000000e+000
|
||||||
|
@ -67,6 +68,7 @@ n: +1.500000e+000
|
||||||
remainder: -2.000000e-001
|
remainder: -2.000000e-001
|
||||||
sin: +9.974950e-001
|
sin: +9.974950e-001
|
||||||
sinh: +2.129279e+000
|
sinh: +2.129279e+000
|
||||||
|
sqrt: +1.224745e+000
|
||||||
tan: +1.410142e+001
|
tan: +1.410142e+001
|
||||||
tanh: +9.051483e-001
|
tanh: +9.051483e-001
|
||||||
trunc: +1.000000e+000
|
trunc: +1.000000e+000
|
||||||
|
@ -103,6 +105,7 @@ n: +2.600000e+000
|
||||||
remainder: -2.000000e-001
|
remainder: -2.000000e-001
|
||||||
sin: +5.155014e-001
|
sin: +5.155014e-001
|
||||||
sinh: +6.694732e+000
|
sinh: +6.694732e+000
|
||||||
|
sqrt: +1.612452e+000
|
||||||
tan: -6.015966e-001
|
tan: -6.015966e-001
|
||||||
tanh: +9.890274e-001
|
tanh: +9.890274e-001
|
||||||
trunc: +2.000000e+000
|
trunc: +2.000000e+000
|
||||||
|
@ -139,6 +142,7 @@ n: -1.100000e+000
|
||||||
remainder: -2.000000e-001
|
remainder: -2.000000e-001
|
||||||
sin: -8.912074e-001
|
sin: -8.912074e-001
|
||||||
sinh: -1.335647e+000
|
sinh: -1.335647e+000
|
||||||
|
sqrt: NaN
|
||||||
tan: -1.964760e+000
|
tan: -1.964760e+000
|
||||||
tanh: -8.004990e-001
|
tanh: -8.004990e-001
|
||||||
trunc: -1.000000e+000
|
trunc: -1.000000e+000
|
||||||
|
@ -175,6 +179,7 @@ n: -3.100000e+000
|
||||||
remainder: -2.000000e-001
|
remainder: -2.000000e-001
|
||||||
sin: -4.158066e-002
|
sin: -4.158066e-002
|
||||||
sinh: -1.107645e+001
|
sinh: -1.107645e+001
|
||||||
|
sqrt: NaN
|
||||||
tan: +4.161665e-002
|
tan: +4.161665e-002
|
||||||
tanh: -9.959494e-001
|
tanh: -9.959494e-001
|
||||||
trunc: -3.000000e+000
|
trunc: -3.000000e+000
|
||||||
|
@ -211,6 +216,7 @@ n: -3.800000e+000
|
||||||
remainder: -2.000000e-001
|
remainder: -2.000000e-001
|
||||||
sin: +6.118579e-001
|
sin: +6.118579e-001
|
||||||
sinh: -2.233941e+001
|
sinh: -2.233941e+001
|
||||||
|
sqrt: NaN
|
||||||
tan: -7.735561e-001
|
tan: -7.735561e-001
|
||||||
tanh: -9.989996e-001
|
tanh: -9.989996e-001
|
||||||
trunc: -3.000000e+000
|
trunc: -3.000000e+000
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче