How about fractions to be computed in hundreds or even thousands of digits in
precision?
OK, just write programs to compute PI and the Euler number in hundreds or even
thousands of digits to test various kind of programming languages.
This is a sophomore school home work for gifted kid
You should get in touch with the Sage developers. In the Sage FAQ they
say that "until SciPy is ported to run with Python 3.x and Cython
supports Python 3.x, Sage will continue to use Python 2.x."
``scipy.weave``."
So according to the Sage FAQ there is no reason why Sage shouldn't
support Pyt
On Oct 13, 10:04 am, Laurent Claessens wrote:
> Thanks all for your ansers. I'll import division from __future__
> Most of what I'm using in Python is with Sage[1]. Thus I'm not about to
> step to 3.x :(
You should get in touch with the Sage developers. In the Sage FAQ they
say that "until SciPy
Wohaw. This means that this behavior is going to be default in a
foreseeable future ?
It's the default in 3.x. I can't imagine it ever being the default in 2.x.
2.7 is now in "bug-fix only" mode, so no new features, and there won't be a
2.8, so true division will never be the default in
Nobody wrote:
> On Wed, 12 Oct 2011 13:28:35 +0200, Laurent wrote:
>
>> from __future__ import division
>> 1/2
>>> 0.5
>>>
>>
>> Wohaw. This means that this behavior is going to be default in a
>> foreseeable future ?
>
> It's the default in 3.x. I can't imagine it ever being the defa
On Wed, Oct 12, 2011 at 12:28 PM, Laurent wrote:
>
>> Include from __future__ import division on the top of your file
>>
> from __future__ import division
> 1/2
>>
>> 0.5
>>
>
> Wohaw. This means that this behavior is going to be default in a foreseeable
> future ?
Never in Python 2.x,
On Wed, 12 Oct 2011 13:28:35 +0200, Laurent wrote:
> from __future__ import division
> 1/2
>> 0.5
>>
>
> Wohaw. This means that this behavior is going to be default in a
> foreseeable future ?
It's the default in 3.x. I can't imagine it ever being the default in 2.x.
--
http://mail.
Include from __future__ import division on the top of your file
from __future__ import division
1/2
0.5
Wohaw. This means that this behavior is going to be default in a
foreseeable future ?
Thanks
Laurent
--
http://mail.python.org/mailman/listinfo/python-list
Laurent Claessens wrote:
> This is well known :
>
> >>> 1/2
> 0
>
> This is because the division is an "integer division".
>
> My question is : how can I evaluate 1/2 to 0.5 ? Is there some non
> integer division operator ?
> Up to now I workarounded writing float(1)/2. Is there an other way ?
Laurent Claessens writes:
> Hi all
>
>
> This is well known :
>
1/2
> 0
>
> This is because the division is an "integer division".
>
> My question is : how can I evaluate 1/2 to 0.5 ? Is there some non
> integer division operator ?
> Up to now I workarounded writing float(1)/2. Is there an o
"Laurent Claessens" skrev i en meddelelse
news:j73p9s$baa$1...@news.univ-fcomte.fr...
> Hi all
>
>
> This is well known :
>
> >>> 1/2
> 0
>
> This is because the division is an "integer division".
>
> My question is : how can I evaluate 1/2 to 0.5 ? Is there some non integer
> division operator
On Wed, Oct 12, 2011 at 9:14 PM, Laurent Claessens wrote:
> Hi all
>
> This is well known :
>
1/2
> 0
Only in Python 2.
> This is because the division is an "integer division".
>
> My question is : how can I evaluate 1/2 to 0.5 ? Is there some non integer
> division operator ?
1.0/2 is flo
On Wed, Oct 12, 2011 at 11:14 AM, Laurent Claessens wrote:
> This is well known :
>
1/2
> 0
>
> This is because the division is an "integer division".
>
> My question is : how can I evaluate 1/2 to 0.5 ? Is there some non integer
Include from __future__ import division on the top of your fil
Laurent Claessens wrote:
Hi all
This is well known :
>>> 1/2
0
This is because the division is an "integer division".
My question is : how can I evaluate 1/2 to 0.5 ? Is there some non
integer division operator ?
Up to now I workarounded writing float(1)/2. Is there an other way ?
My Zen
14 matches
Mail list logo