about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-05-01 10:07:00 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-05-01 10:07:00 +0000
commit10de07f5fdd9eaf3a808d4461401f5b661095614 (patch)
tree844a1ed48df767e65d46a429f0e1b062e0e2fad5 /sysdeps
parentcb4d54147e620f4267d1c675bf2daec0a8e7c809 (diff)
downloadglibc-10de07f5fdd9eaf3a808d4461401f5b661095614.tar.gz
glibc-10de07f5fdd9eaf3a808d4461401f5b661095614.tar.xz
glibc-10de07f5fdd9eaf3a808d4461401f5b661095614.zip
Fix catan, catanh spurious underflows (bug 15423).
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/i386/fpu/libm-test-ulps144
-rw-r--r--sysdeps/x86_64/fpu/libm-test-ulps232
2 files changed, 376 insertions, 0 deletions
diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps
index a3f58447d9..081559257d 100644
--- a/sysdeps/i386/fpu/libm-test-ulps
+++ b/sysdeps/i386/fpu/libm-test-ulps
@@ -3497,6 +3497,12 @@ ldouble: 1
 Test "Imaginary part of: catan (-0x1.000002p0 - 0x1p-13 i) == -7.853982267273793866654490522673596014524e-1 - 6.103514882246036852433556327261700380577e-5 i":
 double: 1
 idouble: 1
+Test "Imaginary part of: catan (-0x1.3p-73 + 1.0 i) == -7.853981633974483096156922786831527361009e-1 + 2.556052055225464683726753902092495938633e1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (-0x1.3p-73 - 1.0 i) == -7.853981633974483096156922786831527361009e-1 - 2.556052055225464683726753902092495938633e1 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
@@ -3509,15 +3515,45 @@ 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 (-0x1p-1020 + 1.0 i) == -7.853981633974483096156608458198757210493e-1 + 3.538516356758520804574969980043991380025e2 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (-0x1p-1020 - 1.0 i) == -7.853981633974483096156608458198757210493e-1 - 3.538516356758520804574969980043991380025e2 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (-0x1p-1022 + 0x0.ffffffffffffffffp0 i) == -2.052268400649188124723641491045245971623e-289 + 2.252728336819822255604649142023466965703e1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (-0x1p-1022 - 0x0.ffffffffffffffffp0 i) == -2.052268400649188124723641491045245971623e-289 - 2.252728336819822255604649142023466965703e1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (-0x1p-16382 + 0x0.ffffffffffffffffp0 i) == -3.100992811520163369065387859792822623745e-4913 + 2.252728336819822255604649142023466965703e1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (-0x1p-16382 - 0x0.ffffffffffffffffp0 i) == -3.100992811520163369065387859792822623745e-4913 - 2.252728336819822255604649142023466965703e1 i":
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: catan (-0x1p-33 + 0x0.ffffffffffffffffp0 i) == -7.853981631937214964185249205444919953948e-1 + 1.178350206951907026002603046195591193050e1 i":
 ildouble: 1
 ldouble: 1
 Test "Imaginary part of: catan (-0x1p-33 - 0x0.ffffffffffffffffp0 i) == -7.853981631937214964185249205444919953948e-1 - 1.178350206951907026002603046195591193050e1 i":
 ildouble: 1
 ldouble: 1
+Test "Imaginary part of: catan (-0x1p-64 + 1.0 i) == -7.853981633974483096292133729759445264744e-1 + 2.252728336819822255606004394739073846245e1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (-0x1p-64 - 1.0 i) == -7.853981633974483096292133729759445264744e-1 - 2.252728336819822255606004394739073846245e1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (-1.0 + 0x1p-64 i) == -7.853981633974483096156608458198757210500e-1 + 2.710505431213761085018632002174854278563e-20 i":
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: catan (-1.0 - 0x1p-13 i) == -7.853981671227386080775748393881580082970e-1 - 6.103515609841754902688560615027452023669e-5 i":
 ildouble: 1
 ldouble: 1
+Test "Imaginary part of: catan (-1.0 - 0x1p-64 i) == -7.853981633974483096156608458198757210500e-1 - 2.710505431213761085018632002174854278563e-20 i":
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
 double: 1
 float: 1
@@ -3540,6 +3576,12 @@ ldouble: 1
 Test "Imaginary part of: catan (0x1.000002p0 - 0x1p-13 i) == 7.853982267273793866654490522673596014524e-1 - 6.103514882246036852433556327261700380577e-5 i":
 double: 1
 idouble: 1
