Skip to content

Latest commit

 

History

History
572 lines (511 loc) · 15.6 KB

cmath.md

File metadata and controls

572 lines (511 loc) · 15.6 KB
descriptiontitlems.datef1_keywordshelpviewer_keywords
Learn more about: <cmath>
<cmath>
11/04/2016
<cmath>
cmath header

<cmath>

Includes the Standard C library header <math.h> and adds the associated names to the std namespace.

Syntax

#include<cmath>

Constants and Types

namespacestd { usingfloat_t = see below ; usingdouble_t = see below ; } #defineHUGE_VAL see below #defineHUGE_VALF see below #defineHUGE_VALL see below #defineINFINITY see below #defineNAN see below #defineFP_INFINITE see below #defineFP_NAN see below #defineFP_NORMAL see below #defineFP_SUBNORMAL see below #defineFP_ZERO see below #defineFP_FAST_FMA see below #defineFP_FAST_FMAF see below #defineFP_FAST_FMAL see below #defineFP_ILOGB0 see below #defineFP_ILOGBNAN see below #defineMATH_ERRNO see below #defineMATH_ERREXCEPT see below #definemath_errhandling see below

Functions

floatacos(float x); doubleacos(double x); longdoubleacos(longdouble x); floatacosf(float x); longdoubleacosl(longdouble x); floatasin(float x); doubleasin(double x); longdoubleasin(longdouble x); floatasinf(float x); longdoubleasinl(longdouble x); floatatan(float x); doubleatan(double x); longdoubleatan(longdouble x); floatatanf(float x); longdoubleatanl(longdouble x); floatatan2(float y, float x); doubleatan2(double y, double x); longdoubleatan2(longdouble y, longdouble x); floatatan2f(float y, float x); longdoubleatan2l(longdouble y, longdouble x); floatcos(float x); doublecos(double x); longdoublecos(longdouble x); floatcosf(float x); longdoublecosl(longdouble x); floatsin(float x); doublesin(double x); longdoublesin(longdouble x); floatsinf(float x); longdoublesinl(longdouble x); floattan(float x); doubletan(double x); longdoubletan(longdouble x); floattanf(float x); longdoubletanl(longdouble x); floatacosh(float x); doubleacosh(double x); longdoubleacosh(longdouble x); floatacoshf(float x); longdoubleacoshl(longdouble x); floatasinh(float x); doubleasinh(double x); longdoubleasinh(longdouble x); floatasinhf(float x); longdoubleasinhl(longdouble x); floatatanh(float x); doubleatanh(double x); longdoubleatanh(longdouble x); floatatanhf(float x); longdoubleatanhl(longdouble x); floatcosh(float x); doublecosh(double x); longdoublecosh(longdouble x); floatcoshf(float x); longdoublecoshl(longdouble x); floatsinh(float x); doublesinh(double x); longdoublesinh(longdouble x); floatsinhf(float x); longdoublesinhl(longdouble x); floattanh(float x); doubletanh(double x); longdoubletanh(longdouble x); floattanhf(float x); longdoubletanhl(longdouble x); floatexp(float x); doubleexp(double x); longdoubleexp(longdouble x); floatexpf(float x); longdoubleexpl(longdouble x); floatexp2(float x); doubleexp2(double x); longdoubleexp2(longdouble x); floatexp2f(float x); longdoubleexp2l(longdouble x); floatexpm1(float x); doubleexpm1(double x); longdoubleexpm1(longdouble x); floatexpm1f(float x); longdoubleexpm1l(longdouble x); floatfrexp(float value, int* exp); doublefrexp(double value, int* exp); longdoublefrexp(longdouble value, int* exp); floatfrexpf(float value, int* exp); longdoublefrexpl(longdouble value, int* exp); intilogb(float x); intilogb(double x); intilogb(longdouble x); intilogbf(float x); intilogbl(longdouble x); floatldexp(float x, int exp); doubleldexp(double x, int exp); longdoubleldexp(longdouble x, int exp); floatldexpf(float x, int exp); longdoubleldexpl(longdouble x, int exp); floatlog(float x); doublelog(double x); longdoublelog(longdouble x); floatlogf(float x); longdoublelogl(longdouble x); floatlog10(float x); doublelog10(double x); longdoublelog10(longdouble x); floatlog10f(float x); longdoublelog10l(longdouble x); floatlog1p(float x); doublelog1p(double x); longdoublelog1p(longdouble x); floatlog1pf(float x); longdoublelog1pl(longdouble x); floatlog2(float x); doublelog2(double x); longdoublelog2(longdouble x); floatlog2f(float x); longdoublelog2l(longdouble x); floatlogb(float x); doublelogb(double x); longdoublelogb(longdouble x); floatlogbf(float x); longdoublelogbl(longdouble x); floatmodf(float value, float* iptr); doublemodf(double value, double* iptr); longdoublemodf(longdouble value, longdouble* iptr); floatmodff(float value, float* iptr); longdoublemodfl(longdouble value, longdouble* iptr); floatscalbn(float x, int n); doublescalbn(double x, int n); longdoublescalbn(longdouble x, int n); floatscalbnf(float x, int n); longdoublescalbnl(longdouble x, int n); floatscalbln(float x, longint n); doublescalbln(double x, longint n); longdoublescalbln(longdouble x, longint n); floatscalblnf(float x, longint n); longdoublescalblnl(longdouble x, longint n); floatcbrt(float x); doublecbrt(double x); longdoublecbrt(longdouble x); floatcbrtf(float x); longdoublecbrtl(longdouble x);

