Math: default %f formatting rounds to 6 decimal places. increase that to 16.

This commit is contained in:
Daniel Folkinshteyn 2012-06-12 12:28:26 -04:00 committed by Valentin Lorentz
parent 17227a6829
commit 643788b478
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,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: