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