[Haskell-cafe] Sinus in Haskell

ajb at spamcop.net ajb at spamcop.net
Sat Nov 10 20:03:17 EST 2007


G'day all.

Quoting jerzy.karczmarczuk at info.unicaen.fr:

> == No, Gentlemen, nobody rational would use Taylor nowadays! It is
> lousy.

This is correct.  Real implementations are far more likely to use the
minmax polynomial of some order.  However...

> 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.

In general, if you can implement FP operations without using microcode,
that's a big win.

Cheers,
Andrew Bromage


More information about the Haskell-Cafe mailing list