Patent ID: 9658828
Date: 2017-05-23
CPC Classifications: G06F

Claim:
1. A data processing system for implementing a binary or decimal floating point arithmetic add/subtract operation on two floating point numbers, the system comprising an arithmetic logic circuitry, wherein the first floating point number has a first magnitude and the second floating point number has a second magnitude, and wherein the first and second floating point numbers are both in the same of either decimal or binary floating point format, the arithmetic logic circuitry being configured for implementing a method comprising in case of the floating point numbers being in a binary floating point format, mapping the binary floating point numbers to a decimal floating point format, by padding bits to form digits in order to share the same fields as in case of the floating point numbers being in a decimal floating point format; generating a guard digit of zero of at least one of the first or the second floating point number by transforming the first and the second floating point number by a compressing function; computing as a result depending on the arithmetic operation a sum of the transformed floating point numbers, a first difference or a second difference of the transformed floating point numbers, wherein for the first difference the second floating point number is subtracted from the first floating point number and for the second difference the first floating point number is subtracted from the second floating point number and computing a corresponding result plus one by additionally adding a value of one to the result; generating injection values for rounding a final result in dependence of the first and second floating point numbers being in a decimal floating point format or a binary floating point format, of a rounding mode and of the arithmetic operation; generating injection carry values based on the transformed first and second floating point numbers and the injection values; selecting the final result from the result, the result plus one and a least significant digit based on the injection carry values and end around carry signals.