Predefined Values

Some useful values that describe properties of the floating point environment.

  #include <math.h>
  
  #define 
  HUGE_VAL /*...*/
  
  #define 
  HUGE_VALF /*...*/
  
  #define 
  HUGE_VALL /*...*/
  
  #define 
  NAN /*...*/
  
  #define 
  INFINITY /*...*/    

If the floating-point result of a function is too large to be represented as a value by the return type, the function will return HUGE_VAL if the return type is double, HUGE_VALF if the type is float, or HUGE_VALL if long double.

The NAN macro defines the quiet NaN of type float.

The INFINITY macro defines the value of infinity of type float.

This facility may not be available on configurations of the EWL that run on platforms that do not have floating-point math capabilities.