Patent ID: 6631392
Filing Date: 2003-10-07
Classification: G06F

Abstract:
In a data processing system of the type having a processing unit being operable to perform computations using floating-point numbers, a method for predicting whether a floating-point computation involving a first floating-point number and a second floating-point number could result in a floating-point exception and for generating an exception prediction signal if a floating-point exception is predicted, the method comprising the steps of:determining a preliminary result exponent, where the preliminary result exponent is a function of an exponent of the first floating-point number and an exponent of the second floating-point number; selecting a first threshold value and a second threshold value according to the mantissa format of the first floating-point number and the second floating-point number; if the floating-point computation is a magnitude subtraction and the difference between said exponent of the first floating-point number and said exponent of the second floating-point number is greater than said first threshold value or less than said second threshold value, then generating an underflow exception prediction signal if the value of said preliminary result exponent is less than a first underflow threshold value; and if the floating-point computation is a magnitude subtraction and the difference between said exponent of the first floating-point number and said exponent of the second floating-point number is less than or equal to said first threshold value and greater than or equal to said second threshold value, then generating an underflow exception prediction signal if the value of said preliminary result exponent is less than a second underflow threshold value, wherein said first underflow threshold value is less than said second underflow threshold value.