摘要 |
A method and apparatus for performing a floating point division of a dividend (a) by a divisor (b) to produce a correctly rounded-to-nearest quotient (q') having a mantissa of P bits in a data processing system is disclosed.In one embodiment, the data processing system computes a current quotient estimate (qm', where m represents an integer and m>=0) that is within 1 ulp of a true quotient (a/b). Then the data processing system computes a current remainder estimate (rm') based on the dividend (a), the divisor (b) and the current quotient estimate (qm'). The data processing system also computes a current reciprocal estimate (yn', where n represents an integer and n>=0) based on a reciprocal intermediate value (E) with a relative error with respect to a true reciprocal of the divisor (1/b) of less than or equal to z/(22P) (where z is an integer derived from error analyses of computations of the current reciprocal estimate (yn')).Finally, the data processing system obtains the correctly rounded-to-nearest quotient (q'), except possibly when z>=(2P-Mb) (where Mb represents mantissa of the divisor, b), based on the current remainder estimate (rm'), the current reciprocal estimate (yn') and current quotient estimate (qm').
|