lib.utils.std_notation

lib.utils.std_notation(value, sigfigs, extra=None)

Standard notation (US version). Return a string corresponding to value with the number of significant digits sigfigs.

>>> std_notation(5, 2)
'5.0'
>>> std_notation(5.36, 2)
'5.4'
>>> std_notation(5360, 2)
'5400'
>>> std_notation(0.05363, 3)
'0.0536'
Created by William Rusnack:

github.com/BebeSparkelSparkel linkedin.com/in/williamrusnack/ williamrusnack@gmail.com