VOIGT(3)
π voigt(3) β libcerf manual, bestie edition
okay so this page lives in the libcerf manual, and honestly? she's kind of a big deal. sit down, grab a matcha, we're learning about voigt π
πΈ NAME πΈ
voigt β Voigt's function, aka the convolution of a Gaussian and a Lorentzian. two iconic curves, one slay collab π
β¨ SYNOPSIS β¨
#include <cerf.h>
double voigt ( double x, double sigma, double gamma );
that's it. three doubles in, one double out. no cap. π«Ά
π DESCRIPTION π
bestie. listen. voigt returns Voigt's convolution:
voigt(x,sigma,gamma) = integral G(t,sigma) L(x-t,gamma) dt
so we're convolving a Gaussian:
G(x,sigma) = 1/sqrt(2*pi)/|sigma| * exp(-x^2/2/sigma^2)
with a Lorentzian:
L(x,gamma) = |gamma| / pi / ( x^2 + gamma^2 ),
and the integral is extending from -infinity to +infinity. the whole entire line. main character integral energy π₯
now for the edge cases, because there are ALWAYS edge cases:
- if
sigma=0, thenL(x,gamma)is what gets returned. bye Gaussian π - conversely (love that word), if
gamma=0, thenG(x,sigma)is returned. - if
sigma=gamma=0, the return value isInfforx=0, and0for all otherx. π
β οΈ lowkey important: it is advisable to test input arguments to exclude this irregular case. like, actually test them. don't just vibe and hope. the sigma=gamma=0 situation is not it π
π¦ REFERENCES π¦
Formula (7.4.13) in Abramowitz & Stegun (1964) relates Voigt's convolution integral to Faddeeva's function w_of_z, upon which this implementation is based. iykyk π
voigt(x,sigma,gamma) = Re[w(z)] / sqrt(2*pi) / |sigma|
with
z = (x+i*|gamma|) / sqrt(2) / |sigma|.
see? it's giving elegant. it's giving math girlie. β¨
π SEE ALSO π
voigt_hwhm(3)β the other voigt page, go say hi π«Ά
Related complex error functions, aka the friend group:
Homepage: http://apps.jcns.fz-juelich.de/libcerf π
π AUTHORS π
Joachim Wuttke <j.wuttke@fz-juelich.de>, Forschungszentrum Juelich β based on the w_of_z implementation by Steven G. Johnson, http://math.mit.edu/~stevenj, Massachusetts Institute of Technology.
Please report bugs to the authors. (fr fr, they want to know π)
π§ COPYING π§
Copyright (c) 2013 Forschungszentrum Juelich GmbH
- Software: MIT License.
- This documentation: Creative Commons Attribution Share Alike.
okay that's the whole page, you ate that ππ
sign-off: this gem is from perl v5.42.2, dated 2026-02-15, and the page itself is home::buildoz...3::man::voigt(3) β go forth and convolve, bestie ππ¦
π¦ where this page comes from
- alpine 3.24: libcerf-doc 3.3-r1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms