summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/dvips
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-10-29 21:31:33 +0000
committerKarl Berry <karl@freefriends.org>2021-10-29 21:31:33 +0000
commit53fa86c1a99996fb63aa77b0c01079910dd56bca (patch)
treef72a6d7c54b25132b7afc77101de58775c9786f3 /Master/texmf-dist/dvips
parentbb6fb9bc36cd7c1636aa9ad986a5535cc9e9a6c4 (diff)
pst-func (29oct21)
git-svn-id: svn://tug.org/texlive/trunk@60889 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/dvips')
-rw-r--r--Master/texmf-dist/dvips/pst-func/pst-func.pro39
1 files changed, 37 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 09252c19a36..f752442e87c 100644
--- a/Master/texmf-dist/dvips/pst-func/pst-func.pro
+++ b/Master/texmf-dist/dvips/pst-func/pst-func.pro
@@ -316,7 +316,8 @@ tx@FuncDict begin
end
} def
%
-/ChebyshevT { 5 dict begin % z on stack
+/ChebyshevT {
+ 5 dict begin % z on stack
/xtmp exch def
/n exch def
0 0 1 n .5 mul floor {
@@ -329,7 +330,8 @@ tx@FuncDict begin
end
} def
%
-/ChebyshevU {5 dict begin % z on stack
+/ChebyshevU {
+ 5 dict begin % z on stack
/xtmp exch def
/n exch def
0 0 1 n .5 mul floor {
@@ -367,6 +369,39 @@ tx@FuncDict begin
%end{vasicek density}
%
end
+%
+/arraySum { % on stack the array
+ 5 dict begin
+ dup length 0 eq
+ {}
+ { /xArray exch def
+ /xSum 0 def
+ /i 0 def
+ xArray length {
+ /xSum xSum xArray i get add def
+ /i i 1 add def
+ } repeat
+ } ifelse
+ xSum
+ end
+} def
+%
+/arrayProd { % on stack the array
+ 5 dict begin
+ dup length 0 eq
+ {}
+ { /xArray exch def
+ /xProd 1 def
+ /i 0 def
+ xArray length {
+ /xProd xProd xArray i get mul def
+ /i i 1 add def
+ } repeat
+ } ifelse
+ xProd
+ end
+} def
+%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% subroutines for complex numbers, given as an array [a b]
% which is a+bi = Real+i Imag