summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--representer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/representer.py b/representer.py
index 9163637..fddfa3c 100644
--- a/representer.py
+++ b/representer.py
@@ -782,7 +782,7 @@ class RoundTripRepresenter(SafeRepresenter):
value += u'0'
else:
# exponent
- m, es = u'{:{}.{}e}'.format(data, data._width, data._width - data._prec).split('e')
+ m, es = u'{:{}.{}e}'.format(data, data._width, data._width - data._prec + (1 if data._m_sign else 0)).split('e')
w = data._width if data._prec > 0 else (data._width + 1)
if data < 0:
w += 1