[Top][All Lists]

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

Re: [patch #4994] Include -lm in uptime link line when needed

From: Paul Eggert
Subject: Re: [patch #4994] Include -lm in uptime link line when needed
Date: Mon, 27 Mar 2006 14:14:37 -0800
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Would you be interested in an alternative patch that modifies
lib/strtod.c so that it does not need 'pow'?  This would fix a
continuing porting hassle with that file.

The idea is to compute 10**exponent ourselves, instead of relying on
pow.  On IEEE floating point platforms this can be done without
introducing any further rounding error.  On other platforms there
might be an additional rounding error but this isn't of much practical
importance (as the function already has rounding errors, and these
platforms are exceedingly rare these days anyway).

We'd have to stop using AC_FUNC_STRTOD, but that's OK.  AC_FUNC_STRTOD
tests for bugs in parsing "NaN", but our replacement function doesn't
parse "NaN" either.  AC_FUNC_STRTOD also tests for bugs in parsing "
+69", but is that bug of any practical importance any more?  I doubt
it, but if it is, then we should simply install a wrapper that strips
leading " +".

reply via email to

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