Back to index

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

Go to the source code of this file.

Functions

int fesetenv (const fenv_t *envp)

Function Documentation

int fesetenv ( const fenv_t envp)

Definition at line 25 of file fesetenv.c.

{
  fpu_control_t cw;

  /* Read first current state to flush fpu pipeline.  */
  _FPU_GETCW (cw);

  if (envp == FE_DFL_ENV)
    _FPU_SETCW (_FPU_DEFAULT);
  else if (envp == FE_NOMASK_ENV)
    _FPU_SETCW (_FPU_IEEE);
  else
    _FPU_SETCW (envp->__fp_control_register);

  /* Success.  */
  return 0;
}