summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/dvips
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2021-04-07 14:58:54 +0000
committerNorbert Preining <preining@logic.at>2021-04-07 14:58:54 +0000
commit3ba11f114f4ad5222bc1cd0615cbc32719e60d32 (patch)
tree5ec998edc5bf7abf3317947c1684c2ece7bf5a69 /Master/texmf-dist/dvips
parent7f9381891f4b470e0dbb31e2e0057d6f70a07ae6 (diff)
pst-func (7apr21)
git-svn-id: svn://tug.org/texlive/trunk@58786 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/dvips')
-rw-r--r--Master/texmf-dist/dvips/pst-func/pst-func.pro16
1 files changed, 14 insertions, 2 deletions
diff --git a/Master/texmf-dist/dvips/pst-func/pst-func.pro b/Master/texmf-dist/dvips/pst-func/pst-func.pro
index 1eca86df516..09252c19a36 100644
--- a/Master/texmf-dist/dvips/pst-func/pst-func.pro
+++ b/Master/texmf-dist/dvips/pst-func/pst-func.pro
@@ -366,10 +366,11 @@ tx@FuncDict begin
} def
%end{vasicek density}
%
-
+end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% subroutines for complex numbers, given as an array [a b]
% which is a+bi = Real+i Imag
+%% Global defined
%
/cxadd { % [a1 b1] [a2 b2] = [a1+a2 b1+b2]
dup 0 get % [a1 b1] [a2 b2] a2
@@ -504,4 +505,15 @@ tx@FuncDict begin
RadtoDeg dup sin exch cos cxmake2
} def
%
-end
+% cxexp z^k with k as a natural number
+/cxexp { % z k
+ 3 dict begin
+ dup 0 eq { pop pop [1 0] }{
+ /k ED
+ /z ED
+ /sol [1 0] def
+ k { sol z cxmul /sol ED } repeat
+ sol } ifelse
+ end
+} def
+%