Re: R-alpha: Machine Constants

Douglas Bates (bates@stat.wisc.edu)
Fri, 6 Dec 1996 09:30:50 -0600 (CST)


Message-Id: <m0vW2Ek-000hhyC@franz.stat.wisc.edu>
Date: Fri, 6 Dec 1996 09:30:50 -0600 (CST)
From: Douglas Bates <bates@stat.wisc.edu>
To: George White <gwhite@cabot.bio.dfo.ca>
Subject: Re: R-alpha: Machine Constants
In-Reply-To: <199612061203.NAA24909@hypatia.math.ethz.ch>

The version of machar.c that George sent gives incorrect results when
compiled on an Intel-Linux machine with -O.  I haven't tried declaring
the variables as volatile yet.
 bash$ uname -a
 Linux franz 2.0.24 #1 Wed Nov 6 16:37:27 CST 1996 i686
 bash$ cc -o machar -DSP -O machar.c
 bash$ ./machar
 Single  precision MACHAR constants
 ibeta  = 2
 it     = 64
 irnd   = 2
 ngrd   = 0
 machep = -63
 negep  = -64
 iexp   = 2
 minexp = -150
 maxexp = -148
 eps      1.0842021724855044e-19   20000000 
 epsneg   5.4210108624275222e-20   1F800000 
 xmin     0.0000000000000000e+00          0 
 xmax                        Inf   7F800000 
 bash$ cc -o machar -DSP machar.c
 bash$ ./machar
 Single  precision MACHAR constants
 ibeta  = 2
 it     = 24
 irnd   = 5
 ngrd   = 0
 machep = -23
 negep  = -24
 iexp   = 8
 minexp = -126
 maxexp = 128
 eps      1.1920928955078125e-07   34000000 
 epsneg   5.9604644775390625e-08   33800000 
 xmin     1.1754943508222875e-38     800000 
 xmax     3.4028234663852886e+38   7F7FFFFF 
 bash$ cc -o machar -DDP -O machar.c
 bash$ ./machar
 Double  precision MACHAR constants
 ibeta  = 2
 it     = 64
 irnd   = 2
 ngrd   = 0
 machep = -63
 negep  = -64
 iexp   = 2
 minexp = -1075
 maxexp = -1073
 eps      1.0842021724855044e-19          0   3C000000 
 epsneg   5.4210108624275222e-20          0   3BF00000 
 xmin     0.0000000000000000e+00          0          0 
 xmax                        Inf          0   7FF00000 
 bash$ cc -o machar -DDP machar.c
 bash$ ./machar
 Double  precision MACHAR constants
 ibeta  = 2
 it     = 53
 irnd   = 5
 ngrd   = 0
 machep = -52
 negep  = -53
 iexp   = 11
 minexp = -1022
 maxexp = 1024
 eps      2.2204460492503131e-16          0   3CB00000 
 epsneg   1.1102230246251565e-16          0   3CA00000 
 xmin    2.2250738585072014e-308          0     100000 
 xmax    1.7976931348623157e+308   FFFFFFFF   7FEFFFFF 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- For info or help, send "info" or "help",
To [un]subscribe, send "[un]subscribe"
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-