Decimal Floating-Point Instruction Reround Mode
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing technologies face challenges in efficiently rounding decimal floating-point numbers to a variable precision, leading to potential double rounding errors and performance bottlenecks.
Innovation Solution
The implementation of a 'round for reround' mode in decimal floating-point operations, which maintains information about the infinitely precise intermediate result to prevent double rounding errors, combined with a reround instruction that specifies a variable rounding precision.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If traditional rounding methods are used to round decimal floating-point numbers to variable precision, then the rounding operation can be performed, but double rounding errors occur and performance is degraded
Solution Approach 1:
The patent applies preliminary action by performing a first rounding operation to an intermediate precision before the final rounding to the target precision. This intermediate rounding step prepares the data in a specific state that enables the subsequent final rounding to produce the correct result equivalent to direct rounding to the target precision, thereby preventing double rounding errors.
2Measurement precision
If multiple separate instructions are used to perform rounding operations, then rounding can be achieved, but the number of instructions increases and performance decreases
Solution Approach 1:
The patent merges multiple rounding operations into a single unified instruction that performs both the intermediate rounding and final rounding in one execution. This consolidation eliminates the need for separate instructions, reduces the total number of operations, and improves performance while maintaining the ability to round to variable precision.
3Measurement precision
If extended precision is maintained throughout calculations, then calculation accuracy is improved, but the number of required instructions and complexity increases
Solution Approach 1:
The patent applies preliminary action by pre-rounding intermediate results to a specific precision that preserves enough information for the final rounding to produce accurate results. This preliminary precision adjustment simplifies subsequent operations while maintaining the accuracy equivalent to extended precision calculations, reducing instruction complexity.
Data Source
AI summary
A decimal floating-point instruction is executed in a round-for-reround mode. The decimal floating-point instruction is configured to perform a decimal floating-point operation on a decimal floating-point operand. The executing includes forming based on performing the decimal floating-point operation, an intermediate result having a high order portion and a low order portion. The high order portion has a least significant digit. A rounded-for-reround number is created from the intermediate result. The rounded-for-reround number includes the high order portion of the intermediate result and based on the least significant coefficient digit of the high order portion being a selected value and based on the low order portion having another selected value, the least significant digit of the rounded-for-reround number is incremented. The rounded-for-reround number is stored.


