Ross Ihaka ihaka@stat.auckland.ac.nz
Sun, 11 Apr 1999 08:35:38 +1200 (NZST)

The problem in eigen.c seems to be as follows.

1) f2c defines a macro abs() which does the standard abs() which
   works for all numeric types. This macro was inserted in Fortran.h.

2) recently it was recognised that there is an abs() in stdlib and
   the macro in Fortran.h was commented out.

3) unfortunately the abs() in stdlib is an integer valued function
   of an integer argument.

4) end of world.

I think the lesson is that partial translations of fortran into C and the
use of macros to get the rest of the way is VERY dangerous. 

Sometimes it is unavoidable, because we want to do some bit-fiddling or
platform dependent manipulation.  The lesson I think is to keep the use of
externally defined macros in the translations to a minimum. 

I am going to go through appl/ to look carefully at all the translations
for problems of this kind.


r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch