octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: 3.0.1 release?


From: Bateman David-ADB014
Subject: RE: 3.0.1 release?
Date: Tue, 8 Apr 2008 14:25:25 +0100

The code

#include <iostream>
int main (void)
{
        uint64_t a = 0x001FFFFFFFFFFFFFUL^0x0007FFFFFFFFFFFFUL;
        std::cerr << a  << std::endl;
        return 0;
}

returns 6755399441055744, and I suspect it does something else under MSVC

D.


-----Original Message-----
From: Michael Goffioul [mailto:address@hidden]
Sent: Tue 08-Apr-08 3:06 PM
To: Bateman David-ADB014
Cc: John W. Eaton; address@hidden
Subject: Re: 3.0.1 release?

On Tue, Apr 8, 2008 at 3:01 PM, David Bateman
<address@hidden> wrote:
>  I just looked at this issue a little bit and the failing part of the
>  code is
>
>   Bmax = bitmax;
>   A = bitshift(Bmax,-2);
>   bitxor(cast(A,'uint64'),cast(Bmax,'uint64'))
>
>  Bmax is '2^53 - 1' and A is '2^51 - 1" and so bitxor of the above should
>  be '2^52 + 2^51' and is under linux. Under windows this appears to
>  return '2^53 + 2^51' which is of course a bug.. The equivalent in C++
>  would be
>
>  0x000FFFFFFFFFFFFFUL^ x0003FFFFFFFFFFFFUL
>
>  so what does this return when compiled with MSVC in C++ mode? If its not
>  '2^52 + 2^51' its time to file a bug report against MSVC..

Could you provide some code that I can compile and run out-of-the-box?
I'm not sure I fully understand the problem...

Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]