Piecewise Function Evaluation via Lookup Table Segmentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for numerically evaluating mathematical functions, such as logarithms, on computers face challenges in accuracy and efficiency, particularly when dealing with complex domains and large input ranges, as they often rely on Taylor series approximations which may not minimize errors effectively.
Innovation Solution
The approach involves approximating the function using piecewise linear or non-linear functions on divided intervals, with constants A and B determined to minimize maximum absolute or average quadratic errors, and implementing a device with a lookup table and converter units to rapidly compute function values, allowing for efficient hardware implementation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If Taylor series approximation is used for evaluating mathematical functions, then the computation can be performed digitally, but the accuracy is insufficient and errors are not minimized effectively
Solution Approach 1:
The domain of the mathematical function is divided into multiple sub-domains or intervals. For each sub-domain, a separate lookup table is created containing pre-computed function values. This segmentation allows the system to select the appropriate lookup table based on the input value's location, thereby improving accuracy without requiring complex real-time computations.
Solution Approach 2:
Function values are pre-computed and stored in lookup tables before runtime. The lookup tables contain pre-calculated values for each sub-domain, eliminating the need for complex real-time calculations during actual function evaluation. This preliminary action transfers computational effort from runtime to setup time, improving runtime efficiency and accuracy.
2Device complexity
If a reduced lookup table is used for evaluating functions, then hardware implementation is simplified, but the table may not cover the entire domain effectively
Solution Approach 1:
The domain is divided into multiple sub-domains, each with its own lookup table. This segmentation allows each lookup table to be smaller and simpler, reducing individual table complexity while collectively covering the entire domain. The system selects the appropriate sub-domain and corresponding lookup table based on the input value.
Solution Approach 2:
The lookup table structure is designed to be universal and adaptable to different function types and domains. The same hardware architecture can evaluate different mathematical functions by loading appropriate lookup tables, making the system multi-functional without increasing structural complexity.
3Measurement precision
If piecewise approximation functions are used with constants determined to minimize errors, then computation accuracy improves, but the device complexity increases
Solution Approach 1:
The optimal constants for piecewise approximation functions are pre-calculated during system setup to minimize approximation errors. These pre-determined constants are then stored in the lookup tables, eliminating the need for complex real-time optimization calculations. The lookup tables encapsulate the results of error-minimizing calculations, providing both accuracy and simplicity during runtime.
Data Source
AI summary
A device is provided for computing a function value of a function F. The device includes a memory, a truncator unit, a selector unit, and an evaluator unit. The memory contains a look-up table comprising a set of entries, each entry having associated with it a domain and an approximation function for approximating F on the associated domain. The truncator unit is arranged to truncate or round a first value X1 to generate a second value X2. The selector unit is arranged to select an entry of the lookup-table according to the second value X2, thus selecting the approximation function that is associated with the selected entry. The evaluator unit is arranged to determine the function value of the selected approximation function at the first value X1.


