Re: R-alpha: .Machine object

Ross Ihaka (
Thu, 14 Nov 1996 10:51:54 +1300 (NZDT)

From: Ross Ihaka <>
Date: Thu, 14 Nov 1996 10:51:54 +1300 (NZDT)
Message-Id: <>
To: George White <>
Subject: Re: R-alpha: .Machine object
In-Reply-To: <>

George White writes:
 > There are two questions here:
 > 1.  What should be in a .Machine for R?
 > Mimic what S does.  Since R can be used as a high-level shell that
 > calls procedures written in other languages, completeness in 
 > .Machine is a virtue.    
 > I prefer run-time tests such as those in the machar code from netlib over
 > the use of stored values because some of the machine parameters can be
 > affected by compiler flags and runtime libraries (I was recently bitten by
 > difference between the setting of the underflow behaviour in Win32 vs OS/2
 > such that the same binary gave different results when run in the two envts).
 > It is not unusual to find compiler defaults that disable IEEE gradual 
 > underflow, and this can have a major impact on some numerical algorithms, 
 > so it is very worthwhile to include the rounding mode in .Machine.
 > 2.  How to implement this with minimal fuss?
 > Use <limits.h>, which in my experience has been reliable.  
 > If the machar code is acceptable in GPL'd software, use run-time machar
 > values in preference to <float.h> (what we really need is a GNU <float.h>
 > that performs runtime tests!).

I have a C version of the machar code (this is what I mentioned
originally).  It costs next to nothing to return all the values it
produces.  Since there is at least one voice saying that the values I
thought were "obscure" are in fact useful, lets have 'em all.
r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: