Re: Simple/Fast Algorithm for binary logarithm in C (on ARM7)
- From: Spoon <devnull@xxxxxxxxxxxxx>
- Date: Fri, 11 May 2007 14:41:37 +0200
Peter Dickerson wrote:
I had a need for log of an integer with the result fixed point. For fixed point input there is just a constant difference. I didn't hugely accurate results, but the results are better than I needed. Input was signed 32-bit integer and result was ln(x) as 32-bit fixed point with 24-bit fraction. log10(x) was then obtained by scaling. There is no particular reason why the input can't be unsigned.
Since the logarithm function is undefined for negative numbers,
why would an implementation allow anything but unsigned input?
.
- Follow-Ups:
- Re: Simple/Fast Algorithm for binary logarithm in C (on ARM7)
- From: Peter Dickerson
- Re: Simple/Fast Algorithm for binary logarithm in C (on ARM7)
- References:
- Simple/Fast Algorithm for binary logarithm in C (on ARM7)
- From: Tilmann Reh
- Re: Simple/Fast Algorithm for binary logarithm in C (on ARM7)
- From: Peter Dickerson
- Simple/Fast Algorithm for binary logarithm in C (on ARM7)
- Prev by Date: Re: Simple/Fast Algorithm for binary logarithm in C (on ARM7)
- Next by Date: Re: pic c
- Previous by thread: Re: Simple/Fast Algorithm for binary logarithm in C (on ARM7)
- Next by thread: Re: Simple/Fast Algorithm for binary logarithm in C (on ARM7)
- Index(es):