On Mon, Jul 6, 2015 at 11:44 AM, Oscar Benjamin
wrote:
> On Sat, 4 Jul 2015 at 02:12 Jason Swails wrote:
>
>> On Fri, Jul 3, 2015 at 11:13 AM, Oscar Benjamin <
>> oscar.j.benja...@gmail.com> wrote:
>>
>>> On 2 July 2015 at 18:29, Jason Swails wrote:
>>>
>>> Where is the 32 bit one looks like:
>
On Sat, 4 Jul 2015 at 02:12 Jason Swails wrote:
> On Fri, Jul 3, 2015 at 11:13 AM, Oscar Benjamin <
> oscar.j.benja...@gmail.com> wrote:
>
>> On 2 July 2015 at 18:29, Jason Swails wrote:
>>
>> Where is the 32 bit one looks like:
>>
>> $ objdump -d a.out.32 | less
>> ...
>
> 804843e: fildl -0x
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
On 02.07.2015 19:29, Jason Swails wrote:
> // maths.h #include #include
>
> int main() { double x; int i; x = 1-pow(0.5, 53);
>
> for (i = 1; i < 100; i++) { if ((int)(i*x) == i) {
> printf("%d\n", i); break; } }
>
> return 0; }
Does not
Laura Creighton wrote:
> In a message of Fri, 03 Jul 2015 00:52:55 +1000, "Steven D'Aprano" writes:
>>Despite the title, this is not one of the usual "Why can't Python do
>>maths?" "bug" reports.
>>
>>Can anyone reproduce this behaviour? If so, please reply with the version
>>of Python and your op
In a message of Fri, 03 Jul 2015 00:52:55 +1000, "Steven D'Aprano" writes:
>Despite the title, this is not one of the usual "Why can't Python do
>maths?" "bug" reports.
>
>Can anyone reproduce this behaviour? If so, please reply with the version of
>Python and your operating system. Printing sys.ve
On Fri, Jul 3, 2015 at 11:13 AM, Oscar Benjamin
wrote:
> On 2 July 2015 at 18:29, Jason Swails wrote:
> >
> > As others have suggested, this is almost certainly a 32-bit vs. 64-bit
> > issue. Consider the following C program:
> >
> > // maths.h
> > #include
> > #include
> >
> > int main() {
>
On 3-7-2015 7:07, Ned Deily wrote:
> In article <559579bb$0$2921$e4fe5...@news.xs4all.nl>,
> Irmen de Jong wrote:
>> Tested on Mac OSX 10.10.4, with a 64-bit core2duo processor. Below are all
>> 64-bit python
>> implementations:
>> 2.6.9 (apple supplied), 2.7.6 (apple supplied), 3.4.3 (homebrew)
On 2 July 2015 at 18:29, Jason Swails wrote:
>
> As others have suggested, this is almost certainly a 32-bit vs. 64-bit
> issue. Consider the following C program:
>
> // maths.h
> #include
> #include
>
> int main() {
> double x;
> int i;
> x = 1-pow(0.5, 53);
>
> for (i = 1; i <
In article <559579bb$0$2921$e4fe5...@news.xs4all.nl>,
Irmen de Jong wrote:
> Tested on Mac OSX 10.10.4, with a 64-bit core2duo processor. Below are all
> 64-bit python
> implementations:
> 2.6.9 (apple supplied), 2.7.6 (apple supplied), 3.4.3 (homebrew), and
> pypy-2.6.0
> (homebrew). I don't h
Steven D'Aprano wrote:
> Despite the title, this is not one of the usual "Why can't Python do
> maths?" "bug" reports.
>
> Can anyone reproduce this behaviour? If so, please reply with the version
> of Python and your operating system. Printing sys.version will probably
> do.
On Kubuntu 15.04,
On 2-7-2015 16:52, Steven D'Aprano wrote:
> Despite the title, this is not one of the usual "Why can't Python do
> maths?" "bug" reports.
>
> Can anyone reproduce this behaviour? If so, please reply with the version of
> Python and your operating system. Printing sys.version will probably do.
>
>
On Thu, Jul 2, 2015 at 10:52 AM, Steven D'Aprano
wrote:
> Despite the title, this is not one of the usual "Why can't Python do
> maths?" "bug" reports.
>
> Can anyone reproduce this behaviour? If so, please reply with the version
> of
> Python and your operating system. Printing sys.version will
On 2015-07-03 00:52, Steven D'Aprano wrote:
> x = 1 - 1/2**53
> assert x == 0.
> for i in range(1, 100):
> if int(i*x) == i:
> print(i); break
tkc@debian:~$ python
Python 2.7.9 (default, Mar 1 2015, 12:57:24)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credit
On 2015-07-02 15:52, Steven D'Aprano wrote:
Despite the title, this is not one of the usual "Why can't Python do
maths?" "bug" reports.
Can anyone reproduce this behaviour? If so, please reply with the version of
Python and your operating system. Printing sys.version will probably do.
x = 1 -
On 02/07/15 15:52, Steven D'Aprano wrote:
> Despite the title, this is not one of the usual "Why can't Python do
> maths?" "bug" reports.
>
> Can anyone reproduce this behaviour? If so, please reply with the version of
> Python and your operating system. Printing sys.version will probably do.
>
>
On Thu, Jul 2, 2015 at 5:29 PM, Robin Becker wrote:
>
>
> $ uname -a
> Linux everest 4.0.6-1-ARCH #1 SMP PREEMPT Tue Jun 23 14:40:31 CEST 2015
> i686 GNU/Linux
>
I am wondering if this is a 32bit vs. 64bit thing. Has anyone gotten this
problem to work on a 64bit python?
--
https://mail.python
On Fri, 3 Jul 2015 12:52 am, Steven D'Aprano wrote:
> x = 1 - 1/2**53
Ooops, sorry I forgot that I had already run "from __future__ import
division". Otherwise that line needs to be:
x = 1 - 1.0/2**53
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, 3 Jul 2015 01:34 am, Chris Angelico wrote:
> From previous discussions I happen to know that Steven normally runs
> everything with "from __future__ import division" active (and possibly
> others? not sure), so just assume he means to work with floats here.
> Steven, I think this is one of
On Thu, Jul 2, 2015 at 9:26 AM, Paul Rubin wrote:
> Steven D'Aprano writes:
>> x = 1 - 1/2**53
>> assert x == 0.
>
> In Python 2.x I don't see how that assert can possibly succeed, since
> x is the integer 1. But I tested it anyway on 2.7.5 under Fedora 19
> and it threw an asser
On Fri, Jul 3, 2015 at 1:26 AM, Paul Rubin wrote:
> Steven D'Aprano writes:
>> x = 1 - 1/2**53
>> assert x == 0.
>
> In Python 2.x I don't see how that assert can possibly succeed, since
> x is the integer 1. But I tested it anyway on 2.7.5 under Fedora 19
> and it threw an asser
On Thu, Jul 2, 2015 at 9:28 AM, Ian Kelly wrote:
> On my Chromebook, using Python 2.7.6 from the Ubuntu Trusty
> distribution, I get AssertionError, and x == 1.
>
> In Python 3.4.0 on the same system, the code runs to completion. Both
> Pythons appear to be 64-bit builds.
>
> On my Mint 17.1 deskt
Steven D'Aprano writes:
> x = 1 - 1/2**53
> assert x == 0.
In Python 2.x I don't see how that assert can possibly succeed, since
x is the integer 1. But I tested it anyway on 2.7.5 under Fedora 19
and it threw an assertion error.
I changed it to say 1 - 1/2.0**53 and then the lo
$ uname -a
Linux everest 4.0.6-1-ARCH #1 SMP PREEMPT Tue Jun 23 14:40:31 CEST 2015 i686
GNU/Linux
robin@everest:~
$ python2
Python 2.7.10 (default, May 26 2015, 04:28:58)
[GCC 5.1.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> x = 1.0 - 1.0/2**53
>>> as
On my Chromebook, using Python 2.7.6 from the Ubuntu Trusty
distribution, I get AssertionError, and x == 1.
In Python 3.4.0 on the same system, the code runs to completion. Both
Pythons appear to be 64-bit builds.
On my Mint 17.1 desktop (which should be using the same packages), I
get the same r
Le 02/07/2015 16:52, Steven D'Aprano a écrit :
Despite the title, this is not one of the usual "Why can't Python do
maths?" "bug" reports.
Can anyone reproduce this behaviour? If so, please reply with the version of
Python and your operating system. Printing sys.version will probably do.
x = 1
On 02/07/2015 15:52, Steven D'Aprano wrote:
Despite the title, this is not one of the usual "Why can't Python do
maths?" "bug" reports.
Can anyone reproduce this behaviour? If so, please reply with the version of
Python and your operating system. Printing sys.version will probably do.
x = 1 -
On Fri, Jul 3, 2015 at 12:52 AM, Steven D'Aprano wrote:
> Can anyone reproduce this behaviour? If so, please reply with the version of
> Python and your operating system. Printing sys.version will probably do.
>
>
> x = 1 - 1/2**53
> assert x == 0.
> for i in range(1, 100):
>
hi Steven,
I'm running python-3.4.2 on a linuxmint16 box and CANNOT reproduce
it is just that
int(i*x) == i
is never True!
hope that helps
regards
Michael
* Steven D'Aprano [2015-07-02 16:56]:
> Despite the title, this is not one of the usual "Why can't Python do
> maths?" "bug" reports.
>
> C
The loop runs to completion for me on openSUSE Tumbleweed and both Python
2.7 64bits and Python 3.4 64bits.
On Thu, Jul 2, 2015 at 4:52 PM, Steven D'Aprano wrote:
> Despite the title, this is not one of the usual "Why can't Python do
> maths?" "bug" reports.
>
> Can anyone reproduce this behavio
Despite the title, this is not one of the usual "Why can't Python do
maths?" "bug" reports.
Can anyone reproduce this behaviour? If so, please reply with the version of
Python and your operating system. Printing sys.version will probably do.
x = 1 - 1/2**53
assert x == 0.
for i i
30 matches
Mail list logo