Raymond Toy pushed to branch master at cmucl / cmucl

Commits:

2 changed files:

Changes:

  • src/lisp/e_log10.c
    --- a/src/lisp/e_log10.c
    +++ b/src/lisp/e_log10.c
    @@ -56,8 +56,6 @@ ivln10     =  4.34294481903251816668e-01, /* 0x3FDBCB7B, 0x1526E50E */
     log10_2hi  =  3.01029995663611771306e-01, /* 0x3FD34413, 0x509F6000 */
     log10_2lo  =  3.69423907715893078616e-13; /* 0x3D59FEF3, 0x11F12B36 */
     
    -static double zero   =  0.0;
    -
     #ifdef __STDC__
     	double __ieee754_log10(double x)
     #else
    

  • src/lisp/setexception.c
    --- a/src/lisp/setexception.c
    +++ b/src/lisp/setexception.c
    @@ -46,7 +46,7 @@ fdlibm_setexception(double x, enum FDLIBM_EXCEPTION type)
         double ret;
         
         switch (type) {
    -      case 0:
    +      case FDLIBM_DIVIDE_BY_ZERO:
               /* Division by zero. Use the sign of x to get the correct
                *  signed infinity
                */
    @@ -54,17 +54,17 @@ fdlibm_setexception(double x, enum FDLIBM_EXCEPTION type)
               
               ret = copysign(INFINITY, x);
               break;
    -      case 1:
    +      case FDLIBM_UNDERFLOW:
               /* Underflow. Use the sign of x to get a signed zero. */
               feraiseexcept(FE_UNDERFLOW);
               ret = copysign(0.0, x);
               break;
    -      case 2:
    +      case FDLIBM_OVERFLOW:
               /* overflow */
               feraiseexcept(FE_OVERFLOW);
               ret = copysign(INFINITY, x);
               break;
    -      case 3:
    +      case FDLIBM_INVALID:
           {
               /* invalid */
     
    @@ -88,6 +88,10 @@ fdlibm_setexception(double x, enum FDLIBM_EXCEPTION type)
               
               break;
           }
    +    default:
    +      /* Shouldn't happen! */
    +      ret = 0.0;
    +      break;
         }
     
         return ret;