29
$\begingroup$

Bug introduced in 10.0.0 and fixed in 10.0.2


I don't know if this is a silly question, but it really baffles me. So please help me understand this behavior.

list=RandomInteger[100,100]

I interpret the (silly) code above as randomly generating a list of integers, returning the result and assigning the result to list. Please point me out if I was wrong.

But look at what I got by executing the code (after a fresh start of Mathematica V10.0.1 on Windows 8.1) :

enter image description here

Two results were not identical. It looks like the RandomInteger had been re-evaluated to generate a new list.

I then quitted Mma completely and restarted it, trying a smaller list:

enter image description here

This time two results are identical.

Now I'm really confused. Any suggestion what I did wrong?

$\endgroup$
8
  • 2
    $\begingroup$ (61710) can be related. See the comments there. $\endgroup$
    – ybeltukov
    Oct 12, 2014 at 12:19
  • 3
    $\begingroup$ Reported to Wolfram Technical Support. A support case with the identification [CASE:1765387] was created. $\endgroup$
    – rhermans
    Oct 12, 2014 at 12:51
  • 2
    $\begingroup$ This bug affects all Random* functions for the 1D case but not the multidimensional list generation, except for RandomColor where it also affects the multidimensional case. I'm on Windows 10 TP. $\endgroup$
    – RunnyKine
    Oct 12, 2014 at 22:48
  • 2
    $\begingroup$ Wolfram Technical Support replied confirming that the problem exists on the predictive interface in the front end. Answer updated. $\endgroup$
    – rhermans
    Oct 14, 2014 at 14:43
  • 6
    $\begingroup$ I can reproduce the problem with v.10.0.1 on OS X 10.9.5, only when the Suggestions Bar is showed (no bug when the Suggestions Bar is minimized) $\endgroup$
    – SquareOne
    Oct 14, 2014 at 15:03

3 Answers 3

11
$\begingroup$

Updated 14-10-2014 see solution at the end. Updated 17-07-2015 Bug no longer present in version 10.2

This answer is basically for documentation of the problem. The credit goes mainly to the people participating in the comments.

Diagnostics


I can reproduce you observation on two different computers both, Windows 7 Pro 64, SP 1 running Mathematica 10.0.1. The "feature" appears for list of 11 or more random numbers, both using RandomReal and RandomInteger . I can NOT reproduce the problem on same computer but running Mathematica 9.0.1, so it may be a new bug.

These are my tests:

Mathematica 10.0.1

list = RandomInteger[100, 11]

{32, 93, 57, 54, 52, 43, 75, 72, 76, 0, 22}

list == %

False

list

{55, 35, 91, 46, 90, 69, 4, 65, 98, 49, 27}

list2 = RandomReal[100, 12]

{4.74866, 2.96541, 45.1146, 51.7122, 15.335, 24.3059, \ 55.6953, 9.82313, 39.6287, 7.48303, 11.8829, 65.0989}

list2 == %

False

list2

{72.6577, 86.4083, 24.7092, 93.0095, 66.7453, 20.361, \ 0.751391, 54.1193, 93.568, 7.31844, 93.3521, 21.871}

Trace output

No difference for shorter lists

list = RandomInteger[100, 10]

{3, 93, 60, 7, 95, 22, 60, 99, 96, 12}

list == %

True

Also no problem if evaluated in the documentation notebook

enter image description here

Mathematica 9.0.1

list = RandomInteger[100, 100]

{40, 4, 94, 60, 85, 10, 91, 74, 4, 30, 88, 29, 46, 36, 13, 79, 52, 96, 71, 18, 20, 13, 36, 62, 98, 48, 88, 20, 92, 75, 6, 92, 11, 90, 85, 5, 66, 35, 21, 57, 69, 86, 20, 91, 18, 94, 100, 74, 37, 1, 8, 86, 14, 79, 43, 78, 30, 0, 3, 16, 94, 95, 27, 68, 56, 51, 33, 80, 62, 69, 60, 45, 70, 61, 30, 59, 37, 97, 29, 97, 14, 23, 8, 10, 99, 23, 36, 75, 83, 8, 31, 97, 89, 31, 90, 5, 56, 71, 80, 67}

list == %

True

Cause


I have contacted Wolfram Technical Support and in their reply they say:

This is indeed a serious problem and from my testing it looks like this happens when the predictive interface is turned on. This at the moment seems to be a front-end issue

Solution


This is a bug, so there is no solution for v10.0.1. Based on the answer from Wolfram Technical Support and the comments by @Square1 and @Naitree a temporary workaround is to disable or minimize the suggestion bar feature.

enter image description here

enter image description here

$\endgroup$
2
  • 2
    $\begingroup$ The TracePrint image shows the problem very clearly. No idea why this happens - I suggest you (and @Naitree) report this to Wolfram as a bug. $\endgroup$ Oct 12, 2014 at 12:41
  • 1
    $\begingroup$ This "feature" only shows up for 1D lists. For multidimensional lists generation it doesn't. e.g. list = RandomInteger[20, {50, 2}] works fine. $\endgroup$
    – RunnyKine
    Oct 12, 2014 at 18:22
2
$\begingroup$

This is NOT an answer but more like an observation.

Fresh start, win7 x64, MMA V10.0.1 X64:

The first input should assign value to ans, and I check ans EQUALS the last output (%1)??

So no problem when you type the first TWO lines together?? enter image description here

Only is a problem is you type them separately? so executed twice?? enter image description here

$\endgroup$
0
2
$\begingroup$

This has been fixed in version 10.0.2. On windows 7, 64 bit

Mathematica graphics

Mathematica graphics

try with small list

Mathematica graphics

and

Mathematica graphics

$\endgroup$
1
  • $\begingroup$ You could also edit the question and where it says "Introduced in 10.0.0" add "and fixed in 10.0.2". That way it's immediately clear that we don't need to worry about the bug, without having to glance through all the answers. $\endgroup$
    – Szabolcs
    Dec 10, 2014 at 23:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.