header
Tóm Tắt
<cmath> (math.h)
C numerics library
Header <cmath>
declares a set of functions to compute common mathematical operations and transformations:
Functions
Trigonometric functions
Hyperbolic functions
Exponential and logarithmic functions
Power functions
Error and gamma functions
Rounding and remainder functions
Floating-point manipulation functions
Minimum, maximum, difference functions
Other functions
Macros / Functions
These are implemented as macros in C and as functions in C++:
Classification macro / functions
Comparison macro / functions
Macro constants
This header also defines the following macro constants (since C99/C++11):
macrotypedescription
MATH_ERRNO
MATH_ERREXCEPTint
Bitmask value with the possible values math_errhandling can take.
FP_FAST_FMA
FP_FAST_FMAF
FP_FAST_FMALint
Each, if defined, identifies for which type fma is at least as efficient as x*y+z
.
FP_INFINITE
FP_NAN
FP_NORMAL
FP_SUBNORMAL
FP_ZEROint
The possible values returned by fpclassify.
FP_ILOGB0
FP_ILOGBNANint
Special values the ilogb function may return.
This header also defines the following macro constants (since C99/C++11):