+Test "Imaginary part of: catan (0x1.3p-73 + 1.0 i) == 7.853981633974483096156922786831527361009e-1 + 2.556052055225464683726753902092495938633e1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (0x1.3p-73 - 1.0 i) == 7.853981633974483096156922786831527361009e-1 - 2.556052055225464683726753902092495938633e1 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
@@ -3552,20 +3594,62 @@ 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 (0x1p-1020 + 1.0 i) == 7.853981633974483096156608458198757210493e-1 + 3.538516356758520804574969980043991380025e2 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (0x1p-1020 - 1.0 i) == 7.853981633974483096156608458198757210493e-1 - 3.538516356758520804574969980043991380025e2 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (0x1p-1022 + 0x0.ffffffffffffffffp0 i) == 2.052268400649188124723641491045245971623e-289 + 2.252728336819822255604649142023466965703e1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (0x1p-1022 - 0x0.ffffffffffffffffp0 i) == 2.052268400649188124723641491045245971623e-289 - 2.252728336819822255604649142023466965703e1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (0x1p-16382 + 0x0.ffffffffffffffffp0 i) == 3.100992811520163369065387859792822623745e-4913 + 2.252728336819822255604649142023466965703e1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (0x1p-16382 - 0x0.ffffffffffffffffp0 i) == 3.100992811520163369065387859792822623745e-4913 - 2.252728336819822255604649142023466965703e1 i":
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: catan (0x1p-33 + 0x0.ffffffffffffffffp0 i) == 7.853981631937214964185249205444919953948e-1 + 1.178350206951907026002603046195591193050e1 i":
 ildouble: 1
 ldouble: 1
 Test "Imaginary part of: catan (0x1p-33 - 0x0.ffffffffffffffffp0 i) == 7.853981631937214964185249205444919953948e-1 - 1.178350206951907026002603046195591193050e1 i":
 ildouble: 1
 ldouble: 1
+Test "Imaginary part of: catan (0x1p-64 + 1.0 i) == 7.853981633974483096292133729759445264744e-1 + 2.252728336819822255606004394739073846245e1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (0x1p-64 - 1.0 i) == 7.853981633974483096292133729759445264744e-1 - 2.252728336819822255606004394739073846245e1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (1.0 + 0x1p-64 i) == 7.853981633974483096156608458198757210500e-1 + 2.710505431213761085018632002174854278563e-20 i":
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: catan (1.0 - 0x1p-13 i) == 7.853981671227386080775748393881580082970e-1 - 6.103515609841754902688560615027452023669e-5 i":
 ildouble: 1
 ldouble: 1
+Test "Imaginary part of: catan (1.0 - 0x1p-64 i) == 7.853981633974483096156608458198757210500e-1 - 2.710505431213761085018632002174854278563e-20 i":
+ildouble: 1
+ldouble: 1
 
 # catanh
+Test "Real part of: catanh (-0x0.ffffffffffffffffp0 + 0x1p-1022 i) == -2.252728336819822255604649142023466965703e1 + 2.052268400649188124723641491045245971623e-289 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (-0x0.ffffffffffffffffp0 + 0x1p-16382 i) == -2.252728336819822255604649142023466965703e1 + 3.100992811520163369065387859792822623745e-4913 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: catanh (-0x0.ffffffffffffffffp0 + 0x1p-33 i) == -1.178350206951907026002603046195591193050e1 + 7.853981631937214964185249205444919953948e-1 i":
 ildouble: 1
 ldouble: 1
+Test "Real part of: catanh (-0x0.ffffffffffffffffp0 - 0x1p-1022 i) == -2.252728336819822255604649142023466965703e1 - 2.052268400649188124723641491045245971623e-289 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (-0x0.ffffffffffffffffp0 - 0x1p-16382 i) == -2.252728336819822255604649142023466965703e1 - 3.100992811520163369065387859792822623745e-4913 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: catanh (-0x0.ffffffffffffffffp0 - 0x1p-33 i) == -1.178350206951907026002603046195591193050e1 - 7.853981631937214964185249205444919953948e-1 i":
 ildouble: 1
 ldouble: 1
@@ -3593,6 +3677,30 @@ idouble: 1
 Test "Real part of: catanh (-0x1p-13 - 1.0 i) == -6.103515609841754902688560615027452023669e-5 - 7.853981671227386080775748393881580082970e-1 i":
 ildouble: 1
 ldouble: 1
+Test "Real part of: catanh (-0x1p-64 + 1.0 i) == -2.710505431213761085018632002174854278563e-20 + 7.853981633974483096156608458198757210500e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (-0x1p-64 - 1.0 i) == -2.710505431213761085018632002174854278563e-20 - 7.853981633974483096156608458198757210500e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (-1.0 + 0x1.3p-73 i) == -2.556052055225464683726753902092495938633e1 + 7.853981633974483096156922786831527361009e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (-1.0 + 0x1p-1020 i) == -3.538516356758520804574969980043991380025e2 + 7.853981633974483096156608458198757210493e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (-1.0 + 0x1p-64 i) == -2.252728336819822255606004394739073846245e1 + 7.853981633974483096292133729759445264744e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (-1.0 - 0x1.3p-73 i) == -2.556052055225464683726753902092495938633e1 - 7.853981633974483096156922786831527361009e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (-1.0 - 0x1p-1020 i) == -3.538516356758520804574969980043991380025e2 - 7.853981633974483096156608458198757210493e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (-1.0 - 0x1p-64 i) == -2.252728336819822255606004394739073846245e1 - 7.853981633974483096292133729759445264744e-1 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
 double: 2
 float: 1
@@ -3605,9 +3713,21 @@ double: 1
 idouble: 1
 ildouble: 1
 ldouble: 1
