Re: sw multiply
- From: Charles Marslett <c-deletethis-marslett@xxxxxxxxx>
- Date: Thu, 12 Oct 2006 16:15:00 -0500
On Fri, 6 Oct 2006 10:51:11 +0200, "ivan" <wolfsafety@xxxxxxxxxxxxx>
wrote:
I am very tight on time here. I have lots of long moltiplications to do in e
very short time. I needed to roughly estimate how wastefull would be a
moltiplication without a HW multiplier. But found out that the safest option
(with HW multiplier) is also the cheapest (at least using PICs).
thanks everyone for their useful inputs
ivan
--
Regards, Joerg
http://www.analogconsultants.com
Depending on the architecture, and assuming you have space for a table
of arguments, the following pseudocode can make a really fast software
multiplier:
mul(a, b)
return (sqr(a+b)-(sqr[a] + sqr[b])) >> 1
It costs a table of squares from the minimum argument value to the sum
of the two largest argument values, though, and that can eat a lot of
memory. Otherwise, it involves 3 table lookups, 2 adds, 2 subtracts
and a right shift.
--Charles
.
- Follow-Ups:
- Re: sw multiply
- From: Bill Davy
- Re: sw multiply
- References:
- sw multiply
- From: ivan
- Re: sw multiply
- From: Jonathan Kirwan
- Re: sw multiply
- From: Joerg
- Re: sw multiply
- From: ivan
- sw multiply
- Prev by Date: Re: What micros do you actually hate to work with?
- Next by Date: Re: What micros do you actually hate to work with?
- Previous by thread: Re: sw multiply
- Next by thread: Re: sw multiply
- Index(es):
Relevant Pages
|