NEWS | R Documentation |
New vignette ‘rationalRound’, comparing CRAN package gmp's based exact rational rounding with our package's algorithms.
adapt ‘tests/’ to failing (NaN) for some "r3.C"
cases, when there are no long doubles (as on Mac M1).
in roundX()
's help page example, consider numerical noise
when checking for equality of different versions.
The ‘Rounding’ vignette now gives R 4.0.0's state and mentions mathematical exact rounding via rational arithmetic.
Tweaked ‘tests/’ slightly so they work on an R configured
with --no-long-double
.
Added trace
option to "r3d.C"
, as it failed on
32-bit (Windows and Fedora 30) platforms, giving Inf
7 out of
16 times for roundX(.Machine$double.xmax, -(295:310), "r3d.C")
.
Added rounding version "r3d.C"
, version of "r3.C"
which is not using any long double
and should match the
pure R version "r3"
more closely.
externalized round_r3()
and added info
option.
provide simple wrapper roundAll()
to apply all
roundVersions
.
Obey CRAN requirements by adding info to ‘DESCRIPTION’, etc.
Added C rounding version "r3.C"
, by translating the R
code of "r3"
to C, making use of long double
to
possibly get extended accuracy.
added "sprintf"
version for round()
; new roundVersions
, Jan. 2.
+ first regression tests.
Added R (interface to libc) version of C99 libmath functions logB()
, ilogb()
,
nearbyint()
, fpclassify()
, isnormal()
,
signbit()
, and nextafter()
.
added "r2a.C"
version of round()
, corresponding
to my (svn r77618; Dec 24, 2019) commit to R-devel.
added "r3"
, my “optimal” round()
pure R version.
new randI()
for random integers of specified number of
digits, in order to create simulated data examples for
round*()
testing.
New package round: Implements several versions of
round(x, digits)
;
with just the one function roundX(x, digits, version)
and
possible versions c("r0", "r1", "r1a", "r2")
, all via C code
of current (R-devel) and former (R and R-devel) versions of R's own
round(x, digits)
.
E.g., "r2"
is related to my change of round()
in
R-devel via svn commit r77618, on 2019-12-24, with message
tweaks to round() bug fix for PR#17668 in r77609.