Skip to content

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

2 messages · Martin Maechler, Peter Dalgaard

#
signif(.) is a <primitive> function.

Unfortunately, I couldn't even find WHERE in the source,
  signif(.) is defined.

Here are the symptoms:

xmin <- .Machine $ double.xmin
signif(xmin,3) #--> NA

umach <- unlist(.Machine)[paste("double.x", c("min","max"), sep='')]
for(dig in 1:10) {cat("dig=",dig,": "); print(signif(umach, digits = dig))}


-------
Why do I "complain"?  
	-- it breaks  str(.Machine), now that I've improved 'str'.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#
Martin Maechler <maechler@stat.math.ethz.ch> writes:
In src/math/prec.c
Here is the disease:
[1] 2.225074e-308
[1] NA

- and the cure:
[1] 222.5074

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