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
|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:
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.
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.
|Base of natural logarithms (e)
|Base-2 logarithm of e
|Base-10 logarithm of e
|Natural logarithm of 2
|Natural logarithm of 10
|Pi, the ratio of the circumference of a circle to its diameter
|Value of pi divided by 2
|Value of pi divided by 4
|Value of 1 divided by pi
|Value of 2 divided by pi
|Value of 2 divided by the positive square root of pi
|Positive square root of 2
|Positive square root of 1/2
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.