fesetround

Sets the floating point rounding direction.

Library:LibC
Classification:ANSI
Service:Math

Syntax

  #include <fenv.h> 
  
  int fesetround (
     int   round );
  

Parameters

round

(IN) Specifies the rounding direction with one of the following flags:

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

The default direction is FE_TONEAREST.

Return Values

If successful, returns 0. Otherwise returns a non-zero value.

See Also