Just to be sure, you CAN'T expect sum to always have the same result in
float{32,64,128}. This is a properties of float numbers, but if you add
precission, you can hide this problem in some/most case.
Fred
On Sun, Aug 25, 2013 at 4:30 PM, Matthieu Brucher <
matthieu.bruc...@gmail.com> wrote:
>
You can expect sum to always have the same result with this precision.
Depending on how the sum is done (first to last or last to first for
instance), you will have this kind of results.
Le 25 août 2013 08:47, "Peter Prettenhofer"
a écrit :
>
>
>
> 2013/8/24 Lars Buitinck
>
>> 2013/8/24 Peter Pr
2013/8/25 Peter Prettenhofer :
> yes - I used the builtin hash to show its different (if you print the
> floating point you can see the difference as well).
> If hash would not be consistent than pickling dicts would not be a good
> idea... ?
A pickled dict just is just a list of key-value pairs.
2013/8/24 Lars Buitinck
> 2013/8/24 Peter Prettenhofer :
> > can anybody help me understand why the output of the following code
> snippet
> > is different depending on 32bit or 64bit architecture::
> >
> > x = np.empty((10 ** 6,), dtype=np.float64)
> > x.fill(1e-9)
> > hash(x.mean())
2013/8/24 Peter Prettenhofer :
> can anybody help me understand why the output of the following code snippet
> is different depending on 32bit or 64bit architecture::
>
> x = np.empty((10 ** 6,), dtype=np.float64)
> x.fill(1e-9)
> hash(x.mean())
>
> on 64bit I get: 2475364768
> on 32bit
can anybody help me understand why the output of the following code snippet
is different depending on 32bit or 64bit architecture::
x = np.empty((10 ** 6,), dtype=np.float64)
x.fill(1e-9)
hash(x.mean())
on 64bit I get: 2475364768
on 32bit I get: -1839780448
I expected that given you
Josef,
thanks for double checking - I indeed had an error in my scripts - now I
too get the same results for 32bit and 64bit.
sorry for the false alarm.
best,
Peter
2013/8/24
>
>
>
> On Sat, Aug 24, 2013 at 1:41 PM, Peter Prettenhofer <
> peter.prettenho...@gmail.com> wrote:
>
>> Hi,
>>
>>
On Sat, Aug 24, 2013 at 1:41 PM, Peter Prettenhofer <
peter.prettenho...@gmail.com> wrote:
> Hi,
>
> while investigating some 64bit vs. 32bit differences in the GBRT code I
> stumpled upon this ticket [1].
> Even though its quite old, I can confirm that it holds on my virtual
> machines (np 1.7.1)
Hi,
while investigating some 64bit vs. 32bit differences in the GBRT code I
stumpled upon this ticket [1].
Even though its quite old, I can confirm that it holds on my virtual
machines (np 1.7.1).
Basically, np.random.RandomState(seed) gives different results on 64bit and
32bit architectures - thi