summaryrefslogtreecommitdiff
path: root/texmf-dist/doc/latex/rangen/randomR.tex
blob: 69f2f2ba1a5cdd619554bbcd01c5ccb4cbc18868 (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
44
\documentclass{article}
\usepackage[tight,designv]{web}
\usepackage{insdljs}
\usepackage[testmode,quiet]{rangen}

\parindent0pt\parskip6pt

\begin{document}

\RandomR{\a}{-2.3}{2.3}\a

\RandomL{\a}{17,\rPI,3/4,\rE,88,1/2}

Choose at random a number from the list \verb!{17,\rPI,3/4,\rE,88,1/2}!:
The choice is $\texttt{\a}$

\rule{\linewidth}{.4pt}


\defineR{\a}{-4.5}\defineR{\b}{5.343}

\RandomR[round=2,showzeros]{\c}{\a}{\b}

Random Real from the interval \texttt{[\a, \b ]} is \texttt{\c}

\RandomR[round=2]{\a}{0}{10}\RandomR[round=2]{\b}{0}{12}

\RandomR[round=2]{\c}{\a}{\b}

A random Real taken from a random interval \texttt{[\a, \b ]} is \texttt{\c}


\rule{\linewidth}{.4pt}


\RandomR[round=2,showzeros]{\b}{0}{9.5}
\RandomR[round=2]{\a}{-3}{\b}

We require \verb!\b! to be greater than \texttt{\string\a}:
$ \texttt{\string\b=\b} > \texttt{\a=\string\a} $

$\texttt{\string\a}=\a\approx\nOf{\a}/\dOf{\a}$

\end{document}