]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
logl: Remove support for OSF/1.
authorBruno Haible <bruno@clisp.org>
Tue, 9 Sep 2025 10:42:37 +0000 (12:42 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 9 Sep 2025 10:42:37 +0000 (12:42 +0200)
* m4/logl.m4 (gl_FUNC_LOGL_WORKS): Remove test regarding logl (-0.0L).
* lib/logl.c (logl): Remove workaround for OSF/1.

ChangeLog
lib/logl.c
m4/logl.m4

index e2b761a453d02fe32d0e89bb36a3c44fc1c8da31..a0cb819fd19d21f650b42f57060e89c10e746096 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2025-09-09  Bruno Haible  <bruno@clisp.org>
 
+       logl: Remove support for OSF/1.
+       * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Remove test regarding logl (-0.0L).
+       * lib/logl.c (logl): Remove workaround for OSF/1.
+
        logf: Remove support for OSF/1.
        * m4/logf.m4 (gl_FUNC_LOGF_WORKS): Remove macro.
        (gl_FUNC_LOGF): Don't invoke it.
index 90ec4851331aa6e7a657151a73372d1b7cd99846..a8cb1e7b41e49f6fc2c835851fea07c3a42d530c 100644 (file)
@@ -26,19 +26,6 @@ logl (long double x)
   return log (x);
 }
 
-#elif 0 /* was: HAVE_LOGL */
-
-long double
-logl (long double x)
-# undef logl
-{
-  /* Work around the OSF/1 5.1 bug.  */
-  if (x == 0.0L)
-    /* Return -Infinity.  */
-    return -1.0L / 0.0L;
-  return logl (x);
-}
-
 #else
 
 /* Code based on glibc/sysdeps/ieee754/ldbl-128/e_logl.c.  */
index a6e92105e5e3ef6a779d47a2c27866044759e8d6..8143ca1bd48461f8fb9d17f416f0940b7c2bd84f 100644 (file)
@@ -1,5 +1,5 @@
 # logl.m4
-# serial 18
+# serial 19
 dnl Copyright (C) 2010-2025 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -104,7 +104,6 @@ AC_DEFUN([gl_FUNC_LOGL],
 ])
 
 dnl Test whether logl() works.
-dnl On OSF/1 5.1, logl(-0.0L) is NaN.
 dnl On NetBSD 9.3, the result is accurate to only 16 digits.
 AC_DEFUN([gl_FUNC_LOGL_WORKS],
 [
@@ -161,13 +160,6 @@ int main (int argc, char *argv[])
 {
   long double (* volatile my_logl) (long double) = argc ? logl : dummy;
   int result = 0;
-  /* This test fails on OSF/1 5.1.  */
-  {
-    gx = -0.0L;
-    gy = logl (gx);
-    if (!(gy + gy == gy))
-      result |= 1;
-  }
   /* This test fails on musl 1.2.2/arm64, musl 1.2.2/s390x, NetBSD 9.3.  */
   {
     const long double TWO_LDBL_MANT_DIG = /* 2^LDBL_MANT_DIG */
@@ -179,7 +171,7 @@ int main (int argc, char *argv[])
     long double x = 16.981137113807045L;
     long double err = (my_logl (x) + my_logl (1.0L / x)) * TWO_LDBL_MANT_DIG;
     if (!(err >= -100.0L && err <= 100.0L))
-      result |= 2;
+      result |= 1;
   }
 
   return result;