search for: fp_t

Displaying 1 result from an estimated 1 matches for "fp_t".

Did you mean: gfp_t
2003 Aug 25
1
Re: R 1.7.x and inaccurate log1p() on OpenBSD 3.2 and NetBSD 1.6 (PR#3979)
...00000000000e+00 100 7.888609052210118e-31 0.000000000000000e+00 The whole point of log1p(x) is to return accurate results for |x| << 1, and the OpenBSD/FreeBSD folks failed to understand that. The simple solution for a missing log1p() that I adopted in hoc is this internal function: fp_t Log1p(fp_t x) { #if defined(HAVE_LOG1PF) || defined(HAVE_LOG1P) || defined(HAVE_LOG1PL) return (log1p(x)); #else fp_t u; /* Use log(), corrected to first order for truncation loss */ u = FP(1.0) + x; if (u == FP(1.0)) return (x); else...