19 feenableexcept (
unsigned int excepts)
22 unsigned int new_excepts = excepts & FE_ALL_EXCEPT,
25 if ( fegetenv (&fenv) )
return -1;
26 old_excepts = fenv.__control & FE_ALL_EXCEPT;
29 fenv.__control &= ~new_excepts;
30 fenv.__mxcsr &= ~(new_excepts << 7);
32 return ( fesetenv (&fenv) ? -1 : old_excepts );
36 fedisableexcept (
unsigned int excepts)
39 unsigned int new_excepts = excepts & FE_ALL_EXCEPT,
42 if ( fegetenv (&fenv) )
return -1;
43 old_excepts = fenv.__control & FE_ALL_EXCEPT;
46 fenv.__control |= new_excepts;
47 fenv.__mxcsr |= new_excepts << 7;
49 return ( fesetenv (&fenv) ? -1 : old_excepts );