O'Reilly logo

C Primer Plus, Fourth Edition by Stephen Prata

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Math Library: math.h

With C99, the math.h header file defines two types:

float_t
double_t

These types are at least as wide as float and double respectively, and double_t is at least as wide as float_t. These are intended to be the most efficient types for doing float and double calculations, respectively.

This header file also defines several macros, as described in Table RS.V.13; all but HUGE_VAL are C99 additions. Some of these are discussed in more detail in Reference Section VIII, “C99 Numeric Computational Enhancements.”

Table RS.V.13. math.h Macros
Macro Description
HUGE_VAL A positive double constant not necessarily expressible as a float; in the past, it was used as the return value for functions when the magnitude of the result exceeded ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required