vp.special.faddeeva_w
The Faddeeva function w(z) = exp(-z^2) erfc(-i z).
Part of the distribution vipyr; it runs from a checkout of the
repository. Planned on PyPI as pip install vipyr.
Signature
vp.special.faddeeva_w(z) Parameters
- z : complex, required
Returns
A frozen FaddeevaWResult. Iterating it gives the fields below in order; it also has
params, tests, log and check().
- w : complex
Raises
- TypeError
- An argument of the wrong type, or an unknown keyword.
- vipyr.VivBuildError
- An ImportError: no C compiler, or the program's C does not build.
Examples
import vipyr as vp
r = vp.special.faddeeva_w(z=2.0 + 1.0j)
print(r.w)
assert r.check() (0.14023958136627798+0.22221344017989914j)Each example ran as written when these pages were generated, and the output shown is what it printed.
Checked against
- Reference
- scipy.special.wofz
- Compared by
- relative error |a - b| / |b|
- Domain
- -6 <= Re z <= 6, -1 <= Im z <= 4
- Tolerance
- rel 2 × 10−14
- Why that tolerance
- Weideman's expansion with N = 40 terms is 10−14 relative on the domain (lib/zfunc_ref.py); wofz itself is good to a few ulps
Source
- Manifest: kernels/k1/k1.export.toml
- Viv: kernels/k1/special.viv
- Viv: lib/zfunc.viv
- The defs it reaches and the calls between them: map of the code