From b7e5ce583e54cb7be78eb8c6b40363b413efca03 Mon Sep 17 00:00:00 2001
From: Seblu <sebastien.luttringer@smartjog.com>
Date: Tue, 15 Feb 2011 12:12:12 +0100
Subject: [PATCH] change f to g in tagdisplay for si and bit types

---
 cccli/tagdisplay.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cccli/tagdisplay.py b/cccli/tagdisplay.py
index aeb624e..b45f89f 100644
--- a/cccli/tagdisplay.py
+++ b/cccli/tagdisplay.py
@@ -117,7 +117,7 @@ class TagDisplay(object):
                 p = min(math.floor(math.log10(abs(v))/3.0), len(si))
                 d = v / pow(10, 3*p)
                 u = si[int(p-1)]
-                value =  u"%.1f%s"%(d, u)
+                value =  u"%.4g%s"%(d, u)
         return value
 
     def type_bit(self, value):
@@ -129,7 +129,7 @@ class TagDisplay(object):
                 p = min(math.floor(math.log(abs(v), 2)/10.0), pow(2, len(si)))
                 d = v / pow(2, 10*p)
                 u = si[int(p-1)]
-                value =  u"%.1f%si"%(d, u)
+                value =  u"%.4g%si"%(d, u)
         return value
 
     def type_second(self, value):
-- 
GitLab