Raymond Toy pushed to branch issue-475-update-core-math at cmucl / cmucl

Commits:

1 changed file:

Changes:

  • src/lisp/irrat.c
    ... ... @@ -53,8 +53,9 @@ double
    53 53
     lisp_sin(double x)
    
    54 54
     {
    
    55 55
     #ifdef FEATURE_CORE_MATH
    
    56
    +#if 0
    
    56 57
         MAYBE_SIGNAL_INVALID(isinf(x), x)
    
    57
    -
    
    58
    +#endif
    
    58 59
         return cr_sin(x);
    
    59 60
     #else    
    
    60 61
         return fdlibm_sin(x);
    
    ... ... @@ -77,8 +78,9 @@ double
    77 78
     lisp_tan(double x)
    
    78 79
     {
    
    79 80
     #ifdef FEATURE_CORE_MATH
    
    81
    +#if 0
    
    80 82
         MAYBE_SIGNAL_INVALID(isinf(x), x)
    
    81
    -
    
    83
    +#endif
    
    82 84
         return cr_tan(x);
    
    83 85
     #else    
    
    84 86
         return fdlibm_tan(x);
    
    ... ... @@ -129,8 +131,9 @@ double
    129 131
     lisp_sinh(double x)
    
    130 132
     {
    
    131 133
     #ifdef FEATURE_CORE_MATH
    
    134
    +#if 0
    
    132 135
         MAYBE_SIGNAL_OVERFLOW(x)
    
    133
    -	
    
    136
    +#endif
    
    134 137
         return cr_sinh(x);
    
    135 138
     #else    
    
    136 139
         return __ieee754_sinh(x);
    
    ... ... @@ -176,7 +179,7 @@ lisp_acosh(double x)
    176 179
         MAYBE_SIGNAL_INVALID(x < 1, x)
    
    177 180
     
    
    178 181
         MAYBE_SIGNAL_OVERFLOW(x)
    
    179
    -    
    
    182
    +
    
    180 183
         return cr_acosh(x);
    
    181 184
     #else    
    
    182 185
         return __ieee754_acosh(x);
    
    ... ... @@ -197,27 +200,6 @@ double
    197 200
     lisp_exp(double x)
    
    198 201
     {
    
    199 202
     #ifdef FEATURE_CORE_MATH
    
    200
    -    /*
    
    201
    -     * For consistency, silently return NaN when x is NaN.  Do not
    
    202
    -     * signal an invalid operation, even if invalid operation trap is
    
    203
    -     *  enabled.  This is what fdlibm does, and also what many of the
    
    204
    -     *  other core-math routines do.
    
    205
    -     */
    
    206
    -
    
    207
    -    if (isnan(x)) {
    
    208
    -	return x;
    
    209
    -    }
    
    210
    -    
    
    211
    -    /*
    
    212
    -     * Can't depend on cr_exp to signal underflow.  It seems the
    
    213
    -     * underflow has been constant-folded to zero.  Hence, check for
    
    214
    -     * underflow here and explicitly signal an underflow.  The
    
    215
    -     * constant here is from core-math exp.c.
    
    216
    -     */
    
    217
    -    if (x <= -0x1.74910d52d3052p+9) {
    
    218
    -	return fdlibm_setexception(0.0, FDLIBM_UNDERFLOW);
    
    219
    -    }
    
    220
    -
    
    221 203
         return cr_exp(x);
    
    222 204
     #else    
    
    223 205
         return __ieee754_exp(x);