Absolute values

intabs(int j); longintabs(longint j); longlongintabs(longlongint j); floatabs(float j); doubleabs(double j); longdoubleabs(longdouble j); floatfabs(float x); doublefabs(double x); longdoublefabs(longdouble x); floatfabsf(float x); longdoublefabsl(longdouble x); floathypot(float x, float y); doublehypot(double x, double y); longdoublehypot(double x, double y); floathypotf(float x, float y); longdoublehypotl(longdouble x, longdouble y);

Three-dimensional hypotenuse

floathypot(float x, float y, float z); doublehypot(double x, double y, double z); longdoublehypot(longdouble x, longdouble y, longdouble z); floatpow(float x, float y); doublepow(double x, double y); longdoublepow(longdouble x, longdouble y); floatpowf(float x, float y); longdoublepowl(longdouble x, longdouble y); floatsqrt(float x); doublesqrt(double x); longdoublesqrt(longdouble x); floatsqrtf(float x); longdoublesqrtl(longdouble x); floaterf(float x); doubleerf(double x); longdoubleerf(longdouble x); floaterff(float x); longdoubleerfl(longdouble x); floaterfc(float x); doubleerfc(double x); longdoubleerfc(longdouble x); floaterfcf(float x); longdoubleerfcl(longdouble x); floatlgamma(float x); doublelgamma(double x); longdoublelgamma(longdouble x); floatlgammaf(float x); longdoublelgammal(longdouble x); floattgamma(float x); doubletgamma(double x); longdoubletgamma(longdouble x); floattgammaf(float x); longdoubletgammal(longdouble x); floatceil(float x); doubleceil(double x); longdoubleceil(longdouble x); floatceilf(float x); longdoubleceill(longdouble x); floatfloor(float x); doublefloor(double x); longdoublefloor(longdouble x); floatfloorf(float x); longdoublefloorl(longdouble x); floatnearbyint(float x); doublenearbyint(double x); longdoublenearbyint(longdouble x); floatnearbyintf(float x); longdoublenearbyintl(longdouble x); floatrint(float x); doublerint(double x); longdoublerint(longdouble x); floatrintf(float x); longdoublerintl(longdouble x); longintlrint(float x); longintlrint(double x); longintlrint(longdouble x); longintlrintf(float x); longintlrintl(longdouble x); longlongintllrint(float x); longlongintllrint(double x); longlongintllrint(longdouble x); longlongintllrintf(float x); longlongintllrintl(longdouble x); floatround(float x); doubleround(double x); longdoubleround(longdouble x); floatroundf(float x); longdoubleroundl(longdouble x); longintlround(float x); longintlround(double x); longintlround(longdouble x); longintlroundf(float x); longintlroundl(longdouble x); longlongintllround(float x); longlongintllround(double x); longlongintllround(longdouble x); longlongintllroundf(float x); longlongintllroundl(longdouble x); floattrunc(float x); doubletrunc(double x); longdoubletrunc(longdouble x); floattruncf(float x); longdoubletruncl(longdouble x); floatfmod(float x, float y); doublefmod(double x, double y); longdoublefmod(longdouble x, longdouble y); floatfmodf(float x, float y); longdoublefmodl(longdouble x, longdouble y); floatremainder(float x, float y); doubleremainder(double x, double y); longdoubleremainder(longdouble x, longdouble y); floatremainderf(float x, float y); longdoubleremainderl(longdouble x, longdouble y); floatremquo(float x, float y, int* quo); doubleremquo(double x, double y, int* quo); longdoubleremquo(longdouble x, longdouble y, int* quo); floatremquof(float x, float y, int* quo); longdoubleremquol(longdouble x, longdouble y, int* quo); floatcopysign(float x, float y); doublecopysign(double x, double y); longdoublecopysign(longdouble x, longdouble y); floatcopysignf(float x, float y); longdoublecopysignl(longdouble x, longdouble y); doublenan(constchar* tagp); floatnanf(constchar* tagp); longdoublenanl(constchar* tagp); floatnextafter(float x, float y); doublenextafter(double x, double y); longdoublenextafter(longdouble x, longdouble y); floatnextafterf(float x, float y); longdoublenextafterl(longdouble x, longdouble y); floatnexttoward(float x, longdouble y); doublenexttoward(double x, longdouble y); longdoublenexttoward(longdouble x, longdouble y); floatnexttowardf(float x, longdouble y); longdoublenexttowardl(longdouble x, longdouble y); floatfdim(float x, float y); doublefdim(double x, double y); longdoublefdim(longdouble x, longdouble y); floatfdimf(float x, float y); longdoublefdiml(longdouble x, longdouble y); floatfmax(float x, float y); doublefmax(double x, double y); longdoublefmax(longdouble x, longdouble y); floatfmaxf(float x, float y); longdoublefmaxl(longdouble x, longdouble y); floatfmin(float x, float y); doublefmin(double x, double y); longdoublefmin(longdouble x, longdouble y); floatfminf(float x, float y); longdoublefminl(longdouble x, longdouble y); floatfma(float x, float y, float z); doublefma(double x, double y, double z); longdoublefma(longdouble x, longdouble y, longdouble z); floatfmaf(float x, float y, float z); longdoublefmal(longdouble x, longdouble y, longdouble z);

