diff options
| author | Paul Eggert | 2011-06-03 11:49:33 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-03 11:49:33 -0700 |
| commit | be14b9ab109c8deb5745dc47cbc471e97be06486 (patch) | |
| tree | 1926a234ed0eabcba764462e4b99c1ea58b2fcb7 /doc/lispref/objects.texi | |
| parent | b047e7acb5d18ccabb7548e3e7d79eba711008bf (diff) | |
| download | emacs-be14b9ab109c8deb5745dc47cbc471e97be06486.tar.gz emacs-be14b9ab109c8deb5745dc47cbc471e97be06486.zip | |
Document wide integers better.
* files.texi (File Attributes): Document ino_t values better.
* numbers.texi (Integer Basics, Integer Basics, Arithmetic Operations):
(Bitwise Operations):
* objects.texi (Integer Type): Integers are typically 62 bits now.
* os.texi (Time Conversion): Document time_t values better.
Diffstat (limited to 'doc/lispref/objects.texi')
| -rw-r--r-- | doc/lispref/objects.texi | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi index c58d54f13fc..d5aa51098e7 100644 --- a/doc/lispref/objects.texi +++ b/doc/lispref/objects.texi | |||
| @@ -164,25 +164,25 @@ latter are unique to Emacs Lisp. | |||
| 164 | @node Integer Type | 164 | @node Integer Type |
| 165 | @subsection Integer Type | 165 | @subsection Integer Type |
| 166 | 166 | ||
| 167 | The range of values for integers in Emacs Lisp is @minus{}536870912 to | 167 | The range of values for integers in Emacs Lisp is |
| 168 | 536870911 (30 bits; i.e., | 168 | @minus{}2305843009213693952 to 2305843009213693951 (62 bits; i.e., |
| 169 | @ifnottex | 169 | @ifnottex |
| 170 | -2**29 | 170 | -2**61 |
| 171 | @end ifnottex | 171 | @end ifnottex |
| 172 | @tex | 172 | @tex |
| 173 | @math{-2^{29}} | 173 | @math{-2^{61}} |
| 174 | @end tex | 174 | @end tex |
| 175 | to | 175 | to |
| 176 | @ifnottex | 176 | @ifnottex |
| 177 | 2**29 - 1) | 177 | 2**61 - 1) |
| 178 | @end ifnottex | 178 | @end ifnottex |
| 179 | @tex | 179 | @tex |
| 180 | @math{2^{29}-1}) | 180 | @math{2^{61}-1}) |
| 181 | @end tex | 181 | @end tex |
| 182 | on most machines. (Some machines may provide a wider range.) It is | 182 | on most machines. Some machines may provide a narrower or wider |
| 183 | important to note that the Emacs Lisp arithmetic functions do not check | 183 | range; all machines provide at least 30 bits. Emacs Lisp arithmetic |
| 184 | for overflow. Thus @code{(1+ 536870911)} is @minus{}536870912 on most | 184 | functions do not check for overflow. Thus @code{(1+ |
| 185 | machines. | 185 | 2305843009213693951)} is @minus{}2305843009213693952 on most machines. |
| 186 | 186 | ||
| 187 | The read syntax for integers is a sequence of (base ten) digits with an | 187 | The read syntax for integers is a sequence of (base ten) digits with an |
| 188 | optional sign at the beginning and an optional period at the end. The | 188 | optional sign at the beginning and an optional period at the end. The |
| @@ -195,7 +195,6 @@ leading @samp{+} or a final @samp{.}. | |||
| 195 | 1 ; @r{The integer 1.} | 195 | 1 ; @r{The integer 1.} |
| 196 | 1. ; @r{Also the integer 1.} | 196 | 1. ; @r{Also the integer 1.} |
| 197 | +1 ; @r{Also the integer 1.} | 197 | +1 ; @r{Also the integer 1.} |
| 198 | 1073741825 ; @r{Also the integer 1 on a 30-bit implementation.} | ||
| 199 | @end group | 198 | @end group |
| 200 | @end example | 199 | @end example |
| 201 | 200 | ||
| @@ -203,8 +202,8 @@ leading @samp{+} or a final @samp{.}. | |||
| 203 | As a special exception, if a sequence of digits specifies an integer | 202 | As a special exception, if a sequence of digits specifies an integer |
| 204 | too large or too small to be a valid integer object, the Lisp reader | 203 | too large or too small to be a valid integer object, the Lisp reader |
| 205 | reads it as a floating-point number (@pxref{Floating Point Type}). | 204 | reads it as a floating-point number (@pxref{Floating Point Type}). |
| 206 | For instance, on most machines @code{536870912} is read as the | 205 | For instance, on most machines @code{2305843009213693952} is read as the |
| 207 | floating-point number @code{536870912.0}. | 206 | floating-point number @code{2.305843009213694e+18}. |
| 208 | 207 | ||
| 209 | @xref{Numbers}, for more information. | 208 | @xref{Numbers}, for more information. |
| 210 | 209 | ||