summaryrefslogtreecommitdiff
path: root/src/lisp.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-08-22 19:30:24 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2018-08-22 19:30:57 -0700
commitee641b87cf220250ba89f219fb47a4406a05deb7 (patch)
tree08ff44c5197ae39b2ec0906de4bb4dcafda4677f /src/lisp.h
parentbe5fe6183e95f3afe3a62ec43504b99df90bc794 (diff)
downloademacs-ee641b87cf220250ba89f219fb47a4406a05deb7.tar.gz
Fix bugs when rounding to bignums
Also, since Emacs historically reported a range error when rounding operations overflowed, do that consistently for all bignum overflows. * doc/lispref/errors.texi (Standard Errors): * doc/lispref/numbers.texi (Integer Basics): Document range errors. * src/alloc.c (range_error): Rename from integer_overflow. All uses changed. * src/floatfns.c (rounding_driver): When the result of a floating point rounding operation does not fit into a fixnum, put it into a bignum instead of always signaling an range error. * test/src/floatfns-tests.el (divide-extreme-sign): These tests now return the mathematically-correct answer instead of signaling an error. (bignum-round): Check that integers round to themselves.
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lisp.h b/src/lisp.h
index c5593b21008..bca4dfbb603 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3708,7 +3708,7 @@ extern void display_malloc_warning (void);
extern ptrdiff_t inhibit_garbage_collection (void);
extern Lisp_Object build_overlay (Lisp_Object, Lisp_Object, Lisp_Object);
extern void free_cons (struct Lisp_Cons *);
-extern _Noreturn void integer_overflow (void);
+extern _Noreturn void range_error (void);
extern void init_alloc_once (void);
extern void init_alloc (void);
extern void syms_of_alloc (void);