Changes in version 0.6-1 (2025-10-13) NEW FEATURES o pnchisq_ss() gets new optional argument ssr = ss(....) for flexibility. o New gam1() calls mpfr-ized direct code or the double-only C code gam1d() o Add Abramowitz & Stegun, p.945, pbeta() approximations 26.5.20 and 26.5.21 as pbetaAS_eq20() and pbetaAS_eq21(). For “didactical” reasons, also provide the simple moment matching normal approximation pbetaNorm2(). For now, also low-level versions .pbeta.eq20(), ..., .pbetaSeq21(). BUG FIXES o ldexp({}, 1) or pow({}, 2) no longer segfault. o pbetaRv1() for verbose = TRUE and/or mpfr-number arguments. o dnbinomR() and dnbinom.mu(): fix vectorization logic, using ifelse(). o pbetaRv1() for verbose = TRUE and/or mpfr-number arguments. o dnbinomR() and dnbinom.mu(): fix vectorization logic, using ifelse(). Changes in version 0.6-0 (2025-07-08) NEW FEATURES o added functions dltgammaInc() and lgammaP11(), both from TOMS Algorithm 1006 by Rémy Abergel and Lionel Moisan (2020). o C-level logcf() now uses long double, i.e., R's LDOUBLE, to possibly improve for smallish eps. logcf() also got an optional maxit argument. For the pure-R version, renamed the simplistic and slow one from logcfR() to logcfR_vec() and the smarter faster one from logcfR.() to logcfR(). They have given identical results in test cases, and logcfR() should really be the one used practically. o bd0C() has new version = "R_2025_0510" where as bd0() has just been updated to the latest version also in R-devel svn revisions 88190,1,3 and 88208. New bd0_p1l1(), also as version in dpois_raw(); bd0(), and the now four bd0_() functions work with x=Inf and properly vectorize. o The log1pmx vignette now shows that for dpois(x, 48) at least, using the two parts of ebd0() gives clearly the most accurate values (used in R since ca. 2022). On the other hand, new evaluations at the end of tests/bd0-tst.R indicate that increasing the (only in DPQ) optional cutoff from delta = 0.1 to about delta = 0.4 gets much more accurate bd0(x, np) values, notably when |x - np| is smallish for relatively large x and np where ebd0() is clearly less accurate. BUG FIXES o rchk PROTECT fix in bd0.c. o Strictly _not_ comparing Rboolean with NA_LOGICAL. o log1pmx(Inf) is correct (= -Inf) now. o dpois_raw(1, {}) now works (returning numeric(0)). MISC o tests/pow-tst.R also work on "bizarre" platforms where osVersion is NULL. o tests/stirlerr-tst.R uses many more if(doExtras) ... to run faster without “extras”. Changes in version 0.5-9 (2024-08-23) NEW FEATURES o dbinom_raw() gets a new more accurate version = "R4.4", using the new pow1p() function, from R-devel, i.e., R 4.4.0 and newer. o stirlerr_simpl() gets argument version, a string specifying the exact function to be used, currently with options ("R3", "lgamma1p", "MM2", "n0"). The first being the direct formula hardwired in R up to versions 4.3.z, "lgamma1p" is to use lgamma1p(n) instead of lgamma(n+1), whereas "MM2" is a version using lgamma(n) and slightly more accurate for n \in [1, 5], approximately. stirlerr() correspondingly gets argument direct.ver to be passed to stirlerr_simpl(., version=*) in the “direct” formula case, when n < cutoffs[1]. o stirlerr() gets argument order allowing currently up to order 20 terms (constants S0..S19) in Stirling's series (and _not_ using cutoffs or direct formula). o New stirlerrC() interfacing to C code which should “parallelize” R's own C level stirlerr(). More documentation and tests; experiments added in ../Misc/stirlerr-trms.R; nice explorations to ../tests/stirlerr-tst.R. o New functions pow(x,y) and pow_di(x,y) computing x^y as in R's C API Rmathlib. o dgamma.R(x, *) gets new optional argument _dpois_r_args_. o New function expm1x() providing exp(x) - 1 - x numerically accurately also for small |x|. o New experimental Ixpq() implementing Gil et al.(2023)'s direct incomplete Beta function, i.e., pbeta() version. *TODO*: make it work with mpfr() ! o New function pntGST23_T6() and pntGST23_1() implementing Gil et al.(2023)'s first asymptotic formula (Theorem 6), and based on Temme's Maple code for their direct computation (1). pnt*(): CDF of the non-central t-distribution. o New function pntVW13() implementing Viktor Witkovský(2013)'s algorithm, from his published Matlab code. o Data set pt_Witkovsky_Tab1 containing (the free software subset of) Viktor Witkovský(2013)'s _Table 1_ of pt(x, df=nu, ncp=delta) examples; updated with octave results for both the original 2013 matlab code and the 2022 corrected one. o lgamma1p_series(x, k), the Taylor series approximations for lgamma1p(x) := \log Gamma(1+x) are now available up to k = 15, also for mpfr() numbers x. o New gam1d() and gamln1() providing more TOMS 708 auxiliary routines. BUG FIXES o _fix_ format fixes for when 'long != long long'. o dgamma.R(x, ..) now _does_ vectorize in x, as documented. o minor adjustment of pntR()'s default use.pnorm. o src/bd0.c needed one more PROTECT(). Misc o new tests/dt-ex.R exploring dt() accuracy issues, mostly historical, but newly for df=nu << 1. Changes in version 0.5-8 (2023-12-01) BUG FIXES o ebd0() and C level ebd0C() now work with _long_ vectors and hence return data.frame(yh = *, yl = *) instead of 2-row matrix. o format fixes: "%lld" and (long long) notably for R_xlen_t. Changes in version 0.5-7 (2023-11-03) Misc o fix "lost braces" o replace UTF-8 greek glyps by plotmath Changes in version 0.5-6 (2023-09-07) NEW FEATURES o phyperR() gets lower.tail=TRUE, log.p=FALSE arguments. BUG FIXES o Correctly vectorize phyperR(). Misc o Documentation (and internal comment) updates for qbinomR() and qnbinomR(), notably fixing "empty" argument doc. o Deprecated phyperBinMolenaar(); it has been synonym to phyperBinMolenaar.1(). o Fix LaTeX warnings/errors by removing amazingly many \cr in man/*.Rd files. Changes in version 0.5-5 (2023-06-23) BUG FIXES o qbinomR(p, *), qnbinomR(p, *), and qpoisR(p, *): Fix R_Q_P01_boundaries(p, ..) for trivial boundaries, e.g., p \in \{0,1\} for log.p=FALSE. Misc o A new flang Fortran compiler does not know outdated derfc(), but needs current standard erfc(). Changes in version 0.5-4 (2023-04-14) NEW FEATURES o New R function qnormCappr(). o New R function rexpm1() from TOMS 708. o Provide also qnormR(*, version = "1.0.x") and "1.0_noN", for history's sake. o New R function rlog1() from TOMS 708. BUG FIXES o qnormUappr() & qnormUappr6() were _wrongly_ negative for lp in [-.693147, 0) (corresponding to p > 1/2). Misc o Tweaks to the qnorm-asymp vignette, related to the JSS submission. o tests/pqnorm_extreme.R plots more about the pnormAsymp() relative errors. o Apple clang 14.0.3 needs looser tolerance for logcf{R}() and dbinom_raw() comparisons. o Minimally document the _internal_ .D_*() and .DT_*() utilities, as we provide them to experts and e.g., package DPQmpfr. Changes in version 0.5-3 (2022-12-01) NEW FEATURES o New R functions qntR() and qtU(), Vectorize()d versions of qntR1() and qtU1(), respectively. o New qtR() <- Vectorize(qntR1, *); pure R implementation of R's Mathlib C-level qt(), but additionally allowing tweaks, used for fixing R's bug PR#18630. Added (optional) log-scale Newton steps via logNewton = log.p, needing more tests. o New qtNappr() - from the remark in R's nmath/qt.c about very large df approximation, now with all 4 large-df terms from Abramowitz & Stegun's (26.7.5). o New gammaVer() to exemplify R's (partly historical) versions of gamma() implementations. o New qnormUappr6(), providing the ‘6 coefficients’-approximation of A. & S. to qnorm(). o qnormR() gets new version = "2022-08-04" which uses MM's newly derived asymptotic approximations to qnorm(). o New qnormAsymp() providing new asymptotic approximations to qnorm(). o Added vignette “Asymptotic Tail Formulas for Gaussian Quantiles”. o New chebychevPoly() (and auxiliaries) for evaluation of Chebyshev polynomials. Changes in version 0.5-2 (2022-06-10) NEW FEATURES o qbetaAppr() (and the qbetaAppr.{1,3}() auxiliaries) now get a log.p argument. o all(?) qbeta.Appr*() functions now accept a lower.tail argument (with default TRUE). o New R function dpsifn(), as interface to R's C API dpsifn(), the workhorse of all R's psigamma() functions. o dpois_raw(x, lambda, *) gets new cutoff small.x__lambda to _not_ use bd0() or ebd0() when x is much smaller than lambda. o Simple functions, mostly for didactical and comparison purposes, dpois_simpl(), dpois_simpl0() and stirlerr_simpl(), all of which use the “simple” direct formula which leads to numerical cancellation typically. o New R function bpser() interfacing to the C function of the same in R's Mathlib pbeta() or bratio() in file nmath/toms708.c. BUG FIXES o Updated URL of Abramowitz & Stegun. o Fixed \ escape in one man/*.Rd Misc o Our tests/*.R no longer rely on the Matrix test-tools.R collection but rather use our own. o In tests/chisq-nonc-ex.R (and DESCRIPTION), we've replaced akima by interp as the latter has a FOSS licence. Changes in version 0.5-1 (2021-12-13) NEW FEATURES o 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. BUG FIXES o consistency between ebd0() and ebd0C(): multiplication * e coming last ("bug" did not show ..). o okLongDouble() should no longer fail on M1 mac. o 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). o fix rchk issue: "need" PROTECT(.) while calling allocating lgamma1p(). Changes in version 0.5-0 (2021-11-24) NEW FEATURES o 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. o In bd0() work around underflow of (x-np)/(x+np). o 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. o 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! BUG FIXES o fixed embarrassing typo (two i's) bug in logcfR() o stirlerr(n) now also works when is.integer(n) and n is large enough for n * n to overflow (to NA). o fix typo/thinko in dnbinomR() o ditto in logcfR(*, trace=TRUE) iteration report. o dpois_raw(x, *) now works up to maximal x, now preventing overflow in previous 2*pi*x computation. o dnbinomR() and dnbinom.mu() fix for x > size when log=TRUE, notably for x >> size. Changes in version 0.4-4 (2021-05-27) NEW FEATURES o new bd0_*() versions of bd0(), based mainly on log1pmx(). REFACTORING o To be more modular, our test-tools.R no longer source() those of Matrix. BUG FIXES o src/bd0.c gave warning with some compiler settings with -Wself-assign. o test-tools.R readRDS_() thinko fixed. Changes in version 0.4-3 (2021-05-05) NEW FEATURES o Provide R functions log1mexpC(), log1pexpC(), log1pmxC(), and lgamma1pC(), all interfacing to R's C API (Rmath.h), aka ‘Rmathlib’. o New pnormAsymp() for asymptotic (typically upper tail, log scale) approximation of pnorm(). With Rmpfr, we can see how accurate these are in detail. o 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. o Several C level utilities to be .Call()ed from R, from R's mathlib, ldexp() and frexp() even from C math. o 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. o 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. o Now lb_chiAsymp(nu, order) works up to order 8. o 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. Changes in version 0.4-2 (2020-11-09) NEW FEATURES o New functions pnormL*() and pnormU*() for (mathematically proven) lower and upper bound to pnorm(), notably also for investigation with log.p=TRUE. o qnormR(), implementing current R's qnorm() in pure R, notably with trace and version options. Changes in version 0.4-1 (2020-06-19) TESTING o Reorganize tests; notably to become less platform dependent. Changes in version 0.4-0 NEW FEATURES o Many new phyper*() functions and helpers for them, such as Bernoulli numbers Bern() and asymptotic lgammaAsymp(). o Notably phyperR2() which is a pure R version of R's own (C code based) phyper(). Changes in version 0.3-5 (2019-10-21) NEW FEATURES o pnbetaAS310() gained a useAS226 option. o New okLongDouble() function, notably for detecting that with a valgrinded version of R, long double C arithmetic seems to silently switch to (simple) double precision. BUG FIXES o long double printing from C now should happen correctly on all platforms including 32- and 64-bit Windows. Changes in version 0.3-4 NEW FEATURES o more efficient (internally vectorized) dntJKBf(). Consequently, dntJKBf1() is deprecated now. o pntR() (and pntR1()) get new option use.pnorm (the default of which had been hard coded previously). BUG FIXES o fix thinko in any_mpfr() and all_mpfr(). o pnchisqRC()'s C code gave severe valgrind warnings; fixed printing of long double etc; also added special MinGW deal in Windows. o ppoisD() behaves differently in a valgrinded version; for now, reproducible only when using valgrind on non-valgrinded installed package. Changes in version 0.3-3 (2019-10-02) NEW FEATURES o Renamed (and generalized / merged) many functions to have less "." in names. o New pnbetaAS310() function interfacing to my _corrected_ C version of 'ASA 310' (2007). o New algdiv() function interfacing to the 'TOMS 708' version of our logQab(). o New pl2curves() which generalizes (somewhat) previous function p.dnchiB(). o 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). o new pnchisqRC(), a version of R's C level non-central chi-squared, with additional options. o “new” logspace.add() and logspace.sub(). o “new” pnchisqT93() (plus its two auxiliaries), implementing Temme(1993)'s approximations. o “new” pnchisqBolKuz() and qnchisqBolKuz() implementing Bol'shev and Kuznetzov (1963)'s approximations. o “new” pnchi1sq() and pnchi2sq() with “exact” formulas for the special cases df=1 and df=3. o simplified formula in dtWV(). BUG FIXES o qnchisqPearson(pp, df=DF, ncp=100) and qnchisqSankaran_d(*) no longer return NaN for very large DF = 1e200. o pnchisq() now also has default verbose = 0 as all other such functions with verbose (or trace[.lev] optional argument. Changes in version 0.3-0 NEW FEATURES o Move many of my up to 15 years old DPQ computation utilities into a package, to become public, “bloggable”, etc.