mirror of
https://github.com/vale981/arb
synced 2025-03-06 09:51:39 -05:00
avoid another square root, and fix formula in the documentation
This commit is contained in:
parent
8dfba32d8c
commit
2ba3e36dbd
2 changed files with 3 additions and 4 deletions
|
@ -142,10 +142,9 @@ acb_hypgeom_erf_asymp(acb_t res, const acb_t z, int complementary, slong prec, s
|
||||||
acb_exp(t, t, prec2);
|
acb_exp(t, t, prec2);
|
||||||
acb_mul(u, u, t, prec2);
|
acb_mul(u, u, t, prec2);
|
||||||
|
|
||||||
acb_const_pi(t, prec2);
|
arb_const_sqrt_pi(acb_realref(t), prec2);
|
||||||
acb_sqrt(t, t, prec2);
|
arb_zero(acb_imagref(t));
|
||||||
acb_mul(t, t, z, prec2);
|
acb_mul(t, t, z, prec2);
|
||||||
|
|
||||||
acb_div(u, u, t, prec2);
|
acb_div(u, u, t, prec2);
|
||||||
|
|
||||||
/* branch cut term: -1 or 1 */
|
/* branch cut term: -1 or 1 */
|
||||||
|
|
|
@ -251,7 +251,7 @@ Error functions and Fresnel integrals
|
||||||
\operatorname{erf}(z) &= \frac{z}{\sqrt{z^2}}
|
\operatorname{erf}(z) &= \frac{z}{\sqrt{z^2}}
|
||||||
\left(1 - \frac{e^{-z^2}}{\sqrt{\pi}}
|
\left(1 - \frac{e^{-z^2}}{\sqrt{\pi}}
|
||||||
U(\tfrac{1}{2}, \tfrac{1}{2}, z^2)\right) =
|
U(\tfrac{1}{2}, \tfrac{1}{2}, z^2)\right) =
|
||||||
\frac{z}{\sqrt{z^2}} - \frac{z e^{-z^2}}{\sqrt{\pi}}
|
\frac{z}{\sqrt{z^2}} - \frac{e^{-z^2}}{z \sqrt{\pi}}
|
||||||
U^{*}(\tfrac{1}{2}, \tfrac{1}{2}, z^2).
|
U^{*}(\tfrac{1}{2}, \tfrac{1}{2}, z^2).
|
||||||
|
|
||||||
The *asymp* version takes a second precision to use for the *U* term.
|
The *asymp* version takes a second precision to use for the *U* term.
|
||||||
|
|
Loading…
Add table
Reference in a new issue