emacs.d/clones/lisp/www.cs.cmu.edu/Groups/AI/html/cltl/clm/node134.html

129 lines
7.9 KiB
HTML
Raw Normal View History

2022-08-26 19:11:35 +02:00
<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
<!Converted with LaTeX2HTML 0.6.5 (Tue Nov 15 1994) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
<HEAD>
<TITLE>12.10. Implementation Parameters</TITLE>
</HEAD>
<BODY>
<meta name="description" value=" Implementation Parameters">
<meta name="keywords" value="clm">
<meta name="resource-type" value="document">
<meta name="distribution" value="global">
<P>
<b>Common Lisp the Language, 2nd Edition</b>
<BR> <HR><A NAME=tex2html3197 HREF="node135.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html3195 HREF="node121.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html3191 HREF="node133.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html3199 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html3200 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html3198 HREF="node135.html"> Characters</A>
<B>Up:</B> <A NAME=tex2html3196 HREF="node121.html"> Numbers</A>
<B> Previous:</B> <A NAME=tex2html3192 HREF="node133.html"> Random Numbers</A>
<HR> <P>
<H1><A NAME=SECTION0016100000000000000000>12.10 Implementation Parameters</A></H1>
<P>
The values of the named constants defined in this section are
implementation-dependent. They may be useful for parameterizing
code in some situations.
<P>
<BR><b>[Constant]</b><BR>
<tt>most-positive-fixnum <BR></tt><tt>most-negative-fixnum</tt><P>The value of <tt>most-positive-fixnum</tt> is that fixnum closest in value to
positive infinity provided by the implementation.
<P>
The value of <tt>most-negative-fixnum</tt> is that fixnum closest in value to
negative infinity provided by the implementation.
<P>
<img align=bottom alt="change_begin" src="gif/change_begin.gif"><br>
X3J13 voted in January 1989
(FIXNUM-NON-PORTABLE) <A NAME=13813>&#160;</A>
to specify that <tt>fixnum</tt> must be a supertype
of the type <tt>(signed-byte 16)</tt>, and additionally that the value
of <tt>array-dimension-limit</tt> must be a fixnum. This implies that the value
of <tt>most-negative-fixnum</tt> must be less than or equal to <IMG ALIGN=BOTTOM ALT="" SRC="_24769_tex2html_wrap41917.gif">,
and the value of <tt>most-positive-fixnum</tt> must be greater than or equal to
both <IMG ALIGN=BOTTOM ALT="" SRC="_24769_tex2html_wrap41919.gif"> and the value of <tt>array-dimension-limit</tt>.
<br><img align=bottom alt="change_end" src="gif/change_end.gif">
<P>
<BR><b>[Constant]</b><BR>
<tt>most-positive-short-float <BR></tt><tt>least-positive-short-float <BR></tt><tt>least-negative-short-float <BR></tt><tt>most-negative-short-float</tt><P>The value of <tt>most-positive-short-float</tt> is that short-format
floating-point number closest in value to (but not equal to)
positive infinity provided by the implementation.
<P>
The value of <tt>least-positive-short-float</tt> is that positive short-format
floating-point number closest in value to (but not equal to) zero provided by
the implementation.
<P>
The value of <tt>least-negative-short-float</tt> is that negative short-format
floating-point number closest in value to (but not equal to) zero provided by
the implementation. (Note that even if an implementation supports
minus zero as a distinct short floating-point value,
<tt>least-negative-short-float</tt> must not be minus zero.)
<P>
<img align=bottom alt="change_begin" src="gif/change_begin.gif"><br>
X3J13 voted in June 1989 (FLOAT-UNDERFLOW) <A NAME=13830>&#160;</A>
to clarify that these definitions are to be taken quite literally.
In implementations that support denormalized numbers,
the values of <tt>least-positive-short-float</tt> and
<tt>least-negative-short-float</tt> may be denormalized.
<br><img align=bottom alt="change_end" src="gif/change_end.gif">
<P>
The value of <tt>most-negative-short-float</tt> is that short-format
floating-point number closest in value to (but not equal to)
negative infinity provided by the implementation.
<P>
<BR><b>[Constant]</b><BR>
<tt>most-positive-single-float <BR></tt><tt>least-positive-single-float <BR></tt><tt>least-negative-single-float <BR></tt><tt>most-negative-single-float <BR></tt><tt>most-positive-double-float <BR></tt><tt>least-positive-double-float <BR></tt><tt>least-negative-double-float <BR></tt><tt>most-negative-double-float <BR></tt><tt>most-positive-long-float <BR></tt><tt>least-positive-long-float <BR></tt><tt>least-negative-long-float <BR></tt><tt>most-negative-long-float</tt><P>These are analogous to the constants defined above for short-format
floating-point numbers.
<P>
<img align=bottom alt="change_begin" src="gif/change_begin.gif">
<BR><b>[Constant]</b><BR>
<tt>least-positive-normalized-short-float <BR></tt><tt>least-negative-normalized-short-float</tt><P>X3J13 voted in June 1989 (FLOAT-UNDERFLOW) <A NAME=13840>&#160;</A>
to add these constants to the language.
<P>
The value of <tt>least-positive-normalized-short-float</tt> is that positive normalized
short-format
floating-point number closest in value to (but not equal to) zero provided by
the implementation. In implementations that do not support denormalized numbers
this may be the same as the value of
<tt>least-positive-short-float</tt>.
<P>
The value of <tt>least-negative-normalized-short-float</tt> is that negative normalized short-format
floating-point number closest in value to (but not equal to) zero provided by
the implementation.
(Note that even if an implementation supports
minus zero as a distinct short floating-point value,
<tt>least-negative-normalized-short-float</tt> must not be minus zero.)
In implementations that do not support denormalized numbers
this may be the same as the value of <tt>least-positive-short-float</tt>.
<P>
<BR><b>[Constant]</b><BR>
<tt>least-positive-normalized-single-float <BR></tt><tt>least-negative-normalized-single-float <BR></tt><tt>least-positive-normalized-double-float <BR></tt><tt>least-negative-normalized-double-float <BR></tt><tt>least-positive-normalized-long-float <BR></tt><tt>least-negative-normalized-long-float</tt><P>These are analogous to the constants defined above for short-format
floating-point numbers.
<br><img align=bottom alt="change_end" src="gif/change_end.gif">
<P>
<BR><b>[Constant]</b><BR>
<tt>short-float-epsilon <BR></tt><tt>single-float-epsilon <BR></tt><tt>double-float-epsilon <BR></tt><tt>long-float-epsilon</tt><P>These constants have as value, for each floating-point format,
the smallest positive floating-point number <i>e</i> of that format such that
the expression
<P><pre>
(not (= (float 1 <i>e</i>) (+ (float 1 <i>e</i>) <i>e</i>)))
</pre><P>
is true when actually evaluated.
<P>
<BR><b>[Constant]</b><BR>
<tt>short-float-negative-epsilon <BR></tt><tt>single-float-negative-epsilon <BR></tt><tt>double-float-negative-epsilon <BR></tt><tt>long-float-negative-epsilon</tt><P>These constants have as value, for each floating-point format,
the smallest positive floating-point number <i>e</i> of that format such that
the expression
<P><pre>
(not (= (float 1 <i>e</i>) (- (float 1 <i>e</i>) <i>e</i>)))
</pre><P>
is true when actually evaluated.
<P>
<P>
<BR> <HR><A NAME=tex2html3197 HREF="node135.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html3195 HREF="node121.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html3191 HREF="node133.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html3199 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html3200 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html3198 HREF="node135.html"> Characters</A>
<B>Up:</B> <A NAME=tex2html3196 HREF="node121.html"> Numbers</A>
<B> Previous:</B> <A NAME=tex2html3192 HREF="node133.html"> Random Numbers</A>
<HR> <P>
<HR>
<P><ADDRESS>
AI.Repository@cs.cmu.edu
</ADDRESS>
</BODY>