Blame | Last modification | View Log | RSS feed
<p>
For example, if you want to generate a random decimal number with 2 digits after the decimal point and within the range [-10:10], you may first generate a random integer within the range [-1000:1000], then divide the result by 100. For example under OEF format, this can be done by
<pre>
\\real{r=randint(-1000..1000)/100}
</pre>
Test its result:
\def{real r=randint(-1000..1000)/100} \r [\reload{Refresh}{randdec}]
Generated by GNU Enscript 1.6.5.90.