Commit 1e7b76c7 authored by Daniel Brown's avatar Daniel Brown
Browse files

removing some higher SI suffixes as the Exa was making inputting exponents a pain

parent e50b48f9
......@@ -9,7 +9,7 @@ def SIfloat(value):
return convertToFloat(value)
def convertToFloat(value):
__prefix = {'y': 'e-24', # yocto
__suffix = {'y': 'e-24', # yocto
'z': 'e-21', # zepto
'a': 'e-18', # atto
'f': 'e-15', # femto
......@@ -23,12 +23,12 @@ def convertToFloat(value):
'M': 'e6', # mega
'G': 'e9', # giga
'T': 'e12', # tera
'P': 'e15', # peta
'E': 'e18', # exa
'Z': 'e21', # zetta
'Y': 'e24', # yotta
'P': 'e15' # peta
}
value = str(value)
for i, j in __prefix.iteritems():
for i, j in __suffix.iteritems():
value=value.replace(i, str(j))
return float(value)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment