summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/dvips
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-04-03 21:32:32 +0000
committerKarl Berry <karl@freefriends.org>2023-04-03 21:32:32 +0000
commitf587320cb4c3114a76584fc12b89cdba7c1db07c (patch)
tree3b137781b5ff9282162fa89ca6647893010b5728 /Master/texmf-dist/dvips
parentf7e460629cd4ad5b5633111ebcfe71c4d9dfa545 (diff)
pst-func (3apr23)
git-svn-id: svn://tug.org/texlive/trunk@66750 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/dvips')
-rw-r--r--Master/texmf-dist/dvips/pst-func/pst-func.pro55
1 files changed, 38 insertions, 17 deletions
diff --git a/Master/texmf-dist/dvips/pst-func/pst-func.pro b/Master/texmf-dist/dvips/pst-func/pst-func.pro
index f752442e87c..a0a58d9e921 100644
--- a/Master/texmf-dist/dvips/pst-func/pst-func.pro
+++ b/Master/texmf-dist/dvips/pst-func/pst-func.pro
@@ -1,4 +1,4 @@
-%% $Id: pst-func.pro 861 2018-12-13 20:40:06Z herbert $
+%% $Id: pst-func.pro 689 2023-04-03 06:46:27Z herbert $
%%
%% This is file `pst-func.pro',
%%
@@ -16,7 +16,7 @@
%% `pst-func' is a PSTricks package to plot special math functions
%%
%%
-%% version 0.17 / 2018-12-13 Herbert Voss
+%% version 0.19 / 2023-04-02 Herbert Voss
%
/tx@FuncDict 100 dict def
tx@FuncDict begin
@@ -289,13 +289,13 @@ tx@FuncDict begin
/s1 0 def
/s2 0 def
1 1 M {
- /k exch def
- /xVal k 2 mul 1 sub h mul a add def
+ /simp_k exch def
+ /xVal simp_k 2 mul 1 sub h mul a add def
/s1 s1 xVal useX { /x exch def } if SFunc add def
} for
1 1 M 1 sub {
- /k exch def
- /xVal k 2 mul h mul a add def
+ /simp_k exch def
+ /xVal simp_k 2 mul h mul a add def
/s2 s2 xVal useX { /x exch def } if SFunc add def
} for
/I a useX { /x exch def } if SFunc b useX { /x exch def } if SFunc add s1 4 mul add s2 2 mul add 3 div h mul def
@@ -305,12 +305,12 @@ tx@FuncDict begin
/LogGamma { 5 dict begin % z on stack
/z ED
/sum 0 def
- /k 1 def
+ /logGamma_k 1 def
{
- z k div dup 1 add ln sub dup
+ z logGamma_k div dup 1 add ln sub dup
abs eps8 lt { pop exit } if
sum add /sum exch def
- /k k 1 add def
+ /logGamma_k logGamma_k 1 add def
} loop
sum z ln sub CEuler z mul sub
end
@@ -321,10 +321,10 @@ tx@FuncDict begin
/xtmp exch def
/n exch def
0 0 1 n .5 mul floor {
- /k exch def
- xtmp xtmp mul 1 sub k exp
- xtmp n 2 k mul sub exp mul
- n 2 k mul MoverN mul
+ /cheb_k exch def
+ xtmp xtmp mul 1 sub cheb_k exp
+ xtmp n 2 cheb_k mul sub exp mul
+ n 2 cheb_k mul MoverN mul
add
} for
end
@@ -335,10 +335,10 @@ tx@FuncDict begin
/xtmp exch def
/n exch def
0 0 1 n .5 mul floor {
- /k exch def
- xtmp xtmp mul 1 sub k exp
- xtmp n 2 k mul sub exp mul
- n 1 add 2 k mul 1 add MoverN mul
+ /cheb_k exch def
+ xtmp xtmp mul 1 sub cheb_k exp
+ xtmp n 2 cheb_k mul sub exp mul
+ n 1 add 2 cheb_k mul 1 add MoverN mul
add
} for
end
@@ -368,6 +368,27 @@ tx@FuncDict begin
} def
%end{vasicek density}
%
+% https://mathworld.wolfram.com/ConfluentHypergeometricFunctionoftheFirstKind.html
+/ConfHyperFunc { % Confluent Hypergeometric Funtion of the First Kind
+ % on stack must be a b z
+ 10 dict begin
+ /z ED /b ED /a ED
+ /sum 1 def
+ /k 0 def
+ /nom 1 def
+ /denom 1 def
+ {
+ nom a k add mul z mul /nom ED
+ denom b k add mul k 1 add mul /denom ED
+ nom denom div /diff ED
+ sum diff add /sum ED
+ diff 1e-5 lt { exit } { k 1 add /k ED } ifelse
+ k 1000 ge { (Error ConfHyperFunc: k =1000) == exit } if
+ } loop
+ sum
+ end
+} def
+%
end
%
/arraySum { % on stack the array