From 3c30463e1139da429176c6e8f7541cbc44843ad3 Mon Sep 17 00:00:00 2001 From: Daniel Folkinshteyn Date: Tue, 12 Jun 2012 12:28:26 -0400 Subject: [PATCH] Math: default %f formatting rounds to 6 decimal places. increase that to 16. Signed-off-by: James McCoy --- plugins/Math/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Math/plugin.py b/plugins/Math/plugin.py index dbea4303c..98a4d4722 100644 --- a/plugins/Math/plugin.py +++ b/plugins/Math/plugin.py @@ -195,7 +195,7 @@ class Math(callbacks.Plugin): # use of str() on large numbers loses information: # str(float(33333333333333)) => '3.33333333333e+13' # float('3.33333333333e+13') => 33333333333300.0 - return '%f' % x + return '%.16f' % x return str(x) text = self._mathRe.sub(handleMatch, text) try: