Is Put - Get cycle in Mathematica always deterministic?

I'm afraid I can't give a definitive answer. If you look into the text file you see it's stored as something like the InputForm of the values, including the precision indication for non-machine precision numbers.

I'm afraid I can't give a definitive answer. If you look into the text file you see it's stored as something like the InputForm of the values, including the precision indication for non-machine precision numbers. Assuming that Get uses the same conversion routines as ImportString and ExportString your test can be sped up a tiny bit.

Monitor Do I = RandomReal{$MinMachineNumber, 10 $MinMachineNumber}, 100000; Ifi =! = ToExpressionImportStringExportStringi, "Text", "List", Printi, {n, 100} , n I have tested this for several hundreds of millions of numbers in various ranges between $MinMachineNumber and $MaxMachineNumber and I always get back the original numbers. It's no proof, of course, but it seems unlikely that you're going to see numbers for which this is not true if there are any (and in that case the difference would be so tiny as to be negligible).

1 You rely on UnsameQ in your code which "still considers Real numbers equal if they differ in their last binary digit. " Order has no such disadvantage. See this thread for more information: "Is there a “normal” EqualQ function in Mathematica?".

– Alexey Popkov Jun 27 at 4:54 1 And about ExportString: Process Monitor shows that MathKernel creates a temporary file with output of ExportStringi, "Text" in the user's temporary directory %TEMP%. So it seems that in this case there is no any benefit to use ExportString instead of Put since both of them work with file system. – Alexey Popkov Jun 27 at 6:04 1 @Alexey Good points.

Now that I timed it, Put/Get seem to be twice as fast as the ImportString/ExportString. I assumed they would work in memory and thus be faster. – Sjoerd C.De Vries Jun 27 at 11:05.

One important thing to know is that Put / Get doesn't keep packed arrays packed. You should check out DumpSave. It's much faster as it's a binary format and keeps arrays packed.

1 I am aware of DumpSave but I am interested in exporting expressions in human-readable format. I am quite satisfied with the default ASCII-based representation created by Put and PutAppend. The only reason for concern is formulated in the question.

– Alexey Popkov Jun 27 at 5:04.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions