summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/rangen/examples/randomR.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/rangen/examples/randomR.tex
Initial commit
Diffstat (limited to 'macros/latex/contrib/rangen/examples/randomR.tex')
-rw-r--r--macros/latex/contrib/rangen/examples/randomR.tex44
1 files changed, 44 insertions, 0 deletions
diff --git a/macros/latex/contrib/rangen/examples/randomR.tex b/macros/latex/contrib/rangen/examples/randomR.tex
new file mode 100644
index 0000000000..69f2f2ba1a
--- /dev/null
+++ b/macros/latex/contrib/rangen/examples/randomR.tex
@@ -0,0 +1,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}