Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
280 views

C++ Cmath Functions

The document describes various trigonometric, hyperbolic, exponential, logarithmic, power, and other mathematical functions in C and C++. These include functions to calculate sines, cosines, logarithms, exponents, square roots, minimum/maximum values, and more. It also includes macros and functions to classify and compare floating point values. Many of these functions are implemented as macros in C and functions in C++.

Uploaded by

Polina
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
280 views

C++ Cmath Functions

The document describes various trigonometric, hyperbolic, exponential, logarithmic, power, and other mathematical functions in C and C++. These include functions to calculate sines, cosines, logarithms, exponents, square roots, minimum/maximum values, and more. It also includes macros and functions to classify and compare floating point values. Many of these functions are implemented as macros in C and functions in C++.

Uploaded by

Polina
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

Functions

Trigonometric functions

cos
Compute cosine (function )
sin
Compute sine (function )
tan
Compute tangent (function )
acos
Compute arc cosine (function )
asin
Compute arc sine (function )
atan
Compute arc tangent (function )
atan2
Compute arc tangent with two parameters (function )

Hyperbolic functions

cosh
Compute hyperbolic cosine (function )
sinh
Compute hyperbolic sine (function )
tanh
Compute hyperbolic tangent (function )
acosh
Compute area hyperbolic cosine (function )
asinh
Compute area hyperbolic sine (function )
atanh
Compute area hyperbolic tangent (function )

Exponential and logarithmic functions

exp
Compute exponential function (function )
frexp
Get significand and exponent (function )
ldexp
Generate value from significand and exponent (function )
log
Compute natural logarithm (function )
log10
Compute comm1on logarithm (function )
modf
Break into fractional and integral parts (function )
exp2
Compute binary exponential function (function )
expm1
Compute exponential minus one (function )
ilogb
Integer binary logarithm (function )
log1p
Compute logarithm plus one (function )
log2
Compute binary logarithm (function )
logb
Compute floating-point base logarithm (function )
scalbn
Scale significand using floating-point base exponent (function )
scalbln
Scale significand using floating-point base exponent (long) (function )

Power functions

pow
Raise to power (function )
sqrt
Compute square root (function )
cbrt
Compute cubic root (function )
hypot
Compute hypotenuse (function )

Error and gamma functions

erf
Compute error function (function )
erfc
Compute complementary error function (function )
tgamma
Compute gamma function (function )
lgamma
Compute log-gamma function (function )

Rounding and remainder functions

ceil
Round up value (function )
floor
Round down value (function )
fmod
Compute remainder of division (function )
trunc
Truncate value (function )
round
Round to nearest (function )
lround
Round to nearest and cast to long integer (function )
llround
Round to nearest and cast to long long integer (function )
rint
Round to integral value (function )
lrint
Round and cast to long integer (function )
llrint
Round and cast to long long integer (function )
nearbyint
Round to nearby integral value (function )
remainder
Compute remainder (IEC 60559) (function )
remquo
Compute remainder and quotient (function )

Floating-point manipulation functions

copysign
Copy sign (function )
nan
Generate quiet NaN (function )
nextafter
Next representable value (function )
nexttoward
Next representable value toward precise value (function )

Minimum, maximum, difference functions

fdim
Positive difference (function )
fmax
Maximum value (function )
fmin
Minimum value (function )

Other functions

fabs
Compute absolute value (function )
abs
Compute absolute value (function )
fma
Multiply-add (function )

Macros / Functions

These are implemented as macros in C and as functions in C++:

Classification macro / functions

fpclassify
Classify floating-point value (macro/function )
isfinite
Is finite value (macro )
isinf
Is infinity (macro/function )
isnan
Is Not-A-Number (macro/function )
isnormal
Is normal (macro/function )
signbit
Sign bit (macro/function )

Comparison macro / functions

isgreater
Is greater (macro )
isgreaterequal
Is greater or equal (macro )
isless
Is less (macro )
islessequal
Is less or equal (macro )
islessgreater
Is less or greater (macro )
isunordered
Is unordered (macro )

You might also like