diff options
author | Joseph Myers <joseph@codesourcery.com> | 2013-04-27 14:56:34 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2013-04-27 14:57:41 +0000 |
commit | 5b4217d71f592287bc77d80e08a20873bce86756 (patch) | |
tree | 6c0cb83177b4bee4da605e7e3c6b91f798e2204b /sysdeps | |
parent | d5ba74f76461d2eaca738413cd49bf28bebff2f1 (diff) | |
download | glibc-5b4217d71f592287bc77d80e08a20873bce86756.tar.gz glibc-5b4217d71f592287bc77d80e08a20873bce86756.tar.xz glibc-5b4217d71f592287bc77d80e08a20873bce86756.zip |
Fix catan, catanh spurious overflows (bug 15409).
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/i386/fpu/libm-test-ulps | 50 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/libm-test-ulps | 82 |
2 files changed, 132 insertions, 0 deletions
diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps index ce6654c73f..e36d0c374d 100644 --- a/sysdeps/i386/fpu/libm-test-ulps +++ b/sysdeps/i386/fpu/libm-test-ulps @@ -3480,13 +3480,49 @@ double: 1 idouble: 1 # catan +Test "Imaginary part of: catan (-0x1.fp1023 + 0x1.fp1023 i) == -1.570796326794896619231321691639751442099 + 2.871063043235098558826106732041811695767e-309 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: catan (-0x1.fp1023 - 0x1.fp1023 i) == -1.570796326794896619231321691639751442099 - 2.871063043235098558826106732041811695767e-309 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: catan (-0x1.fp127 + 0x1.fp127 i) == -1.570796326794896619231321691639751442097 + 1.516766904286822590927401983512575068153e-39 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: catan (-0x1.fp127 - 0x1.fp127 i) == -1.570796326794896619231321691639751442097 - 1.516766904286822590927401983512575068153e-39 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": double: 1 float: 1 idouble: 1 ifloat: 1 +Test "Imaginary part of: catan (0x1.fp1023 + 0x1.fp1023 i) == 1.570796326794896619231321691639751442099 + 2.871063043235098558826106732041811695767e-309 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: catan (0x1.fp1023 - 0x1.fp1023 i) == 1.570796326794896619231321691639751442099 - 2.871063043235098558826106732041811695767e-309 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: catan (0x1.fp127 + 0x1.fp127 i) == 1.570796326794896619231321691639751442097 + 1.516766904286822590927401983512575068153e-39 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: catan (0x1.fp127 - 0x1.fp127 i) == 1.570796326794896619231321691639751442097 - 1.516766904286822590927401983512575068153e-39 i": +ildouble: 1 +ldouble: 1 # catanh +Test "Real part of: catanh (-0x1.fp1023 + 0x1.fp1023 i) == -2.871063043235098558826106732041811695767e-309 + 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: catanh (-0x1.fp1023 - 0x1.fp1023 i) == -2.871063043235098558826106732041811695767e-309 - 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: catanh (-0x1.fp127 + 0x1.fp127 i) == -1.516766904286822590927401983512575068153e-39 + 1.570796326794896619231321691639751442097 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: catanh (-0x1.fp127 - 0x1.fp127 i) == -1.516766904286822590927401983512575068153e-39 - 1.570796326794896619231321691639751442097 i": +ildouble: 1 +ldouble: 1 Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": double: 2 float: 1 @@ -3499,6 +3535,18 @@ double: 1 idouble: 1 ildouble: 1 ldouble: 1 +Test "Real part of: catanh (0x1.fp1023 + 0x1.fp1023 i) == 2.871063043235098558826106732041811695767e-309 + 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: catanh (0x1.fp1023 - 0x1.fp1023 i) == 2.871063043235098558826106732041811695767e-309 - 1.570796326794896619231321691639751442099 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: catanh (0x1.fp127 + 0x1.fp127 i) == 1.516766904286822590927401983512575068153e-39 + 1.570796326794896619231321691639751442097 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: catanh (0x1.fp127 - 0x1.fp127 i) == 1.516766904286822590927401983512575068153e-39 - 1.570796326794896619231321691639751442097 i": +ildouble: 1 +ldouble: 1 # cbrt Test "cbrt (-27.0) == -3.0": @@ -6236,6 +6284,8 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Real part of "catanh": double: 2 diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps index 958848180f..43b5595c5a 100644 --- a/sysdeps/x86_64/fpu/libm-test-ulps +++ b/sysdeps/x86_64/fpu/libm-test-ulps @@ -4205,6 +4205,26 @@ double: 1 idouble: 1 # catan +Test "Imaginary part of: catan (-0x1.fp1023 + 0x1.fp1023 i) == -1.570796326794896619231321691639751442099 + 2.871063043235098558826106732041811695767e-309 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: catan (-0x1.fp1023 - 0x1.fp1023 i) == -1.570796326794896619231321691639751442099 - 2.871063043235098558826106732041811695767e-309 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: catan (-0x1.fp127 + 0x1.fp127 i) == -1.570796326794896619231321691639751442097 + 1.516766904286822590927401983512575068153e-39 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: catan (-0x1.fp127 - 0x1.fp127 i) == -1.570796326794896619231321691639751442097 - 1.516766904286822590927401983512575068153e-39 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": float: 3 ifloat: 3 @@ -4216,8 +4236,48 @@ ifloat: 1 Test "Real part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i": float: 4 ifloat: 4 +Test "Imaginary part of: catan (0x1.fp1023 + 0x1.fp1023 i) == 1.570796326794896619231321691639751442099 + 2.871063043235098558826106732041811695767e-309 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: catan (0x1.fp1023 - 0x1.fp1023 i) == 1.570796326794896619231321691639751442099 - 2.871063043235098558826106732041811695767e-309 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: catan (0x1.fp127 + 0x1.fp127 i) == 1.570796326794896619231321691639751442097 + 1.516766904286822590927401983512575068153e-39 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: catan (0x1.fp127 - 0x1.fp127 i) == 1.570796326794896619231321691639751442097 - 1.516766904286822590927401983512575068153e-39 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 # catanh +Test "Real part of: catanh (-0x1.fp1023 + 0x1.fp1023 i) == -2.871063043235098558826106732041811695767e-309 + 1.570796326794896619231321691639751442099 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: catanh (-0x1.fp1023 - 0x1.fp1023 i) == -2.871063043235098558826106732041811695767e-309 - 1.570796326794896619231321691639751442099 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: catanh (-0x1.fp127 + 0x1.fp127 i) == -1.516766904286822590927401983512575068153e-39 + 1.570796326794896619231321691639751442097 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: catanh (-0x1.fp127 - 0x1.fp127 i) == -1.516766904286822590927401983512575068153e-39 - 1.570796326794896619231321691639751442097 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": double: 4 idouble: 4 @@ -4234,6 +4294,26 @@ ldouble: 1 Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i": float: 6 ifloat: 6 +Test "Real part of: catanh (0x1.fp1023 + 0x1.fp1023 i) == 2.871063043235098558826106732041811695767e-309 + 1.570796326794896619231321691639751442099 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: catanh (0x1.fp1023 - 0x1.fp1023 i) == 2.871063043235098558826106732041811695767e-309 - 1.570796326794896619231321691639751442099 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: catanh (0x1.fp127 + 0x1.fp127 i) == 1.516766904286822590927401983512575068153e-39 + 1.570796326794896619231321691639751442097 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: catanh (0x1.fp127 - 0x1.fp127 i) == 1.516766904286822590927401983512575068153e-39 - 1.570796326794896619231321691639751442097 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 # cbrt Test "cbrt (-0.001) == -0.1": @@ -6780,6 +6860,8 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Real part of "catanh": double: 4 |