1 | initial version |
def Ns(x, nd = 5): # round x to a given number of significant digits d = ceil(log(abs(x), 10)) return round(x, ndigits = -d + nd)
2 | No.2 Revision |
def Ns(x, nd = 5):
# round x to a given number of significant digits
d = ceil(log(abs(x), 10))
return round(x, ndigits = -d +