Names specified here
Name Description Notes Source Availability
erf() Compute error function (·) <math.h> C99 C11
erf() Compute error function M (·) <tgmath.h> C99 C11
erfc() Compute complementary error function M (·) <tgmath.h> C99 C11
erfc() Compute complementary error function (·) <math.h> C99 C11
erfcf() Compute complementary error function (·) <math.h> C99 C11
erfcl() Compute complementary error function (·) <math.h> C99 C11
erff() Compute error function (·) <math.h> C99 C11
erfl() Compute error function (·) <math.h> C99 C11
fdim() Compute positive difference (·) <math.h> C99 C11
fdim() Compute positive difference M (·) <tgmath.h> C99 C11
fdimf() Compute positive difference (·) <math.h> C99 C11
fdiml() Compute positive difference (·) <math.h> C99 C11
fmax() Select maximum M (·) <tgmath.h> C99 C11
fmax() Select maximum (·) <math.h> C99 C11
fmaxf() Select maximum (·) <math.h> C99 C11
fmaxl() Select maximum (·) <math.h> C99 C11
fmin() Select minimum M (·) <tgmath.h> C99 C11
fmin() Select minimum (·) <math.h> C99 C11
fminf() Select minimum (·) <math.h> C99 C11
fminl() Select minimum (·) <math.h> C99 C11
lgamma() Compute natural logarithm of gamma (·) <math.h> C99 C11
lgamma() Compute natural logarithm of gamma M (·) <tgmath.h> C99 C11
lgammaf() Compute natural logarithm of gamma (·) <math.h> C99 C11
lgammal() Compute natural logarithm of gamma (·) <math.h> C99 C11
tgamma() Compute gamma M (·) <tgmath.h> C99 C11
tgamma() Compute gamma (·) <math.h> C99 C11
tgammaf() Compute gamma (·) <math.h> C99 C11
tgammal() Compute gamma (·) <math.h> C99 C11

Minima and maxima

#include <math.h>
float fminf(float x, float y);
double fmin(double x, double y);
long double fminl(long double x, long double y);
#include <tgmath.h>
real-floating-type fmin(real-floating-type x, real-floating-type y);

The fmin functions return the lower of their two arguments x and y.

#include <math.h>
float fmaxf(float x, float y);
double fmax(double x, double y);
long double fmaxl(long double x, long double y);
#include <tgmath.h>
real-floating-type fmax(real-floating-type x, real-floating-type y);

The fmax functions return the higher of their two arguments x and y.

#include <math.h>
float fdimf(float x, float y);
double fdim(double x, double y);
long double fdiml(long double x, long double y);
#include <tgmath.h>
real-floating-type fdim(real-floating-type x, real-floating-type y);

The fdim functions return x-y if positive, or zero otherwise.

Gauss error function

The normal distribution function of x is ex². The error function is the integral of the normal distribution.

#include <math.h>
float erff(float x);
double erf(double x);
long double erfl(long double x);
float erfcf(float x);
double erfc(double x);
long double erfcl(long double x);
#include <tgmath.h>
real-floating-type erf(real-floating-type x);
real-floating-type erfc(real-floating-type x);

Functions with names matching ^c(erf|erfc)(|f|l)$ might be added to <complex.h>.

The erf functions compute and return the error function of x, integrating over the range zero to x. The erfc functions compute and return the complementary error function of x, integrating over the range x to +∞.

Gamma function

The gamma function is the continuous version of the factorial function, such that Γ(n+1) = n! for n∈ℕ. Six C functions are provided by <math.h> for computing the gamma function.

#include <math.h>
float tgammaf(float x);
double tgamma(double x);
long double tgammal(long double x);
#include <tgmath.h>
real-floating-type tgamma(real-floating-type x);

Functions with names matching ^ctgamma(|f|l)$ might be added to <complex.h>.

The tgamma functions compute and return the gamma function of x, Γ(x).

#include <math.h>
float lgammaf(float x);
double lgamma(double x);
long double lgammal(long double x);
#include <tgmath.h>
real-floating-type lgamma(real-floating-type x);

Functions with names matching ^clgamma(|f|l)$ might be added to <complex.h>.

The lgamma functions compute and return natural logarithm of the gamma function of x, ln |Γ(x)|.


CHaR
Sitemap Supported
Site format updated 2024-06-05T22:37:07.391+0000
Data updated 1970-01-01T00:00:00.000+0000
Page updated 2024-06-10T19:54:01.041+0000