| 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 +
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.