Patent ID: 7031993

Claim:
A method for computing an approximation of a natural logarithm function comprising the steps of: partitioning an interval between 1 and 2 into N equally spaced sub-regions; precomputing a reference point a i of each of the N equally spaced sub-regions, where i=0, . . . ,N−1; selecting N sufficiently large so that, for each sub-region, a first degree polynomial in m computes log(m) to within a preselected degree of accuracy for any m within the sub-region, where m is a binary mantissa of a binary floating point representation of a variable x; computing a value of log(x) for a binary floating point representation of x stored in a memory of a computing device utilizing the first degree polynomial in the binary mantissa m, wherein log(x) is a function of a distance between the reference point a i and the binary mantissa m; and generating an image by using the computed value of log(x), wherein x has a binary exponent e in addition to the binary mantissa m; and further wherein computing a value of log(x) for the binary floating point representation of x comprises the steps of: partitioning the binary mantissa m of a binary representation of x in a memory, the representation of x including a binary exponent e and the binary mantissa m, wherein a first, most significant part of the partition corresponds to a region i and a second, less significant part of the partition corresponds to a region Δx, where Δx is a distance from the binary mantissa m to the reference point a i = 1 + i + 0.5 N ; computing an approximation to log(x), using the first degree polynomial in the binary mantissa m and a precomputed value of log(a i ), wherein computing an approximation to log(x) comprises the step of computing an approximation written as: y=− log( x )≈ b i +c i Δx+e× log(2) for i=0, . . . ,N−1 where: b i = - log ⁡ ( a i ) + ( 1 4 ⁢ a i ⁢ N ) 2 - ( 1 + 1 2 ⁢ N ) ⁢ 1 a i ; ⁢ and c i =−1 /a i ; precomputing a value for log(2); and for each i, precomputing each value of b i and c i .