From 1384fa33581c398a3f3393c82be071d5784b0b04 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 00:45:34 -0700 Subject: * floatfns.c (domain_error2): Define only if needed. --- src/floatfns.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/floatfns.c') diff --git a/src/floatfns.c b/src/floatfns.c index c00923643d1..c8b5236d34a 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -187,8 +187,10 @@ static const char *float_error_fn_name; xsignal3 (Qrange_error, build_string ((op)), (a1), (a2)) #define domain_error(op,arg) \ xsignal2 (Qdomain_error, build_string ((op)), (arg)) +#ifdef FLOAT_CHECK_DOMAIN #define domain_error2(op,a1,a2) \ xsignal3 (Qdomain_error, build_string ((op)), (a1), (a2)) +#endif /* Extract a Lisp number as a `double', or signal an error. */ @@ -1037,7 +1039,7 @@ syms_of_floatfns (void) defsubr (&Scopysign); defsubr (&Sfrexp); defsubr (&Sldexp); -#endif +#endif #if 0 defsubr (&Sacosh); defsubr (&Sasinh); @@ -1074,4 +1076,3 @@ syms_of_floatfns (void) defsubr (&Sround); defsubr (&Struncate); } - -- cgit v1.2.1 From a885e2ed791b15dc48a7024751872d2b5bc17034 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 00:47:02 -0700 Subject: * floatfns.c (Ffrexp, Fldexp): Rename locals to avoid shadowing. --- src/floatfns.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/floatfns.c') diff --git a/src/floatfns.c b/src/floatfns.c index c8b5236d34a..bc03509b757 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -328,9 +328,9 @@ If X is zero, both parts (SGNFCAND and EXP) are zero. */) return Fcons (make_float (0.0), make_number (0)); else { - int exp; - double sgnfcand = frexp (f, &exp); - return Fcons (make_float (sgnfcand), make_number (exp)); + int exponent; + double sgnfcand = frexp (f, &exponent); + return Fcons (make_float (sgnfcand), make_number (exponent)); } } @@ -338,10 +338,10 @@ DEFUN ("ldexp", Fldexp, Sldexp, 1, 2, 0, doc: /* Construct number X from significand SGNFCAND and exponent EXP. Returns the floating point value resulting from multiplying SGNFCAND (the significand) by 2 raised to the power of EXP (the exponent). */) - (Lisp_Object sgnfcand, Lisp_Object exp) + (Lisp_Object sgnfcand, Lisp_Object exponent) { - CHECK_NUMBER (exp); - return make_float (ldexp (XFLOATINT (sgnfcand), XINT (exp))); + CHECK_NUMBER (exponent); + return make_float (ldexp (XFLOATINT (sgnfcand), XINT (exponent))); } #endif -- cgit v1.2.1