mirror of
https://github.com/vale981/arb
synced 2025-03-04 08:51:40 -05:00
fix issue #404: nan fp computation resulting in unreasonably large N in erf on some systems
This commit is contained in:
parent
076249eaee
commit
7de55e6b43
1 changed files with 2 additions and 0 deletions
|
@ -97,6 +97,8 @@ arb_hypgeom_erf_1f1b(arb_t res, const arb_t z, slong prec)
|
|||
dz = arf_get_d(arb_midref(z), ARF_RND_DOWN);
|
||||
dz = fabs(dz);
|
||||
u = -dz * dz + prec * LOG2 + log(dz);
|
||||
if (dz < 1.0)
|
||||
u = FLINT_MAX(u, 1e-6);
|
||||
u = u / d_lambertw(u / (EXP1 * dz * dz));
|
||||
N = u + 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue