Precision rounding in a floating point arithmetic unit
AssigneeRaytheon Company
InventorMalcolm Frazier
Life of this patent
Estimating the term…
Abstract
A floating point computation unit having an arithmetic unit employing two guard digits for preserving information needed for rounding and an indicator generator for providing an indicator signal to a precision rounding apparatus. The indicator generator detects any digits beyond the guard digits of a shifted operand instead of waiting to detect such digits in the mantissa produced by an add or subtract cycle. The indicator generator comprises a priority encoder network coupled to a comparator for determining whether or not the least significant digits beyond the guard digits of the shifted mantissa are all zeros.
Claims17
A floating point computation unit performing a precision rounding operation during an arithmetic operation comprising:
- means for processing a first mantissa and a second mantissa of floating point numbers;
- means for processing a first exponent and a second exponent of said floating point numbers, said exponent processing means generating a first signal identifying the larger exponent being processed when said first exponent and said second exponent are not equal, said first signal being coupled to said mantissa processing means, and said exponent processing means generating a second signal representing the magnitude of an arithmetic difference between the exponents of said numbers being processed;
- said mantissa processing means comprising a shifter means for adjusting the mantissa of one of said floating point numbers in response to said second signal generated by said exponent processing means;
- an indicator generator means, coupled to said shifter means and being fed by a selected one of either said first mantissa or said second mantissa, for generating an indicator signal when a plurality of least significant digits of said selected mantissa are not all zeros, the number of said least significant digits being specified by said second signal generated by said exponent processing means;
- and
- means for performing normalization and said precision rounding on an unnormalized resulting mantissa from said mantissa processing means, said preceision rounding of said resulting mantissa being performed in accordance with said indicator signal.
A floating point computation unit for processing floating point numbers having an exponent processor, a mantissa processor with guard digit positions for preserving precision and a precision rounding apparatus comprising:
- means for shifting a mantissa operand of said floating point numbers in said mantissa processor;
- means coupled to said mantissa processor for generating a magnitude of an arithmetic difference between the exponents of said floating point numbers being processed in said exponent processor;
- means coupled between said mantissa processor and said exponent processor for detecting a number of zeros beyond one or more of said guard digit positions after shifting said mantissa operand in accordance with said generated magnitude of the arithmetic difference between the exponents of said floating point numbers being processed;
- said detecting means comprising means for comparing the number of digit positions said mantissa operand is shifted to an output of said zero detecting means, said comparing means providing an indicator signal when said number of shifted digit positions is greater than said zero detecting means output;
- and
- means coupled to said mantissa processor and said detecting means for performing precision rounding in accordance with sa-d indicator signal from said detecting means, said indicator signal identifying the presence or absence of a trailing least significant nonzero digit beyond the guard digit position.
A method of performing a precision rounding operation in a floating point computation unit comprising the steps of:
- processing a first mantissa and a second mantissa of floating point numbers to provide an unnormalized resulting mantissa;
- processing a first exponent and a second exponent of said floating point numbers;
- generating a first signal identifying the larger exponent being processed when said first exponent and said second exponent are not equal;
- generating a second signal representing the magnitude of the arithmetic difference between the exponents of said numbers being processed;
- adjusting the mantissa of one of said floating point numbers in response to said second signal;
- generating an indicator signal when a specified number of least significant digits of said adjusted mantissa are not all zeros, said number of least significant digits being specified by said second signal;
- and
- performing normalization and precision rounding on said unnormalized resulting mantissa, said precision rounding being performed accordance with said indicator signal.
A floating point computation unit performing a precision rounding operation during an arithmetic operation comprising:
- means for processing a first mantissa and a second mantissa of floating point numbers;
- means for processing a first exponent and a second exponent of said floating point numbers, said exponent processing means generating a first signal indentifying the larger exponent being processed when said first exponent and said second exponent are not equal, said first signal being coupled to said mantissa processing means, and said exponent processing means generating a second signal representing the magnitude of an arithmetic difference between the exponents of said numbers being processed;
- said mantissa processing means comprising a shifter mesn for adjusting the mantissa of one of said floating point numbers in response to said second signal generated by said exponent processing means;
- and
- an indicator generator means, coupled to said shifter means and being fed by a selected one of either said first mantissa or said second mantissa, for generating an indicator signal when a plurality of least significant digits of said selected mantissa are not all zeros, the number of said least signainficant digits being specified by said second signal generated by said exponent processing means.
The floating point computation unit recited in calim 16 wherein:
- said arithmetic-logic unit means comprises a first input fed by the one of said first mantissa or said second mantissa not being coupled to said shifter means plus two guard digits and a second input fed by an output from said shifter means having n+2 digits;
- and
- said arithmetic logic means generates an n+2 digit output signal and an overflow signal.
Dependencies are inferred from the claim text.