1
0
Fork 0
cl-sites/HyperSpec-7-0/HyperSpec/Body/t_short_.htm
2024-04-01 10:24:07 +02:00

70 lines
12 KiB
HTML

<!-- Common Lisp HyperSpec (TM), version 7.0 generated by Kent M. Pitman on Mon, 11-Apr-2005 2:31am EDT -->
<HTML>
<HEAD>
<TITLE>CLHS: Type SHORT-FLOAT, SINGLE-FLOAT, DOUBLE-FLOAT...</TITLE>
<LINK HREF="../Data/clhs.css" REL="stylesheet" TYPE="text/css" />
<META HTTP-EQUIV="Author" CONTENT="Kent M. Pitman">
<META HTTP-EQUIV="Organization" CONTENT="LispWorks Ltd.">
<LINK REL=TOP HREF="../Front/index.htm">
<LINK REL=COPYRIGHT HREF="../Front/Help.htm#Legal">
<LINK REL=DISCLAIMER HREF="../Front/Help.htm#Disclaimer">
<LINK REL=PREV HREF="t_float.htm">
<LINK REL=UP HREF="c_number.htm">
<LINK REL=NEXT HREF="t_ration.htm">
</HEAD>
<BODY>
<H1><A REV=MADE HREF="http://www.lispworks.com/"><IMG WIDTH=80 HEIGHT=65 ALT="[LISPWORKS]" SRC="../Graphics/LWSmall.gif" ALIGN=Bottom></A><A REL=TOP HREF="../Front/index.htm"><IMG WIDTH=237 HEIGHT=65 ALT="[Common Lisp HyperSpec (TM)]" SRC="../Graphics/CLHS_Sm.gif" ALIGN=Bottom></A> <A REL=PREV HREF="t_float.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="c_number.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="t_ration.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
<HR>
<A NAME="short-float"><A NAME="single-float"><A NAME="double-float"><A NAME="long-float"><I>Type</I> <B>SHORT-FLOAT, SINGLE-FLOAT, DOUBLE-FLOAT, LONG-FLOAT</B></A></A></A></A> <P>
<P><B>Supertypes:</B><P>
<P>
<A REL=DEFINITION HREF="#short-float"><B>short-float</B></A>: <A REL=DEFINITION HREF="#short-float"><B>short-float</B></A>, <A REL=DEFINITION HREF="t_float.htm#float"><B>float</B></A>, <A REL=DEFINITION HREF="t_real.htm#real"><B>real</B></A>, <A REL=DEFINITION HREF="t_number.htm#number"><B>number</B></A>, <A REL=DEFINITION HREF="t_t.htm#t"><B>t</B></A> <P>
<A REL=DEFINITION HREF="#single-float"><B>single-float</B></A>: <A REL=DEFINITION HREF="#single-float"><B>single-float</B></A>, <A REL=DEFINITION HREF="t_float.htm#float"><B>float</B></A>, <A REL=DEFINITION HREF="t_real.htm#real"><B>real</B></A>, <A REL=DEFINITION HREF="t_number.htm#number"><B>number</B></A>, <A REL=DEFINITION HREF="t_t.htm#t"><B>t</B></A> <P>
<A REL=DEFINITION HREF="#double-float"><B>double-float</B></A>: <A REL=DEFINITION HREF="#double-float"><B>double-float</B></A>, <A REL=DEFINITION HREF="t_float.htm#float"><B>float</B></A>, <A REL=DEFINITION HREF="t_real.htm#real"><B>real</B></A>, <A REL=DEFINITION HREF="t_number.htm#number"><B>number</B></A>, <A REL=DEFINITION HREF="t_t.htm#t"><B>t</B></A> <P>
<A REL=DEFINITION HREF="#long-float"><B>long-float</B></A>: <A REL=DEFINITION HREF="#long-float"><B>long-float</B></A>, <A REL=DEFINITION HREF="t_float.htm#float"><B>float</B></A>, <A REL=DEFINITION HREF="t_real.htm#real"><B>real</B></A>, <A REL=DEFINITION HREF="t_number.htm#number"><B>number</B></A>, <A REL=DEFINITION HREF="t_t.htm#t"><B>t</B></A> <P>
<P><B>Description:</B><P>
<P>
For the four defined <A REL=DEFINITION HREF="26_glo_s.htm#subtype"><I>subtypes</I></A> of <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>type</I></A> <A REL=DEFINITION HREF="t_float.htm#float"><B>float</B></A>, it is true that intermediate between the <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>type</I></A> <A REL=DEFINITION HREF="#short-float"><B>short-float</B></A> and the <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>type</I></A> <A REL=DEFINITION HREF="#long-float"><B>long-float</B></A> are the <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>type</I></A> <A REL=DEFINITION HREF="#single-float"><B>single-float</B></A> and the <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>type</I></A> <A REL=DEFINITION HREF="#double-float"><B>double-float</B></A>. The precise definition of these categories is <A REL=DEFINITION HREF="26_glo_i.htm#implementation-defined"><I>implementation-defined</I></A>. The precision (measured in ``bits'', computed as p log 2b) and the exponent size (also measured in ``bits,'' computed as log 2(n+1), where n is the maximum exponent value) is recommended to be at least as great as the values in the next figure. Each of the defined <A REL=DEFINITION HREF="26_glo_s.htm#subtype"><I>subtypes</I></A> of <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>type</I></A> <A REL=DEFINITION HREF="t_float.htm#float"><B>float</B></A> might or might not have a minus zero. <P>
<PRE>
Format Minimum Precision Minimum Exponent Size
----------<P>
Short 13 bits 5 bits
Single 24 bits 8 bits
Double 50 bits 8 bits
Long 50 bits 8 bits
</PRE>
<P><B>Figure 12-12. Recommended Minimum Floating-Point Precision and Exponent Size</B> <P>
There can be fewer than four internal representations for <A REL=DEFINITION HREF="26_glo_f.htm#float"><I>floats</I></A>. If there are fewer distinct representations, the following rules apply: <P><UL><LI> If there is only one, it is the <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>type</I></A> <A REL=DEFINITION HREF="#single-float"><B>single-float</B></A>. In this representation, an <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A> is simultaneously of <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>types</I></A> <A REL=DEFINITION HREF="#single-float"><B>single-float</B></A>, <A REL=DEFINITION HREF="#double-float"><B>double-float</B></A>, <A REL=DEFINITION HREF="#short-float"><B>short-float</B></A>, and <A REL=DEFINITION HREF="#long-float"><B>long-float</B></A>. <LI> Two internal representations can be arranged in either of the following ways: <P><UL><LI> Two <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>types</I></A> are provided: <A REL=DEFINITION HREF="#single-float"><B>single-float</B></A> and <A REL=DEFINITION HREF="#short-float"><B>short-float</B></A>. An <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A> is simultaneously of <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>types</I></A> <A REL=DEFINITION HREF="#single-float"><B>single-float</B></A>, <A REL=DEFINITION HREF="#double-float"><B>double-float</B></A>, and <A REL=DEFINITION HREF="#long-float"><B>long-float</B></A>. <LI> Two <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>types</I></A> are provided: <A REL=DEFINITION HREF="#single-float"><B>single-float</B></A> and <A REL=DEFINITION HREF="#double-float"><B>double-float</B></A>. An <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A> is simultaneously of <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>types</I></A> <A REL=DEFINITION HREF="#single-float"><B>single-float</B></A> and <A REL=DEFINITION HREF="#short-float"><B>short-float</B></A>, or <A REL=DEFINITION HREF="#double-float"><B>double-float</B></A> and <A REL=DEFINITION HREF="#long-float"><B>long-float</B></A>. <P></UL><LI> Three internal representations can be arranged in either of the following ways: <P><UL><LI> Three <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>types</I></A> are provided: <A REL=DEFINITION HREF="#short-float"><B>short-float</B></A>, <A REL=DEFINITION HREF="#single-float"><B>single-float</B></A>, and <A REL=DEFINITION HREF="#double-float"><B>double-float</B></A>. An <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A> can simultaneously be of <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>type</I></A> <A REL=DEFINITION HREF="#double-float"><B>double-float</B></A> and <A REL=DEFINITION HREF="#long-float"><B>long-float</B></A>. <LI> Three <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>types</I></A> are provided: <A REL=DEFINITION HREF="#single-float"><B>single-float</B></A>, <A REL=DEFINITION HREF="#double-float"><B>double-float</B></A>, and <A REL=DEFINITION HREF="#long-float"><B>long-float</B></A>. An <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A> can simultaneously be of <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>types</I></A> <A REL=DEFINITION HREF="#single-float"><B>single-float</B></A> and <A REL=DEFINITION HREF="#short-float"><B>short-float</B></A>. <P></UL><P></UL><P>
<P><B>Compound Type Specifier Kind:</B><P>
<P>
Abbreviating. <P>
<P><B>Compound Type Specifier Syntax:</B><P>
<P>
<B>short-float</B> <I>[short-lower-limit [short-upper-limit]]</I><P>
<B>single-float</B> <I>[single-lower-limit [single-upper-limit]]</I><P>
<B>double-float</B> <I>[double-lower-limit [double-upper-limit]]</I><P>
<B>long-float</B> <I>[long-lower-limit [long-upper-limit]]</I><P>
<P>
<P><B>Compound Type Specifier Arguments:</B><P>
<P>
<I>short-lower-limit</I>, <I>short-upper-limit</I>---<A REL=DEFINITION HREF="26_glo_i.htm#interval_designator"><I>interval designators</I></A> for <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>type</I></A> <A REL=DEFINITION HREF="#short-float"><B>short-float</B></A>. The defaults for each of <I>lower-limit</I> and <I>upper-limit</I> is the <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbol</I></A> <A REL=DEFINITION HREF="a_st.htm#ST"><B>*</B></A>. <P>
<I>single-lower-limit</I>, <I>single-upper-limit</I>---<A REL=DEFINITION HREF="26_glo_i.htm#interval_designator"><I>interval designators</I></A> for <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>type</I></A> <A REL=DEFINITION HREF="#single-float"><B>single-float</B></A>. The defaults for each of <I>lower-limit</I> and <I>upper-limit</I> is the <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbol</I></A> <A REL=DEFINITION HREF="a_st.htm#ST"><B>*</B></A>. <P>
<I>double-lower-limit</I>, <I>double-upper-limit</I>---<A REL=DEFINITION HREF="26_glo_i.htm#interval_designator"><I>interval designators</I></A> for <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>type</I></A> <A REL=DEFINITION HREF="#double-float"><B>double-float</B></A>. The defaults for each of <I>lower-limit</I> and <I>upper-limit</I> is the <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbol</I></A> <A REL=DEFINITION HREF="a_st.htm#ST"><B>*</B></A>. <P>
<I>long-lower-limit</I>, <I>long-upper-limit</I>---<A REL=DEFINITION HREF="26_glo_i.htm#interval_designator"><I>interval designators</I></A> for <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>type</I></A> <A REL=DEFINITION HREF="#long-float"><B>long-float</B></A>. The defaults for each of <I>lower-limit</I> and <I>upper-limit</I> is the <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbol</I></A> <A REL=DEFINITION HREF="a_st.htm#ST"><B>*</B></A>. <P>
<P><B>Compound Type Specifier Description:</B><P>
<P>
Each of these denotes the set of <A REL=DEFINITION HREF="26_glo_f.htm#float"><I>floats</I></A> of the indicated <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>type</I></A> that are on the interval specified by the <A REL=DEFINITION HREF="26_glo_i.htm#interval_designator"><I>interval designators</I></A>. <P>
<P><HR>The following <A REL=META HREF="../Front/X3J13Iss.htm">X3J13 cleanup issue</A>, <I>not part of the specification</I>, applies to this section:<P><UL><LI> <A REL=CHILD HREF="../Issues/iss290.htm">REAL-NUMBER-TYPE:X3J13-MAR-89</A><P></UL><HR>
<A REL=NAVIGATOR HREF="../Front/StartPts.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Starting Points]" SRC="../Graphics/StartPts.gif" ALIGN=Bottom></A><A REL=TOC HREF="../Front/Contents.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Contents]" SRC="../Graphics/Contents.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Master.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Index]" SRC="../Graphics/Index.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Symbol.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Symbols]" SRC="../Graphics/Symbols.gif" ALIGN=Bottom></A><A REL=GLOSSARY HREF="../Body/26_a.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Glossary]" SRC="../Graphics/Glossary.gif" ALIGN=Bottom></A><A HREF="../Front/X3J13Iss.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Issues]" SRC="../Graphics/Issues.gif" ALIGN=Bottom></A><BR>
<A REL=COPYRIGHT HREF="../Front/Help.htm#Legal"><I>Copyright 1996-2005, LispWorks Ltd. All rights reserved.</I></A><P>
</BODY>
</HTML>