Math errors in python

Heiko Wundram heikowu at ceosg.de
Mon Sep 20 05:07:39 EDT 2004


Am Sonntag, 19. September 2004 19:41 schrieb Alex Martelli:
> gmpy (or to be more precise the underlying GMP library) runs optimally
> on AMD Athlon 32-bit processors, which happen to be dirt cheap these
> days, so a cleverly-purchased 300-dollars desktop Linux PC using such an
> Athlon chip would no doubt let you use way more than these humble couple
> thousand bits for such interactive computations while maintaining a
> perfectly acceptable interactive response time.

But still, no algorithm implemented in software will ever beat the 
FADD/FMUL/FDIV/FPOW/FSIN/FCOS etc. instructions in runtime, that was my 
point... And error calculation is always possible, so that you can give 
bounds to your result, even when using normal floating point arithmetic. And, 
even when using GMPy, you have to know about the underlying limitations of 
binary floating point so that you can reorganize your code if need be to add 
precision (because one calculation might be much less precise if done in some 
way than in another).

Heiko.



More information about the Python-list mailing list