From p.dalgaard@kubism.ku.dk  Tue May 27 16:56:30 1997
From: p.dalgaard@kubism.ku.dk (Peter Dalgaard BSA)
Date: 27 May 1997 17:56:30 +0200
Subject: R-alpha: signif( small , d) gives NA
In-Reply-To: Martin Maechler's message of Tue, 27 May 97 17:29:15 +0200
References: <9705271529.AA02767@>
Message-ID: <x2bu5wyklt.fsf@bush.kubism.ku.dk>

Martin Maechler <maechler@stat.math.ethz.ch> writes:

> 
> signif(.) is a <primitive> function.
> 
> Unfortunately, I couldn't even find WHERE in the source,
>   signif(.) is defined.
>

In src/math/prec.c

> Here are the symptoms:
> 
> xmin <- .Machine $ double.xmin
> signif(xmin,3) #--> NA

Here is the disease:

> xmin
[1] 2.225074e-308
> xmin * 1e310
[1] NA

- and the cure:

> xmin * 1e300 * 1e10
[1] 222.5074

I'll leave it to you (or Ross) to find a clean and general way of
fixing the source...

-- 
   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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


R-alpha: signif( small , d) gives NA
Peter Dalgaard BSA