Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #20493
| Date | 2012-02-16 01:18 +0100 |
|---|---|
| Subject | format a measurement result and its error in "scientific" way |
| From | Daniel Fetchinson <fetchinson@googlemail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.5869.1329351490.27778.python-list@python.org> (permalink) |
Hi folks, often times in science one expresses a value (say 1.03789291) and its error (say 0.00089) in a short way by parentheses like so: 1.0379(9) One can vary things a bit, but let's take the simplest case when we only keep 1 digit of the error (and round it of course) and round the value correspondingly. I've been searching around for a simple function that would take 2 float arguments and would return a string but didn't find anything although something tells me it's been done a gazillion times. What would be the simplest such function? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
format a measurement result and its error in "scientific" way Daniel Fetchinson <fetchinson@googlemail.com> - 2012-02-16 01:18 +0100
Re: format a measurement result and its error in "scientific" way jmfauth <wxjmfauth@gmail.com> - 2012-02-17 01:17 -0800
Re: format a measurement result and its error in "scientific" way Daniel Fetchinson <fetchinson@googlemail.com> - 2012-02-17 11:03 +0100
Re: format a measurement result and its error in "scientific" way jmfauth <wxjmfauth@gmail.com> - 2012-02-17 04:13 -0800
Re: format a measurement result and its error in "scientific" way Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2012-02-17 12:16 +0100
csiph-web