about summary refs log tree commit diff
path: root/math/libm-test.inc
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-07-31 14:21:19 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-07-31 14:21:19 +0000
commitd0419dbfbd19cb01398d43895a679c0bcb961070 (patch)
treed600a45e750c40eed4d2050bd2b3bba3c9e64309 /math/libm-test.inc
parent2bc1387273d2123398fc12133643ea2bc02a2cd1 (diff)
downloadglibc-d0419dbfbd19cb01398d43895a679c0bcb961070.tar.gz
glibc-d0419dbfbd19cb01398d43895a679c0bcb961070.tar.xz
glibc-d0419dbfbd19cb01398d43895a679c0bcb961070.zip
Improve clog, clog10 handling of values with real or imaginary part slightly above 1 (bug 13629).
Diffstat (limited to 'math/libm-test.inc')
-rw-r--r--math/libm-test.inc22
1 files changed, 22 insertions, 0 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc
index c2fb50cec2..0f64ea4971 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);
 }