[Baypiggies] scientific notation: string to int

Keith Dart keith at dartworks.biz
Wed Dec 8 22:47:56 CET 2010


=== On Wed, 12/08, Eric Edens wrote: ===
> >>> foo ('2.96116E-11')  
> 2.96116e-11

===

What's wrong with just:

Python> float('2.96116E+11')
296116000000.0

Python> float('2.96116E-11')
2.96116e-11

?



-- Keith Dart

-- 

-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Keith Dart <keith at dartworks.biz>
   public key: ID: 19017044
   <http://www.dartworks.biz/>
   =====================================================================


More information about the Baypiggies mailing list