Convert a scientific notation to decimal number, and still keeping the data format as float64

doganadres at gmail.com doganadres at gmail.com
Mon Oct 21 16:36:59 EDT 2019


On Monday, October 21, 2019 at 4:09:23 PM UTC+3, Piet van Oostrum wrote:
> Piet van Oostrum <piet-l at vanoostrum.org> writes:
> 
> > doganadres at gmail.com writes:
> >
> >> I dont know much about scala actually. I have just have tried to give
> >> 0.0001 and it returned a presentation with an 'e' .whereas python takes
> >> 0.0001 and gives 0.0001 . it made me think python is better in that
> >> specific subject.
> >>
> >> However, python though starts to give 'e' number when 5 decimals are
> >> given as input. Although there can be systems around which are better in
> >> this subject other things I can achieve in python overrides some
> >> disadvantages.
> >
> > Yes, I would say Python is more user-friendly in this particular
> > example, although both outputs are correct. If I remember correctly,
> > Python had an update in the area several years ago to make the output
> > for floating-point numbers more user-friendly, (and at the same time
> > maybe even more correct).
> >
> > But these are just choices of the implementers of the language, not
> > characteristics of the language itself.
> 
> In Python 0.00001 => 1e-05, so it just chooses a different point to
> switch from pure decimal to scientific notation.
> -- 
> Pieter van Oostrum <piet-l at vanoostrum.org>
> WWW: http://piet.vanoostrum.org/
> PGP key: [8DAE142BE17999C4]


They ought to have a reason to make the program switch from pure decimal to scientific notation representation. I don't know that reason. Getting along with it.



More information about the Python-list mailing list