bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] strtod: make it more-accurate typically, and don't require l


From: Bruno Haible
Subject: Re: [PATCH] strtod: make it more-accurate typically, and don't require libm
Date: Mon, 12 Jul 2010 23:58:19 +0200
User-agent: KMail/1.9.9

Hi Paul,

Paul Eggert wrote:
> + #define ldexp dummy_ldexp
> + static double ldexp (double x, int exponent) { return x + exponent; }

This code looks fishy to someone who may not understand the intent of this
definition. How about making it clearer, like this?


--- lib/strtod.c.orig   Mon Jul 12 23:57:42 2010
+++ lib/strtod.c        Mon Jul 12 23:56:58 2010
@@ -45,7 +45,8 @@
 
 #if !HAVE_LDEXP_IN_LIBC
  #define ldexp dummy_ldexp
- static double ldexp (double x, int exponent) { return x + exponent; }
+ /* A dummy definition that will never be invoked.  */
+ static double ldexp (double x, int exponent) { abort (); return 0.0; }
 #endif
 
 /* Return X * BASE**EXPONENT.  Return an extreme value and set errno



reply via email to

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