Engineering numerical format PEP discussion
keith.brafford at gmail.com
Mon Apr 26 01:10:03 EDT 2010
On Apr 26, 12:29 am, Steven D'Aprano <st... at REMOVE-THIS-
> On Sun, 25 Apr 2010 20:36:22 -0700, Keith wrote:
>>no one talks about 4.7e-5F, as they would rather see 47e-6
>>(micro). Instead of 2.2e-2, engineers need to see 22.0e-3 (milli).
>I'd be cautious about making claims about "no one"
Good point, and I don't intend to belittle scientific computing folks
for whom traditional floating point representation is expected.
Nor am I suggesting that any of the six format specifiers that we
already have for scientific notation (e, E, f, F, g, G) be altered in
I guess I wasn't clear about the F in the 4.7e-5F in the example.
People doing engineering don't use 4.7e-5 Farads. They typically have
to do extra work to get that number to print out correctly, as 47 e-6
Farads. The same goes for lots of signal processing entities. People
doing things with Hz, seconds, you name it, have the same problem.
More information about the Python-list