w_of_z(3)
π w_of_z β bestie's guide to Faddeeva's rescaled complex error function π
okay so this is a page from the libcerf manual, and we're talking about w_of_z and im_w_of_x β the two functions in here. Faddeeva's rescaled complex error function, aka the plasma dispersion function (iykyk). yes it's giving "why is there an imaginary unit in my math" energy, we're doing it anyway π§
β¨ NAME β¨
w_of_z, im_w_of_x β Faddeeva's rescaled complex error function. that's the whole vibe, no cap π
πΈ SYNOPSIS πΈ
#include <cerf.h>
double _Complex w_of_z ( double _Complex z );
double im_w_of_x ( double x );
so you pull in <cerf.h> and then boom, two functions, both yours π«Ά
π¦ DESCRIPTION π¦
Faddeeva's rescaled complex error function w(z) β literally also known as the plasma dispersion function. two names, one icon, main character energy π
w_of_z returns
w(z) = exp(-z^2) * erfc(-i*z)
like, exactly that. no notes.
im_w_of_x returns Im[w(x)] β just the imaginary part, bestie, that's it, that's the function. π
π₯ RESOURCES π₯
Project web site: http://apps.jcns.fz-juelich.de/libcerf β go look, it's right there β¨
π REFERENCES π
so here's the tea on how these get computed, because the math girlies were busy:
To compute w(z), a combination of two algorithms is used:
- For sufficiently large
|z|, a continued-fraction expansion similar to those described by Gautschi (1970) and Poppe & Wijers (1990). π - Otherwise, Algorithm 916 by Zaghloul & Ali (2011), which is generally competitive at small
|z|, and more accurate than the Poppe & Wijers expansion in some regions, e.g. in the vicinity ofz=1+i. not me casually being more accurate nearz=1+iπ
To compute Im[w(x)], Chebyshev polynomials and continous fractions are used.
and now the full reading list, citations stay exactly as they are because plagiarism is NOT the vibe:
- Milton Abramowitz and Irene M. Stegun, "Handbook of Mathematical Functions", National Bureau of Standards (1964): Formula (7.1.3) introduces the nameless function
w(z). - Walter Gautschi, "Efficient computation of the complex error function," SIAM J. Numer. Anal. 7, 187 (1970).
- G. P. M. Poppe and C. M. J. Wijers, "More efficient computation of the complex error function," ACM Trans. Math. Soft. 16, 38 (1990).
- Mofreh R. Zaghloul and Ahmed N. Ali, "Algorithm 916: Computing the Faddeyeva and Voigt Functions," ACM Trans. Math. Soft. 38, 15 (2011).
- Steven G. Johnson,
http://ab-initio.mit.edu/Faddeeva(accessed January 2013).
π BUG REPORTS π
Please report bugs to the authors. fr fr, they want to know. don't suffer in silence bestie π
π AUTHORS π
- Steven G. Johnson [
http://math.mit.edu/~stevenj], Massachusetts Institute of Technology, researched the numerics, and implemented the Faddeeva function. π§ β¨ - Joachim Wuttke
<j.wuttke@fz-juelich.de>, Forschungszentrum Juelich, reorganized the code into a library, and wrote this man page. (yes, the very page you're reading, iconic)
π SEE ALSO π
This function is used within liberfc to compute several other complex error functions β so it's like, the moment, the blueprint:
dawson(3), voigt(3), cerf(3), erfcx(3), erfi(3).
go read those too, they ate πβ
π COPYING π
Copyright (c) 2012 Massachusetts Institute of Technology Copyright (c) 2013 Forschungszentrum Juelich GmbH Software: MIT License. This documentation: Creative Commons Attribution Share Alike.
and that's the whole page, bestie π«Ά this was written up on 2013-03-11, and the original page footer says perl v5.14.2 on the left and w_of_z(3) on the right β so shoutout to perl v5.14.2 and the libcerf manual, mwah π stay accurate, stay cunty, bye π
π¦ where this page comes from
- debian bookworm: libcerf-doc 1.3-2.1 Β· MIT
- ubuntu jammy: libcerf-doc 1.3-2.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms