On Tue, Jul 13, 2010 at 6:39 AM, Andrey Novoseltsev <novos...@gmail.com> wrote:
> On Jul 13, 3:37 am, Carl Witty <carl.wi...@gmail.com> wrote:
>> On Thu, Jun 17, 2010 at 2:18 PM, Volker Braun <vbraun.n...@gmail.com> wrote:
>> > Unsurprisingly, setting the random seed makes the random_expr() always
>> > return the same value:
>>
>> > sage: set_random_seed(0xdeadbeef)
>> > sage: random_expr(5)
>> > tanh(-pi^real_part(v1)*sin(log(pi)*imag_part(v1)))
>> > sage: set_random_seed(0xdeadbeef)
>> > sage: random_expr(5)
>> > tanh(-pi^real_part(v1)*sin(log(pi)*imag_part(v1)))
>> > sage: random_expr(5)
>> > v1 + arccos(e/golden_ratio)
>>
>> > I suggest that the doctests for sage.symbolic.random_tests simply set
>> > the random seed to a fixed value.
>>
>> The testing framework automatically runs set_random_seed(0) before
>> testing every docstring, so this shouldn't be necessary.
>>
>> Carl Witty
>
> I completely agree that this should not be necessary, but the output
> of this function does change!!!
>
> Andrey

OK.

Setting the random seed seems like a fine workaround for getting your
patch in... the problem is unlikely to be in your patch, as you point
out.

But as the author of both sage.misc.randstate and
sage.symbolic.random_tests, it makes me nervous when I don't
understand what my code is doing.  I tried to look into this, but I
couldn't figure out how to reproduce the problem.  Could you do me a
favor and give nice simple instructions?  (In particular, what version
of Sage do I start with and what is the complete list of patches to
apply?)

Thanks,

Carl

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to