Classification / comparison functions

intfpclassify(float x); intfpclassify(double x); intfpclassify(longdouble x); intisfinite(float x); intisfinite(double x); intisfinite(longdouble x); intisinf(float x); intisinf(double x); intisinf(longdouble x); intisnan(float x); intisnan(double x); intisnan(longdouble x); intisnormal(float x); intisnormal(double x); intisnormal(longdouble x); intsignbit(float x); intsignbit(double x); intsignbit(longdouble x); intisgreater(float x, float y); intisgreater(double x, double y); intisgreater(longdouble x, longdouble y); intisgreaterequal(float x, float y); intisgreaterequal(double x, double y); intisgreaterequal(longdouble x, longdouble y); intisless(float x, float y); intisless(double x, double y); intisless(longdouble x, longdouble y); intislessequal(float x, float y); intislessequal(double x, double y); intislessequal(longdouble x, longdouble y); intislessgreater(float x, float y); intislessgreater(double x, double y); intislessgreater(longdouble x, longdouble y); intisunordered(float x, float y); intisunordered(double x, double y); intisunordered(longdouble x, longdouble y);

Mathematical special functions

Associated Laguerre polynomials

doubleassoc_laguerre(unsigned n, unsigned m, double x); floatassoc_laguerref(unsigned n, unsigned m, float x); longdoubleassoc_laguerrel(unsigned n, unsigned m, longdouble x);

