Patchwork test/math: Adjust arm tests for older ULPs format

login
register
mail settings
Submitter Gregory Fong
Date April 21, 2014, 7:08 p.m.
Message ID <1398107283-25586-1-git-send-email-gregory.0xf0@gmail.com>
Download mbox | patch
Permalink /patch/340903/
State Accepted
Commit 3a3b2e42e5a59bac00a7eefaf030e50e948425e2
Headers show

Comments

Gregory Fong - April 21, 2014, 7:08 p.m.
The ULPs format in glibc has changed slightly and now deviates from
that in uClibc, so when using the files directly from glibc, for
certain types of tests the ULPs values were incorrectly defaulting to
0 rather than using the values provided.  This caused some tests to
fail despite the max ULPs being correctly marked.

Regenerated and updated part of the ULPs file to fix this issue.  This
also added values for exp and log.

Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>
---
 test/math/libm-test-ulps-arm | 53 ++++++++++++++++++++++++++++----------------
 1 file changed, 34 insertions(+), 19 deletions(-)
aldot - April 23, 2014, 2:08 p.m.
On 21 April 2014 21:08, Gregory Fong <gregory.0xf0@gmail.com> wrote:
> The ULPs format in glibc has changed slightly and now deviates from
> that in uClibc, so when using the files directly from glibc, for
> certain types of tests the ULPs values were incorrectly defaulting to
> 0 rather than using the values provided.  This caused some tests to
> fail despite the max ULPs being correctly marked.
>
> Regenerated and updated part of the ULPs file to fix this issue.  This
> also added values for exp and log.
>
> Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>

Applied, thanks!

Patch

diff --git a/test/math/libm-test-ulps-arm b/test/math/libm-test-ulps-arm
index 7a421bf..d2d4e05 100644
--- a/test/math/libm-test-ulps-arm
+++ b/test/math/libm-test-ulps-arm
@@ -3135,10 +3135,11 @@  ifloat: 1
 Test "cos (0x1p+127)":
 float: 1
 ifloat: 1
-Test "cos (M_PI_6l * 2.0)":
+Test "cos (M_PI_6l * 2.0) == 0.5":
 double: 1
 idouble: 1
-Test "cos (M_PI_6l * 4.0)":
+ifloat: 1
+Test "cos (M_PI_6l * 4.0) == -0.5":
 double: 2
 float: 1
 idouble: 2
@@ -3478,7 +3479,10 @@  idouble: 2
 ifloat: 1
 
 # erf
-Test "erf (1.25)":
+Test "erf (0.75) == 0.711155633653515131598937834591410777":
+double: 1
+idouble: 1
+Test "erf (1.25) == 0.922900128256458230136523481197281140":
 double: 1
 idouble: 1
 
@@ -3492,7 +3496,12 @@  ifloat: 1
 Test "erfc (2.0)":
 double: 1
 idouble: 1
-Test "erfc (4.125)":
+Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8":
+double: 1
+idouble: 1
+
+# exp
+Test "exp (1) == e":
 double: 1
 idouble: 1
 
@@ -3535,7 +3544,7 @@  float: 1
 ifloat: 1
 
 # expm1
-Test "expm1 (0.75)":
+Test "expm1 (0.75) == 1.11700001661267466854536981983709561":
 double: 1
 idouble: 1
 Test "expm1 (1)":
@@ -3558,28 +3567,28 @@  idouble: 1
 ifloat: 2
 
 # hypot
-Test "hypot (-0.7, -12.4)":
+Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
 float: 1
 ifloat: 1
-Test "hypot (-0.7, 12.4)":
+Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271":
 float: 1
 ifloat: 1
-Test "hypot (-12.4, -0.7)":
+Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271":
 float: 1
 ifloat: 1
-Test "hypot (-12.4, 0.7)":
+Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271":
 float: 1
 ifloat: 1
-Test "hypot (0.7, -12.4)":
+Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271":
 float: 1
 ifloat: 1
-Test "hypot (0.7, 12.4)":
+Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271":
 float: 1
 ifloat: 1
-Test "hypot (12.4, -0.7)":
+Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271":
 float: 1
 ifloat: 1
-Test "hypot (12.4, 0.7)":
+Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271":
 float: 1
 ifloat: 1
 
@@ -3744,24 +3753,22 @@  idouble: 1
 ifloat: 2
 
 # lgamma
-Test "lgamma (0.7)":
+Test "lgamma (0.7) == 0.260867246531666514385732417016759578":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
-Test "lgamma (1.2)":
+Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1":
 double: 1
 float: 2
 idouble: 1
 ifloat: 2
 
 # log10
-Test "log10 (0.75)":
+Test "log10 (0.75) == -0.124938736608299953132449886193870744":
 double: 1
-float: 2
 idouble: 1
-ifloat: 2
-Test "log10 (e)":
+Test "log10 (e) == log10(e)":
 float: 1
 ifloat: 1
 
@@ -4807,6 +4814,10 @@  float: 1
 idouble: 1
 ifloat: 1
 
+Function: "exp":
+double: 1
+idouble: 1
+
 Function: "exp10":
 double: 1
 idouble: 1
@@ -4863,6 +4874,10 @@  float: 2
 idouble: 1
 ifloat: 2
 
+Function: "log":
+float: 1
+ifloat: 1
+
 Function: "log10":
 double: 1
 float: 2