From kleiweg at let.rug.nl  Tue Aug  5 19:53:31 2003
From: kleiweg at let.rug.nl (Peter Kleiweg)
Date: Tue Aug  5 18:53:13 2003
Subject: [Rd] RE: [R] ^ operation much slower in R 1.7.1 than in R 1.7.0
	???
In-Reply-To: <16175.53670.329214.861007@devzero.bogus.domain>
Message-ID: <Pine.LNX.4.44.0308051851060.1175-100000@kleigh.nl>

# aldus John W. Eaton :

> On  5-Aug-2003, Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk> wrote:
>
> | Also, R is generally compiled with -D NO_MATH_INLINES because of some
> | ancient messup with glibc. I'm not sure whether that is actually still
> | necessary, but it is forcing the use of the non-inlined pow() function.
>
> I think the origin of this option might be that someone reported a bug
> in Octave because exp (-Inf) was returning NaN.  The problem turned
> out to be that the inline version of exp returns NaN for Inf, NaN, and
> -Inf arguments.  These days it seems that you don't get the inline
> versions unless you use -ffast-math (at least that's what I just now
> found with gcc 3.3).  Using -DNO_MATH_INLINES might still be needed
> for some older GCC compiler/library combinations, so I don't think it
> hurts.  I'm not sure whether it matters for R, but according to the
> glibc math.h header the inline versions also don't set errno.

There were also wrong results with some goniometric function, if
I recall correctly. I can't verify it, since I now use a newer
version of gcc. To be safe, I always use -DNO_MATH_INLINES.


-- 
Peter Kleiweg
http://www.let.rug.nl/~kleiweg/


[Rd] RE: [R] ^ operation much slower in R 1.7.1 than in R 1.7.0 ???
Peter Kleiweg