+Test "Real part of: catanh (0x0.ffffffffffffffffp0 + 0x1p-1022 i) == 2.252728336819822255604649142023466965703e1 + 2.052268400649188124723641491045245971623e-289 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (0x0.ffffffffffffffffp0 + 0x1p-16382 i) == 2.252728336819822255604649142023466965703e1 + 3.100992811520163369065387859792822623745e-4913 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: catanh (0x0.ffffffffffffffffp0 + 0x1p-33 i) == 1.178350206951907026002603046195591193050e1 + 7.853981631937214964185249205444919953948e-1 i":
 ildouble: 1
 ldouble: 1
+Test "Real part of: catanh (0x0.ffffffffffffffffp0 - 0x1p-1022 i) == 2.252728336819822255604649142023466965703e1 - 2.052268400649188124723641491045245971623e-289 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (0x0.ffffffffffffffffp0 - 0x1p-16382 i) == 2.252728336819822255604649142023466965703e1 - 3.100992811520163369065387859792822623745e-4913 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: catanh (0x0.ffffffffffffffffp0 - 0x1p-33 i) == 1.178350206951907026002603046195591193050e1 - 7.853981631937214964185249205444919953948e-1 i":
 ildouble: 1
 ldouble: 1
@@ -3651,6 +3771,30 @@ ldouble: 1
 Test "Real part of: catanh (0x1p-33 - 0x0.ffffffffffffffffp0 i) == 5.820766091346740722958646680334721192083e-11 - 7.853981633974483095919439232967553115548e-1 i":
 ildouble: 1
 ldouble: 1
+Test "Real part of: catanh (0x1p-64 + 1.0 i) == 2.710505431213761085018632002174854278563e-20 + 7.853981633974483096156608458198757210500e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (0x1p-64 - 1.0 i) == 2.710505431213761085018632002174854278563e-20 - 7.853981633974483096156608458198757210500e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (1.0 + 0x1.3p-73 i) == 2.556052055225464683726753902092495938633e1 + 7.853981633974483096156922786831527361009e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (1.0 + 0x1p-1020 i) == 3.538516356758520804574969980043991380025e2 + 7.853981633974483096156608458198757210493e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (1.0 + 0x1p-64 i) == 2.252728336819822255606004394739073846245e1 + 7.853981633974483096292133729759445264744e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (1.0 - 0x1.3p-73 i) == 2.556052055225464683726753902092495938633e1 - 7.853981633974483096156922786831527361009e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (1.0 - 0x1p-1020 i) == 3.538516356758520804574969980043991380025e2 - 7.853981633974483096156608458198757210493e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (1.0 - 0x1p-64 i) == 2.252728336819822255606004394739073846245e1 - 7.853981633974483096292133729759445264744e-1 i":
+ildouble: 1
+ldouble: 1
 
 # cbrt
 Test "cbrt (-27.0) == -3.0":
diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps
index 7ef2832190..d84a898e00 100644
--- a/sysdeps/x86_64/fpu/libm-test-ulps
+++ b/sysdeps/x86_64/fpu/libm-test-ulps
@@ -4222,15 +4222,27 @@ ldouble: 1
 Test "Imaginary part of: catan (-0x1.0000000000001p0 - 0x1p-27 i) == -7.853981633974484345157511161499711112683e-1 - 3.725290298461913200853528590596263270474e-9 i":
 double: 1
 idouble: 1
+Test "Real part of: catan (-0x1.000002p0 + 0x1p-126 i) == -7.853982230020895322927482174768220815493e-1 + 5.877471053462247139383742414506671233336e-39 i":
+float: 1
+ifloat: 1
 Test "Real part of: catan (-0x1.000002p0 + 0x1p-13 i) == -7.853982267273793866654490522673596014524e-1 + 6.103514882246036852433556327261700380577e-5 i":
 float: 1
 ifloat: 1
+Test "Real part of: catan (-0x1.000002p0 - 0x1p-126 i) == -7.853982230020895322927482174768220815493e-1 - 5.877471053462247139383742414506671233336e-39 i":
+float: 1
+ifloat: 1
 Test "Real part of: catan (-0x1.000002p0 - 0x1p-13 i) == -7.853982267273793866654490522673596014524e-1 - 6.103514882246036852433556327261700380577e-5 i":
 float: 1
 ifloat: 1
 Test "Imaginary part of: catan (-0x1.000002p0 - 0x1p-13 i) == -7.853982267273793866654490522673596014524e-1 - 6.103514882246036852433556327261700380577e-5 i":
 double: 1
 idouble: 1
+Test "Imaginary part of: catan (-0x1.3p-73 + 1.0 i) == -7.853981633974483096156922786831527361009e-1 + 2.556052055225464683726753902092495938633e1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (-0x1.3p-73 - 1.0 i) == -7.853981633974483096156922786831527361009e-1 - 2.556052055225464683726753902092495938633e1 i":
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: catan (-0x1.fp1023 + 0x1.fp1023 i) == -1.570796326794896619231321691639751442099 + 2.871063043235098558826106732041811695767e-309 i":
 double: 1
 idouble: 1
