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:> > 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) #--> NAHere 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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-