C Programming/C Reference/float.h

< C Programming < C Reference

The header float.h contains macros that expand to various limits and parameters of the standard floating-point types.

The macros, as defined on ISO 9899:1999 section 5.2.4.2.2, are:

  • -1 indeterminable;
  • 0 toward zero;
  • 1 to nearest;
  • 2 toward positive infinity;
  • 3 toward negative infinity;
  • other value means implementation-defined rounding behavior.
  • -1 indeterminable;
  • 0 evaluate all operations and constants just to the precision of the type;
  • 1 evaluate operations and constants of type float and double to the range and precision of the double type;
  • 2 evaluate all operations and constants to the range and precision of the long double type;
  • other value means implementation-defined behavior.
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.