@@ -4251,6 +4263,22 @@ double: 1
 idouble: 1
 ildouble: 1
 ldouble: 1
+Test "Imaginary part of: catan (-0x1p-1020 + 1.0 i) == -7.853981633974483096156608458198757210493e-1 + 3.538516356758520804574969980043991380025e2 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (-0x1p-1020 - 1.0 i) == -7.853981633974483096156608458198757210493e-1 - 3.538516356758520804574969980043991380025e2 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (-0x1p-1022 + 0x0.ffffffffffffffffp0 i) == -2.052268400649188124723641491045245971623e-289 + 2.252728336819822255604649142023466965703e1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (-0x1p-1022 - 0x0.ffffffffffffffffp0 i) == -2.052268400649188124723641491045245971623e-289 - 2.252728336819822255604649142023466965703e1 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: catan (-0x1p-13 + 0x1.000002p0 i) == -7.859169620684960844300240092596908675974e-1 + 4.852030056234795712498957387213592193975 i":
 float: 1
 ifloat: 1
@@ -4266,6 +4294,12 @@ ifloat: 1
 Test "Real part of: catan (-0x1p-13 - 1.0 i) == -7.854286809755354140031716771044626356262e-1 - 4.852030264850939738801379894163661227127 i":
 float: 1
 ifloat: 1
+Test "Imaginary part of: catan (-0x1p-16382 + 0x0.ffffffffffffffffp0 i) == -3.100992811520163369065387859792822623745e-4913 + 2.252728336819822255604649142023466965703e1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (-0x1p-16382 - 0x0.ffffffffffffffffp0 i) == -3.100992811520163369065387859792822623745e-4913 - 2.252728336819822255604649142023466965703e1 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: catan (-0x1p-27 + 1.0 i) == -7.853981652600934588466178684534110069553e-1 + 9.704060527839234335310696652368086117807 i":
 float: 1
 ifloat: 1
@@ -4287,15 +4321,33 @@ ifloat: 1
 Test "Real part of: catan (-0x1p-54 + 1.0 i) == -7.853981633974483234934486536343324763447e-1 + 1.906154746539849600897388334009985581467e1 i":
 float: 1
 ifloat: 1
+Test "Imaginary part of: catan (-0x1p-54 + 1.0 i) == -7.853981633974483234934486536343324763447e-1 + 1.906154746539849600897388334009985581467e1 i":
+float: 1
+ifloat: 1
 Test "Real part of: catan (-0x1p-54 - 1.0 i) == -7.853981633974483234934486536343324763447e-1 - 1.906154746539849600897388334009985581467e1 i":
 float: 1
 ifloat: 1
+Test "Imaginary part of: catan (-0x1p-54 - 1.0 i) == -7.853981633974483234934486536343324763447e-1 - 1.906154746539849600897388334009985581467e1 i":
+float: 1
+ifloat: 1
 Test "Real part of: catan (-0x1p-57 + 1.0 i) == -7.853981633974483113503843217966828154612e-1 + 2.010126823623841397309973152228712047720e1 i":
 float: 1
 ifloat: 1
+Test "Imaginary part of: catan (-0x1p-57 + 1.0 i) == -7.853981633974483113503843217966828154612e-1 + 2.010126823623841397309973152228712047720e1 i":
+float: 1
+ifloat: 1
 Test "Real part of: catan (-0x1p-57 - 1.0 i) == -7.853981633974483113503843217966828154612e-1 - 2.010126823623841397309973152228712047720e1 i":
 float: 1
 ifloat: 1
+Test "Imaginary part of: catan (-0x1p-57 - 1.0 i) == -7.853981633974483113503843217966828154612e-1 - 2.010126823623841397309973152228712047720e1 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: catan (-0x1p-64 + 1.0 i) == -7.853981633974483096292133729759445264744e-1 + 2.252728336819822255606004394739073846245e1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (-0x1p-64 - 1.0 i) == -7.853981633974483096292133729759445264744e-1 - 2.252728336819822255606004394739073846245e1 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: catan (-1.0 + 0x1p-13 i) == -7.853981671227386080775748393881580082970e-1 + 6.103515609841754902688560615027452023669e-5 i":
 float: 1
 ifloat: 1
@@ -4311,6 +4363,9 @@ ifloat: 1
 Test "Real part of: catan (-1.0 + 0x1p-57 i) == -7.853981633974483096156608458198757330864e-1 + 3.469446951953614188823848962783813448721e-18 i":
 float: 1
 ifloat: 1
+Test "Imaginary part of: catan (-1.0 + 0x1p-64 i) == -7.853981633974483096156608458198757210500e-1 + 2.710505431213761085018632002174854278563e-20 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: catan (-1.0 - 0x1p-13 i) == -7.853981671227386080775748393881580082970e-1 - 6.103515609841754902688560615027452023669e-5 i":
 float: 1
 ifloat: 1
@@ -4329,6 +4384,9 @@ ifloat: 1
 Test "Real part of: catan (-1.0 - 0x1p-57 i) == -7.853981633974483096156608458198757330864e-1 - 3.469446951953614188823848962783813448721e-18 i":
 float: 1
 ifloat: 1
