Skip to contentSkip to conversation

How to use floating point in a module?

DISCUSSION Manfred Spraul 2 participants 2 messages May 31, 2004

lore
Share & tools
lore
#0 lore raw
Quoted 4 lines · Horst von Brand

Trascendental functions are _not_ computed by series in practice, rational approximations (polinomial / polinomial) are used instead. Or interpolate in a smallish table.

Is that really faster on modern cpus? The multiplier is fully pipelined and a division takes 25-40 cycles.

--
Manfred

#1 lore raw
Quoted 7 lines · Manfred Spraul
Quoted 3 lines · Horst von Brand

Trascendental functions are _not_ computed by series in practice, rational approximations (polinomial / polinomial) are used instead. Or interpolate in a smallish table.

Is that really faster on modern cpus? The multiplier is fully pipelined and a division takes 25-40 cycles.

You need smallish polinomials for double precision, via series it would take you a lot more terms (and then you get trouble from rounding etc).

No, numerical computation is not my main interest. I might be wrong here.

Signature · 4 lines
Dr. Horst H. von Brand                   User #22616 counter.li.org
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513