summaryrefslogtreecommitdiff
path: root/devdocs/elisp/numbers.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/numbers.html
new repository
Diffstat (limited to 'devdocs/elisp/numbers.html')
-rw-r--r--devdocs/elisp/numbers.html56
1 files changed, 56 insertions, 0 deletions
diff --git a/devdocs/elisp/numbers.html b/devdocs/elisp/numbers.html
new file mode 100644
index 00000000..7f23345f
--- /dev/null
+++ b/devdocs/elisp/numbers.html
@@ -0,0 +1,56 @@
+ <h2 class="chapter">Numbers</h2> <p>GNU Emacs supports two numeric data types: <em>integers</em> and <em>floating-point numbers</em>. Integers are whole numbers such as -3, 0, 7, 13, and 511. Floating-point numbers are numbers with fractional parts, such as -4.5, 0.0, and 2.71828. They can also be expressed in exponential notation: ‘<samp>1.5e2</samp>’ is the same as ‘<samp>150.0</samp>’; here, ‘<samp>e2</samp>’ stands for ten to the second power, and that is multiplied by 1.5. Integer computations are exact. Floating-point computations often involve rounding errors, as the numbers have a fixed amount of precision. </p> <table class="menu" border="0" cellspacing="0"> <tr>
+<td align="left" valign="top">• <a href="integer-basics" accesskey="1">Integer Basics</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Representation and range of integers. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="float-basics" accesskey="2">Float Basics</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Representation and range of floating point. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="predicates-on-numbers" accesskey="3">Predicates on Numbers</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Testing for numbers. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="comparison-of-numbers" accesskey="4">Comparison of Numbers</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Equality and inequality predicates. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="numeric-conversions" accesskey="5">Numeric Conversions</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Converting float to integer and vice versa. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="arithmetic-operations" accesskey="6">Arithmetic Operations</a>
+</td>
+<td> </td>
+<td align="left" valign="top">How to add, subtract, multiply and divide. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="rounding-operations" accesskey="7">Rounding Operations</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Explicitly rounding floating-point numbers. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="bitwise-operations" accesskey="8">Bitwise Operations</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Logical and, or, not, shifting. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="math-functions" accesskey="9">Math Functions</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Trig, exponential and logarithmic functions. </td>
+</tr> <tr>
+<td align="left" valign="top">• <a href="random-numbers">Random Numbers</a>
+</td>
+<td> </td>
+<td align="left" valign="top">Obtaining random integers, predictable or not. </td>
+</tr> </table><div class="_attribution">
+ <p class="_attribution-p">
+ Copyright &copy; 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/Numbers.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Numbers.html</a>
+ </p>
+</div>