diff options
-rw-r--r-- | ChangeLog | 16 | ||||
-rw-r--r-- | math/libm-test.inc | 22 | ||||
-rw-r--r-- | math/s_clog.c | 7 | ||||
-rw-r--r-- | math/s_clog10.c | 7 | ||||
-rw-r--r-- | math/s_clog10f.c | 7 | ||||
-rw-r--r-- | math/s_clog10l.c | 14 | ||||
-rw-r--r-- | math/s_clogf.c | 7 | ||||
-rw-r--r-- | math/s_clogl.c | 14 | ||||
-rw-r--r-- | sysdeps/i386/fpu/libm-test-ulps | 95 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/libm-test-ulps | 71 |
10 files changed, 258 insertions, 2 deletions
@@ -1,3 +1,19 @@ +2012-07-31 Joseph Myers <joseph@codesourcery.com> + + [BZ #13629] + * math/s_clog.c (__clog): Use __log1p if larger part has absolute + value between 1.0 and 2.0 and smaller part has absolute value less + than 1.0. + * math/s_clog10.c (__clog10): Likewise. + * math/s_clog10f.c (__clog10f): Likewise. + * math/s_clog10l.c (__clog10l): Likewise. + * math/s_clogf.c (__clogf): Likewise. + * math/s_clogl.c (__clogl): Likewise. + * math/libm-test.inc (clog_test): Add more tests. + (clog10_test): Likewise. + * sysdeps/i386/fpu/libm-test-ulps: Update. + * sysdeps/x86_64/fpu/libm-test-ulps: Likewise. + 2012-07-31 Florian Weimer <fweimer@redhat.com> * stdlib/tst-secure-getenv.c: Use printf for error reporting. diff --git a/math/libm-test.inc b/math/libm-test.inc index c2fb50c..0f64ea4 100644 --- a/math/libm-test.inc +++ b/math/libm-test.inc @@ -2484,6 +2484,17 @@ clog_test (void) TEST_c_c (clog, 0x1p-8192L, 1.0L, 4.202628928890116882828347271652190753248e-4933L, 1.570796326794896619231321691639751442099L, UNDERFLOW_EXCEPTION); #endif + TEST_c_c (clog, 0x1.000566p0L, 0x1.234p-10L, 8.298731898331237038231468223024422855654e-5L, 1.110938609507128729312743251313024793990e-3L); + TEST_c_c (clog, 0x1.000566p0L, 0x1.234p-100L, 8.237022655933121125560939513260027133767e-5L, 8.974094312218060110948251664314290484113e-31L); +#ifndef TEST_FLOAT + TEST_c_c (clog, -0x1.0000000123456p0L, 0x1.2345678p-30L, 2.649094282537168795982991778475646793277e-10L, 3.141592652530155111500161671113150737892L); + TEST_c_c (clog, -0x1.0000000123456p0L, 0x1.2345678p-1000L, 2.649094276923003995420209214900915462737e-10L, 3.141592653589793238462643383279502884197L); +#endif +#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106 + TEST_c_c (clog, 0x1.00000000000000123456789abcp0L, 0x1.23456789p-60L, 9.868649107778739757272772275265050767867e-19L, 9.868649106423871142816660980898339912137e-19L); + TEST_c_c (clog, 0x1.00000000000000123456789abcp0L, 0x1.23456789p-1000L, 9.868649107778739752403260515979017248596e-19L, 1.061846605795612822522063052130030717368e-301L); +#endif + END (clog, complex); } @@ -2633,6 +2644,17 @@ clog10_test (void) TEST_c_c (clog10, 0x1p-8191L, 1.0L, 7.300714213215805914467117112656302312931e-4933L, 6.821881769209206737428918127156778851051e-1L, UNDERFLOW_EXCEPTION); #endif + TEST_c_c (clog10, 0x1.000566p0L, 0x1.234p-10L, 3.604093470239754109961125085078190708674e-5L, 4.824745078422174667425851670822596859720e-4L); + TEST_c_c (clog10, 0x1.000566p0L, 0x1.234p-100L, 3.577293486783822178310971763308187385546e-5L, 3.897399639875661463735636919790792140598e-31L); +#ifndef TEST_FLOAT + TEST_c_c (clog10, -0x1.0000000123456p0L, 0x1.2345678p-30L, 1.150487028947346337782682105935961875822e-10L, 1.364376353381646356131680448946397884147L); + TEST_c_c (clog10, -0x1.0000000123456p0L, 0x1.2345678p-1000L, 1.150487026509145544402795327729455391948e-10L, 1.364376353841841347485783625431355770210L); +#endif +#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106 + TEST_c_c (clog10, 0x1.00000000000000123456789abcp0L, 0x1.23456789p-60L, 4.285899851347756188767674032946882584784e-19L, 4.285899850759344225805480528847018395861e-19L); + TEST_c_c (clog10, 0x1.00000000000000123456789abcp0L, 0x1.23456789p-1000L, 4.285899851347756186652871946325962330640e-19L, 4.611541215247321502041995872887317363241e-302L); +#endif + END (clog10, complex); } diff --git a/math/s_clog.c b/math/s_clog.c index e28aa51..2593066 100644 --- a/math/s_clog.c +++ b/math/s_clog.c @@ -78,6 +78,13 @@ __clog (__complex__ double x) else __real__ result = __log1p (absy2) / 2.0; } + else if (absx > 1.0 && absx < 2.0 && absy < 1.0 && scale == 0) + { + double d2m1 = (absx - 1.0) * (absx + 1.0); + if (absy >= DBL_EPSILON) + d2m1 += absy * absy; + __real__ result = __log1p (d2m1) / 2.0; + } else { double d = __ieee754_hypot (absx, absy); diff --git a/math/s_clog10.c b/math/s_clog10.c index b733b04..ef997ee 100644 --- a/math/s_clog10.c +++ b/math/s_clog10.c @@ -81,6 +81,13 @@ __clog10 (__complex__ double x) else __real__ result = __log1p (absy2) * (M_LOG10E / 2.0); } + else if (absx > 1.0 && absx < 2.0 && absy < 1.0 && scale == 0) + { + double d2m1 = (absx - 1.0) * (absx + 1.0); + if (absy >= DBL_EPSILON) + d2m1 += absy * absy; + __real__ result = __log1p (d2m1) * (M_LOG10E / 2.0); + } else { double d = __ieee754_hypot (absx, absy); diff --git a/math/s_clog10f.c b/math/s_clog10f.c index eb1b895..c61e8af 100644 --- a/math/s_clog10f.c +++ b/math/s_clog10f.c @@ -83,6 +83,13 @@ __clog10f (__complex__ float x) else __real__ result = __log1pf (absy2) * ((float) M_LOG10E / 2.0f); } + else if (absx > 1.0f && absx < 2.0f && absy < 1.0f && scale == 0) + { + float d2m1 = (absx - 1.0f) * (absx + 1.0f); + if (absy >= FLT_EPSILON) + d2m1 += absy * absy; + __real__ result = __log1pf (d2m1) * ((float) M_LOG10E / 2.0f); + } else { float d = __ieee754_hypotf (absx, absy); diff --git a/math/s_clog10l.c b/math/s_clog10l.c index 2a380f6..d50f616 100644 --- a/math/s_clog10l.c +++ b/math/s_clog10l.c @@ -22,6 +22,13 @@ #include <math_private.h> #include <float.h> +/* To avoid spurious underflows, use this definition to treat IBM long + double as approximating an IEEE-style format. */ +#if LDBL_MANT_DIG == 106 +# undef LDBL_EPSILON +# define LDBL_EPSILON 0x1p-106L +#endif + /* log_10 (2). */ #define M_LOG10_2l 0.3010299956639811952137388947244930267682L @@ -75,6 +82,13 @@ __clog10l (__complex__ long double x) else __real__ result = __log1pl (absy2) * (M_LOG10El / 2.0L); } + else if (absx > 1.0L && absx < 2.0L && absy < 1.0L && scale == 0) + { + long double d2m1 = (absx - 1.0L) * (absx + 1.0L); + if (absy >= LDBL_EPSILON) + d2m1 += absy * absy; + __real__ result = __log1pl (d2m1) * (M_LOG10El / 2.0L); + } else { long double d = __ieee754_hypotl (absx, absy); diff --git a/math/s_clogf.c b/math/s_clogf.c index 088730c..92f782c 100644 --- a/math/s_clogf.c +++ b/math/s_clogf.c @@ -78,6 +78,13 @@ __clogf (__complex__ float x) else __real__ result = __log1pf (absy2) / 2.0f; } + else if (absx > 1.0f && absx < 2.0f && absy < 1.0f && scale == 0) + { + float d2m1 = (absx - 1.0f) * (absx + 1.0f); + if (absy >= FLT_EPSILON) + d2m1 += absy * absy; + __real__ result = __log1pf (d2m1) / 2.0f; + } else { float d = __ieee754_hypotf (absx, absy); diff --git a/math/s_clogl.c b/math/s_clogl.c index d98a3c0..eaba572 100644 --- a/math/s_clogl.c +++ b/math/s_clogl.c @@ -22,6 +22,13 @@ #include <math_private.h> #include <float.h> +/* To avoid spurious underflows, use this definition to treat IBM long + double as approximating an IEEE-style format. */ +#if LDBL_MANT_DIG == 106 +# undef LDBL_EPSILON +# define LDBL_EPSILON 0x1p-106L +#endif + __complex__ long double __clogl (__complex__ long double x) { @@ -71,6 +78,13 @@ __clogl (__complex__ long double x) else __real__ result = __log1pl (absy2) / 2.0L; } + else if (absx > 1.0L && absx < 2.0L && absy < 1.0L && scale == 0) + { + long double d2m1 = (absx - 1.0L) * (absx + 1.0L); + if (absy >= LDBL_EPSILON) + d2m1 += absy * absy; + __real__ result = __log1pl (d2m1) / 2.0L; + } else { long double d = __ieee754_hypotl (absx, absy); diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps index f832e17..f70311b 100644 --- a/sysdeps/i386/fpu/libm-test-ulps +++ b/sysdeps/i386/fpu/libm-test-ulps @@ -223,8 +223,12 @@ float: 1 idouble: 2 ifloat: 1 Test "Imaginary part of: cacos (+0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i": +double: 1 float: 1 +idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: cacos (+0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i": double: 1 float: 1 @@ -249,8 +253,12 @@ float: 1 idouble: 2 ifloat: 1 Test "Imaginary part of: cacos (-0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i": +double: 1 float: 1 +idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: cacos (-0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i": double: 1 float: 1 @@ -293,8 +301,12 @@ ldouble: 1 # cacosh Test "Real part of: cacosh (+0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i": +double: 1 float: 1 +idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacosh (+0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i": double: 1 float: 1 @@ -304,8 +316,12 @@ Test "Real part of: cacosh (+0 + 1.5 i) == 1.19476321728710930411193082851909052 double: 1 idouble: 1 Test "Real part of: cacosh (+0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i": +double: 1 float: 1 +idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacosh (+0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i": double: 1 float: 1 @@ -315,8 +331,12 @@ Test "Real part of: cacosh (+0 - 1.5 i) == 1.19476321728710930411193082851909052 double: 1 idouble: 1 Test "Real part of: cacosh (-0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i": +double: 1 float: 1 +idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacosh (-0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i": double: 1 float: 1 @@ -326,8 +346,12 @@ Test "Real part of: cacosh (-0 + 1.5 i) == 1.19476321728710930411193082851909052 double: 1 idouble: 1 Test "Real part of: cacosh (-0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i": +double: 1 float: 1 +idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacosh (-0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i": double: 1 float: 1 @@ -343,11 +367,19 @@ Test "Imaginary part of: cacosh (-0.5 - 0 i) == +0 - 2.0943951023931954923084289 double: 1 idouble: 1 Test "Real part of: cacosh (-1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + pi i": +double: 1 float: 1 +idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacosh (-1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - pi i": +double: 1 float: 1 +idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": double: 1 float: 9 @@ -366,11 +398,19 @@ Test "Real part of: cacosh (0.75 + 1.25 i) == 1.13239363160530819522266333696834 ildouble: 1 ldouble: 1 Test "Real part of: cacosh (1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + +0 i": +double: 1 float: 1 +idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacosh (1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - 0 i": +double: 1 float: 1 +idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 # casin Test "Imaginary part of: casin (+0 + 0.5 i) == +0 + 0.4812118250596034474977589134243684231352 i": @@ -389,8 +429,12 @@ float: 1 idouble: 2 ifloat: 1 Test "Imaginary part of: casin (+0 - 0.5 i) == +0 - 0.4812118250596034474977589134243684231352 i": +double: 1 float: 1 +idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casin (+0 - 1.0 i) == +0 - 0.8813735870195430252326093249797923090282 i": double: 1 float: 1 @@ -415,8 +459,12 @@ float: 1 idouble: 2 ifloat: 1 Test "Imaginary part of: casin (-0 - 0.5 i) == -0 - 0.4812118250596034474977589134243684231352 i": +double: 1 float: 1 +idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casin (-0 - 1.0 i) == -0 - 0.8813735870195430252326093249797923090282 i": double: 1 float: 1 @@ -516,11 +564,19 @@ ifloat: 6 ildouble: 5 ldouble: 5 Test "Real part of: casinh (0.5 + +0 i) == 0.4812118250596034474977589134243684231352 + +0 i": +double: 1 float: 1 +idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (0.5 - 0 i) == 0.4812118250596034474977589134243684231352 - 0 i": +double: 1 float: 1 +idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": float: 1 ifloat: 1 @@ -789,6 +845,12 @@ ildouble: 1 ldouble: 1 # clog +Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 2.649094276923003995420209214900915462737e-10 + 3.141592653589793238462643383279502884197 i": +double: 1 +idouble: 1 +Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 2.649094282537168795982991778475646793277e-10 + 3.141592652530155111500161671113150737892 i": +double: 1 +idouble: 1 Test "Real part of: clog (-0x1.fp+127 + 0x1p-149 i) == 88.69109041335841930424871526389807508374 + pi i": ildouble: 1 ldouble: 1 @@ -818,6 +880,12 @@ float: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: clog (0x1.000566p0 + 0x1.234p-10 i) == 8.298731898331237038231468223024422855654e-5 + 1.110938609507128729312743251313024793990e-3 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: clog (0x1.000566p0 + 0x1.234p-100 i) == 8.237022655933121125560939513260027133767e-5 + 8.974094312218060110948251664314290484113e-31 i": +float: 1 +ifloat: 1 Test "Real part of: clog (0x1.234566p-30 + 1.0 i) == 5.614163921211322622623353961365728040115e-19 + 1.570796325735258575254858696548386439740 i": ildouble: 1 ldouble: 1 @@ -869,6 +937,20 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i": +double: 1 +idouble: 1 +Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: clog10 (-0x1.234566p-40 - 1.0 i) == 2.325249110681915353442924915876654139373e-25 - 6.821881769213700828789403802671540158935e-1 i": float: 1 ifloat: 1 @@ -986,6 +1068,15 @@ idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-100 i) == 3.577293486783822178310971763308187385546e-5 + 3.897399639875661463735636919790792140598e-31 i": +ildouble: 1 +ldouble: 1 Test "Imaginary part of: clog10 (0x1.234566p-30 + 1.0 i) == 2.438200411482400072282924063740535840474e-19 + 6.821881764607257184291586401763604544928e-1 i": float: 1 ifloat: 1 @@ -1386,7 +1477,9 @@ ildouble: 2 ldouble: 2 Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": double: 1 +float: 1 idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i": @@ -3154,7 +3247,9 @@ ildouble: 1 ldouble: 1 Function: Real part of "clog": +double: 1 float: 1 +idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps index dba153b..cdf80c3 100644 --- a/sysdeps/x86_64/fpu/libm-test-ulps +++ b/sysdeps/x86_64/fpu/libm-test-ulps @@ -197,6 +197,8 @@ ifloat: 1 Test "Imaginary part of: cacos (+0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: cacos (+0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i": double: 1 float: 1 @@ -225,6 +227,8 @@ ifloat: 1 Test "Imaginary part of: cacos (-0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: cacos (-0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i": double: 1 float: 1 @@ -269,6 +273,8 @@ ldouble: 1 Test "Real part of: cacosh (+0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacosh (+0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i": double: 1 float: 1 @@ -280,6 +286,8 @@ idouble: 1 Test "Real part of: cacosh (+0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacosh (+0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i": double: 1 float: 1 @@ -291,6 +299,8 @@ idouble: 1 Test "Real part of: cacosh (-0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacosh (-0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i": double: 1 float: 1 @@ -302,6 +312,8 @@ idouble: 1 Test "Real part of: cacosh (-0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacosh (-0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i": double: 1 float: 1 @@ -319,9 +331,13 @@ idouble: 1 Test "Real part of: cacosh (-1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + pi i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacosh (-1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - pi i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i": double: 1 float: 7 @@ -342,9 +358,13 @@ ldouble: 1 Test "Real part of: cacosh (1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + +0 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cacosh (1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - 0 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 # casin Test "Imaginary part of: casin (+0 + 0.5 i) == +0 + 0.4812118250596034474977589134243684231352 i": @@ -367,6 +387,8 @@ ifloat: 1 Test "Imaginary part of: casin (+0 - 0.5 i) == +0 - 0.4812118250596034474977589134243684231352 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casin (+0 - 1.0 i) == +0 - 0.8813735870195430252326093249797923090282 i": double: 1 float: 1 @@ -395,6 +417,8 @@ ifloat: 1 Test "Imaginary part of: casin (-0 - 0.5 i) == -0 - 0.4812118250596034474977589134243684231352 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casin (-0 - 1.0 i) == -0 - 0.8813735870195430252326093249797923090282 i": double: 1 float: 1 @@ -500,9 +524,13 @@ ldouble: 5 Test "Real part of: casinh (0.5 + +0 i) == 0.4812118250596034474977589134243684231352 + +0 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (0.5 - 0 i) == 0.4812118250596034474977589134243684231352 - 0 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i": float: 1 ifloat: 1 @@ -729,6 +757,12 @@ ildouble: 1 ldouble: 1 # clog +Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 2.649094276923003995420209214900915462737e-10 + 3.141592653589793238462643383279502884197 i": +double: 1 +idouble: 1 +Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 2.649094282537168795982991778475646793277e-10 + 3.141592652530155111500161671113150737892 i": +double: 1 +idouble: 1 Test "Imaginary part of: clog (-0x1.234566p-40 - 1.0 i) == 5.354083939753840089583620652120903838944e-25 - 1.570796326795931422008642456283782656359 i": float: 1 ifloat: 1 @@ -778,6 +812,11 @@ float: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: clog (0x1.000566p0 + 0x1.234p-10 i) == 8.298731898331237038231468223024422855654e-5 + 1.110938609507128729312743251313024793990e-3 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: clog (0x1.fffffep+127 + 0x1.fffffep+127 i) == 89.06941264234832570836679262104313101776 + pi/4 i": ildouble: 1 ldouble: 1 @@ -841,6 +880,20 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i": +double: 2 +idouble: 2 +Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i": +double: 1 +idouble: 1 +Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 i": +double: 2 +idouble: 2 +Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: clog10 (-0x1.fp+1023 + 0x1p-1074 i) == 308.2409272754311106024666378243768099991 + 1.364376353841841347485783625431355770210 i": double: 1 idouble: 1 @@ -953,6 +1006,20 @@ idouble: 1 ifloat: 1 ildouble: 1 ldouble: 1 +Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i": +double: 1 +idouble: 1 +Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-100 i) == 3.577293486783822178310971763308187385546e-5 + 3.897399639875661463735636919790792140598e-31 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-100 i) == 3.577293486783822178310971763308187385546e-5 + 3.897399639875661463735636919790792140598e-31 i": +ildouble: 1 +ldouble: 1 Test "Real part of: clog10 (0x1.234566p-30 + 1.0 i) == 2.438200411482400072282924063740535840474e-19 + 6.821881764607257184291586401763604544928e-1 i": ildouble: 1 ldouble: 1 @@ -2940,9 +3007,9 @@ float: 3 ifloat: 3 Function: Real part of "clog10": -double: 1 +double: 2 float: 1 -idouble: 1 +idouble: 2 ifloat: 1 ildouble: 1 ldouble: 1 |