OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [newlib/] [libm/] [math/] [w_scalb.c] - Diff between revs 39 and 56

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 39 Rev 56
Line 52... Line 52...
        if(_LIB_VERSION == _IEEE_) return z;
        if(_LIB_VERSION == _IEEE_) return z;
        if(!(finite(z)||isnan(z))&&finite(x)) {
        if(!(finite(z)||isnan(z))&&finite(x)) {
            /* scalb overflow; SVID also returns +-HUGE_VAL */
            /* scalb overflow; SVID also returns +-HUGE_VAL */
            exc.type = OVERFLOW;
            exc.type = OVERFLOW;
            exc.name = "scalb";
            exc.name = "scalb";
 
            exc.err = 0;
 
            exc.arg1 = x;
 
            exc.arg2 = fn;
            exc.retval = x > 0.0 ? HUGE_VAL : -HUGE_VAL;
            exc.retval = x > 0.0 ? HUGE_VAL : -HUGE_VAL;
            if (_LIB_VERSION == _POSIX_)
            if (_LIB_VERSION == _POSIX_)
               errno = ERANGE;
               errno = ERANGE;
            else if (!matherr(&exc)) {
            else if (!matherr(&exc)) {
               errno = ERANGE;
               errno = ERANGE;
Line 66... Line 69...
        }
        }
        if(z==0.0&&z!=x) {
        if(z==0.0&&z!=x) {
            /* scalb underflow */
            /* scalb underflow */
            exc.type = UNDERFLOW;
            exc.type = UNDERFLOW;
            exc.name = "scalb";
            exc.name = "scalb";
 
            exc.err = 0;
 
            exc.arg1 = x;
 
            exc.arg2 = fn;
            exc.retval = copysign(0.0,x);
            exc.retval = copysign(0.0,x);
            if (_LIB_VERSION == _POSIX_)
            if (_LIB_VERSION == _POSIX_)
               errno = ERANGE;
               errno = ERANGE;
            else if (!matherr(&exc)) {
            else if (!matherr(&exc)) {
               errno = ERANGE;
               errno = ERANGE;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.