Floating point arithmetic unit using modified Newton-Raphson technique for division and square root
AssigneeHewlett-Packard Company
InventorsAlan H. Karp, Peter Markstein, Dennis Brzezinski
Life of this patent
Estimating the term…
Abstract
A floating point processing system which uses a multiplier unit and an adder unit to perform floating point division and square root operations using both a conventional and a modified form of the Newton-Raphson method. The modified form of the Newton-Raphson method is used in place of the final iteration of the conventional Newton-Raphson so as to compute high precision approximated results with a substantial improvement in speed. The invention computes approximated results faster and simplifies hardware requirements because no multiplications of numbers of the precision of the result are required.
Claims10
A method of operating a data processing system for determining an approximate result of a square root or division instruction, said method comprising:
- (a) receiving microcode instructions corresponding to said square root or division instruction into a control unit of the data processing system;
- (b) at the direction of said control unit retrieving an approximation of a reciprocal value from a memory unit having preloaded approximate reciprocal values;
- (c) at the direction of said control unit operating a floating point unit of said data processing system to perform n iterations of Newton-Raphson method to geometrically improve the precision of the approximation of the reciprocal value, where n is a positive integer, wherein multiplication and addition operations of said iterations are executed using single instruction hardware operations of said floating point unit;
- and
- (d) at the direction of said control unit operating a floating point unit of said data processing system to perform an additional iteration using a modified Newton-Raphson method to produce the final approximate result of the square root or division instruction, wherein said modified Newton-Raphson method includes the step of detecting a multiplier of said floating point unit to multiply at least one of the terms of said additional iteration by a constant.
A method for operating a floating point arithmetic unit of a computer to perform floating point division of a dividend by a divisor for producing a quotient having a mantissa with a precision of nearly 2N-bits, comprising the steps of:
- (a) obtaining a current guess of a reciprocal of the divisor from a circuit operable to provide guesses of reciprocal for a number provided to said circuit;
- (b) increasing the precision of the current guess of the reciprocal by computing an error parameter and computing a revised guess of the reciprocal from the error parameter and the current guess of the reciprocal;
- (c) repeating step (b) until the precision of the revised guess of the reciprocal becomes at least substantially close to N bits, where N is a positive integer;
- (d) operating a multiplier of said floating point unit to determine an initial guess of the quotient from the revised guess of the reciprocal times the dividend;
- (e) operating an adder of said floating point unit to determine a residual error for the initial guess of the quotient based on the initial guess of the quotient;
- and
- (f) operating an adder of said floating point unit to determine the quotient from the initial guess of the quotient plus the revised guess of the reciprocal times the residual error.
A method of operating a floating point arithmetic unit for performing floating point square root of a value to produce a square root having a mantissa with a precision of nearly 2N-bits, comprising the steps of:
- (a) obtaining a current guess of a reciprocal of the square root from a circuit operable to provide an approximate value of a reciprocal of a number provided to said circuit;
- (b) increasing the precision of the current guess of the reciprocal by computing an error parameter and computing a revised guess of the reciprocal from the error parameter and the current guess of the reciprocal;
- (c) repeating step (b) until the precision of the revised guess of the reciprocal becomes at least substantially close to N bits, where N is a positive integer;
- (d) operating a multiplier of said floating point unit to determine an initial guess of the square root from the revised guess of the reciprocal times the value;
- (e) operating an adder of said floating point unit to determine a residual error for the initial guess of the square root based on the value and the initial guess of the square root;
- and
- (f) operating a multiplier and an adder of said floating point unit to determine the square root from the initial guess of the square root plus one half of the product of the revised guess of the reciprocal times the residual error.
Dependencies are inferred from the claim text.