bessel_?.c constants (fwd)

Gregory R. Warnes warnes@biostat.washington.edu
Sat, 6 Mar 1999 12:11:18 -0800 (PST)


This doesn't seem to have made it to the list, so here it is again.  Sorry
if this results in duplicates.

---------- Forwarded message ----------
Date: Fri, 5 Mar 1999 21:36:44 -0800 (PST)
From: Gregory R. Warnes <warnes@biostat.washington.edu>
To: R devel <r-devel@stat.math.ethz.ch>
Subject: bessel_?.c constants


Hi All,

I've been digging around in src/nmath and have discovered that there are
two sets of "machine constants" in bessel_l.c and bessel_j.c which have
different values:

bessel_i.c:    static double ensig = 1e16;
bessel_i.c:    static double rtnsig = 1e-4;
bessel_i.c:    static double enmten = 8.9e-308;
bessel_i.c:    static double enten = 1e308;

bessel_j.c:    static double ensig = 1e17;
bessel_j.c:    static double rtnsig = 1e-4;
bessel_j.c:    static double enmten = 1.2e-37;
bessel_j.c:    static double enten = 1e38;

According to the comments heading the files, the first set is correct for
IEEE Double-Precision hardware (the comments give the same values for
these parameters in each file):


         Approximate values for some important machines are:
    
    			    it	  NSIG	  ENTEN	      ENSIG
      [...]    
      IEEE (IBM/XT,
      SUN, etc.) (D.P.)	    53	   16	 1.0D+308    1.0D+16
      [...]

    			   RTNSIG      ENMTEN	   XLARGE
      [...]   
      IEEE (IBM/XT,
      SUN, etc.) (D.P.)	   1.0E-4    8.90D-308	  1.0D+4
      [...]

Is there some reason for using different values in bessel_j.c than in
bessel_l.c?  Or is this just a bug? ;^)

-Greg

PS:  Where is DBL_EPSILON defined, and what is its value?




-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._