Debian Codegraph @

info/gcl/number.html

raw
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>number (ANSI and GNU Common Lisp Document)</title>
7
8 <meta name="description" content="number (ANSI and GNU Common Lisp Document)">
9 <meta name="keywords" content="number (ANSI and GNU Common Lisp Document)">
10 <meta name="resource-type" content="document">
11 <meta name="distribution" content="global">
12 <meta name="Generator" content="makeinfo">
13 <link href="index.html" rel="start" title="Top">
14 <link href="Numbers-Dictionary.html" rel="up" title="Numbers Dictionary">
15 <link href="complex-_0028System-Class_0029.html" rel="next" title="complex (System Class)">
16 <link href="Numbers-Dictionary.html" rel="prev" title="Numbers Dictionary">
17 <style type="text/css">
18 <!--
19 a.summary-letter {text-decoration: none}
20 blockquote.indentedblock {margin-right: 0em}
21 div.display {margin-left: 3.2em}
22 div.example {margin-left: 3.2em}
23 div.lisp {margin-left: 3.2em}
24 kbd {font-style: oblique}
25 pre.display {font-family: inherit}
26 pre.format {font-family: inherit}
27 pre.menu-comment {font-family: serif}
28 pre.menu-preformatted {font-family: serif}
29 span.nolinebreak {white-space: nowrap}
30 span.roman {font-family: initial; font-weight: normal}
31 span.sansserif {font-family: sans-serif; font-weight: normal}
32 ul.no-bullet {list-style: none}
33 -->
34 </style>
35
36
37 </head>
38
39 <body lang="en">
40 <span id="number"></span><div class="header">
41 <p>
42 Next: <a href="complex-_0028System-Class_0029.html" accesskey="n" rel="next">complex (System Class)</a>, Previous: <a href="Numbers-Dictionary.html" accesskey="p" rel="prev">Numbers Dictionary</a>, Up: <a href="Numbers-Dictionary.html" accesskey="u" rel="up">Numbers Dictionary</a> &nbsp; </p>
43 </div>
44 <hr>
45 <span id="number-_005bSystem-Class_005d"></span><h4 class="subsection">12.2.1 number [System Class]</h4>
46
47 <span id="Class-Precedence-List_003a_003a-35"></span><h4 class="subsubheading">Class Precedence List::</h4>
48 <p><b>number</b>,
49 <b>t</b>
50 </p>
51 <span id="Description_003a_003a-267"></span><h4 class="subsubheading">Description::</h4>
52
53 <p>The <i>type</i> <b>number</b> contains <i>objects</i> which represent
54 mathematical numbers.
55 </p>
56 <p>The <i>types</i> <b>real</b> and <b>complex</b> are <i>disjoint</i>
57 <i>subtypes</i> of <b>number</b>.
58 </p>
59 <p>The <i>function</i> <b>=</b> tests for numerical equality.
60 The <i>function</i> <b>eql</b>, when its arguments are both <i>numbers</i>,
61 tests that they have both the same <i>type</i> and numerical value.
62 Two <i>numbers</i> that are the <i>same</i> under <b>eql</b> or <b>=</b>
63 are not necessarily the <i>same</i> under <b>eq</b>.
64 </p>
65 <span id="Notes_003a_003a-136"></span><h4 class="subsubheading">Notes::</h4>
66
67 <p><span class="roman">Common Lisp</span> differs from mathematics on some naming issues. In mathematics,
68 the set of real numbers is traditionally described as a subset of the
69 complex numbers, but in <span class="roman">Common Lisp</span>, the <i>type</i> <b>real</b> and the <i>type</i> <b>complex</b> are
70 disjoint. The <span class="roman">Common Lisp</span> type which includes all mathematical complex
71 numbers is called <b>number</b>. The reasons for these differences
72 include historical precedent, compatibility with most other popular
73 computer languages, and various issues of time and space efficiency.
74 </p>
75
76
77
78 </body>
79 </html>