Raymond Toy pushed to branch issue-475-update-core-math at cmucl / cmucl Commits: b86eb7ce by Raymond Toy at 2026-02-20T19:08:16-08:00 Update irrat.c for changes in the core-math binary64 code We don't need some of the special cases anymore. In particular exp(-1000) signals underflow now. Some of the trig functions now signal invalid for inf so we don't need our checks either. - - - - - 1 changed file: - src/lisp/irrat.c Changes: ===================================== src/lisp/irrat.c ===================================== @@ -53,8 +53,9 @@ double lisp_sin(double x) { #ifdef FEATURE_CORE_MATH +#if 0 MAYBE_SIGNAL_INVALID(isinf(x), x) - +#endif return cr_sin(x); #else return fdlibm_sin(x); @@ -77,8 +78,9 @@ double lisp_tan(double x) { #ifdef FEATURE_CORE_MATH +#if 0 MAYBE_SIGNAL_INVALID(isinf(x), x) - +#endif return cr_tan(x); #else return fdlibm_tan(x); @@ -129,8 +131,9 @@ double lisp_sinh(double x) { #ifdef FEATURE_CORE_MATH +#if 0 MAYBE_SIGNAL_OVERFLOW(x) - +#endif return cr_sinh(x); #else return __ieee754_sinh(x); @@ -176,7 +179,7 @@ lisp_acosh(double x) MAYBE_SIGNAL_INVALID(x < 1, x) MAYBE_SIGNAL_OVERFLOW(x) - + return cr_acosh(x); #else return __ieee754_acosh(x); @@ -197,27 +200,6 @@ double lisp_exp(double x) { #ifdef FEATURE_CORE_MATH - /* - * For consistency, silently return NaN when x is NaN. Do not - * signal an invalid operation, even if invalid operation trap is - * enabled. This is what fdlibm does, and also what many of the - * other core-math routines do. - */ - - if (isnan(x)) { - return x; - } - - /* - * Can't depend on cr_exp to signal underflow. It seems the - * underflow has been constant-folded to zero. Hence, check for - * underflow here and explicitly signal an underflow. The - * constant here is from core-math exp.c. - */ - if (x <= -0x1.74910d52d3052p+9) { - return fdlibm_setexception(0.0, FDLIBM_UNDERFLOW); - } - return cr_exp(x); #else return __ieee754_exp(x); View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/b86eb7ce1716decabd6f3451... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/b86eb7ce1716decabd6f3451... You're receiving this email because of your account on gitlab.common-lisp.net.