search for: r_rint

Displaying 3 results from an estimated 3 matches for "r_rint".

Did you mean: r_print
2001 Oct 22
1
round() doesn't (PR#1139)
...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: pow10 = R_pow_di(10., dig) ... return sgn * (intx + R_rint(x * pow10) / pow10); and (says Peter), > the problem is most likely that pow10 (== 1/100) has no finite binary > representation. Patches are welcome... I'm not up to patching C code, but I will say that a workaround is: R> round(round(100000/3, -2)) - 33300 [1] 0 and a smarter C-pr...
2002 Jan 16
0
round() doesn't (PR#1139)
...fdef 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)floor(digits + 0.5); if(x < 0.) { sgn = -1.; x = -x; } else sgn = 1.; if (dig == 0) { return sgn * R_rint(x); } else if (dig > 0) { pow10 = R_pow_di(10., dig); intx = floor(x); return sgn * (intx + R_rint((x-intx) * pow10) / pow10); } else { pow10 = R_pow_di(10., -dig); return sgn * R_rint(x/pow10) * pow10; } } ---- end C code ----...
2001 Feb 06
2
X11 warnings about "wrong" font sizes (PR#840)
...10, 11, 12, 14, 17, 18, 20, 24, 25, 34 can be obtained via - an integer "size" at 100 dpi, namely 6, 7, 8, 9, 10, 12, 13, - 14, 17, 18, 24 points. It's almost y = x * 100/72, but not - quite. The constants were found using lm(). --pd */ - if (IS_100DPI) size = R_rint(size * 1.43 - 0.4); - /* search fontcache */ for ( i = nfonts ; i-- ; ) { f = &fontcache[i]; if ( f->face == face && f->size == size ) return f->font; } ! /* 'size' is the requested size, 'pixelsize' the size of the ! actu...