Hi,
I consider the floating point logarithm, f(x) = log_{e}x.
Floating number x > 0 can be represented as follows;
x = (2^{Fx - F0})*(1.Mx)
where Fx is fraction, and Mx is mantissa, respectively.
Then we can take log_{e}(x) as follows;
log_{e}(x) = log_{e}[2^{Fx - F0 - LM}*((
1.MX)*2^{LM})]
where LM is a mantissa bit-field width, then this equation can be;
log_{e}(x) = (log_{e}2)log_{2}[2^{(Fx - LM - F0}*((1.Mx)*2^{LM}]
= (log_{e}2)[log_{2}2^{Fx - LM - F0}*((1.Mx)*2^{LM}]
= (log_{e}2)[log_{2}2^{Fx - LM - F0} + log_{2}(1.Mx)*2^{LM}]
= (log_{e}2)[(Fx - LM - F0) + log_{2}((1.Mx) << LM)]
= c0*[A + log_{2}B]
where,
c0 = log_{e}2,
A = Fx - (LM + F0): Integer
B = 1.Mx << LM
= {
1.MZ, LM(0)}: Integer and greater than zero (concatenation with LM-bit zero)
Therefore, we can obtain log_{e}(x) with Int2Float(A), log_{2}(Int2Float(B)), addition, and finally constant (c0) float multiplication.
1) If log_{2}(float d) is reasonably implemented, logic circuit of this approach has high accuracy.
2) Or, if float_log_{2}(int B) is possible as logic circuit, then it is more easier to implement.
Does anyone know possibility of 1) and 2) ?
Best,
S.Takano