fastmath library?

Paul Hughett hughett at
Sat Nov 18 16:24:50 CET 2000

Alex Martelli <aleaxit at> wrote:
: What IS available in/for C/C++ that does "crudely
: approximate but horribly fast elementary functions"?
: No doubt, the most productive task would be to wrap
: such a beast (assuming it exists... it IS going to
: be DIFFICULT indeed to beat hardware-FPU performance
: with ANY software implementation, rough at its
: approximations may be...!-)

I doubt that any standard set of fast and sloppy math
functions is available, since the trade-offs between
required accuracy, restriction of domain, fixed vs.
floating point,d restriction of platforms to support,
and how much time you're willing to spend optimizing the
code pretty much dictate that the job has to be done
individually for each application.  The best choice
is probably to check the books on generating the elementary
functions and roll your own, either in Python or as a
C extension.

Paul Hughett

More information about the Python-list mailing list