MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: RandomReal gets stuck

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100361] Re: RandomReal gets stuck
  • From: Szabolcs <szhorvat at gmail.com>
  • Date: Tue, 2 Jun 2009 06:40:55 -0400 (EDT)
  • References: <gvq0eu$n31$1@smc.vnet.net> <gvtmeb$gdh$1@smc.vnet.net>

On May 31, 1:33 pm, "Sjoerd C. de Vries" <sjoerd.c.devr... at gmail.com>
wrote:
> Hi Bas,
>
> I can confirm this bug.
>
> Executing an even simpler version, namely
>
> Maximize[Plus @@ Table[y[i], {i, 31}], Table[y[i], {i, 31}]];
>
> will also set the random generator to a fixed starting point. The
> number 31 is crucial, as lower values do not appear to cause the bug,
> while higher values do. Changing Plus to Times appears to prevent the
> bug.
>
> In[394]:= Table[
>  Maximize[Plus @@ Table[y[i], {i, 31}], Table[y[i], {i, 31}]];
>  RandomReal[],
>  {20}
>  ]
>
> During evaluation of In[394]:= Maximize::natt: The maximum is not
> attained at any point satisfying the given constraints.  >>
>
> Out[394]= {0.455719, 0.455719, 0.455719, 0.455719, 0.455719, \
> 0.455719, 0.455719, 0.455719, 0.455719, 0.455719, 0.455719, 0.455719,
> \
> 0.455719, 0.455719, 0.455719, 0.455719, 0.455719, 0.455719, 0.455719,
> \
> 0.455719}
>
> This is very nasty, as a lot of people critically depend on random
> functions to be random. I would urge you to report this to wolfram
> support.
>

The problem is present both in version 6.0.3 and version 7.0.1.


  • Prev by Date: Re: Min function returns Min[2.05875,] instead of just 2.05875
  • Next by Date: Re: Perpendicular lines do not appear perpendicular
  • Previous by thread: Re: RandomReal gets stuck
  • Next by thread: Re: RandomReal gets stuck