+Test "Imaginary part of: catan (-1.0 - 0x1p-64 i) == -7.853981633974483096156608458198757210500e-1 - 2.710505431213761085018632002174854278563e-20 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
 float: 3
 ifloat: 3
@@ -4357,15 +4415,27 @@ ldouble: 1
 Test "Imaginary part of: catan (0x1.0000000000001p0 - 0x1p-27 i) == 7.853981633974484345157511161499711112683e-1 - 3.725290298461913200853528590596263270474e-9 i":
 double: 1
 idouble: 1
+Test "Real part of: catan (0x1.000002p0 + 0x1p-126 i) == 7.853982230020895322927482174768220815493e-1 + 5.877471053462247139383742414506671233336e-39 i":
+float: 1
+ifloat: 1
 Test "Real part of: catan (0x1.000002p0 + 0x1p-13 i) == 7.853982267273793866654490522673596014524e-1 + 6.103514882246036852433556327261700380577e-5 i":
 float: 1
 ifloat: 1
+Test "Real part of: catan (0x1.000002p0 - 0x1p-126 i) == 7.853982230020895322927482174768220815493e-1 - 5.877471053462247139383742414506671233336e-39 i":
+float: 1
+ifloat: 1
 Test "Real part of: catan (0x1.000002p0 - 0x1p-13 i) == 7.853982267273793866654490522673596014524e-1 - 6.103514882246036852433556327261700380577e-5 i":
 float: 1
 ifloat: 1
 Test "Imaginary part of: catan (0x1.000002p0 - 0x1p-13 i) == 7.853982267273793866654490522673596014524e-1 - 6.103514882246036852433556327261700380577e-5 i":
 double: 1
 idouble: 1
+Test "Imaginary part of: catan (0x1.3p-73 + 1.0 i) == 7.853981633974483096156922786831527361009e-1 + 2.556052055225464683726753902092495938633e1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (0x1.3p-73 - 1.0 i) == 7.853981633974483096156922786831527361009e-1 - 2.556052055225464683726753902092495938633e1 i":
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: catan (0x1.fp1023 + 0x1.fp1023 i) == 1.570796326794896619231321691639751442099 + 2.871063043235098558826106732041811695767e-309 i":
 double: 1
 idouble: 1
@@ -4386,6 +4456,22 @@ double: 1
 idouble: 1
 ildouble: 1
 ldouble: 1
+Test "Imaginary part of: catan (0x1p-1020 + 1.0 i) == 7.853981633974483096156608458198757210493e-1 + 3.538516356758520804574969980043991380025e2 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (0x1p-1020 - 1.0 i) == 7.853981633974483096156608458198757210493e-1 - 3.538516356758520804574969980043991380025e2 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (0x1p-1022 + 0x0.ffffffffffffffffp0 i) == 2.052268400649188124723641491045245971623e-289 + 2.252728336819822255604649142023466965703e1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (0x1p-1022 - 0x0.ffffffffffffffffp0 i) == 2.052268400649188124723641491045245971623e-289 - 2.252728336819822255604649142023466965703e1 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: catan (0x1p-13 + 0x1.000002p0 i) == 7.859169620684960844300240092596908675974e-1 + 4.852030056234795712498957387213592193975 i":
 float: 1
 ifloat: 1
@@ -4401,6 +4487,12 @@ ifloat: 1
 Test "Real part of: catan (0x1p-13 - 1.0 i) == 7.854286809755354140031716771044626356262e-1 - 4.852030264850939738801379894163661227127 i":
 float: 1
 ifloat: 1
+Test "Imaginary part of: catan (0x1p-16382 + 0x0.ffffffffffffffffp0 i) == 3.100992811520163369065387859792822623745e-4913 + 2.252728336819822255604649142023466965703e1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (0x1p-16382 - 0x0.ffffffffffffffffp0 i) == 3.100992811520163369065387859792822623745e-4913 - 2.252728336819822255604649142023466965703e1 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: catan (0x1p-27 + 1.0 i) == 7.853981652600934588466178684534110069553e-1 + 9.704060527839234335310696652368086117807 i":
 float: 1
 ifloat: 1
@@ -4422,15 +4514,33 @@ ifloat: 1
 Test "Real part of: catan (0x1p-54 + 1.0 i) == 7.853981633974483234934486536343324763447e-1 + 1.906154746539849600897388334009985581467e1 i":
 float: 1
 ifloat: 1
+Test "Imaginary part of: catan (0x1p-54 + 1.0 i) == 7.853981633974483234934486536343324763447e-1 + 1.906154746539849600897388334009985581467e1 i":
+float: 1
+ifloat: 1
 Test "Real part of: catan (0x1p-54 - 1.0 i) == 7.853981633974483234934486536343324763447e-1 - 1.906154746539849600897388334009985581467e1 i":
 float: 1
 ifloat: 1
+Test "Imaginary part of: catan (0x1p-54 - 1.0 i) == 7.853981633974483234934486536343324763447e-1 - 1.906154746539849600897388334009985581467e1 i":
+float: 1
+ifloat: 1
 Test "Real part of: catan (0x1p-57 + 1.0 i) == 7.853981633974483113503843217966828154612e-1 + 2.010126823623841397309973152228712047720e1 i":
 float: 1
 ifloat: 1
