Format conversion method of floating point number and device employing the same
AssigneeMatsushita Electric Industrial Co., Ltd.
InventorsMiki Urano, Takashi Taniguchi
Life of this patent
Estimating the term…
Loading patent…
AssigneeMatsushita Electric Industrial Co., Ltd.
InventorsMiki Urano, Takashi Taniguchi
Estimating the term…
At a format conversion of a floating point number from double-precision to single-precision, a temporary exponent e.sub.1 is obtained by subtracting a double-precision bias B.sub.d from an exponent E of an operand and by adding a single-precision bias B.sub.s thereto. A mantissa M of the operand is shifted to right by a number obtained by adding 1 to an absolute value of the exponent e.sub.1 when e.sub.1 .ltoreq.0. When e.sub.1 >0, the mantissa M is not shifted. the result is rounded to a 23-bit length. When no carry is caused, the rounded value and 0 (when e.sub.1 .ltoreq.0) or e.sub.1 (when e.sub.1 >0) are respectively a mantissa and an exponent to be obtained. The rounded value and e.sub.1 +1 are regarded as a conversion result when e.sub.1 =0 and a carry is caused. A value obtained by shifting the rounded value to right by 1 bit and e.sub.1 +1 are selected when e.sub.1 >0 and a carry is caused. Accordingly, denormalization is executed with a high speed without interrupting a procedure being executed, and conversion results can be always obtained with a minimum number of procedures.
A format conversion method for converting a higher-precision floating point number as a normalized operand having an exponent E to which a first bias is added and a mantissa M having a first bit length to a lower-precision floating point number having an exponent .epsilon. to which a second bias smaller than the first bias is added and a mantissa .mu. having a second bit length shorter than the first bit length, comprising the steps of:
A format conversion method of an operand expressed as a double-precision floating point number having an exponent E and a mantissa M to a single-precision floating point number, comprising the steps of:
A format converting device for converting an operand expressed as a double-precision floating point number having an exponent E and a mantissa M to a single-precision floating point number, comprising:
A format conversion method of a fixed point number as a integer type operand having a most significant bit expressing a sign and an integer part of a first bit length, wherein a negative value is expressed by 2's complement, to a normalized floating point number having an exponent .epsilon. to which a bias is added and a mantissa .mu. of a second bit length which is shorter than the first bit length, comprising the steps of:
A format converting device for converting an operand a total bit number of which is 32 having a most significant bit expressing a sign and an integer part of 31-bit length, wherein a negative value is expressed by 2's complement, to a normalized single-precision floating point number having an exponent to which a bias is added and a fraction of 23-bit length, comprising:
Dependencies are inferred from the claim text.