IP Library Granted Patent US 8,402,078
Granted Patent B2
US 8,402,078 · App. 12/037,207 · Granted Mar 19, 2013

Method, system and computer program product for determining required precision in fixed-point divide operations

Inventors: Joshua M. Weinberg (Bronx, NY); Martin S. Schmookler (Austin, TX)
Assignee: International Business Machines Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,402,078
App. No.
12/037,207
Granted
Mar 19, 2013
Kind
B2
Abstract

A method, computer program product and a system for controlling a fixed point division operation are provided. The method includes: receiving an instruction to perform a division operation for a dividend and a divisor, the operation comprising a maximum number of iterations to produce a quotient having a maximum precision; calculating a magnitude of at least one of the dividend and the divisor; determining a quotient precision based on the magnitude; and computing a required number of iterations needed to produce the quotient precision and performing the number of iterations.

Claims (46)

1. A method of controlling a fixed point division operation, the method comprising:

executing, by a processor, an instruction to perform a division operation for a dividend and a divisor, the execution comprising;

calculating a magnitude of the dividend and the divisor, the magnitude selected from one of a number of significant bits and a value represented in an exponent field;

comparing the magnitude of the dividend to the magnitude of the divisor;

prior to performing the division operation, determining a quotient precision based on the comparison, the determining including at least one of:

determining whether a special condition exists for which a required number of iterations is zero, and

calculating a difference between the magnitude of the dividend and the magnitude of the divisor;

computing a required number of iterations needed to produce the quotient precision; and

performing the required number of iterations.

2. The method of claim 1 , wherein each iteration results in an estimated value of the quotient, and each successive iteration results in a successive estimated value having a greater precision than a previous estimated value.

3. The method of claim 1 , wherein the dividend magnitude is a first number of significant bits in the dividend, and the divisor magnitude is a second number of significant bits in the divisor.

4. The method of claim 1 , wherein the quotient precision is a number of significant bits in the quotient.

5. The method of claim 1 , further comprising converting the dividend and the divisor into a floating point format.

6. The method of claim 5 , wherein the dividend magnitude is a first value represented in an exponent field of the dividend, and the divisor magnitude is a second value represented in an exponent field of the divisor.

7. The method of claim 1 , wherein comparing the magnitude of the dividend to the magnitude of the divisor comprises determining a difference between the magnitudes of the dividend and the divisor.

8. The method of claim 1 , wherein:

the special condition is at least one of: the divisor having a value of zero, the dividend having a value of zero, the divisor being greater than the dividend, and the quotient precision being greater than a maximum quotient precision allowed by the operation.

9. The method of claim 1 , wherein the special condition includes the divisor having a value of one and the quotient is equal to the dividend.

10. A computer program product for controlling a fixed point division operation, the computer program product comprising:

a computer-readable storage medium for storing instructions for executing a method of:

executing, by a processor, an instruction to perform a division operation for a dividend and a divisor, the execution comprising;

calculating a magnitude of the dividend and the divisor, the magnitude selected from one of a number of significant bits and a value represented in an exponent field;

comparing the magnitude of the dividend to the magnitude of the divisor;

prior to performing the division operation, determining a quotient precision based on the comparison, the determining including at least one of:

determining whether a special condition exists for which a required number of iterations is zero, and

calculating a difference between the magnitude of the dividend and the magnitude of the divisor;

computing a required number of iterations needed to produce the quotient precision; and

performing the required number of iterations.

11. The computer program product of claim 10 , wherein each iteration results in an estimated value of the quotient, and each successive iteration results in a successive estimated value having a greater precision than a previous estimated value.

12. The computer program product of claim 10 , wherein the dividend magnitude is a first number of significant bits in the dividend, and the divisor magnitude is a second number of significant bits in the divisor.

13. The computer program product of claim 10 , wherein the quotient precision is a number of significant bits in the quotient.

14. The computer program product of claim 10 , further comprising converting the dividend and the divisor into a floating point format.

15. The computer program product of claim 14 , wherein the dividend magnitude is a first value represented in an exponent field of the dividend, and the divisor magnitude is a second value represented in an exponent field of the divisor.

16. The computer program product of claim 10 , wherein the special condition includes at least one of: the divisor having a value of zero, the dividend having a value of zero, the divisor being greater than the dividend, and the quotient precision being greater than a maximum quotient precision allowed by the operation, wherein the required number of iterations is zero.

17. The computer program product of claim 10 , wherein the special condition includes the divisor having a value of one and the quotient is equal to the dividend.

18. A system for controlling a fixed 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 processor in operable communication with the IDU, the processor performing:

executing the instruction from the IDU, the execution comprising;

calculating a magnitude of the dividend and the divisor, the magnitude selected from one of a number of significant bits and a value represented in an exponent field;

comparing the magnitude of the dividend to the magnitude of the divisor;

prior to performing the division operation, determining a quotient precision based on the comparison, the determining including at least one of:

determining whether a special condition exists for which a required number of iterations is zero, and

calculating a difference between the magnitude of the dividend and the magnitude of the divisor;

computing a required number of iterations needed to produce the quotient precision; and

performing the required number of iterations.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 26, 2008
From: WEINBERG, JOSHUA M.; SCHMOOKLER, MARTIN S.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 020558/0882 →
Continuity (1)
Related Publication 20090216824A1 · Aug 27, 2009