diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/integer-type.html | |
new repository
Diffstat (limited to 'devdocs/elisp/integer-type.html')
| -rw-r--r-- | devdocs/elisp/integer-type.html | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/devdocs/elisp/integer-type.html b/devdocs/elisp/integer-type.html new file mode 100644 index 00000000..920dfc54 --- /dev/null +++ b/devdocs/elisp/integer-type.html @@ -0,0 +1,11 @@ + <h4 class="subsection">Integer Type</h4> <p>Under the hood, there are two kinds of integers—small integers, called <em>fixnums</em>, and large integers, called <em>bignums</em>. </p> <p>The range of values for a fixnum depends on the machine. The minimum range is -536,870,912 to 536,870,911 (30 bits; i.e., -2**29 to 2**29 - 1) but many machines provide a wider range. </p> <p>Bignums can have arbitrary precision. Operations that overflow a fixnum will return a bignum instead. </p> <p>All numbers can be compared with <code>eql</code> or <code>=</code>; fixnums can also be compared with <code>eq</code>. To test whether an integer is a fixnum or a bignum, you can compare it to <code>most-negative-fixnum</code> and <code>most-positive-fixnum</code>, or you can use the convenience predicates <code>fixnump</code> and <code>bignump</code> on any object. </p> <p>The read syntax for integers is a sequence of (base ten) digits with an optional sign at the beginning and an optional period at the end. The printed representation produced by the Lisp interpreter never has a leading ‘<samp>+</samp>’ or a final ‘<samp>.</samp>’. </p> <div class="example"> <pre class="example">-1 ; <span class="roman">The integer -1.</span> +1 ; <span class="roman">The integer 1.</span> +1. ; <span class="roman">Also the integer 1.</span> ++1 ; <span class="roman">Also the integer 1.</span> +</pre> +</div> <p>See <a href="numbers">Numbers</a>, for more information. </p><div class="_attribution"> + <p class="_attribution-p"> + Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br> + <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Integer-Type.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Integer-Type.html</a> + </p> +</div> |
