From 30e9cda301125dbde368d7bba3331bfd0f8389a1 Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Thu, 13 Jul 2017 09:26:18 +0900
Subject: add lmacs popupmenu rangen renditions richtext yt4pdf

---
 texmf-dist/doc/latex/rangen/rangen_fp.tex | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 texmf-dist/doc/latex/rangen/rangen_fp.tex

(limited to 'texmf-dist/doc/latex/rangen/rangen_fp.tex')

diff --git a/texmf-dist/doc/latex/rangen/rangen_fp.tex b/texmf-dist/doc/latex/rangen/rangen_fp.tex
new file mode 100644
index 00000000..e7e4fcff
--- /dev/null
+++ b/texmf-dist/doc/latex/rangen/rangen_fp.tex
@@ -0,0 +1,24 @@
+\documentclass{article}
+\usepackage[tight,dvipsone,designv,nodirectory]{web}
+\usepackage{insdljs}
+\usepackage[testmode,quiet]{rangen}
+\usepackage{fp}
+
+\parindent0pt\parskip6pt
+
+\begin{document}
+
+\RandomQ{\a}[6]{2}{4}\RandomQ{\b}[6]{2}{4}\RandomS{\thisop}
+\gcd{\dOf\a}{\dOf\b}
+\FPeval\lcd{clip((\dOf\a)*(\dOf\b)/\thegcd)}
+\FPeval\si{clip(\lcd/(\dOf\a))}
+\FPeval\sii{clip(\lcd/(\dOf\b))}\def\thisop{+}
+\if\thisop+\FPeval\finalnum{clip((\si)*(\nOf\a)+(\sii)*(\nOf\b))}
+\else\FPeval\finalnum{clip((\si)*(\nOf\a)-(\sii)*(\nOf\b))}\fi
+\defineQ{\ans}{\finalnum}{\lcd}
+$$
+\ds\a \thisop \ds\b = \frac{(\si)(\nOf\a)+(\sii)(\nOf\b)}{\lcd}
+    = \frac{\finalnum}{\lcd}\ifnum\lcd=\dOf\ans\else =\ds\ans\fi
+$$
+
+\end{document}
-- 
cgit v1.2.3

