STINNER Victor added the comment:

About tradeoff, would it be possible to add an option to choose the quality of 
the accuracy? For example, a flag to choose between "fast nth root" or 
"accurate nth root".

Python already has two kind of numbers: Decimal and float. Maybe the "flag" 
should be the type of input numbers, Decimal or float?

I'm asking because I looked at http://lipforge.ens-lyon.fr/www/crlibm/ a few 
years ago, and such library is designed for accuracy, not for speed. crlibm is 
based on the scslib library which compose a number using multiple float numbers 
to get a better precision. To get correct rounding, crlibm requires more loop 
iterations and more floating point number operations, so as expected, it is 
slower.

FYI my old blog article (in french!): 
http://www.haypocalc.com/blog/index.php/2009/02/20/188-bibliotheque-mathematique-arrondi-exact-crlibm

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27761>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to