+Test "Imaginary part of: catan (0x1p-57 + 1.0 i) == 7.853981633974483113503843217966828154612e-1 + 2.010126823623841397309973152228712047720e1 i":
+float: 1
+ifloat: 1
 Test "Real part of: catan (0x1p-57 - 1.0 i) == 7.853981633974483113503843217966828154612e-1 - 2.010126823623841397309973152228712047720e1 i":
 float: 1
 ifloat: 1
+Test "Imaginary part of: catan (0x1p-57 - 1.0 i) == 7.853981633974483113503843217966828154612e-1 - 2.010126823623841397309973152228712047720e1 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: catan (0x1p-64 + 1.0 i) == 7.853981633974483096292133729759445264744e-1 + 2.252728336819822255606004394739073846245e1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catan (0x1p-64 - 1.0 i) == 7.853981633974483096292133729759445264744e-1 - 2.252728336819822255606004394739073846245e1 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: catan (1.0 + 0x1p-13 i) == 7.853981671227386080775748393881580082970e-1 + 6.103515609841754902688560615027452023669e-5 i":
 float: 1
 ifloat: 1
@@ -4446,6 +4556,9 @@ ifloat: 1
 Test "Real part of: catan (1.0 + 0x1p-57 i) == 7.853981633974483096156608458198757330864e-1 + 3.469446951953614188823848962783813448721e-18 i":
 float: 1
 ifloat: 1
+Test "Imaginary part of: catan (1.0 + 0x1p-64 i) == 7.853981633974483096156608458198757210500e-1 + 2.710505431213761085018632002174854278563e-20 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: catan (1.0 - 0x1p-13 i) == 7.853981671227386080775748393881580082970e-1 - 6.103515609841754902688560615027452023669e-5 i":
 float: 1
 ifloat: 1
@@ -4464,11 +4577,26 @@ ifloat: 1
 Test "Real part of: catan (1.0 - 0x1p-57 i) == 7.853981633974483096156608458198757330864e-1 - 3.469446951953614188823848962783813448721e-18 i":
 float: 1
 ifloat: 1
+Test "Imaginary part of: catan (1.0 - 0x1p-64 i) == 7.853981633974483096156608458198757210500e-1 - 2.710505431213761085018632002174854278563e-20 i":
+ildouble: 1
+ldouble: 1
 
 # catanh
+Test "Real part of: catanh (-0x0.ffffffffffffffffp0 + 0x1p-1022 i) == -2.252728336819822255604649142023466965703e1 + 2.052268400649188124723641491045245971623e-289 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (-0x0.ffffffffffffffffp0 + 0x1p-16382 i) == -2.252728336819822255604649142023466965703e1 + 3.100992811520163369065387859792822623745e-4913 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: catanh (-0x0.ffffffffffffffffp0 + 0x1p-33 i) == -1.178350206951907026002603046195591193050e1 + 7.853981631937214964185249205444919953948e-1 i":
 ildouble: 1
 ldouble: 1
+Test "Real part of: catanh (-0x0.ffffffffffffffffp0 - 0x1p-1022 i) == -2.252728336819822255604649142023466965703e1 - 2.052268400649188124723641491045245971623e-289 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (-0x0.ffffffffffffffffp0 - 0x1p-16382 i) == -2.252728336819822255604649142023466965703e1 - 3.100992811520163369065387859792822623745e-4913 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: catanh (-0x0.ffffffffffffffffp0 - 0x1p-33 i) == -1.178350206951907026002603046195591193050e1 - 7.853981631937214964185249205444919953948e-1 i":
 ildouble: 1
 ldouble: 1
@@ -4504,6 +4632,12 @@ double: 1
 idouble: 1
 ildouble: 1
 ldouble: 1
+Test "Imaginary part of: catanh (-0x1p-126 + 0x1.000002p0 i) == -5.877471053462247139383742414506671233336e-39 + 7.853982230020895322927482174768220815493e-1 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: catanh (-0x1p-126 - 0x1.000002p0 i) == -5.877471053462247139383742414506671233336e-39 - 7.853982230020895322927482174768220815493e-1 i":
+float: 1
+ifloat: 1
 Test "Real part of: catanh (-0x1p-13 + 0x1.000002p0 i) == -6.103514882246036852433556327261700380577e-5 + 7.853982267273793866654490522673596014524e-1 i":
 double: 1
 idouble: 1
@@ -4558,6 +4692,20 @@ ifloat: 1
 Test "Imaginary part of: catanh (-0x1p-57 - 1.0 i) == -3.469446951953614188823848962783813448721e-18 - 7.853981633974483096156608458198757330864e-1 i":
 float: 1
 ifloat: 1
