summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-08-08 22:54:29 +0000
committerKarl Berry <karl@freefriends.org>2015-08-08 22:54:29 +0000
commit531d43fafa269c546d587eaca6cd14adcd11914f (patch)
tree1883933af984c60254e6d9d1bd955a76748cb827 /Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex
parent877e963d44f039783cb9227d90c911866c780961 (diff)
pgf (8aug15)
git-svn-id: svn://tug.org/texlive/trunk@38079 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex22
1 files changed, 22 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex b/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex
index 99f8ccbb2c0..b6ac16c8bf3 100644
--- a/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex
@@ -308,6 +308,22 @@
\endgroup%
}
+% sign(x)
+\pgfmathdeclarefunction{sign}{1}{%
+ \begingroup
+ \ifdim#1pt>0sp %
+ \def\pgfmathresult{1}%
+ \else
+ \ifdim#1pt=0sp %
+ \def\pgfmathresult{0}%
+ \else
+ \def\pgfmathresult{-1}%
+ \fi
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}
+
% e constant.
%
\pgfmathdeclarefunction{e}{0}{\def\pgfmathresult{2.718281828}}
@@ -503,6 +519,12 @@
\endgroup%
}
+% This is needed since \pgfmathlog2 and \pgfmathlog10 are not legal macro names
+\expandafter\let\expandafter\pgfmathlogtwo\csname pgfmathlog2\endcsname
+\expandafter\let\expandafter\pgfmathlogtwo@\csname pgfmathlog2@\endcsname
+\expandafter\let\expandafter\pgfmathlogten\csname pgfmathlog10\endcsname
+\expandafter\let\expandafter\pgfmathlogten@\csname pgfmathlog10@\endcsname
+
% exp function.
%
\pgfmathdeclarefunction{exp}{1}{%