Floating-Point Integer Conversion Using Injection Rounding
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Converting floating-point numbers to integer numbers is challenging due to fractional portions and sign bit representation differences, requiring effective rounding methods and two's complementation, which can be computationally intensive and error-prone.
Innovation Solution
A system comprising a normalization engine, a lookup table, and an adder that normalizes floating-point numbers and generates injection constants based on predefined rounding values, allowing for efficient conversion by adding the normalized number and injection constant to produce an integer result, using techniques like injection rounding to simplify the process.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If traditional floating-point to integer conversion methods are used, then conversion accuracy can be maintained, but computational complexity increases and conversion speed decreases
Solution Approach 1:
The patent applies preliminary action by pre-calculating and storing rounding constants in a lookup table before conversion is needed. The normalization engine prepares the floating-point number in advance by adjusting the radix point position, and the rounding constant is selected based on the normalized exponent value, enabling faster conversion without complex runtime calculations
Solution Approach 2:
The patent changes parameters by using the exponent portion of the normalized floating-point number to index into a lookup table, selecting appropriate rounding constants based on exponent ranges. This parameter-based selection transforms the conversion process from complex arithmetic to simple table lookup and addition operations
2Measurement precision
If complex rounding methods are implemented to handle fractional portions accurately, then conversion precision improves, but the number of computational steps increases
Solution Approach 1:
Rounding constants are pre-calculated and stored in a lookup table based on different exponent ranges. This preliminary preparation eliminates the need for complex rounding calculations during conversion, maintaining precision while reducing computational time to a simple addition operation
Solution Approach 2:
The patent introduces an intermediary rounding constant that mediates between the normalized floating-point number and the final integer result. By adding this pre-determined constant to the normalized number, the system achieves accurate rounding without complex conditional logic or multiple computational steps
3Reliability
If two's complementation is performed to handle sign bit representation, then correct signed integer conversion is achieved, but the conversion process becomes more error-prone and complex
Solution Approach 1:
The patent merges the sign bit handling and rounding operations into a unified process. The rounding constant selection and addition operation naturally handle signed numbers through two's complement representation, eliminating the need for separate sign bit processing logic and reducing errors associated with complex conditional sign handling
Data Source
AI summary
According to one general aspect, an apparatus may include a memory, a normalization engine, a lookup table, and an adder. The memory may be configured to store a floating-point number formatted in a floating-point format. The normalization engine may be configured to normalize at least a portion of the floating-point number to create a normalized number. The lookup table may be configured to generate an injection constant based upon a predefined set of rounding values specifically for converting a floating-point number to an integer number. The adder may be configured to create an integer result by adding the normalized number and the injection constant.