+Test "Real part of: catanh (-0x1p-64 + 1.0 i) == -2.710505431213761085018632002174854278563e-20 + 7.853981633974483096156608458198757210500e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (-0x1p-64 - 1.0 i) == -2.710505431213761085018632002174854278563e-20 - 7.853981633974483096156608458198757210500e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (-1.0 + 0x1.3p-73 i) == -2.556052055225464683726753902092495938633e1 + 7.853981633974483096156922786831527361009e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (-1.0 + 0x1p-1020 i) == -3.538516356758520804574969980043991380025e2 + 7.853981633974483096156608458198757210493e-1 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: catanh (-1.0 + 0x1p-13 i) == -4.852030264850939738801379894163661227127 + 7.854286809755354140031716771044626356262e-1 i":
 float: 1
 ifloat: 1
@@ -4567,12 +4715,29 @@ ifloat: 1
 Test "Imaginary part of: catanh (-1.0 + 0x1p-33 i) == -1.178350206951907026009379309773625595762e1 + 7.853981634265521400723945494331241018449e-1 i":
 float: 1
 ifloat: 1
+Test "Real part of: catanh (-1.0 + 0x1p-54 i) == -1.906154746539849600897388334009985581467e1 + 7.853981633974483234934486536343324763447e-1 i":
+float: 1
+ifloat: 1
 Test "Imaginary part of: catanh (-1.0 + 0x1p-54 i) == -1.906154746539849600897388334009985581467e1 + 7.853981633974483234934486536343324763447e-1 i":
 float: 1
 ifloat: 1
+Test "Real part of: catanh (-1.0 + 0x1p-57 i) == -2.010126823623841397309973152228712047720e1 + 7.853981633974483113503843217966828154612e-1 i":
+float: 1
+ifloat: 1
 Test "Imaginary part of: catanh (-1.0 + 0x1p-57 i) == -2.010126823623841397309973152228712047720e1 + 7.853981633974483113503843217966828154612e-1 i":
 float: 1
 ifloat: 1
+Test "Real part of: catanh (-1.0 + 0x1p-64 i) == -2.252728336819822255606004394739073846245e1 + 7.853981633974483096292133729759445264744e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (-1.0 - 0x1.3p-73 i) == -2.556052055225464683726753902092495938633e1 - 7.853981633974483096156922786831527361009e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (-1.0 - 0x1p-1020 i) == -3.538516356758520804574969980043991380025e2 - 7.853981633974483096156608458198757210493e-1 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: catanh (-1.0 - 0x1p-13 i) == -4.852030264850939738801379894163661227127 - 7.854286809755354140031716771044626356262e-1 i":
 float: 1
 ifloat: 1
@@ -4582,12 +4747,21 @@ ifloat: 1
 Test "Imaginary part of: catanh (-1.0 - 0x1p-33 i) == -1.178350206951907026009379309773625595762e1 - 7.853981634265521400723945494331241018449e-1 i":
 float: 1
 ifloat: 1
+Test "Real part of: catanh (-1.0 - 0x1p-54 i) == -1.906154746539849600897388334009985581467e1 - 7.853981633974483234934486536343324763447e-1 i":
+float: 1
+ifloat: 1
 Test "Imaginary part of: catanh (-1.0 - 0x1p-54 i) == -1.906154746539849600897388334009985581467e1 - 7.853981633974483234934486536343324763447e-1 i":
 float: 1
 ifloat: 1
+Test "Real part of: catanh (-1.0 - 0x1p-57 i) == -2.010126823623841397309973152228712047720e1 - 7.853981633974483113503843217966828154612e-1 i":
+float: 1
+ifloat: 1
 Test "Imaginary part of: catanh (-1.0 - 0x1p-57 i) == -2.010126823623841397309973152228712047720e1 - 7.853981633974483113503843217966828154612e-1 i":
 float: 1
 ifloat: 1
+Test "Real part of: catanh (-1.0 - 0x1p-64 i) == -2.252728336819822255606004394739073846245e1 - 7.853981633974483096292133729759445264744e-1 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
 double: 4
 idouble: 4
@@ -4604,9 +4778,21 @@ 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 (0x0.ffffffffffffffffp0 + 0x1p-1022 i) == 2.252728336819822255604649142023466965703e1 + 2.052268400649188124723641491045245971623e-289 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (0x0.ffffffffffffffffp0 + 0x1p-16382 i) == 2.252728336819822255604649142023466965703e1 + 3.100992811520163369065387859792822623745e-4913 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: catanh (0x0.ffffffffffffffffp0 + 0x1p-33 i) == 1.178350206951907026002603046195591193050e1 + 7.853981631937214964185249205444919953948e-1 i":
 ildouble: 1
 ldouble: 1
+Test "Real part of: catanh (0x0.ffffffffffffffffp0 - 0x1p-1022 i) == 2.252728336819822255604649142023466965703e1 - 2.052268400649188124723641491045245971623e-289 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (0x0.ffffffffffffffffp0 - 0x1p-16382 i) == 2.252728336819822255604649142023466965703e1 - 3.100992811520163369065387859792822623745e-4913 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: catanh (0x0.ffffffffffffffffp0 - 0x1p-33 i) == 1.178350206951907026002603046195591193050e1 - 7.853981631937214964185249205444919953948e-1 i":
 ildouble: 1
 ldouble: 1
