Patent ID: 7472149

Claim:
An arithmetic unit for approximating a function, comprising: a look-up table including a circuit configured to be connected to a register and output an initial value, an inclination of a straight line and at least one of relative correction values for the initial value and the inclination in response to an entry of a high-order bit string, an operand from the register being divided into the high-order bit string and a low-order bit string, a domain of the function of the operand being divided into a plurality of segments associated with the high-order bit string, the function being approximated by the straight line indicating a value equal to the initial value at a reference value in one of the segments; an offset circuit configured to calculate an offset of the low-order bit string from the reference value; a determination circuit configured to determine whether a correction of the straight line is necessary by using high-order bits in the low-order bit string; a correction circuit configured to output the inclination obtained by adding an absolute correction value based on the relative correction values to at least one of the initial value and the inclination or by subtracting the absolute correction value from at least one of the initial value and the inclination, when the correction is necessary; a multiplier configured to calculate a product of the inclination and the offset; and an adder configured to calculate the sum of the initial value and the product and output the sum to the register, wherein the correction circuit comprises: an adder-subtractor configured to output a corrected inclination obtained by adding the absolute correction value to the inclination or subtracting the absolute correction value from the inclination; and a selector configured to select the corrected inclination when correction is necessary, whereby the size of the look-up table circuit is kept small.