Claims
- 1. A method of estimating an elementary function having a non-linear portion, using a computer system having a processor, comprising the steps of:normalizing an input value to yield a normalized input value; selecting a first constant and a second constant from a table having a plurality of intervals, based on the normalized input value, wherein the first and second constants are based on a linear approximation of the non-linear portion of the elementary function using left and right edges of a given interval, offset to reduce a maximum error value for the given interval; and calculating an estimated output value using the normalized input value, the first constant, and the second constant in a multiply-add operation of the processor, wherein said selecting step further reduces the number of bits required in the multiply-add operation.
- 2. A processor for a computer system, comprising:a plurality of registers; a plurality of logic units connected to said registers, including a floating-point execution unit allowing multiply-add operations; and a table lookup for providing an estimate of an elementary function having a non-linear portion based in a normalized input value residing in one of said registers, said table lookup having a plurality of intervals and associated pairs of first and second constants used as inputs to said floating-point execution unit, said first and second constants being based on a linear approximation of the non-linear portion of the elementary function using left and right edges of a given interval, offset to reduce a maximum error value for the given interval, and selected to reduce the number of bits required in a multiply-add operation which calculates an estimated output value.
Parent Case Info
This is a Division of application Ser. No. 09/017,233, filed Feb. 2, 1998, U.S. Pat. No. 6,163,791.
US Referenced Citations (4)