lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] confused by latest expm1.c changes


From: Vadim Zeitlin
Subject: [lmi] confused by latest expm1.c changes
Date: Mon, 23 Jun 2008 00:24:44 +0200

 Hello (Greg),

 I'm a bit confused by the latest change to expm1.c:

    http://cvs.savannah.gnu.org/viewvc/lmi/expm1.c?root=lmi&r1=1.8&r2=1.9

The commit message simply says "Prevent type issues diagnosed by gcc-4" but
this check in changed the conditions in expm1.c without changing the names
of the functions themselves which seems wrong to me: shouldn't we define
expm1l() and not expm1() inside a !LMI_COMPILER_PROVIDES_EXPM1L test?

 If I'm right, the following patch needs to be applied:

--- expm1.c     2008-06-20 13:14:40 +0000
+++ expm1.c     2008-06-22 22:24:21 +0000
@@ -33,7 +33,7 @@
  */
 #if !defined LMI_COMPILER_PROVIDES_EXPM1L
 #   ifdef __GNUC__
-double expm1(double x);
+long double expm1l(long double x);
 #define LOGE2L  6.9314718055994530941723E-1L
 #define LOG2EL  1.4426950408889634073599E0L

@@ -46,7 +46,7 @@
  *
  * End local GWC modifications. */

-double expm1 (double x)
+long double expm1l(long double x)
 {
   if (fabs(x) < LOGE2L)
     {
@@ -68,7 +68,7 @@
 #       ifdef __COMO__
             extern "C"
 #       endif // __COMO__
-            double expm1(double x) {return exp(x) - 1.0;}
+            long double expm1l(long double x) {return exp(x) - 1.0;}
 #   endif // Not gcc.
 #endif // !defined LMI_COMPILER_PROVIDES_EXPM1L

@@ -77,7 +77,7 @@
 #       ifdef __COMO__
             extern "C"
 #       endif // __COMO__
-            double log1p(double x) {return log(1.0 + x);}
+            long double log1pl(long double x) {return log(1.0 + x);}
 #endif // !defined LMI_COMPILER_PROVIDES_LOG1PL

 /* End local GWC modifications. */


 Thanks,
VZ





reply via email to

[Prev in Thread] Current Thread [Next in Thread]