- add more decimals to the mathematical constants

Sun, 30 Nov 2014 03:55:47 +0200

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Sun, 30 Nov 2014 03:55:47 +0200
changeset 107
14e1d18d2a2a
parent 106
31583e5b2f49
child 108
8cf31b4d5fcb

- add more decimals to the mathematical constants

mod_util.py file | annotate | diff | comparison | revisions
--- 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', '') \

mercurial