arbitrary-precision

BBP-Algorithm in Python – Working with Arbitrary-precision arithmetic

BBP-Algorithm in Python – Working with Arbitrary-precision arithmetic Question: I am writing on a term paper about the calculation of pi. While i have finished the theoretical site, i`m now struggeling implementing the BBP-Algorithm in Python. You can find the BBP-Algorithm here: http://en.wikipedia.org/wiki/Bailey%E2%80%93Borwein%E2%80%93Plouffe_formula And this is my Implementation in Python: from sympy.mpmath import * pi …

Total answers: 2

What class to use for money representation?

What class to use for money representation? Question: What class should I use for representation of money to avoid most rounding errors? Should I use Decimal, or a simple built-in number? Is there any existing Money class with support for currency conversion that I could use? Any pitfalls that I should avoid? Asked By: Esteban …

Total answers: 6