---
name: "voigt"
section: "3"
platform: "linux"
package: "libcerf"
version: "1:3.9-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/voigt"
---

# voigt(3)

Voigt's function, convolution of Gaussian and Lorentzian

## NAME

voigt - Voigt's function, convolution of Gaussian and Lorentzian

## SYNOPSIS

**#include \<cerf.h**\>

**double voigt ( double x, double sigma, double gamma );**

## DESCRIPTION

The function **voigt** returns Voigt's convolution

```
  voigt(x,sigma,gamma) = integral G(t,sigma) L(x-t,gamma) dt
```

of a Gaussian

```
  G(x,sigma) = 1/sqrt(2*pi)/|sigma| * exp(-x^2/2/sigma^2)
```

and a Lorentzian

```
  L(x,gamma) = |gamma| / pi / ( x^2 + gamma^2 ),
```

with the integral extending from -infinity to +infinity.

If sigma=0, L(x,gamma) is returned. Conversely, if gamma=0, G(x,sigma) is returned.

If sigma=gamma=0, the return value is Inf for x=0, and 0 for all other x. It is advisable to test input arguments to exclude this irregular case.

## ACCURACY

Errors are given in units of eps = 2^-53 = 1.1e-16, as relative deviations from high-precision reference values.

**voigt** is computed as Re w(z) / (sqrt(2 pi) sigma) from [**w\_of\_z**(3)](/w_of_z/3.md), which controls the relative error of the modulus \|w\|, but not of its real part separately; the relative error of **voigt** is therefore not controlled. Around the line center, Re w and \|w\| are of the same order, and the relative error was found below 7 eps for \|x\| \< 2 sigma and below 16 eps for \|x\| \< 3 sigma. In the wings, \|x\| \>\> sigma, the Lorentzian tail dominates, Re w is smaller than \|w\| by a factor of about gamma/\|x\|, and the relative error of **voigt** grows by the inverse factor, except where **w\_of\_z** computes Re w from an expansion about the real axis, for \|x\| \< 10 sigma, which keeps the loss to a few eps. Beyond, where the asymptotic expansion of w is used, up to 1.5e4 eps were found at x = 10 sigma. For gamma \< 1e-9 \|x\|, w is obtained from a first-order expansion around the real axis, and the relative error of **voigt** is about 2.5 (x/sigma)^2 eps.

What remains is not inherent in the problem. The profile is nowhere smaller than gamma / (pi (x^2 + gamma^2 + sigma^2)), a proven lower bound, so that a componentwise error bound for Re w would carry over to **voigt**; what is needed for that is set out in the manuscript cited below.

## 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:

```
   voigt(x,sigma,gamma) = Re[w(z)] / sqrt(2*pi) / |sigma|
```

with

```
   z = (x+i*|gamma|) / sqrt(2) / |sigma|.
```

Joachim Wuttke, "libcerf, complex error function and related functions reimplemented with relative accuracy guarantees" (unpublished manuscript, available upon request) documents the algorithms of this library and derives their error bounds.

## SEE ALSO

**[voigt\_hwhm(3)](/voigt_hwhm/3.md)**

Related complex error functions: **[w\_of\_z(3)](/w_of_z/3.md)**, **[dawson(3)](/dawson/3.md)**, **[cerf(3)](/cerf/3.md)**, **[erfcx(3)](/erfcx/3.md)**, **[erfi(3)](/erfi/3.md)**.

Homepage: https://jugit.fz-juelich.de/mlz/lib/cerf

## AUTHOR

Joachim Wuttke, Forschungszentrum Juelich.

## CONTACT

Please report bugs to the maintainer:

Joachim Wuttke \<j.wuttke@fz-juelich.de\>

## COPYING

Copyright (c) 2013-2025 Forschungszentrum Juelich GmbH

Software: MIT License.

This documentation: Creative Commons Attribution Share Alike.
