Back to index

glibc  2.9
Functions
fesetround.c File Reference
#include <fenv.h>

Go to the source code of this file.

Functions

int fesetround (int round)

Function Documentation

int fesetround ( int  round)

Definition at line 23 of file fesetround.c.

{
  fenv_t tmp;

  if ((round & ~__FE_ROUND_MASK) != 0)
    /* ROUND is no valid rounding mode.  */
    return 1;

  __fenv_stfsr (tmp);
  tmp &= ~__FE_ROUND_MASK;
  tmp |= round;
  __fenv_ldfsr (tmp);

  return 0;
}