+ 2

How to use float with exponent?

As floating implementation in DSPs there are mentesa and exponent like 5.5x10^2. How to implement it in Python?

14th Nov 2016, 10:42 AM
Jaydeep Parmar
Jaydeep Parmar - avatar
3 Respostas
+ 3
scientific notation in python is like-> 467 = 4.67e+2 meaning 4.67x10^2 you can convert to this notation by simply "{:e}".format(550) = 5.5e2 python accepts these as numbers you don't have to anything to convert from this notation 6.65e-1 = 0.665 if you really want to convert to ax10^c you can write a function to convert to and from the scientific notation check out the codes titled "Scientific_Notation" just a demo
14th Nov 2016, 3:57 PM
Sunera Avinash
Sunera Avinash - avatar
+ 1
do you mean that you want to convert 5.5x10^2 to 550 and vice-versa ?
14th Nov 2016, 11:59 AM
Sunera Avinash
Sunera Avinash - avatar
0
yes, exactly but how to implement it as DSP point of view.
14th Nov 2016, 1:40 PM
Jaydeep Parmar
Jaydeep Parmar - avatar