Re: use python as a calculator

2010-06-24 Thread Ian Kelly
On Thu, Jun 24, 2010 at 10:33 AM, ilovesss2004 wrote: > I use python 2.5 > Must change version? Is there any other solution? It works for me: Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more informatio

Re: use python as a calculator

2010-06-24 Thread Peter Otten
ilovesss2004 wrote: > If I run > 1.0/10**10 > python will return 0 > > How can I make python return 1e-10? If you meant 1/10**10, by default this returns an integer in Python 2.x. With "from __future__ import division" you can opt for the division of integers to return a float: >>> 1/10**10 0

Re: use python as a calculator

2010-06-24 Thread Etienne Rousee
Le 24/06/2010 18:33, ilovesss2004 a écrit : > I use python 2.5 > Must change version? Is there any other solution? With python 2.6.5, I obtain 1e-10. -- Etienne -- http://mail.python.org/mailman/listinfo/python-list

Re: use python as a calculator

2010-06-24 Thread Tim Wintle
On Thu, 2010-06-24 at 09:33 -0700, ilovesss2004 wrote: > On Jun 24, 5:50 pm, Tim Harig wrote: > > On 2010-06-24, ilovesss2004 wrote: > > > > > If I run > > > 1.0/10**10 > > > python will return 0 > > > > Python 2.6.4 (r264:75706, Dec 11 2009, 23:02:59) > > [GCC 3.4.6] on linux2 > > Type "help", "

Re: use python as a calculator

2010-06-24 Thread ilovesss2004
On Jun 24, 5:50 pm, Tim Harig wrote: > On 2010-06-24, ilovesss2004 wrote: > > > If I run > > 1.0/10**10 > > python will return 0 > > Python 2.6.4 (r264:75706, Dec 11 2009, 23:02:59) > [GCC 3.4.6] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > > >>> 1.0/10**10

Re: use python as a calculator

2010-06-24 Thread D'Arcy J.M. Cain
On Thu, 24 Jun 2010 08:42:32 -0700 (PDT) ilovesss2004 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", "c

Re: use python as a calculator

2010-06-24 Thread Tim Harig
On 2010-06-24, ilovesss2004 wrote: > If I run > 1.0/10**10 > python will return 0 Python 2.6.4 (r264:75706, Dec 11 2009, 23:02:59) [GCC 3.4.6] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> 1.0/10**10 1e-10 >>> What version are you using? > How can I make

Re: use python as a calculator

2010-06-24 Thread Thomas Jollans
On 06/24/2010 05:42 PM, ilovesss2004 wrote: > If I run > 1.0/10**10 > python will return 0 > > How can I make python return 1e-10? It returns 1e-10. -- http://mail.python.org/mailman/listinfo/python-list

Re: use python as a calculator

2010-06-24 Thread David Houston
I believe this is fixed in python3 On Thu, Jun 24, 2010 at 4:42 PM, ilovesss2004 wrote: > If I run > 1.0/10**10 > python will return 0 > > How can I make python return 1e-10? > -- > http://mail.python.org/mailman/listinfo/python-list > -- Dave - Email: r...@crankyadmin.net Web: w

use python as a calculator

2010-06-24 Thread ilovesss2004
If I run 1.0/10**10 python will return 0 How can I make python return 1e-10? -- http://mail.python.org/mailman/listinfo/python-list