diff options
| author | Paul Eggert | 2019-06-04 08:13:20 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-06-04 08:34:15 -0700 |
| commit | 7f4558e3d9edbdee6901e5fbcd4a4072f49ec5b9 (patch) | |
| tree | a709f4f82777f6a5e2c16e7d417ba59b74e7b430 /doc/lispref | |
| parent | dd7bc5de3f59237f21e1c4b70f0ba97549ea1fb4 (diff) | |
| download | emacs-7f4558e3d9edbdee6901e5fbcd4a4072f49ec5b9.tar.gz emacs-7f4558e3d9edbdee6901e5fbcd4a4072f49ec5b9.zip | |
Always allow at least double-precision bignums
Without this fix, Emacs can get into a tight loop reporting
a range error when calculating timestamps.
* doc/lispref/numbers.texi (Integer Basics):
* src/alloc.c (syms_of_alloc): Document this.
* src/bignum.c (make_bignum_bits): Always allow bignums
of at least twice the width of (u)intmax_t.
Diffstat (limited to 'doc/lispref')
| -rw-r--r-- | doc/lispref/numbers.texi | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi index fbdd83fa86e..cae8babcb40 100644 --- a/doc/lispref/numbers.texi +++ b/doc/lispref/numbers.texi | |||
| @@ -191,19 +191,19 @@ on 64-bit platforms. | |||
| 191 | @cindex integer range | 191 | @cindex integer range |
| 192 | @cindex number of bignum bits, limit on | 192 | @cindex number of bignum bits, limit on |
| 193 | @defvar integer-width | 193 | @defvar integer-width |
| 194 | The value of this variable is a nonnegative integer that is an upper | 194 | The value of this variable is a nonnegative integer that controls |
| 195 | bound on the number of bits in a bignum. Integers outside the fixnum | 195 | whether Emacs signals a range error when a large integer would be |
| 196 | range are limited to absolute values less than | 196 | calculated. Integers with absolute values less than |
| 197 | @ifnottex | 197 | @ifnottex |
| 198 | 2**@var{n}, | 198 | 2**@var{n}, |
| 199 | @end ifnottex | 199 | @end ifnottex |
| 200 | @tex | 200 | @tex |
| 201 | @math{2^{n}}, | 201 | @math{2^{n}}, |
| 202 | @end tex | 202 | @end tex |
| 203 | where @var{n} is this variable's value. Attempts to create bignums outside | 203 | where @var{n} is this variable's value, do not signal a range error. |
| 204 | this range signal a range error. Setting this variable | 204 | Attempts to create larger integers typically signal a range error, |
| 205 | to zero disables creation of bignums; setting it to a large number can | 205 | although there might be no signal if a larger integer can be created cheaply. |
| 206 | cause Emacs to consume large quantities of memory if a computation | 206 | Setting this variable to a large number can be costly if a computation |
| 207 | creates huge integers. | 207 | creates huge integers. |
| 208 | @end defvar | 208 | @end defvar |
| 209 | 209 | ||