FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > DSP

DSP comp.dsp newsgroup, mailing list

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-17-2005, 04:55 PM
[email protected]
Guest
 
Posts: n/a
Default Fast algorithm to compute logarithms

Can anyone explain me how the following algorithm is working?

Consider the problem of finding the logarithm of a fractional number
between 1.0 and 2.0 (the algorithm can be generalized without too much
difficulty). Feynman observed that any such number can be uniquely
represented as a product of numbers of the form 1 + 2^-k, where k is an
integer. Testing each of these factors in a binary number
representation is simply a matter of a shift and a subtraction. Once
the factors are determined, the logarithm can be computed by adding
together the precomputed logarithms of the factors. The entire
computation took less time than division.

Reply With Quote
  #2 (permalink)  
Old 02-17-2005, 05:43 PM
Jerry Avins
Guest
 
Posts: n/a
Default Re: Fast algorithm to compute logarithms

[email protected] wrote:
> Can anyone explain me how the following algorithm is working?
>
> Consider the problem of finding the logarithm of a fractional number
> between 1.0 and 2.0 (the algorithm can be generalized without too much
> difficulty). Feynman observed that any such number can be uniquely
> represented as a product of numbers of the form 1 + 2^-k, where k is an
> integer. Testing each of these factors in a binary number
> representation is simply a matter of a shift and a subtraction. Once
> the factors are determined, the logarithm can be computed by adding
> together the precomputed logarithms of the factors. The entire
> computation took less time than division.


How does shifting and subtracting determine if 255/256 is a factor of
1.08925? Tell me that, and I'll be able to answer your question.

Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
Reply With Quote

Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved