NEWS | R Documentation |
bd0(x, np, delta, ..)
now uses
if (|x-np| <= delta * (x+np))
(less-equal instead of strictly
less), and hence setting delta = 0
is now allowed, using the
series expansion only for x == np
, useful e.g., for the case
of highly accurate mpfr-numbers.
Similarly, in log1pmx(x, .., eps2, ..)
, eps2 = 0
is now allowed.
consistency between ebd0()
and ebd0C()
:
multiplication * e
coming last ("bug" did not show ..).
okLongDouble()
should no longer fail on M1 mac.
ebd0C()
now checking |yl| < 5.5 before returning; was
horrendously wrong on Windows compiled with -mnative
as long
as it included (the default) -mfma
(FMA:= Fused-Multiply-Add).
fix rchk
issue: "need" PROTECT(.)
while calling allocating lgamma1p()
.
new ebd0C()
interface to C version; helps to fix
lapsus in pure R version ebd0()
:
ebd0(x, M)
for large M
now checks for overflow in
M/x
, and notably the case f * 2^-(e+10) =: fg == Inf
.
In bd0()
work around underflow of (x-np)/(x+np)
.
new R functions frexp()
and ldexp()
for getting
and setting base-2 representations of numbers,
and new R function modf()
to split number into integer and fractional part,
all interfacing the C99 (math lib) standard functions of the same name.
logcfR.(x)
has been “vectorized” in x
even
though it's iterative with different number of iterations for each
x[i]
, and is hence considerably faster when x
is an
"mpfr"
vector.
TODO: Consider renaming the two logcfR versions; at least neither is deprecated!
fixed embarrassing typo (two i
's) bug in logcfR()
stirlerr(n)
now also works when is.integer(n)
and
n
is large enough for n * n
to overflow (to NA
).
fix typo/thinko in dnbinomR()
ditto in logcfR(*, trace=TRUE)
iteration report.
dpois_raw(x, *)
now works up to maximal x
, now
preventing overflow in previous 2*pi*x
computation.
dnbinomR()
and dnbinom.mu()
fix for x >
size
when log=TRUE
, notably for x >> size
.
new bd0_*()
versions of bd0()
, based mainly on log1pmx()
.
To be more modular, our ‘test-tools.R’ no longer
source()
those of Matrix.
‘src/bd0.c’ gave warning with some compiler settings with
-Wself-assign
.
‘test-tools.R’ readRDS_()
thinko fixed.
Provide R functions
log1mexpC()
, log1pexpC()
, log1pmxC()
, and lgamma1pC()
,
all interfacing to R's C API (‘Rmath.h’), aka ‘Rmathlib’.
New pnormAsymp()
for asymptotic (typically upper tail,
log scale) approximation of pnorm()
. With Rmpfr, we
can see how accurate these are in detail.
New dnbinomR()
finding better code for R itself,
dnbinom.mu()
and dbinom_raw()
; also new utility
functions bd0()
and stirlerr()
, both vectorized,
and also working with "mpfr"-numbers, such that dpois_raw()
now does so, too.
Additionally, an “extended” version of bd0()
called
ebd0()
in pure R, where a C version was proposed by Morten
Welinder in R's bugzilla, PR#15628.
Experimentally, also provide p1l1()
and its Taylor series
approximations p1l1ser()
which could be employed for
bd0()
/ ebd0()
instead of the current algorithms.
Several C level utilities to be .Call()ed from R, from R's
mathlib, ldexp()
and frexp()
even from C math.
Pure R implementations (somewhat experimental) of corresponding
R Mathlib C functions: qbinomR()
, qnbinomR()
, and qpoisR()
each with several tuning parameters for the underlying algorithm,
notably the root-finding parts.
newly, logcf()
now based on C code, perfectly
vectorizes; the pure R version, now called logcfR(x, *)
currently still runs the iterations simultaneously for all 'x[i]' and
hence convergence and rescaling happen by “group decision”,
efficiently but undesirable for strict comparisons.
logcfR(x, *)
and log1pmx(x, *)
now also work for
"mpfr"-numbers x
, and log1pmx()
gets optional
eps2 = 1e-2
and minL1 = -0.791
arguments, the defaults
of which may change, as I think at least the latter to not be
perfect.
Now lb_chiAsymp(nu, order)
works up to order 8.
Provide the first parts of a new vignette
(‘../vignettes/log1pmx-etc.Rnw’) on log1pmx()
,
bd0()
, and stirlerr()
, which should contain part of
Loader(2000)'s report and new findings of improved bd0()
and
stirlerr()
computations.
New functions pnormL*()
and pnormU*()
for
(mathematically proven) lower and upper bound to pnorm()
,
notably also for investigation with log.p=TRUE
.
qnormR()
, implementing current R's qnorm()
in
pure R, notably with trace
and version
options.
Reorganize tests; notably to become less platform dependent.
Many new phyper*()
functions and helpers for them, such
as Bernoulli numbers Bern()
and asymptotic
lgammaAsymp()
.
Notably phyperR2()
which is a pure R version of R's
own (C code based) phyper()
.
pnbetaAS310()
gained a useAS226
option.
New okLongDouble()
function, notably for detecting that
with a valgrind
ed version of R, long double
C
arithmetic seems to silently switch to (simple) double
precision.
long double printing from C now should happen correctly on all platforms including 32- and 64-bit Windows.
more efficient (internally vectorized) dntJKBf()
.
Consequently, dntJKBf1()
is deprecated now.
pntR()
(and pntR1()
) get new option
use.pnorm
(the default of which had been hard coded previously).
fix thinko in any_mpfr()
and all_mpfr()
.
pnchisqRC()
's C code gave severe valgrind warnings;
fixed printing of long double
etc;
also added special MinGW deal in Windows.
ppoisD()
behaves differently in a valgrinded version;
for now, reproducible only when using valgrind on non-valgrinded
installed package.
Renamed (and generalized / merged) many functions to have less "." in names.
New pnbetaAS310()
function interfacing to my
corrected C version of 'ASA 310' (2007).
New algdiv()
function interfacing to the 'TOMS 708' version of
our logQab()
.
New pl2curves()
which generalizes (somewhat) previous
function p.dnchiB()
.
Made newton()
more flexible with new xMin
and
xMax
arguments which are notably useful for q*()
(quantile function) computations.
Correspondingly replaced previous qchisq2()
and
qchisqA()
with new qchisqN()
(‘N’ewton).
new pnchisqRC()
, a version of R's C level non-central
chi-squared, with additional options.
“new” logspace.add()
and logspace.sub()
.
“new” pnchisqT93()
(plus its two auxiliaries),
implementing Temme(1993)'s approximations.
“new” pnchisqBolKuz()
and qnchisqBolKuz()
implementing Bol'shev and Kuznetzov (1963)'s approximations.
“new” pnchi1sq()
and pnchi2sq()
with
“exact” formulas for the special cases df=1
and
df=3
.
simplified formula in dtWV()
.
qnchisqPearson(pp, df=DF, ncp=100)
and
qnchisqSankaran_d(*)
no longer return NaN
for very
large DF = 1e200
.
pnchisq()
now also has default verbose = 0
as all
other such functions with verbose
(or trace[.lev]
optional argument.
Move many of my up to 15 years old DPQ computation utilities into a package, to become public, “bloggable”, etc.