Can anybody of the architects of R enlighten me about the reasoning behind the selection of the IEEE 754 mode for the building of R, please? Special points of interest are: 1. The selection seems to be based on the availability of isnan() and finite(). Is this a common way to test for IEEE 754? 2. The C9x draft introduces isfinite() instead of finite() (and as I see, some systems, e.g. the macintosh, use this naming already). This is a deviation from the old ieee754 C mapping. I do not know, where we are in this transformation process now (most compilers seem to use finite(), still). 3. The C9x draft introduces the is*() functionality under the name of "classification MACROS". If an implementation implements this standard, autoconf misses isnan() and isfinite(). ============================================================================Thomas Hoffmann, Institut fuer Halbleiter- und Mikrosystemtechnik, TU Dresden E-mail: hoffmann@ehmgs2.et.tu-dresden.de -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Thomas Hoffmann <hoffmann@ehmgs2.et.tu-dresden.de> writes:> Can anybody of the architects of R enlighten me about the reasoning behind the selection of the IEEE 754 > mode for the building of R, please? > > Special points of interest are: > > 1. The selection seems to be based on the availability of isnan() and finite(). Is this a common way > to test for IEEE 754? > > 2. The C9x draft introduces isfinite() instead of finite() (and as I see, some systems, e.g. the > macintosh, use this naming already). This is a deviation from the old ieee754 C mapping. I do not > know, where we are in this transformation process now (most compilers seem to use finite(), still). > > 3. The C9x draft introduces the is*() functionality under the name of "classification MACROS". If an > implementation implements this standard, autoconf misses isnan() and isfinite(). >Thanks for your comments. If you have suggestions for a safer way of detecting the functionality in a platform-dependent way, we'd be happy to know about it. However, one has to be careful; e.g., Solaris has only finite() and no isfinite(), linux has both. There seems to be almost no consistency in how different systems signal the precence of IEEE compatibility. The heuristics in autoconf are more or less lifted off of other packages like Octave (right, Kurt?) and are by no means failsafe. I don't think it is a big deal to insert a check for finite() *or* isfinite(), if that helps with some of your problems. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> >>>>> Peter Dalgaard BSA writes: > > > Thomas Hoffmann <hoffmann@ehmgs2.et.tu-dresden.de> writes: > >> 3. The C9x draft introducesthe is*() functionality under the name of "classification MACROS". If an> >>implementation implements this standard, autoconf misses isnan() and isfinite(). > >>The problem for me is, that if isnan and isfinite are the way C9x says (i.e. are MACROS), then configure concludes "not there" (AC_FUNCS misses macros (intentionally)).>From this it reasons "not IEEE 754".Then I get back to a native finite() in Arith.h, but IEEE 754 mode was switched off. So I see two topics: 1. Maybe not to (only) check if isnan/isfinite are library functions, but also to check for working macros (I have not found a predefined macro in Autoconf for this). This seems of some importance to me, because it is not only an idiosyncracy of a singular system, but may become a more widespread problem if systems become C9x compliant someday. 2. Introduce a more bulletproof check for IEEE 754. Is there possibly a computation we can carry out and conclude from its result to IEEE 754? I just have no idea. ============================================================================Thomas Hoffmann, Institut fuer Halbleiter- und Mikrosystemtechnik, TU Dresden E-mail: hoffmann@ehmgs2.et.tu-dresden.de -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._