Bugs item #898361, was opened at 2004-02-16 22:44
Message generated for change (Comment added) made by npstrick
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=439479&aid=898361&group_id=44411
Category: Question initialization
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Gustav W Delius (gustav_delius)
Assigned to: Nobody/Anonymous (nobody)
Summary: same random number seed for all subquestions
Initial Comment:
The random number generator appears to be using the
same random number seed for all subquestions. The
following example displays the problem.
sq>
h> a:=rand(0..9)();
t> $@a@$
a> a
esq>
sq>
h> a:=rand(0..9)();
t> $@a@$
a> a
esq>
end>
----------------------------------------------------------------------
>Comment By: Neil Strickland (npstrick)
Date: 2004-02-22 13:40
Message:
Logged In: YES
user_id=430681
This is not a bug, it is a feature. The recommendation
(explained, without sufficient prominence, in the question
syntax documentation) is that all initialisation should be
performed in the main question body, before the first sq>
tag. If you want different random numbers in parts 1 and 2,
you should do something like
h> a := rand(1..9)();
b := rand(1..9)();
before the first sq>, and then use a in part 1 and b in part 2.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=439479&aid=898361&group_id=44411
|