[Tutor] Rounding to n significant digits? (original) (raw)
Dick Moores rdm at rcblue.com
Fri Jul 2 03:41:22 EDT 2004
- Previous message: [Tutor] Rounding to n significant digits?
- Next message: [Tutor] timer module question
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Alan Gauld wrote at 00:15 7/2/2004:
> ================================ > round( x[, n]) > > Return the floating point value x rounded to n digits after the decimal > ... > So that won't do it. "rounded to n digits AFTER the decimal point".
Oops, sorry I got caught out too. I don't know of anything that rounds to n significant digits. Looks ike you need to roll your own, although a quick search on Google or the Vaults of Parnassus might be worthwhile first since its a non trivial task...
I'll give it a try. But I am surprised that Python doesn't have what I want. It seems to have everything else..
Thanks,
Dick
- Previous message: [Tutor] Rounding to n significant digits?
- Next message: [Tutor] timer module question
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]