w_of_z(3)

πŸ“¦ version 1.3, in debian bookworm, ubuntu jammy

πŸ’– 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 of z=1+i. not me casually being more accurate near z=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