diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-fpu.tex')
-rw-r--r-- | Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-fpu.tex | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-fpu.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-fpu.tex index 2a46a0a2e5f..04989eef44d 100644 --- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-fpu.tex +++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-fpu.tex @@ -1,4 +1,4 @@ -% Copyright 2008 by Christian Feuersaenger +% Copyright 2019 by Christian Feuersaenger % % This file may be distributed and/or modified % @@ -147,6 +147,41 @@ by \pgfname. \meta{false-code}, depending on whether the FPU has been activated or not. \end{command} +\begin{key}{/pgf/fpu/install only=\marg{list of names}} + \label{fpu-install-only} + Unfortunately, the FPU is currently incompatible with drawing operations. + However, it can still be useful to replace single definitions with FPU + counterparts to avoid errors of the kind |Dimension too large| which tend + to happen when transformation matrices are inverted. + + This key allows to specify a list of definitions to be pulled into the + current scope. \emph{Note that there is no reverse operation to uninstall + these definitions at the moment}, so it is advisable to do this in a group. + Conveniently, \tikzname{} paths form an implicit group, so you can use this + key on a path as well. + + You have to be aware of the limitations that the FPU imposes. It will not + magically give \TeX{} better precision, but it will avoid overflow or + underflow situations for large or small operands by rescaling them. In the + following example, in the first case the FPU variant performs much better + than the normal variant, however, in the second case where a rescaling + would not in fact be needed the rescaling introduces a small round-off + error. + % +\begin{codeexample}[ + preamble={\usepgflibrary{fpu}}, + pre={\pgfkeys{/pgf/fpu=false}}, +] +\begingroup +\pgfkeys{/pgf/fpu/install only={divide}} +\pgfmathparse{12.34/0.001234}\pgfmathresult (good) +\pgfmathparse{12/4}\pgfmathresult (bad) +\endgroup +\end{codeexample} + % + \emph{This key is experimental and can change or disappear at any time!} +\end{key} + \subsection{Comparison to the fixed point arithmetics library} |