Content deleted Content added
ce Tags: Mobile edit Mobile web edit Advanced mobile edit |
m →Notations: Tag Bare URLs using AWB |
||
Line 256:
* The [[COBOL]] programming language originally supported decimal fixed-precision with arbitrary size and decimal scaling, whose format was specified "graphically" with the {{mono|PIC}} directive. For example, {{code|PIC S9999V99}} specified a sign-magnitude 6-digit decimal integer with two decimal fraction digits.<ref name="cobibm"/>
* The construct <code>REAL FIXED BINARY (''p'',''f'')</code> is used in the [[PL/I]] programming language, to specify a fixed-point signed binary data type with ''p'' total bits (not including sign) with ''f'' bits in the fraction part; that is a ''p''+1 bit signed integer with a scaling factor of 1/2<sup>''f''</sup>. The latter could be positive or negative. One could specify {{mono|COMPLEX}} instead of {{mono|REAL}}, and {{mono|DECIMAL}} instead of {{mono|BINARY}} for base 10.
* In the [[Ada programming language]], a numeric data type can be specified by, for example,{{code|2=ada|type F is delta 0.005 range -50.0 .. 50.0}}. The decimal bounds are translated to the next power of two, hence it means a fixed-point representation consisting of a signed binary integer in two's complement format with at least 8 fraction bits (providing a scaling factor 1/256) and 7 sign-and-magnitude bits (ensuring an actual range from −64.00 to almost +64.00): a minimum total of 15 bits. On a 16-bit computer, the spare bit is assigned to the fractional part. Asymmetrical range constraints are also allowed,<ref name="adafix"/> though the underlying implementation remains symmetric about 0.<ref>
* The notation <code>B''m''</code> has been used<!--BY WHO?--> to mean a fixed binary format with ''m'' bits in the integer part; the rest of the word (typically 32 bits) being fraction bits. For example, the maximum and minimum values that can be stored in a signed {{code|B16}} number are ≈32767.9999847 and −32768.0, respectively.
* The [[VisSim]] company used <code>fx''m''.''b''</code> to denote a binary fixed-point value with ''b'' total bits and ''m'' bits in the integer part; that is, a ''b''-bit integer with scaling factor 1/2<sup>''b''−''m''</sup>. Thus {{code|fx1.16}} would mean a 16-bit number with 1 bit in the integer part and 15 in the fraction.<ref name="vsi"/>
|