use python as a calculator

D'Arcy J.M. Cain darcy at druid.net
Thu Jun 24 11:58:35 EDT 2010


On Thu, 24 Jun 2010 08:42:32 -0700 (PDT)
ilovesss2004 <yyiilluuoo at gmail.com> wrote:
> If I run
> 1.0/10**10
> python will return 0
> 
> How can I make python return 1e-10?

What version of Python are you using?

Python 2.6.4 (r264:75706, Jan 28 2010, 11:26:00) 
[GCC 4.2.1 20070719  [FreeBSD]] on freebsd7
Type "help", "copyright", "credits" or "license" for more information.
>>> 1.0/10**10
1e-10

-- 
D'Arcy J.M. Cain <darcy at druid.net>         |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.



More information about the Python-list mailing list