<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Le 29/04/2019 à 19:03, Jens Simon Strom
      a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:bedbc996-9453-ee1c-9bd9-860d92442d6f@hslmg.de">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <p>Hallo Scilab équipe,</p>
      <p>In my application it is vital   -  in addition to the normal
        focus when using seeds -  that <i>different</i> seeds in
        rand("seed",seed) produce <i>different</i> random number
        series. (1) Is that the case?<br>
      </p>
    </blockquote>
    <p>Yes. However with "rand" you have a periodicit of 2^31 (this is
      explained in the help page).</p>
    <p>Please use "grand" instead of "rand", as grand produces sequences
      with better properties, moreover you have the choice of the basic
      generator. The default one "Mersenne-Twister" has period 2^199937.
      See the help page of grand for more details.<br>
    </p>
    <p>S.<br>
    </p>
    <blockquote type="cite"
      cite="mid:bedbc996-9453-ee1c-9bd9-860d92442d6f@hslmg.de">
      <p> </p>
      <p>I am aware that  seed has to be a non negative integer. (2) Are
        there any further restrictions?  (3) What is the upper bound?</p>
      <p>The minimal example below is as expected.</p>
      <p>Kind regards</p>
      <p>Jens<br>
      </p>
      <pre style="font-family:Monospaced;font-style:normal;font-size:20.0;"><span style="color:rgb(0,0,0);">s1</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(102,102,102);">1e3</span><span style="color:rgb(0,0,0);">; </span>
<span style="color:rgb(0,0,0);">s2</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(102,102,102);">1e10</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(50,185,185);">rand</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(255,0,0);">"</span><span style="color:rgb(255,0,0);">seed</span><span style="color:rgb(255,0,0);">"</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(0,0,0);">s1</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(0,0,0);">r1</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(50,185,185);">rand</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(102,102,102);">3</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(102,102,102);">1</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(50,185,185);">rand</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(255,0,0);">"</span><span style="color:rgb(255,0,0);">seed</span><span style="color:rgb(255,0,0);">"</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(0,0,0);">s2</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(0,0,0);">r2</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(50,185,185);">rand</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(102,102,102);">3</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(102,102,102);">1</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(0,102,102);font-style:italic;">//</span>
<span style="color:rgb(50,185,185);">rand</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(255,0,0);">"</span><span style="color:rgb(255,0,0);">seed</span><span style="color:rgb(255,0,0);">"</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(0,0,0);">s1</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(0,0,0);">r3</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(50,185,185);">rand</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(102,102,102);">3</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(102,102,102);">1</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(50,185,185);">rand</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(255,0,0);">"</span><span style="color:rgb(255,0,0);">seed</span><span style="color:rgb(255,0,0);">"</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(0,0,0);">s2</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(0,0,0);">r4</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(50,185,185);">rand</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(102,102,102);">3</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(102,102,102);">1</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(0,0,0);">r1234</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(74,85,219);">[</span><span style="color:rgb(0,0,0);">r1</span> <span style="color:rgb(0,0,0);">r2</span> <span style="color:rgb(0,0,0);">r3</span> <span style="color:rgb(0,0,0);">r4</span><span style="color:rgb(74,85,219);">]
----------------------------------------------------
</span></pre>
      <p><br>
      </p>
      <p><br>
      </p>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users">https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <p><br>
    </p>
    <pre class="moz-signature" cols="72">-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
<a class="moz-txt-link-freetext" href="http://www.utc.fr/~mottelet">http://www.utc.fr/~mottelet</a></pre>
  </body>
</html>