FESETENV(3)

NAME
fesetenv - set current floating-point environment

SYNOPSIS

#include <fenv.h>

int fesetenv(const fenv_t *envp);

DESCRIPTION

This method attempts to establish the floating-point environment pointed to by envp. The argument envp must point to a floating-point environment obtained via fegetenv or feholdexcept or a floating-point environment macro such as FE_DFL_ENV.

It only sets the states of the flags as recorded in its argument, and does not actually raise the associated floating-point exceptions.

RETURNS

If floating-point environment was successfully established, then this method returns zero. Otherwise, a non-zero value is returned.

PORTABILITY

ANSI C requires fesetenv.

Not all Newlib targets have a working implementation. Refer to the file sys/fenv.h to see the status for your target.