As an electrical engineer, I (we?) Use python to help with calculation / automation, etc.
When working with calculations using some real numbers, VERY often have to think in -nano, -pico, -tera , etc.
For example: I know what a 1pF capacitor is, but a 1e-12 F capacitor is also less friendly. In addition, it is gaining 4 times more ( 1p vs 1e-12 ) and more error prone. Not to mention the fact that the presence of a number suffix is ββsimply simpler when displaying numbers.
So the question is: is it possible to work in python (IPython?):
L = 1n C = 1p f = 1/(2*pi*sqrt(L*C)) print(f) gives: 5.033G (or whatever the accuracy should be)
It would be incredibly useful as well as a calculator!
Thanks.
UPDATE: What I'm looking for is not processing units, but only processing the suffix of numbers . So whether it doesnβt care about a farad or a kilogram, but DO NOT worry about the suffix (-n, -u, -m, -M, -G ...)
python numbers notation
ronszon
source share