Math circuit for estimating a transcendental function
First Claim
Patent Images
1. A circuit for computing an estimate of a transcendental function, comprising:
- a lookup table storage circuit having stored therein a plurality of groups of values, each group of values representing a respective coefficient of a first polynomial that estimates the transcendental function to a first precision; and
a first computing circuit coupled to the lookup table storage circuit to use portions of two groups of values representing two lowest-order coefficients of the first polynomial to evaluate a second polynomial that estimates the transcendental function to a second precision, wherein the second precision is lower than the first precision and the order of the second polynomial is lower than the order of the first polynomial, wherein the first computing circuit comprises;
an adjustment circuit to adjust the portion of the value representing the lowest-order coefficient that is taken from the lookup table storage circuit into an adjusted lowest-order coefficient of the second polynomial by adding an offset value, anda multiply add circuit to use the adjusted lowest-order coefficient and the portion of the value representing the first-order coefficient of the first polynomial to evaluate the second polynomial;
wherein the circuit uses the lookup table storage circuit to evaluate both the first polynomial and the second polynomial.
1 Assignment
0 Petitions
Accused Products
Abstract
A math circuit for computing an estimate of a transcendental function is described. A lookup table storage circuit has stored therein several groups of binary values, where each group of values represents a respective coefficient of a first polynomial that estimates the function to a high precision. A computing circuit uses a portion of a binary value, that is also taken from one of the groups of values, to evaluate a second polynomial that estimates the function to a low precision. Other embodiments are also described and claimed.
27 Citations
19 Claims
-
1. A circuit for computing an estimate of a transcendental function, comprising:
-
a lookup table storage circuit having stored therein a plurality of groups of values, each group of values representing a respective coefficient of a first polynomial that estimates the transcendental function to a first precision; and a first computing circuit coupled to the lookup table storage circuit to use portions of two groups of values representing two lowest-order coefficients of the first polynomial to evaluate a second polynomial that estimates the transcendental function to a second precision, wherein the second precision is lower than the first precision and the order of the second polynomial is lower than the order of the first polynomial, wherein the first computing circuit comprises; an adjustment circuit to adjust the portion of the value representing the lowest-order coefficient that is taken from the lookup table storage circuit into an adjusted lowest-order coefficient of the second polynomial by adding an offset value, and a multiply add circuit to use the adjusted lowest-order coefficient and the portion of the value representing the first-order coefficient of the first polynomial to evaluate the second polynomial; wherein the circuit uses the lookup table storage circuit to evaluate both the first polynomial and the second polynomial. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A processor device comprising:
-
an instruction decoder to receive a first instruction that is to evaluate a transcendental function; and an execution unit having first lookup table circuitry that contains a plurality of values representing coefficients of a first polynomial that estimates the transcendental function to a first precision, the execution unit having an adjustment circuit that, in response to a decode of the first instruction, adjusts portions of the values that represent two lowest-order coefficients of the first polynomial and that are output by the first lookup table circuitry by adding an offset, and wherein the execution unit is to use the adjusted portion of the value to evaluate a second polynomial that estimates the transcendental function to a second precision, wherein the second precision is lower than the first precision and the order of the second polynomial is lower than the order of the first polynomial; wherein the execution unit uses the lookup table circuitry to evaluate both the first polynomial and the second polynomial. - View Dependent Claims (9, 10, 11, 12, 13)
-
-
14. A machine-implemented method for computing an estimate of a transcendental function in a processor device, comprising:
-
fetching an instruction that is to estimate a transcendental function; decoding the instruction and in response accessing a lookup table to obtain a value, wherein the value output by the lookup table represents coefficients of a first polynomial that estimates the transcendental function to a first precision; adjusting a portion of the the lowest-order coefficient output by the lookup table by adding an offset; and evaluating a second polynomial that estimates the transcendental function to a second precision, using the adjusted value, wherein the second precision is lower than the first precision and the order of the second polynomial is lower than the order of the first polynomial; wherein the processor device uses the lookup table to evaluate both the first polynomial and the second polynomial; and wherein the offset is selected such that a result of evaluating the second polynomial is substantially the same as a result of the transcendental function as executed by a legacy processor belonging to a different processor family than the processor device. - View Dependent Claims (15, 16)
-
-
17. A computer system comprising:
-
storage to store software; and a processor device coupled to the storage, the processor device having an instruction set architecture that includes an instruction that is to evaluate a transcendental function, the processor device having a plurality of cores wherein each core of the processor has a math circuit to compute an estimate of the transcendental function, the math circuit includes a) a lookup table storage circuit having stored therein a plurality of groups of values, each group of values representing a respective coefficient of a first polynomial to estimate the transcendental function to a first precision, and b) a computing circuit coupled to the lookup table storage circuit to use values from two groups of values representing two lowest-order coefficients to evaluate a second polynomial that estimates the function to a second precision, wherein the second precision is lower than the first precision and the order of the second polynomial is lower than the order of the first polynomial, wherein the computing circuit comprises; an adjustment circuit that adjusts a portion of the value representing the lowest-order coefficient that is taken from the lookup table storage circuit into an adjusted lowest-order coefficient of the second polynomial by adding an offset value; and a multiply add circuit that uses the adjusted lowest-order coefficient and a portion of the value representing the first-order coefficient of the first polynomial to evaluate the second polynomial; wherein the processor device uses the lookup table storage circuit to evaluate both the first polynomial and the second polynomial; and wherein the processor device belongs to a first processor family, and the offset value is selected such that a result of evaluating the second polynomial is substantially the same as a result of the transcendental function as executed by a processor device belonging to a second processor family. - View Dependent Claims (18, 19)
-
Specification