]> Savannah Git Hosting - gnulib.git/commitdiff
exp2l: Work around a NetBSD 10.0/i386 bug.
authorBruno Haible <bruno@clisp.org>
Fri, 5 Apr 2024 14:45:25 +0000 (16:45 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 8 Apr 2024 11:19:10 +0000 (13:19 +0200)
* m4/exp2l.m4 (gl_FUNC_EXP2L): Test the value of exp2l(LDBL_MAX_EXP-1).

ChangeLog
m4/exp2l.m4

index 42c86b1cda758e7cc551bc1052653fd3b5b6c4a1..1700343465541fc875ac07b1e87f3b25f8d706ad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-04-05  Bruno Haible  <bruno@clisp.org>
+
+       exp2l: Work around a NetBSD 10.0/i386 bug.
+       * m4/exp2l.m4 (gl_FUNC_EXP2L): Test the value of exp2l(LDBL_MAX_EXP-1).
+
 2024-04-05  Bruno Haible  <bruno@clisp.org>
 
        roundl: Fix a link error on Linux/powerpc64le.
index 3d7d5d713a06a875492345d024f6fe09ee3819e9..20a98a1c56acda7dc08470f20a3e070191210e99 100644 (file)
@@ -1,5 +1,5 @@
-# exp2l.m4 serial 11
-dnl Copyright (C) 2010-2023 Free Software Foundation, Inc.
+# exp2l.m4 serial 11.1
+dnl Copyright (C) 2010-2024 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -80,7 +80,7 @@ int main (int argc, char *argv[])
 {
   long double (* volatile my_exp2l) (long double) = argc ? exp2l : dummy;
   int result = 0;
-  /* This test fails on NetBSD 9.0.  */
+  /* This test fails on NetBSD NetBSD 10.0/x86_64.  */
   {
     const long double TWO_LDBL_MANT_DIG = /* 2^LDBL_MANT_DIG */
       (long double) (1U << ((LDBL_MANT_DIG - 1) / 5))
@@ -93,6 +93,13 @@ int main (int argc, char *argv[])
     if (!(err >= -100.0L && err <= 100.0L))
       result |= 1;
   }
+  /* This test fails on NetBSD 10.0/i386.  */
+  {
+    long double x = LDBL_MAX_EXP - 1;
+    long double z = my_exp2l (x);
+    if (z + z == z) /* isinf (z) */
+      result |= 2;
+  }
   return result;
 }
             ]])],