search for: dbl_dig

Displaying 7 results from an estimated 7 matches for "dbl_dig".

2002 Jan 16
0
round() doesn't (PR#1139)
...all.equal(round(1e15, -2) - 1e15, 0) # Fails in R-patched Thanks to all for a great program, and congratulations on the release of 1.4.0! ---- begin C code for fround.c: ---- double fround(double x, double digits) { #define MAX_DIGITS DBL_MAX_10_EXP /* = 308 (IEEE); was till R 0.99: (DBL_DIG - 1) */ /* Note that large digits make sense for very small numbers */ double pow10, sgn, intx; int dig; #ifdef IEEE_754 if (ISNAN(x) || ISNAN(digits)) return x + digits; if(!R_FINITE(x)) return x; #endif if (digits > MAX_DIGITS) digits = MAX_DIGITS; dig = (int)fl...
2013 Oct 02
0
For numeric x, as.character(x) doesn't always match signif(x, 15)
...aracter(x)) == signif(x, 15) [1] TRUE The documentation for 'as.character' in R states this in "Details" section. 'as.character' represents real and complex numbers to 15 significant digits (technically the compiler's setting of the ISO C constant 'DBL_DIG', which will be 15 on machines supporting IEC60559 arithmetic according to the C99 standard). This ensures that all the digits in the result will be reliable (and not the result of representation error), but does mean that conversion to character and back to numeric may cha...
2001 Oct 22
1
round() doesn't (PR#1139)
R> round(100000/3, -2) - 33300 [1] -7.275958e-12 I would have hoped for 0. The problem seems to be specifically for negative "digits". This is in 1.3.1 on Solaris 2.6 (full description at bottom). [Apologies for making everyone read this 3 times; my bug.report() burped.] Peter Dalgaard <p.dalgaard@biostat.ku.dk> says the problem is in fround.c, which reads in part:
2008 Jun 18
3
Number of digits in paste funciton
Hi! Does anyone know hot to set number of digits to be printed in function 'paste'? Tine Mla?
2008 Feb 19
3
Incorrect paste() output (PR#10801)
Hello, I am writing this message because of an incorrect output by paste(). Please try the following script to see if the evidence I collected is reproducible: x <- c(10152, 28177); y <- c(9576, 26625); d <- y - x; d; [1] -576 -1552 paste(d, collapse = ", "); [1] "-576, -1552" x <- x / 1000; y <- y / 1000; d <- y - x; d; [1] -0.576 -1.552 paste(d,
1999 Jul 02
1
R-0.64.2 is released (well, mostly)
...ls. o pmatch() misbehaved on duplicate matches. o R CMD Rd2dvi <file.Rd> works again. o logical binops tried to set time series parameters before dimensions. o upped the BUFSIZE in model.c (NOT proper long-term solution). o dput(), dump() and deparse() now always use DBL_DIG (=15) digits for numeric formatting. o chull() now works for vertical borders, such as in chull(c(1,1,2),3:1). -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45...
1999 Jul 02
1
R-0.64.2 is released (well, mostly)
...ls. o pmatch() misbehaved on duplicate matches. o R CMD Rd2dvi <file.Rd> works again. o logical binops tried to set time series parameters before dimensions. o upped the BUFSIZE in model.c (NOT proper long-term solution). o dput(), dump() and deparse() now always use DBL_DIG (=15) digits for numeric formatting. o chull() now works for vertical borders, such as in chull(c(1,1,2),3:1). -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45...