summary refs log tree commit diff
path: root/math
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-03-14 01:12:05 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-03-14 01:12:05 +0000
commitaa4a2ae1dbc2c7a3469ec13610f0d7a84e3bfc79 (patch)
tree656175b545e89e391b108d5bf22ae598df617e18 /math
parent7c10fd3515f983ca732b2166ccffebbf83603f1f (diff)
downloadglibc-aa4a2ae1dbc2c7a3469ec13610f0d7a84e3bfc79.tar.gz
glibc-aa4a2ae1dbc2c7a3469ec13610f0d7a84e3bfc79.tar.xz
glibc-aa4a2ae1dbc2c7a3469ec13610f0d7a84e3bfc79.zip
Add tests for hypot overflow/underflow.
Diffstat (limited to 'math')
-rw-r--r--math/libm-test.inc13
1 files changed, 13 insertions, 0 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 39cda6663c..191f35959b 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -3557,6 +3557,19 @@ hypot_test (void)
 
   TEST_ff_f (hypot, 0.75L, 1.25L, 1.45773797371132511771853821938639577L);
 
+#if !(defined TEST_FLOAT && defined TEST_INLINE)
+  TEST_ff_f (hypot, 0x3p125L, 0x4p125L, 0x5p125L);
+  TEST_ff_f (hypot, 0x1.234566p-126L, 0x1.234566p-126L, 1.891441686191081936598531534017449451173e-38L);
+#endif
+
+#ifndef TEST_FLOAT
+  TEST_ff_f (hypot, 0x3p1021L, 0x4p1021L, 0x5p1021L);
+#endif
+
+#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384 && !defined TEST_INLINE
+  TEST_ff_f (hypot, 0x3p16381L, 0x4p16381L, 0x5p16381L);
+#endif
+
   END (hypot);
 }