[Haskell-cafe] Sinus in Haskell

Henning Thielemann lemming at henning-thielemann.de
Sun Nov 11 03:46:53 EST 2007

On Sat, 10 Nov 2007 ajb at spamcop.net wrote:

> Quoting jerzy.karczmarczuk at info.unicaen.fr:
> > Then, a *rational* approximation gives you the same precision with
> > less coeffs. Nowadays the division is not sooo much more expensive
> > than the multiplication, so the efficiency doesn't suffer much.
> It might not cost much in the way of time, but it might complicate the
> implementation a lot.  Using polynomials only probably uses a smaller
> number of transistors, disspiate less power and for all I know might be
> easier to parallelise than the alternatives.

I guess that the general answer to the question for the best algorithm is:
"It depends ..." If your architecture (on hardware or machine code level)
has no or slow multiplication, you will use an algorithm that avoids
multiplications, same for division and so on.

More information about the Haskell-Cafe mailing list