# HG changeset patch # User Teemu Piippo # Date 1417312547 -7200 # Node ID 14e1d18d2a2a9b760239997c7136a33515a8ad6f # Parent 31583e5b2f4905ab0db456cfd6d836a8c6f5915e - add more decimals to the mathematical constants diff -r 31583e5b2f49 -r 14e1d18d2a2a mod_util.py --- a/mod_util.py Sun Nov 30 03:51:39 2014 +0200 +++ b/mod_util.py Sun Nov 30 03:55:47 2014 +0200 @@ -133,9 +133,9 @@ try: # Substitute some mathematical constants - expr = mathsubstitute (expr, 'pi' , 3.141592653589793) - expr = mathsubstitute (expr, 'e' , 2.718281828459045) - expr = mathsubstitute (expr, 'phi', 1.618033988749895) # golden ratio + expr = mathsubstitute (expr, 'pi' , 3.14159265358979323846264338327950288419716939937510) + expr = mathsubstitute (expr, 'e' , 2.71828182845904523536028747135266249775724709369995) + expr = mathsubstitute (expr, 'phi', 1.6180339887498948482) # golden ratio result = subprocess.check_output (['calc', expr], stderr=subprocess.STDOUT) \ .replace ('\t', '') \