User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

cl:types:short-float [2017/05/01 21:00] (current)
Line 1: Line 1:
 +====== Type SHORT-FLOAT,​ SINGLE-FLOAT,​ DOUBLE-FLOAT,​ LONG-FLOAT ======
 +
 +====Supertypes====
 +  * **short-float**,​ **[[CL:​Types:​float]]**,​ **[[CL:​Types:​real]]**,​ **[[CL:​Types:​number]]**,​ **[[CL:​Types:​t]]**
 +  * **single-float**,​ **[[CL:​Types:​float]]**,​ **[[CL:​Types:​real]]**,​ **[[CL:​Types:​number]]**,​ **[[CL:​Types:​t]]**
 +  * **double-float**,​ **[[CL:​Types:​float]]**,​ **[[CL:​Types:​real]]**,​ **[[CL:​Types:​number]]**,​ **[[CL:​Types:​t]]**
 +  * **long-float**,​ **[[CL:​Types:​float]]**,​ **[[CL:​Types:​real]]**,​ **[[CL:​Types:​number]]**,​ **[[CL:​Types:​t]]**
 +
 +====Description====
 +For the four defined subtypes of **[[CL:​Types:​float]]**,​ it is true that intermediate between the type **short-float** and the type **long-float** are the type **single-float** and the type **double-float**. The precise definition of these categories is //​[[CL:​Glossary:​implementation-defined]]//​. The precision (measured in "​bits",​ computed as ''​p * log<​sub>​2</​sub>​b''​) and the exponent size (also measured in "​bits,"​ computed as ''​log<​sub>​2</​sub>​(n + 1)'',​ where ''​n''​ is the maximum exponent value) is recommended to be at least as great as the values in the below table. Each of the defined subtypes of **[[CL:​Types:​float]]** might or might not have a minus zero.
 +
 +^ Format ^ Minimum Precision ^ Minimum Exponent Size ^
 +| Short  | 13 bits           | 5 bits                |
 +| Single | 24 bits           | 8 bits                |
 +| Double | 50 bits           | 8 bits                |
 +| Long   | 50 bits           | 8 bits                |
 +
 +There can be fewer than four internal representations for //​[[CL:​Glossary:​floats]]//​. If there are fewer distinct representations,​ the following rules apply: ​
 +  * If there is only one, it is the type **single-float**. In this representation,​ an //​[[CL:​Glossary:​object]]//​ is simultaneously of //​[[CL:​Glossary:​type|types]]//​ **single-float**,​ **double-float**,​ **short-float**,​ and **long-float**. ​
 +  * Two internal representations can be arranged in either of the following ways: 
 +    * Two //​[[CL:​Glossary:​type|types]]//​ are provided: **single-float** and **short-float**. An //​[[CL:​Glossary:​object]]//​ is simultaneously of //​[[CL:​Glossary:​type|types]]//​ **single-float**,​ **double-float**,​ and **long-float**. ​
 +    * Two //​[[CL:​Glossary:​type|types]]//​ are provided: **single-float** and **double-float**. An //​[[CL:​Glossary:​object]]//​ is simultaneously of //​[[CL:​Glossary:​type|types]]//​ **single-float** and **short-float**,​ or **double-float** and **long-float**.
 +  * Three internal representations can be arranged in either of the following ways: 
 +    * Three //​[[CL:​Glossary:​type|types]]//​ are provided: **short-float**,​ **single-float**,​ and **double-float**. An //​[[CL:​Glossary:​object]]//​ can simultaneously be of //​[[CL:​Glossary:​type]]//​ **double-float** and **long-float**. ​
 +    *  Three //​[[CL:​Glossary:​type|types]]//​ are provided: **single-float**,​ **double-float**,​and **long-float**. An //​[[CL:​Glossary:​object]]//​ can simultaneously be of //​[[CL:​Glossary:​type|types]]//​ **single-float** and **short-float**.
 +
 +====Compound Type Specifier Kind====
 +Abbreviating.
 +
 +====Compound Type Specifier Syntax====
 +  * **short-float** [//​short-lower-limit//​ [//​short-upper-limit//​]] ​
 +  * **single-float** [//​single-lower-limit//​ [//​single-upper-limit//​]] ​
 +  * **double-float** [//​double-lower-limit//​ [//​double-upper-limit//​]] ​
 +  * **long-float** [//​long-lower-limit//​ [//​long-upper-limit//​]]
 +
 +====Compound Type Specifier Arguments====
 +
 +//​short-lower-limit//,​ //​short-upper-limit//​ - //​[[CL:​Glossary:​interval designator|interval designators]]//​ for //​[[CL:​Glossary:​type]]//​ **short-float**. The default for each //​lower-limit//​ and //​upper-limit//​ is the //​[[CL:​Glossary:​symbol]]//​ **[[CL:​Types:​wildcard|*]]**.
 +
 +//​single-lower-limit//,​ //​single-upper-limit//​ - //​[[CL:​Glossary:​interval designator|interval designators]]//​ for //​[[CL:​Glossary:​type]]//​ **single-float**. The default for each //​lower-limit//​ and //​upper-limit//​ is the //​[[CL:​Glossary:​symbol]]//​ **[[CL:​Types:​wildcard|*]]**.
 +
 +//​double-lower-limit//,​ //​double-upper-limit//​ - //​[[CL:​Glossary:​interval designator|interval designators]]//​ for //​[[CL:​Glossary:​type]]//​ **double-float**. The default for each //​lower-limit//​ and //​upper-limit//​ is the //​[[CL:​Glossary:​symbol]]//​ **[[CL:​Types:​wildcard|*]]**.
 +
 +//​long-lower-limit//,​ //​long-upper-limit//​ - //​[[CL:​Glossary:​interval designator|interval designators]]//​ for //​[[CL:​Glossary:​type]]//​ **long-float**. The default for each //​lower-limit//​ and //​upper-limit//​ is the //​[[CL:​Glossary:​symbol]]//​ **[[CL:​Types:​wildcard|*]]**.
 +
 +====Compound Type Specifier Description====
 +Each of these denotes the set of //​[[CL:​Glossary:​floats]]//​ of the indicated //​[[CL:​Glossary:​type]]//​ that are on the interval specified by the //​[[CL:​Glossary:​interval designator|interval designators]]//​.
 +
 +\issue{REAL-NUMBER-TYPE:​X3J13-MAR-89} \issue{REAL-NUMBER-TYPE:​X3J13-MAR-89} \issue{REAL-NUMBER-TYPE:​X3J13-MAR-89} \issue{REAL-NUMBER-TYPE:​X3J13-MAR-89}