summaryrefslogtreecommitdiffstats
path: root/tests/nonRegression/bug1568.sci
blob: 4ab0089f747275528b9291534813a68f150929d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// <-- Non-regression test for bug 1568 -->
//
// <-- Bugzilla URL -->
// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1568
//
// <-- Short Description -->
//    The random number generator grand() does not always produce the same 
//    result starting from the same seed, as shown by the following 
//    transcript of a Scilab session:
//
//    $ scilab -nw
//            -------------------------------------------
//                             scilab-3.1.1
//
//                      Copyright (c) 1989-2005
//                  Consortium Scilab (INRIA, ENPC)
//            -------------------------------------------
//
//
//    Startup execution:
//      loading initial environment
//
//    -->grand('setsd',12)
//
//    -->grand(1,'prm',[1:5]')
//     ans  =
// ...

// Copyright INRIA
// Scilab Project - Pierre MARECHAL
// Copyright INRIA 2005
// Date : 21 octobre 2005

grand('setsd',12);
A = grand(1,'prm',[1:5]');
grand('setsd',12);
B = grand(1,'prm',[1:5]');

if or(A<>B) then
	affich_result(%F,1568);
else
	affich_result(%T,1568);
end