Method, system and computer program product for verifying floating point divide operation results
AssigneeInternational Business Machines Corporation
InventorsJoshua M. Weinberg, Martin S. Schmookler
Life of this patent
Estimating the term…
Abstract
A method, system and computer program product for verifying a result of a floating point division operation are provided. The method includes: receiving a result of a floating point division operation for a dividend and a divisor; performing a comparison of a magnitude of a least significant bit (LSB) of the dividend and a magnitude of a most significant bit (MSB) of a remainder; and determining whether the result is correct based on the comparison.
Claims15
A method of verifying a result of a floating point division operation, the method comprising:
- performing, by a division circuit, a floating point division operation for a dividend and a divisor to produce a final result of the floating point division operation, the final result including a quotient;
- providing the final result from the division circuit to a processor;
- after receiving the final result from the division circuit, calculating, by the processor, a remainder from the quotient produced by the floating point division operation;
- performing, by the processor, a comparison of a magnitude of a least significant bit (LSB) of the dividend and a magnitude of a most significant bit (MSB) of the remainder calculated based on the final result, the comparison including determining whether the magnitude of the MSB of the remainder is less than or equal to twice the magnitude of the LSB of the dividend;
- and
- determining whether the final result is correct based on the comparison.
A computer program product for verifying a result of a floating point division operation, the computer program product comprising:
- a non-transitory computer-readable storage medium for storing instructions for executing a method comprising:
- performing, by a division circuit, a floating point division operation for a dividend and a divisor to produce a final result of the floating point division operation, the final result including a quotient;
- providing the final result from the division circuit to a processor;
- after receiving the final result from the division circuit, calculating, by the processor, a remainder from the quotient produced by the floating point division operation;
- performing, by the processor, a comparison of a magnitude of a least significant bit (LSB) of the dividend and a magnitude of a most significant bit (MSB) of the remainder calculated based on the final result, the comparison including determining whether the magnitude of the MSB of the remainder is less than or equal to twice the magnitude of the LSB of the dividend;
- and
- determining whether the final result is correct based on the comparison.
A system for verifying a result of a floating point division operation, the system comprising:
- an instruction dispatching unit (IDU) for sending an instruction to perform a division operation for a dividend and a divisor;
- and
- a division circuit in operable communication with the IDU, the division circuit configured to perform:
- receiving the instruction from the IDU;
- and
- calculating a final result of a floating point division operation for the dividend and the divisor, the final result including a quotient;
- and
- a processor configured to receive the final result from the division circuit and, after receiving the final result, perform an error detection operation including:
- calculating a remainder from the quotient produced by the floating point division operation;
- performing a comparison of a magnitude of a least significant bit (LSB) of the dividend and a magnitude of a most significant bit (MSB) of the remainder calculated based on the final result, the comparison including determining whether the magnitude of the MSB of the remainder is less than or equal to twice the magnitude of the LSB of the dividend;
- and
- determining whether the final result is correct based on the comparison.
Dependencies are inferred from the claim text.