From 983808f02295d345f22b701989083e31e4165e88 Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Thu, 12 Jan 2017 17:41:34 +0100 Subject: [PATCH] Remove dot from floats when there are no decimals and there's an exponent. --- lslopt/lsloutput.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lslopt/lsloutput.py b/lslopt/lsloutput.py index 85b6c84..12f02d0 100644 --- a/lslopt/lsloutput.py +++ b/lslopt/lsloutput.py @@ -135,6 +135,8 @@ class outscript(object): news = news2 exp = newexp s = neg+news + if exp and s[-1] == '.': + s = s[:-1] # transfrom e.g. 1.e-30 into 1e-30 if value >= 0 or self.globalmode or not self.optsigns: return s + exp return '((float)' + s + exp + ')'