summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/pgfplots/pgfmathlogtest.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/pgfplots/pgfmathlogtest.tex')
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/pgfmathlogtest.tex163
1 files changed, 163 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/pgfplots/pgfmathlogtest.tex b/Master/texmf-dist/doc/latex/pgfplots/pgfmathlogtest.tex
new file mode 100644
index 00000000000..5e0a4e0f4de
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pgfplots/pgfmathlogtest.tex
@@ -0,0 +1,163 @@
+\documentclass[a4paper]{article}
+
+\usepackage[intlimits]{amsmath}
+\usepackage{amssymb}
+\usepackage{amsfonts}
+\usepackage{ifpdf}
+
+\ifpdf
+\else
+\def\pgfsysdriver{pgfsys-dvipdfm.def}
+\fi
+\usepackage{pgfmathlog}
+
+
+
+\author{Christian Feuers\"anger}
+\title{Test cases for pgfmathlog.sty}
+
+\begin{document}
+\maketitle
+
+Hier evaluiere ich logarithmen.
+
+\message{HIER GEHTS LOS!}%
+\def\vgl#1#2{%
+ \begingroup
+ \message{COMPUTING LOG(#1)}%
+ \pgfmathlog{#1}%
+ \let\actual=\pgfmathresult
+ \def\expected{#2}%
+ \pgfmathsubtract\actual\expected%
+ \let\abserr=\pgfmathresult
+ \pgfmathdivide\abserr\expected
+ \let\relerr=\pgfmathresult
+ \noindent
+ log(#1)\hfill=
+ \expected;\hfill%
+ actual=\actual;\hfill%
+ abserr=\abserr;\hfill%
+ relerr=\relerr;\hfill%
+ \endgroup
+ \par
+}%
+\def\normalize#1{%
+ \begingroup
+ \message{NORMALISING #1...}%
+ \pgfmathnormalisedfloatingpoint#1\to\M\powten\E
+ \[ #1 \mapsto \M\cdot 10^{\E} \]
+ \endgroup
+}
+
+
+
+
+%--------------------------------------------------
+% \showit{2.8128}
+% log(12)=\pgfmathlog{1.2}\pgfmathadd{\pgfmathresult}{2.30258}\pgfmathresult\par
+% \showit{1.2}
+% \showit{4.0}
+% log(1200)=\pgfmathlog{1.2}\pgfmathadd{\pgfmathresult}{6.9077}\pgfmathresult\par
+% log(6.241e-7)=\pgfmathlog{6.241}\pgfmathadd{\pgfmathresult}{-16.11809}\pgfmathresult\par
+%--------------------------------------------------
+
+Referenz:
+
+\vgl{0.1}{-2.30259}
+\vgl{0.12}{-2.12026}
+\vgl{0.2}{-1.60944}
+\vgl{0.3}{-1.20397}
+\vgl{0.4}{-0.916291}
+\vgl{0.5}{-0.693147}
+\vgl{0.6}{-0.510826}
+\vgl{0.7}{-0.356675}
+\vgl{0.75}{-0.287682}
+\vgl{0.8}{-0.223144}
+\vgl{0.823}{-0.194799}
+\vgl{0.9}{-0.105361}
+\vgl{0.96}{-0.040822}
+\vgl{1.2}{0.182322}
+\vgl{1.5}{0.405465}
+\vgl{1.6}{0.470004}
+\vgl{9.0}{2.1972245773}
+\vgl{9.2}{2.2192034}
+\vgl{9.3}{2.23001440}
+\vgl{9.7}{2.27212588}
+\vgl{10.0}{2.302585092}
+\vgl{100.0}{4.605170185}
+\vgl{1351.0}{7.208600337}
+\vgl{9752.0}{9.185227671}
+\vgl{9600.0}{9.169518377}
+
+\vskip1cm
+\vgl{0.000142}{-8.8596835}
+\vgl{0.0054124}{-5.219062661}
+\vgl{0.000912697124}{-6.9991064}
+
+\vskip1cm
+\vgl{8.31160034e-02}{-2.48751801563782}%
+\vgl{2.54685628e-02}{-3.67031041875206}%
+\vgl{7.40715288e-03}{-4.90530914022879}%
+\vgl{2.10192154e-03}{-6.16490333357987}%
+\vgl{5.87352989e-04}{-7.43988457474844}%
+\vgl{1.62269942e-04}{-8.72624930084187}%
+\vgl{4.44248889e-05}{-10.0217106847708}%
+\vgl{1.20714122e-05}{-11.3246705288704}%
+\vgl{3.26101452e-06}{-12.6334722085451}%
+
+\vskip1cm
+\vgl{5}{1.6094379124341}%
+\vgl{17}{2.83321334405622}%
+\vgl{39}{3.66356164612965}%
+\vgl{49}{3.89182029811063}%
+\vgl{129}{4.85981240436167}%
+\vgl{321}{5.77144112313002}%
+\vgl{769}{6.64509096950564}%
+\vgl{1793}{7.49164547360513}%
+\vgl{4097}{8.31801027754687}%
+\vgl{9217}{9.12880488399366}%
+
+
+Umwandlung nach float:
+\normalize{123.41251}%
+\normalize{123412.51}%
+\normalize{12341251.0}%
+\tracingmacros=2\tracingcommands=2
+\normalize{-12341251.0}%
+\tracingmacros=0\tracingcommands=0
+\normalize{1.2341251}%
+\normalize{0.12341251}%
+\normalize{0.0012341251}%
+\normalize{0.00000012341251}%
+\normalize{-0.00000012341251}%
+
+\normalize{8.31160034e-02}%
+\normalize{2.54685628e-02}%
+\normalize{7.40715288e-03}%
+\normalize{2.10192154e-03}%
+\normalize{5.87352989e-04}%
+\normalize{-1.62269942e-04}%
+\normalize{4.44248889e-05}%
+\normalize{1.20714122e-05}%
+\normalize{3.26101452e-06}%
+\normalize{3261.01452e-06}%
+\normalize{0.000326101452e-06}%
+
+\message{SONDERFALL 0}%
+\normalize{0}
+\normalize{-0}
+\normalize{-1}
+\normalize{1.0e1}
+\tracingmacros=2\tracingcommands=2
+\normalize{1e1}
+\tracingmacros=0\tracingcommands=0
+\normalize{1141}
+\normalize{-53e-5}
+
+
+
+\bibliographystyle{gerabbrv} %gerapali} %gerabbrv} %gerunsrt.bst} %gerabbrv}% gerplain}
+% \bibliography{literatur.bib}
+\end{document}
+
+