[R] Matrix multiplication gives different results some of the times (NaN)

2011-09-13 Thread Xavier Fernández i Marín
Dear all, When trying to multiply the same matrices repeatedly I get different results some of the times. It is not systematic, which is the fact that is giving me more trouble to try to isolate the problem. Basically I am doing X %*% B, where X is a Nx2 matrix and B is a vector with 2 values.

Re: [R] Matrix multiplication gives different results some of the times (NaN)

2011-09-13 Thread Joshua Wiley
I cannot replicate this on, even with 1 milllion reps on: R version 2.13.1 (2011-07-08) Platform: i386-pc-mingw32/i386 (32-bit) or R Under development (unstable) (2011-08-13 r56733) Platform: x86_64-pc-mingw32/x64 (64-bit) Perhaps it is OS dependent (I am away from my linux box at the moment)?

Re: [R] Matrix multiplication gives different results some of the times (NaN)

2011-09-13 Thread Xavier Fernández i Marín
Joshua Wiley vas escriure el dia dt, 13 set 2011: I cannot replicate this on, even with 1 milllion reps on: R version 2.13.1 (2011-07-08) Platform: i386-pc-mingw32/i386 (32-bit) or R Under development (unstable) (2011-08-13 r56733) Platform: x86_64-pc-mingw32/x64 (64-bit) Perhaps

Re: [R] Matrix multiplication gives different results some of the times (NaN)

2011-09-13 Thread Rolf Turner
I tried your example code on my laptop running Ubuntu Linux, and of course it ran --- just as it should (*has* to!) without any problem; no errors thrown. This sort of thing should not/does not/cannot happen under ``normal circumstances''. There has to be something wrong somewhere in your

Re: [R] Matrix multiplication gives different results some of the times (NaN)

2011-09-13 Thread Xavier Fernández i Marín
Rolf Turner vas escriure el dia dt, 13 set 2011: I tried your example code on my laptop running Ubuntu Linux, and of course it ran --- just as it should (*has* to!) without any problem; no errors thrown. This sort of thing should not/does not/cannot happen under ``normal circumstances''.

Re: [R] Matrix multiplication gives different results some of the times (NaN)

2011-09-13 Thread Ben Bolker
Xavier Fernández i Marín xfim.ll at gmail.com writes: Rolf Turner vas escriure el dia dt, 13 set 2011: [snip] This sort of thing should not/does not/cannot happen under ``normal circumstances''. There has to be something wrong somewhere in your setup. Either your hardware or your

Re: [R] Matrix multiplication gives different results some of the times (NaN)

2011-09-13 Thread Ben Bolker
Xavier Fernández i Marín xfim.ll at gmail.com writes: More elements: In python the same algorithm does not show this strange behaviour. Is Python using the same BLAS/LAPACK? __ R-help@r-project.org mailing list

Re: [R] Matrix multiplication gives different results some of the times (NaN)

2011-09-13 Thread Xavier Fernández i Marín
Ben Bolker vas escriure el dia dt, 13 set 2011: You mentioned that you had compiled R yourself. Can you replicate this with a stock R binary, i.e. from a Red Hat or Ubuntu repository? If not, can you give details of your compilation setup, especially if you are using a specialized or