diff options
Diffstat (limited to 'Master/texmf-dist/dvips/pst-func/pst-func.pro')
-rw-r--r-- | Master/texmf-dist/dvips/pst-func/pst-func.pro | 39 |
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 |