Sunteți pe pagina 1din 3

Search:

Reference
C++

Go
<cmath>

Notloggedin

register

login

header

<cmath>(math.h)

Information
Tutorials
Reference
Articles
Forum

Cnumericslibrary
Header<cmath>declaresasetoffunctionstocomputecommonmathematicaloperationsandtransformations:
Reference

Clibrary:
<cassert>(assert.h)
<cctype>(ctype.h)
<cerrno>(errno.h)
<cfenv>(fenv.h)
<cfloat>(float.h)
<cinttypes>(inttypes.h)
<ciso646>(iso646.h)
<climits>(limits.h)
<clocale>(locale.h)
<cmath>(math.h)
<csetjmp>(setjmp.h)
<csignal>(signal.h)
<cstdarg>(stdarg.h)
<cstdbool>(stdbool.h)
<cstddef>(stddef.h)
<cstdint>(stdint.h)
<cstdio>(stdio.h)
<cstdlib>(stdlib.h)
<cstring>(string.h)
<ctgmath>(tgmath.h)
<ctime>(time.h)
<cuchar>(uchar.h)
<cwchar>(wchar.h)
<cwctype>(wctype.h)
Containers:
Input/Output:
Multithreading:
Other:

<cmath>(math.h)
functions:
abs
acos
acosh
asin
asinh
atan
atan2
atanh
cbrt
ceil
copysign
cos
cosh
erf
erfc
exp
exp2
expm1
fabs
fdim
floor
fma
fmax
fmin
fmod
fpclassify
frexp
hypot
ilogb
isfinite
isgreater
isgreaterequal
isinf
isless
islessequal
islessgreater

Functions
Trigonometricfunctions
cos

Computecosine(function)

sin

Computesine(function)

tan

Computetangent(function)

acos

Computearccosine(function)

asin

Computearcsine(function)

atan

Computearctangent(function)

atan2

Computearctangentwithtwoparameters(function)

Hyperbolicfunctions
cosh

Computehyperboliccosine(function)

sinh

Computehyperbolicsine(function)

tanh

Computehyperbolictangent(function)

acosh

Computeareahyperboliccosine(function)

asinh

Computeareahyperbolicsine(function)

atanh

Computeareahyperbolictangent(function)

Exponentialandlogarithmicfunctions
exp

Computeexponentialfunction(function)

frexp

Getsignificandandexponent(function)

ldexp

Generatevaluefromsignificandandexponent(function)

log

Computenaturallogarithm(function)

log10

Computecommonlogarithm(function)

modf

Breakintofractionalandintegralparts(function)

exp2

Computebinaryexponentialfunction(function)

expm1

Computeexponentialminusone(function)

ilogb

Integerbinarylogarithm(function)

log1p

Computelogarithmplusone(function)

log2

Computebinarylogarithm(function)

logb

Computefloatingpointbaselogarithm(function)

scalbn

Scalesignificandusingfloatingpointbaseexponent(function)

scalbln

Scalesignificandusingfloatingpointbaseexponent(long)(function)

Powerfunctions
pow

Raisetopower(function)

sqrt

Computesquareroot(function)

cbrt

Computecubicroot(function)

hypot

Computehypotenuse(function)

Errorandgammafunctions
erf

Computeerrorfunction(function)

erfc

Computecomplementaryerrorfunction(function)

tgamma

Computegammafunction(function)

lgamma

Computeloggammafunction(function)

Roundingandremainderfunctions
ceil

Roundupvalue(function)

floor

Rounddownvalue(function)

fmod

Computeremainderofdivision(function)

trunc

Truncatevalue(function)

round

Roundtonearest(function)

isnan
isnormal
isunordered
ldexp
lgamma
llrint
llround
log
log10
log1p
log2
logb
lrint
lround
modf
nan
nanf
nanl
nearbyint
nextafter
nexttoward
pow
remainder
remquo
rint
round
scalbln
scalbn
signbit
sin
sinh
sqrt
tan
tanh
tgamma

macroconstants:
HUGE_VAL
HUGE_VALF
HUGE_VALL
INFINITY
math_errhandling
NAN
types:
double_t
float_t

lround

Roundtonearestandcasttolonginteger(function)

llround

Roundtonearestandcasttolonglonginteger(function)

rint

Roundtointegralvalue(function)

lrint

Roundandcasttolonginteger(function)

llrint

Roundandcasttolonglonginteger(function)

nearbyint

Roundtonearbyintegralvalue(function)

remainder

Computeremainder(IEC60559)(function)

remquo

Computeremainderandquotient(function)

Floatingpointmanipulationfunctions
copysign

Copysign(function)

nan

GeneratequietNaN(function)

nextafter

Nextrepresentablevalue(function)

nexttoward

Nextrepresentablevaluetowardprecisevalue(function)

Minimum,maximum,differencefunctions
fdim

Positivedifference(function)

fmax

Maximumvalue(function)

fmin

Minimumvalue(function)

Otherfunctions
fabs

Computeabsolutevalue(function)

abs

Computeabsolutevalue(function)

fma

Multiplyadd(function)

Macros/Functions
TheseareimplementedasmacrosinCandasfunctionsinC++:
Classificationmacro/functions
fpclassify

Classifyfloatingpointvalue(macro/function)

isfinite

Isfinitevalue(macro)

isinf

Isinfinity(macro/function)

isnan

IsNotANumber(macro/function)

isnormal

Isnormal(macro/function)

signbit

Signbit(macro/function)

Comparisonmacro/functions
isgreater

Isgreater(macro)

isgreaterequal

Isgreaterorequal(macro)

isless

Isless(macro)

islessequal

Islessorequal(macro)

islessgreater

Islessorgreater(macro)

isunordered

Isunordered(macro)

Macroconstants
math_errhandling

Errorhandling(macro)

INFINITY

Infinity(constant)

NAN

NotANumber(constant)

HUGE_VAL

Hugevalue(constant)

HUGE_VALF

Hugefloatvalue

HUGE_VALL

Hugelongdoublevalue(constant)

Thisheaderalsodefinesthefollowingmacroconstants(sinceC99/C++11):
macro
type
description
MATH_ERRNO
int Bitmaskvaluewiththepossiblevaluesmath_errhandlingcantake.
MATH_ERREXCEPT
FP_FAST_FMA
FP_FAST_FMAF int Each,ifdefined,identifiesforwhichtypefmaisatleastasefficientasx*y+z.
FP_FAST_FMAL
FP_INFINITE
FP_NAN
FP_NORMAL
int Thepossiblevaluesreturnedbyfpclassify.
FP_SUBNORMAL
FP_ZERO
FP_ILOGB0

FP_ILOGBNAN

int Specialvaluestheilogbfunctionmayreturn.

Types
double_t

Floatingpointtype(type)

float_t

Floatingpointtype(type)
Homepage|Privacypolicy
cplusplus.com,20002016Allrightsreservedv3.1
Spottedanerror?contactus

S-ar putea să vă placă și