Dynamic Scale Factor Conversion for Float-to-Integer Precision
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Converting floating point data to integer data is challenging due to the difficulty in selecting an appropriate scaling factor, as existing methods may result in loss of precision for smaller numbers or wash out larger numbers, especially when the distribution of values is unknown.
Innovation Solution
A conversion engine that compares a scaling factor to the exponent portion of floating point values to generate a shift value, bit shifts the mantissa, detects underflow or overflow, and adjusts the scaling factor based on predefined policies to ensure accurate conversion without violating precision thresholds.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If a large scale factor is used for conversion, then larger numbers can be represented, but precision is lost for smaller numbers
Solution Approach 1:
The patent applies dynamics by making the scale factor adjustable rather than fixed. The conversion engine dynamically modifies the scale factor based on the exponent values of the floating point input data, allowing the system to adapt the scaling behavior to match the actual data distribution and avoid both precision loss and range limitations
Solution Approach 2:
The patent changes the parameter (scale factor) based on the characteristics of the input data. By comparing the exponent portion of floating point values to the current scale factor and detecting underflow/overflow conditions, the system adjusts the scale factor parameter to optimize both precision and range for the specific data being converted
2Measurement precision
If a small scale factor is used for conversion, then precision for smaller numbers is maintained, but larger numbers are washed out
Solution Approach 1:
The system dynamically adjusts the scale factor based on the actual exponent distribution of the input floating point data, allowing it to maintain precision when needed while expanding range when necessary, rather than being constrained by a static scale factor choice
Solution Approach 2:
The conversion engine uses feedback from underflow and overflow detectors to determine whether the current scale factor is appropriate. When underflow or overflow is detected, the system adjusts the scale factor accordingly and re-performs the conversion, using this feedback loop to converge on an optimal scale factor that preserves both precision and range
3Ease of manufacture
If a fixed scale factor is used, then the conversion process is simple, but it cannot adapt to unknown data distribution
Solution Approach 1:
The conversion engine performs self-adjustment by automatically modifying the scale factor based on feedback from the conversion process itself. The system monitors for underflow and overflow conditions and autonomously adjusts the scale factor without external intervention, making the simple conversion process adaptive to the data distribution
Solution Approach 2:
The system performs preliminary comparisons between the scale factor and exponent portions of the floating point values before completing the conversion. This preliminary action allows the system to identify potential precision or range issues and adjust the scale factor in advance, maintaining both simplicity and adaptability
Data Source
AI summary
The embodiments herein describe a conversion engine that converts floating point data into integer data using a dynamic scaling factor. To select the scaling factor, the conversion engine compares a default (or initial) scaling factor value to an exponent portion of the floating point value to determine a shift value with which to bit shift a mantissa of the floating point value. After bit shifting the mantissa, the conversion engine determines whether the shift value caused an overflow or an underflow and whether that overflow or underflow violates a predefined policy. If the policy is violated, the conversion engine adjusts the scaling factor and restarts the conversion process. In this manner, the conversion engine can adjust the scaling factor until identifying a scaling factor that converts all the floating point values in the batch without violating the policy.


