| 1 |
<html><head> |
| 2 |
|
| 3 |
<title>Numbers</title> |
| 4 |
|
| 5 |
<style type="text/css"> |
| 6 |
.example { |
| 7 |
color: #000000; |
| 8 |
background-color: #F5F5F5; |
| 9 |
padding: 8px; |
| 10 |
border: #808080; |
| 11 |
border-style: solid; |
| 12 |
border-width: 1px; |
| 13 |
width:auto; |
| 14 |
} |
| 15 |
.button { |
| 16 |
color: #000000; |
| 17 |
background-color: #F5F5F5; |
| 18 |
padding-top: 1px; |
| 19 |
padding-bottom: 1px; |
| 20 |
padding-left: 4px; |
| 21 |
padding-right: 8px; |
| 22 |
border: #808080; |
| 23 |
border-style: solid; |
| 24 |
border-width: 1px; |
| 25 |
white-space: pre; |
| 26 |
} |
| 27 |
.box { |
| 28 |
color: #000000; |
| 29 |
padding-top: 4px; |
| 30 |
padding-bottom: 4px; |
| 31 |
padding-left: 16px; |
| 32 |
padding-right: 16px; |
| 33 |
border: #808080; |
| 34 |
border-style: solid; |
| 35 |
border-width: 1px; |
| 36 |
} |
| 37 |
</style> |
| 38 |
|
| 39 |
</head> |
| 40 |
|
| 41 |
<body> |
| 42 |
|
| 43 |
<a href="../../start.htm">Nyquist / XLISP 2.0</a> - |
| 44 |
<a href="../../manual/contents.htm">Contents</a> | |
| 45 |
<a href="../../tutorials/tutorials.htm">Tutorials</a> | |
| 46 |
<a href="../examples.htm">Examples</a> | |
| 47 |
<a href="../../reference/reference-index.htm">Reference</a> |
| 48 |
|
| 49 |
<hr> |
| 50 |
|
| 51 |
<h1>Numbers</h1> |
| 52 |
|
| 53 |
<hr> |
| 54 |
|
| 55 |
<ol> |
| 56 |
<li><nobr><a href="#number-types">Number Types</a></nobr></li> |
| 57 |
<li><nobr><a href="#integer-limits">Integer Limits</a></nobr></li> |
| 58 |
</ol> |
| 59 |
|
| 60 |
<a name="number-types"></a> |
| 61 |
|
| 62 |
<hr> |
| 63 |
|
| 64 |
<h2>Number Types</h2> |
| 65 |
|
| 66 |
<hr> |
| 67 |
|
| 68 |
<p>In Nyquist/XLISP only two types of numers exist:</p> |
| 69 |
|
| 70 |
<ul> |
| 71 |
<li><nobr><b>fixnum</b> - integer numbers</nobr></li> |
| 72 |
<li><nobr><b>flonum</b> - floating-point numbers</nobr></li> |
| 73 |
</ul> |
| 74 |
|
| 75 |
<p>In Nyquist/XLISP, there are no ratios or complex numbers. Even if the |
| 76 |
math functions in this section are modelled after <nobr>Common Lisp</nobr>, |
| 77 |
no attempt is made to emulate these numbers.</p> |
| 78 |
|
| 79 |
<a name="integer-limits"></a> |
| 80 |
|
| 81 |
<hr> |
| 82 |
|
| 83 |
<h2>Integer Limits</h2> |
| 84 |
|
| 85 |
<hr> |
| 86 |
|
| 87 |
<pre class="example"> |
| 88 |
(setq <font color="#AA5500">*most-positive-fixnum*</font> 2147483647) |
| 89 |
(setq <font color="#AA5500">*most-negative-fixnum*</font> -2147483648) |
| 90 |
</pre> |
| 91 |
|
| 92 |
<p><b>Note:</b> these are the limits for <nobr>32-bit</nobr> machines.</p> |
| 93 |
|
| 94 |
<p><nobr> <a href="#top">Back to top</a></nobr></p> |
| 95 |
|
| 96 |
<hr> |
| 97 |
|
| 98 |
<a href="../../start.htm">Nyquist / XLISP 2.0</a> - |
| 99 |
<a href="../../manual/contents.htm">Contents</a> | |
| 100 |
<a href="../../tutorials/tutorials.htm">Tutorials</a> | |
| 101 |
<a href="../examples.htm">Examples</a> | |
| 102 |
<a href="../../reference/reference-index.htm">Reference</a> |
| 103 |
|
| 104 |
</body></html> |