@@ -4636,6 +4822,12 @@ double: 1
 idouble: 1
 ildouble: 1
 ldouble: 1
+Test "Imaginary part of: catanh (0x1p-126 + 0x1.000002p0 i) == 5.877471053462247139383742414506671233336e-39 + 7.853982230020895322927482174768220815493e-1 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: catanh (0x1p-126 - 0x1.000002p0 i) == 5.877471053462247139383742414506671233336e-39 - 7.853982230020895322927482174768220815493e-1 i":
+float: 1
+ifloat: 1
 Test "Real part of: catanh (0x1p-13 + 0x0.ffffffp0 i) == 6.103515973639646453881721999956617260502e-5 + 7.853981373204155542484315721351697277336e-1 i":
 double: 1
 float: 1
@@ -4700,6 +4892,20 @@ ifloat: 1
 Test "Imaginary part of: catanh (0x1p-57 - 1.0 i) == 3.469446951953614188823848962783813448721e-18 - 7.853981633974483096156608458198757330864e-1 i":
 float: 1
 ifloat: 1
+Test "Real part of: catanh (0x1p-64 + 1.0 i) == 2.710505431213761085018632002174854278563e-20 + 7.853981633974483096156608458198757210500e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (0x1p-64 - 1.0 i) == 2.710505431213761085018632002174854278563e-20 - 7.853981633974483096156608458198757210500e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (1.0 + 0x1.3p-73 i) == 2.556052055225464683726753902092495938633e1 + 7.853981633974483096156922786831527361009e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (1.0 + 0x1p-1020 i) == 3.538516356758520804574969980043991380025e2 + 7.853981633974483096156608458198757210493e-1 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: catanh (1.0 + 0x1p-13 i) == 4.852030264850939738801379894163661227127 + 7.854286809755354140031716771044626356262e-1 i":
 float: 1
 ifloat: 1
@@ -4709,12 +4915,29 @@ ifloat: 1
 Test "Imaginary part of: catanh (1.0 + 0x1p-33 i) == 1.178350206951907026009379309773625595762e1 + 7.853981634265521400723945494331241018449e-1 i":
 float: 1
 ifloat: 1
+Test "Real part of: catanh (1.0 + 0x1p-54 i) == 1.906154746539849600897388334009985581467e1 + 7.853981633974483234934486536343324763447e-1 i":
+float: 1
+ifloat: 1
 Test "Imaginary part of: catanh (1.0 + 0x1p-54 i) == 1.906154746539849600897388334009985581467e1 + 7.853981633974483234934486536343324763447e-1 i":
 float: 1
 ifloat: 1
+Test "Real part of: catanh (1.0 + 0x1p-57 i) == 2.010126823623841397309973152228712047720e1 + 7.853981633974483113503843217966828154612e-1 i":
+float: 1
+ifloat: 1
 Test "Imaginary part of: catanh (1.0 + 0x1p-57 i) == 2.010126823623841397309973152228712047720e1 + 7.853981633974483113503843217966828154612e-1 i":
 float: 1
 ifloat: 1
+Test "Real part of: catanh (1.0 + 0x1p-64 i) == 2.252728336819822255606004394739073846245e1 + 7.853981633974483096292133729759445264744e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (1.0 - 0x1.3p-73 i) == 2.556052055225464683726753902092495938633e1 - 7.853981633974483096156922786831527361009e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: catanh (1.0 - 0x1p-1020 i) == 3.538516356758520804574969980043991380025e2 - 7.853981633974483096156608458198757210493e-1 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: catanh (1.0 - 0x1p-13 i) == 4.852030264850939738801379894163661227127 - 7.854286809755354140031716771044626356262e-1 i":
 float: 1
 ifloat: 1
@@ -4724,12 +4947,21 @@ ifloat: 1
 Test "Imaginary part of: catanh (1.0 - 0x1p-33 i) == 1.178350206951907026009379309773625595762e1 - 7.853981634265521400723945494331241018449e-1 i":
 float: 1
 ifloat: 1
+Test "Real part of: catanh (1.0 - 0x1p-54 i) == 1.906154746539849600897388334009985581467e1 - 7.853981633974483234934486536343324763447e-1 i":
+float: 1
+ifloat: 1
 Test "Imaginary part of: catanh (1.0 - 0x1p-54 i) == 1.906154746539849600897388334009985581467e1 - 7.853981633974483234934486536343324763447e-1 i":
 float: 1
 ifloat: 1
+Test "Real part of: catanh (1.0 - 0x1p-57 i) == 2.010126823623841397309973152228712047720e1 - 7.853981633974483113503843217966828154612e-1 i":
+float: 1
+ifloat: 1
 Test "Imaginary part of: catanh (1.0 - 0x1p-57 i) == 2.010126823623841397309973152228712047720e1 - 7.853981633974483113503843217966828154612e-1 i":
 float: 1
 ifloat: 1
+Test "Real part of: catanh (1.0 - 0x1p-64 i) == 2.252728336819822255606004394739073846245e1 - 7.853981633974483096292133729759445264744e-1 i":
+ildouble: 1
+ldouble: 1
 
 # cbrt
 Test "cbrt (-0.001) == -0.1":