fegetround

Gets the current floating point rounding direction.

Library:LibC
Classification:ANSI
Service:Math

Syntax

  #include <fenv.h> 
  
  int  fegetround ( void );
  

Return Values

If successful, returns a positive value specifying rounding the direction.

Flag

Value

Description

FE_DOWNWARD

0x00000040

Round toward negative infinity

FE_TONEAREST

0x00000080

Round to nearest

FE_TOWARDZERO

0x00000100

Round toward zero

FE_UPWARD

0x00000200

Round toward positive infinity

If unsuccessful, returns a negative value.

See Also