Limit the exported functions
This patch build and export only the expf, exp2f, logf, log2f, powf, sinf, cosf and sincosf. All the double and tanf are supressed for now. They are the symbols already check to provide a better performance than the one provided by bionic. The idea is to check if double precion does show improvements and use then if it is the case. By disabling build, the system one is used instead on mathtests. For x86_64 I am seeig now the following pow issues: (stdin):2794: FAIL: func=pow op1=00000000.00000000 op2=fff00000.00000000 result=7ff00000.00000000 errno=0 wrongstatus=z (stdin):2795: FAIL: func=pow op1=00000000.00000000 op2=fff00000.00000000 result=7ff00000.00000000 errno=0 errno_in=EDOM wrongstatus=z (stdin):2796: FAIL: func=pow op1=00000000.00000000 op2=fff00000.00000000 result=7ff00000.00000000 errno=0 errno_in=ERANGE wrongstatus=z This seems to be an issue with optimized-routines assumptions. POSIX 2017 states that "on systems that support the IEC 60559 Floating-Point option, if x is ±0, a pole error shall occur and pow(), powf(), and powl() shall return ±HUGE_VAL, ±HUGE_VALF, a nd ±HUGE_VALL". (stdin):3589: FAIL: func=pow op1=3ff00000.00000000 op2=7ff00000.00000001 result=7ff80000.00000000 errno=0 status=i wrongstatus=OK wrongresult=1 (stdin):3590: FAIL: func=pow op1=3ff00000.00000000 op2=7ff00000.00000001 result=7ff80000.00000000 errno=0 status=i errno_in=EDOM wrongstatus=OK wrongresult=1 (stdin):3591: FAIL: func=pow op1=3ff00000.00000000 op2=7ff00000.00000001 result=7ff80000.00000000 errno=0 status=i errno_in=ERANGE wrongstatus=OK wrongresult=1 (stdin):3649: FAIL: func=pow op1=3ff00000.00000000 op2=fff00000.00000001 result=7ff80000.00000000 errno=0 status=i wrongstatus=OK wrongresult=1 (stdin):3650: FAIL: func=pow op1=3ff00000.00000000 op2=fff00000.00000001 result=7ff80000.00000000 errno=0 status=i errno_in=EDOM wrongstatus=OK wrongresult=1 (stdin):3651: FAIL: func=pow op1=3ff00000.00000000 op2=fff00000.00000001 result=7ff80000.00000000 errno=0 status=i errno_in=ERANGE wrongstatus=OK wrongresult=1 This seems to be real issues with Bionic x86_64 pow: POSIX states that: For |x| < 1, if y is -Inf, +Inf shall be returned. For |x| > 1, if y is -Inf, +0 shall be returned. For |x| < 1, if y is +Inf, +0 shall be returned. For |x| > 1, if y is +Inf, +Inf shall be returned. So a return of 1 for y bein +-Inf seems wrong. (stdin):4744: FAIL: func=pow op1=7ff00000.00000001 op2=00000000.00000000 result=7ff80000.00000000 errno=0 status=i wrongstatus=OK wrongresult=1 (stdin):4745: FAIL: func=pow op1=7ff00000.00000001 op2=00000000.00000000 result=7ff80000.00000000 errno=0 status=i errno_in=EDOM wrongstatus=OK wrongresult=1 (stdin):4746: FAIL: func=pow op1=7ff00000.00000001 op2=00000000.00000000 result=7ff80000.00000000 errno=0 status=i errno_in=ERANGE wrongstatus=OK wrongresult=1 (stdin):4804: FAIL: func=pow op1=7ff00000.00000001 op2=80000000.00000000 result=7ff80000.00000000 errno=0 status=i wrongstatus=OK wrongresult=1 (stdin):4805: FAIL: func=pow op1=7ff00000.00000001 op2=80000000.00000000 result=7ff80000.00000000 errno=0 status=i errno_in=EDOM wrongstatus=OK wrongresult=1 (stdin):4806: FAIL: func=pow op1=7ff00000.00000001 op2=80000000.00000000 result=7ff80000.00000000 errno=0 status=i errno_in=ERANGE wrongstatus=OK wrongresult=1 This also seems to be another real issue with Bionic x86_64 pow: POSIS states: For y < 0, if x is +Inf, +0 shall be returned. For y > 0, if x is +Inf, +Inf shall be returned. [Option End] So first tree results should be +0.0 instead of 1.0 and later three should be +Inf instead of 1.0. For aarch64/arm I am now seeing 708 failed tests of a total 13938. All tests came from are wrong floating-point status exception and I will need to check optimized-routines are using correct assumptions here. There is nothing really that prevents the patch inclusion. Bug: N/A Test: ran tests Change-Id: I295f4099da1e95da89a410ee87dbbd54c97b5a47
Loading
Please register or sign in to comment