Skip to content
Prev 40832 / 63424 Next

Randomness not due to seed

On Jul 20, 2011, at 15:38 , Dirk Eddelbuettel wrote:

            
Hmm, yes, but you would expect the SAME function on the SAME data to yield the same floating point number, and give the SAME printout on the SAME R on the SAME hardware... 

FWIW all the Mac versions that I can access give the same results as the eclipse version.

Let's look at the numbers side-by-side

-17.579094890510951643137   3.932408759124087715975
-17.57909489051087703615    3.93240875912408460735
                !                           !
 12.345678901234567890123   1.234567890123456789012

so we're seeing differences around the 15th/16th significant digit. This is consistent with a difference of about one unit of least precision in the actual objects, but there could conceivably be other explanations, e.g. the print() function picking up random garbage. Jeroen: Could you save() the results from the two cases, load() them in a new session and compute the difference?