aboutsummaryrefslogtreecommitdiffstats
path: root/src/floatfns.c
diff options
context:
space:
mode:
authorRichard Stallman2015-04-05 08:36:56 -0400
committerRichard Stallman2015-04-05 08:42:43 -0400
commit4e23cd0ccde4ad1e14fe2870ccf140487af649b2 (patch)
treeb709ac1e92a892f6ec1faa85eb59a9e5960c25dd /src/floatfns.c
parentdca743f0941909a80e3f28c023977120b6203e20 (diff)
parent16eec6fc55dcc05d1d819f18998e84a9580b2521 (diff)
downloademacs-4e23cd0ccde4ad1e14fe2870ccf140487af649b2.tar.gz
emacs-4e23cd0ccde4ad1e14fe2870ccf140487af649b2.zip
* mail/rmail.el (rmail-show-message-1): When displaying a mime message,
indicate start and finish in the echo area. * mail/rmail.el (rmail-epa-decrypt): Disregard <pre> before armor. Ignore more kinds of whitespace in mime headers. Modify the decrypted mime part's mime type so it will be displayed by default when visiting this message again. * net/browse-url.el (browse-url-firefox-program): Prefer IceCat, doc. (browse-url-firefox-arguments) (browse-url-firefox-startup-arguments): Doc fix.
Diffstat (limited to 'src/floatfns.c')
-rw-r--r--src/floatfns.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/floatfns.c b/src/floatfns.c
index c68b9bd3a65..072e85776b5 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -185,14 +185,14 @@ If X is zero, both parts (SGNFCAND and EXP) are zero. */)
185 return Fcons (make_float (sgnfcand), make_number (exponent)); 185 return Fcons (make_float (sgnfcand), make_number (exponent));
186} 186}
187 187
188DEFUN ("ldexp", Fldexp, Sldexp, 1, 2, 0, 188DEFUN ("ldexp", Fldexp, Sldexp, 2, 2, 0,
189 doc: /* Construct number X from significand SGNFCAND and exponent EXP. 189 doc: /* Return X * 2**EXP, as a floating point number.
190Returns the floating point value resulting from multiplying SGNFCAND 190EXP must be an integer. */)
191(the significand) by 2 raised to the power of EXP (the exponent). */)
192 (Lisp_Object sgnfcand, Lisp_Object exponent) 191 (Lisp_Object sgnfcand, Lisp_Object exponent)
193{ 192{
194 CHECK_NUMBER (exponent); 193 CHECK_NUMBER (exponent);
195 return make_float (ldexp (XFLOATINT (sgnfcand), XINT (exponent))); 194 int e = min (max (INT_MIN, XINT (exponent)), INT_MAX);
195 return make_float (ldexp (XFLOATINT (sgnfcand), e));
196} 196}
197 197
198DEFUN ("exp", Fexp, Sexp, 1, 1, 0, 198DEFUN ("exp", Fexp, Sexp, 1, 1, 0,