Skip to content
Snippets Groups Projects
Commit b7e5ce58 authored by Seblu's avatar Seblu
Browse files

change f to g in tagdisplay for si and bit types

parent 0b9386e5
No related branches found
No related tags found
No related merge requests found
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment