Defines math subroutines and constants.
The /usr/include/math.h header file contains declarations of all the subroutines in the Math library (libm.a) and of various subroutines in the Standard C Library (libc.a) that return floating-point values.
Among other things, the
math.h file defines the following macro, which is used as an
error-return value:
HUGE_VAL | Specifies the maximum value of a double-precision floating-point number: +infinity on machines that support IEEE-754 and DBL_MAX otherwise. |
If you define the
__MATH__ preprocessor variable before including the
math.h file, the math.h file defines
macros that make the names of certain math subroutines appear to the compiler
as __xxxx. The following names are redefined to
have the __ (double underscore) prefix:
exp | sin |
asin | log |
cos | acos |
log10 | tan |
atan | sqrt |
fabs | atan2 |
These special names instruct the C compiler to generate code that avoids the overhead of the Math library subroutines and issues compatible-mode floating-point subroutines directly. The __MATH__ variable is defined by default.
If _XOPEN_SOURCE
variable is defined, the following mathematical constants are defined for your
convenience. The values are of type double and are accurate to the
precision of this type. That is, the machine value is the mathematical
value rounded to double precision.
The values.h file.
Header Files Overview defines header files, describes how they are used, and lists several of the header files for which information is provided in this documentation.