Latest recipes tagged "significantfigures"http://code.activestate.com/recipes/tags/significantfigures/new/2012-04-26T20:15:48-07:00ActiveState Code RecipesRound number to specified number of significant digits (Python) 2012-04-26T20:15:48-07:00Ben Hoythttp://code.activestate.com/recipes/users/4170919/http://code.activestate.com/recipes/578114-round-number-to-specified-number-of-significant-di/ <p style="color: grey"> Python recipe 578114 by <a href="/recipes/users/4170919/">Ben Hoyt</a> (<a href="/recipes/tags/decimalplaces/">decimalplaces</a>, <a href="/recipes/tags/round/">round</a>, <a href="/recipes/tags/rounding/">rounding</a>, <a href="/recipes/tags/significantfigures/">significantfigures</a>). </p> <p>This function rounds num to the specified number of significant digits (rather than decimal places). See doctests for more examples.</p>