Associated Legendre functions

doubleassoc_legendre(unsigned l, unsigned m, double x); floatassoc_legendref(unsigned l, unsigned m, float x); longdoubleassoc_legendrel(unsigned l, unsigned m, longdouble x);

Beta function

doublebeta(double x, double y); floatbetaf(float x, float y); longdoublebetal(longdouble x, longdouble y);

Complete elliptic integral of the first kind

doublecomp_ellint_1(double k); floatcomp_ellint_1f(float k); longdoublecomp_ellint_1l(longdouble k);

Complete elliptic integral of the second kind

doublecomp_ellint_2(double k); floatcomp_ellint_2f(float k); longdoublecomp_ellint_2l(longdouble k);

Complete elliptic integral of the third kind

doublecomp_ellint_3(double k, double nu); floatcomp_ellint_3f(float k, float nu); longdoublecomp_ellint_3l(longdouble k, longdouble nu);

Regular modified cylindrical Bessel functions

doublecyl_bessel_i(double nu, double x); floatcyl_bessel_if(float nu, float x); longdoublecyl_bessel_il(longdouble nu, longdouble x);

Cylindrical Bessel functions of the first kind

doublecyl_bessel_j(double nu, double x); floatcyl_bessel_jf(float nu, float x); longdoublecyl_bessel_jl(longdouble nu, longdouble x);

Irregular modified cylindrical Bessel functions

doublecyl_bessel_k(double nu, double x); floatcyl_bessel_kf(float nu, float x); longdoublecyl_bessel_kl(longdouble nu, longdouble x);

Cylindrical Neumann functions

doublecyl_neumann(double nu, double x); floatcyl_neumannf(float nu, float x); longdoublecyl_neumannl(longdouble nu, longdouble x);

Incomplete elliptic integral of the first kind

doubleellint_1(double k, double phi); floatellint_1f(float k, float phi); longdoubleellint_1l(longdouble k, longdouble phi);

Incomplete elliptic integral of the second kind

doubleellint_2(double k, double phi); floatellint_2f(float k, float phi); longdoubleellint_2l(longdouble k, longdouble phi);

Incomplete elliptic integral of the third kind

doubleellint_3(double k, double nu, double phi); floatellint_3f(float k, float nu, float phi); longdoubleellint_3l(longdouble k, longdouble nu, longdouble phi);

Exponential integral

doubleexpint(double x); floatexpintf(float x); longdoubleexpintl(longdouble x);

Hermite polynomials

doublehermite(unsigned n, double x); floathermitef(unsigned n, float x); longdoublehermitel(unsigned n, longdouble x);

Laguerre polynomials

doublelaguerre(unsigned n, double x); floatlaguerref(unsigned n, float x); longdoublelaguerrel(unsigned n, longdouble x);

Legendre polynomials

doublelegendre(unsigned l, double x); floatlegendref(unsigned l, float x); longdoublelegendrel(unsigned l, longdouble x);

Riemann zeta function

doubleriemann_zeta(double x); floatriemann_zetaf(float x); longdoubleriemann_zetal(longdouble x);

Spherical Bessel functions of the first kind

doublesph_bessel(unsigned n, double x); floatsph_besself(unsigned n, float x); longdoublesph_bessell(unsigned n, longdouble x);

Spherical associated Legendre functions

doublesph_legendre(unsigned l, unsigned m, double theta); floatsph_legendref(unsigned l, unsigned m, float theta); longdoublesph_legendrel(unsigned l, unsigned m, longdouble theta);

Spherical Neumann functions

doublesph_neumann(unsigned n, double x); floatsph_neumannf(unsigned n, float x); longdoublesph_neumannl(unsigned n, longdouble x);

Remarks

Including this header ensures that the names declared using external linkage in the Standard C library header are declared in the std namespace.

See also

Header Files Reference
C++ Standard Library Overview
Thread Safety in the C++ Standard Library

close