diff options
Diffstat (limited to 'newlib/libm/math/wf_fmod.c')
-rw-r--r-- | newlib/libm/math/wf_fmod.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/newlib/libm/math/wf_fmod.c b/newlib/libm/math/wf_fmod.c index 030ca3e7a..451318ea3 100644 --- a/newlib/libm/math/wf_fmod.c +++ b/newlib/libm/math/wf_fmod.c @@ -31,28 +31,12 @@ return __ieee754_fmodf(x,y); #else float z; - struct exception exc; z = __ieee754_fmodf(x,y); if(_LIB_VERSION == _IEEE_ ||isnan(y)||isnan(x)) return z; - if(y==(float)0.0) { + if(y==0.0f) { /* fmodf(x,0) */ - exc.type = DOMAIN; - exc.name = "fmodf"; - exc.err = 0; - exc.arg1 = (double)x; - exc.arg2 = (double)y; - if (_LIB_VERSION == _SVID_) - exc.retval = x; - else - exc.retval = 0.0/0.0; - if (_LIB_VERSION == _POSIX_) - errno = EDOM; - else if (!matherr(&exc)) { - errno = EDOM; - } - if (exc.err != 0) - errno = exc.err; - return (float)exc.retval; + errno = EDOM; + return 0.0f/0.0f; } else return z; #endif |