Claims
- 1. A method for executing a floating-point instruction, said method comprising the steps of:storing a floating-point number within a memory of a data processing system having a processor, wherein said floating-point number includes a sign bit, a plurality of exponent bits, and a mantissa having an implied one and a plurality of fraction bits; in response to a floating-point instruction: partitioning said mantissa into an integer part and a fraction part, based on said exponent bits; and yielding a floating-point result by assigning said integer part of said floating-point number as an unbiased exponent of said floating-point result, and by converting said fraction part of said floating-point number via a table lookup to become a fraction part of said floating-point result; and storing said floating-point result in said memory.
- 2. The method according to claim 1, wherein said method further includes a step of complementing said integer part and said fraction part of said floating-point number if said floating-point number is negative.
- 3. The method according to claim 1, wherein said method further includes a step of adding 127 to said unbiased exponent of said floating-point result to form a biased exponent of said floating-point result.
- 4. A processor capable of performing a power of two estimation on a floating-point number, wherein said floating-point number includes a sign bit, a plurality of exponent bits, and a mantissa having an implied one and a plurality of fraction bits, said processor comprising:means for partitioning said mantissa into an integer part and a fraction part, based on said exponent bits; and means for yielding a floating-point result by assigning said integer part of said floating-point number as an unbiased exponent of said floating-point result, and by converting said fraction part of said floating-point number via a lookup table to become a fraction part of said floating-point result.
- 5. The processor according to claim 4, wherein said processor further includes a means for complementing said integer part and said fraction part of said floating-point number if said floating-point number is negative.
- 6. The processor according to claim 4, wherein said processor further includes a means for adding 127 to said unbiased exponent of said floating-point result to form a biased exponent of said floating-point result.
RELATED PATENT APPLICATION
The present patent application is related to a copending application U.S. Ser. No. 09/106,942 filed on even date, entitled “METHOD AND SYSTEM FOR PERFORMING A LOGARITHMIC ESTIMATION WITHIN A DATA-PROCESSING SYSTEM” (IBM Docket No. AT9-98-064).
US Referenced Citations (6)