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

John W. Eaton jwe at bevo.che.wisc.edu
Tue Aug 5 11:47:50 MEST 2003


On  5-Aug-2003, Peter Dalgaard BSA <p.dalgaard at 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.

jwe



More information about the R-devel mailing list