Apparatus and method for computing a logarithm of a floating-point number
First Claim
1. An apparatus for computing a logarithm to a base p of a floating-point number X wherein the floating-point number X is represented in the format of (−
- 1)Sx·
2Ex·
Mx, where Mx =(1+fx)=(1+Ax·
2−
K)+(Bx·
2−
N), where Sx is a sign, Ex is an exponent, Mx is a mantissa, 1≦
Mx<
2, fx is a N-bit fraction, Ax is a value of the most significant K bits of fx, Bx is a value of the least significant (N−
K) bits of fx, 0≦
K<
N, and p, K, N are natural numbers, the apparatus comprising;
a first multiplier for multiplying a number whose value is logp 2 and the exponent Ex and outputting a multiplying result;
a logarithmic table for receiving the value Ax and checking the logarithmic table to output a result;
a first adder connected to the first multiplier and the logarithmic table for adding the multiplying result and the result to output an adding result;
a divider for receiving the value Bx and an adding number whose value is (2K+Ax) and dividing the value Bx by the adding number to output a dividing result Rd;
a Taylor-Series approximation circuit connected to the divider for receiving the dividing result Rd, finding a value of ln(1+Rd) and outputting the value of ln(1+Rd);
a second multiplier for multiplying a number whose value is 1/ln(p) and the value of ln(1+Rd) to output a second multiplying result; and
a second adder connected to the first adder and the second multiplier for adding the adding result and the second multiplying result to output the logarithm Y.
1 Assignment
0 Petitions
Accused Products
Abstract
An apparatus for computing a logarithm to a base p of a floating-point number X. The floating-point number X is represented in the format of (−1)Sx·2Ex·Mx, where Mx=(1+fx)=(1+Ax·2−K)+(Bx·2−N), where Sx is a sign, Ex is an exponent, Mx is a mantissa, 1≦Mx<2, fx is a N-bit fraction, Ax is a value of the most significant K bits of fx, Bx is a value of the least significant (N−K) bits of fx, 0≦K<N, and p, K, N are natural numbers. The apparatus includes: a first multiplier, a logarithmic table, a first adder, a divider, a Taylor-Series approximation circuit, a second multiplier, and a second adder.
23 Citations
12 Claims
-
1. An apparatus for computing a logarithm to a base p of a floating-point number X wherein the floating-point number X is represented in the format of (−
- 1)Sx·
2Ex·
Mx, where Mx =(1+fx)=(1+Ax·
2−
K)+(Bx·
2−
N), where Sx is a sign, Ex is an exponent, Mx is a mantissa, 1≦
Mx<
2, fx is a N-bit fraction, Ax is a value of the most significant K bits of fx, Bx is a value of the least significant (N−
K) bits of fx, 0≦
K<
N, and p, K, N are natural numbers, the apparatus comprising;
a first multiplier for multiplying a number whose value is logp 2 and the exponent Ex and outputting a multiplying result;
a logarithmic table for receiving the value Ax and checking the logarithmic table to output a result;
a first adder connected to the first multiplier and the logarithmic table for adding the multiplying result and the result to output an adding result;
a divider for receiving the value Bx and an adding number whose value is (2K+Ax) and dividing the value Bx by the adding number to output a dividing result Rd;
a Taylor-Series approximation circuit connected to the divider for receiving the dividing result Rd, finding a value of ln(1+Rd) and outputting the value of ln(1+Rd);
a second multiplier for multiplying a number whose value is 1/ln(p) and the value of ln(1+Rd) to output a second multiplying result; and
a second adder connected to the first adder and the second multiplier for adding the adding result and the second multiplying result to output the logarithm Y. - View Dependent Claims (2, 3, 4, 5, 6, 12)
- 1)Sx·
-
7. A method for computing a logarithm to a base p of a floating-point number X wherein the floating-point number X is represented in the format of (−
- 1)Sx·
2Ex·
Mx, where Mx=(1+fx)=(1+Ax·
2−
K)+(Bx·
2−
N), where Sx is a sign, Ex is an exponent, Mx is a mantissa, 1≦
Mx<
2, fx is a N-bit fraction, Ax is a value of the most significant K bits of fx, Bx is a value of the least significant (N−
K) bits of fx, 0≦
K<
N, and p, K, N are natural numbers, the method comprising the steps of;
multiplying a number whose value is logp 2 and the exponent Ex to get a multiplying result to output by a first multiplier;
receiving the value Ax by a logarithmic table and checking the logarithmic table to get a result to output;
adding the multiplying result and the result to get an adding result to output by a first adder;
dividing the value Bx by an adding number whose value is (2K+Ax) to get a dividing result Rd to output by a divider;
receiving the dividing result Rd and finding a value of ln(1+Rd) to output by a Taylor-Series approximation circuit;
multiplying a number whose value is 1/ln(p) and the value of ln(1+Rd) to get a second multiplying result to output by a second multiplier; and
adding the adding result and the second multiplying result to get the logarithm Y to output by a second adder. - View Dependent Claims (8, 9, 10, 11)
- 1)Sx·
Specification