From 53fa86c1a99996fb63aa77b0c01079910dd56bca Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 29 Oct 2021 21:31:33 +0000 Subject: pst-func (29oct21) git-svn-id: svn://tug.org/texlive/trunk@60889 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/dvips/pst-func/pst-func.pro | 39 +++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) (limited to 'Master/texmf-dist/dvips') 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 -- cgit v1.2.3