NAME

cerfcx, erfcx - underflow-compensated complementary error function

SYNOPSIS

#include <cerf.h>

double _Complex cerfcx ( double _Complex z );

double erfcx ( double x );

DESCRIPTION

The function cerfcx is an underflow-compensated variant of the complex error function: erfcx(z) = exp(z^2) erfc(z). It is a thin wrapper around Faddeeva's function w_of_z(3), which it calls as erfcx(z) = w(iz).

The function erfcx takes a real argument and returns a real result. Its implementation is self-contained. For 0.03 < x < 12, its relative error stays below 2.2 eps = 2.4e-16, which auto-generated test cases verify at 1008 sample points.

SEE ALSO

Related complex error functions in liberfc: w_of_z(3), dawson(3), voigt(3), cerf(3), erfi(3).

The real error function comes with recent versions of glibc, as requested by the C99 standard: erf(3)

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

AUTHORS, REVISION HISTORY, REFERENCE

Until libcerf-2.4, this was mostly a wrapper of MIT Faddeeva code by Steven G. Johnson.

In libcerf-2.5 of April 2025, the real function erfcx was reimplemented by Joachim Wuttke:

CONTACT

Please report bugs to the maintainer:

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

COPYING

Copyright (c) 2025 Forschungszentrum Juelich GmbH

Software: MIT License.

This documentation: Creative Commons Attribution Share Alike.