Floating-Point Division Rounding via Remainder Magnitude Comparison

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing floating-point arithmetic in computers faces challenges with limited precision and accuracy, leading to issues like uncertain equality and loss of significance, particularly when performing operations that require rounding of intermediate results in hardware implementations, which often necessitate extra hardware resources for correct rounding.

Innovation Solution

A method for rounding floating-point numbers in a floating-point processing pipeline involves calculating intermediate quotients, determining the unit of least precision, and comparing magnitudes of remainders to select the appropriate intermediate quotient, guard, and sticky bits based on rounding modes, allowing for accurate rounding without the need for extra hardware precision.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If floating-point numbers are represented with limited precision in hardware, then device complexity is reduced, but measurement precision deteriorates

Engineering Contradiction:
Improvehardware complexityVSAvoidfloating-point precision
Core Design Contradiction:
Device complexityVSMeasurement precision

Solution Approach 1:

The patent performs preliminary calculations of remainder magnitudes before final rounding. By calculating both first_remainder (using unit of least precision) and second_remainder (using unit of least precision plus one) in advance and comparing their magnitudes, the system determines the correct rounding direction beforehand, ensuring accurate rounding without requiring extra hardware precision resources.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent dynamically changes the parameter used for remainder calculation based on the rounding mode. By switching between using 'unit of least precision' and 'unit of least precision plus one' depending on which produces the smaller remainder magnitude, the system adapts the precision parameter to achieve correct rounding while maintaining standard hardware resource usage.

Inventive Principle:
Principle #35Parameter changes

2Measurement precision

If extra hardware resources are allocated for correct rounding, then measurement precision is improved, but device complexity increases

Engineering Contradiction:
Improverounding accuracyVSAvoidhardware resources
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent uses the existing floating-point division hardware to serve multiple purposes. The same division unit that calculates the quotient is also used to calculate the remainders by adjusting the input parameters. This self-service approach allows the hardware to perform rounding-critical calculations without requiring separate dedicated rounding hardware, thus maintaining standard device complexity while achieving accurate rounding.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

Instead of adding extra hardware precision, the patent achieves accurate rounding by changing the parameters fed into existing hardware. By modifying which unit of least precision value is used (either the standard one or plus one) and comparing remainder magnitudes, the system extracts maximum rounding accuracy from standard hardware resources without increasing device complexity.

Inventive Principle:
Principle #35Parameter changes

3Device complexity

If floating-point calculations use standard precision, then device complexity is maintained, but loss of information occurs

Engineering Contradiction:
Improvehardware resourcesVSAvoidprecision loss
Core Design Contradiction:
Device complexityVSLoss of information

Solution Approach 1:

The patent performs preliminary magnitude comparisons of remainders before final rounding decisions. By calculating both possible remainders (using unit of least precision and unit of least precision plus one) and comparing their magnitudes in advance, the system identifies the correct rounding direction before information loss occurs, ensuring that the final rounded result is as accurate as possible within standard precision constraints.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements a feedback mechanism where the magnitude comparison results of the two remainder calculations feed back into the rounding decision logic. This feedback allows the system to adjust the rounding direction based on which remainder is smaller, preventing information loss by ensuring the rounded result is always the closest representable value to the true mathematical result.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS7752250B2Rounding floating point division results
Publication Date: 2010.07.06 X CORP
  • US7752250B2 patent drawing
  • US7752250B2 patent drawing
  • US7752250B2 patent drawing

AI summary

A method for determining the correct result and the correct guard and sticky bits to obtain a more accurate result in floating point divide operations is presented. An intermediate divide result or quotient is obtained from a multiply-add hardware pipeline of a floating point processor. Remainders are calculated using the floating point numbers divided, the unit of least precision, and the unit of least precision plus one to determine where the infinitely precise result is with respect to the digital representation of the estimated quotient. Evaluating these remainders and the initial floating point numbers and comparing their signs and magnitudes leads to a selection of one of three choices as the most accurate representation of the infinitely precise result as calculated in the inventive rounding method: the intermediate result minus the unit of least precision; the intermediate divide result; or the intermediate divide result plus the unit of least precision. Based on a rounding mode determined by the floating point operation, the correct guard and sticky bits are also determined and, which along with the most accurate intermediate divide result, are forwarded for accurate rounding in accordance with the IEEE standard for single and double precision floating point numbers.