summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/dvips/pst-math
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-09-03 16:35:02 +0000
committerKarl Berry <karl@freefriends.org>2007-09-03 16:35:02 +0000
commitb1a25756ae4b472c485026140eb0faea23b9ae19 (patch)
tree9eea720f231ff4b63537556963bd505ddf62faad /Master/texmf-dist/dvips/pst-math
parent8e1addeb313836534d067bb5f1818d0b9a5c1dd7 (diff)
pst-math update (1sep07)
git-svn-id: svn://tug.org/texlive/trunk@4855 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/dvips/pst-math')
-rw-r--r--Master/texmf-dist/dvips/pst-math/pst-math.pro21
1 files changed, 19 insertions, 2 deletions
diff --git a/Master/texmf-dist/dvips/pst-math/pst-math.pro b/Master/texmf-dist/dvips/pst-math/pst-math.pro
index 1dd5efc7769..6b3e790aecb 100644
--- a/Master/texmf-dist/dvips/pst-math/pst-math.pro
+++ b/Master/texmf-dist/dvips/pst-math/pst-math.pro
@@ -6,7 +6,7 @@
% ('libre' is the french word for 'free' if you want to contact me ;-))
% Created the : Sat 20 March 2004
% Last Mod : $Date: 2004/05/08 13:40:15 $
-% Version : 1.0 $Revision: 1.1 $
+% Version : 1.1 $
%
/PI 3.14159265359 def
/ENeperian 2.71828182846 def
@@ -37,13 +37,30 @@
/GAUSS {dup mul 2 mul dup 4 -2 roll sub dup mul exch div neg EXP exch PI mul sqrt div} bind def
+/GAMMA { 2 dict begin % hv 2007-08-30
+ /z exch def
+ 1.000000000190015 % p(0)
+ 0 1 5 { % on stack is 0 1 2 3 4 5
+ dup % n-1 n-1
+ [ 76.18009172947146
+ -86.50532032941677
+ 24.0140982483091
+ -1.231739572450155
+ 0.1208650973866179E-2
+ -0.5395239384953E-5 ] exch get exch % p(n) n-1
+ 1 add z add div % p(n)/(z+n)
+ add % build the sum
+ } for
+ Pi 2 mul sqrt z div mul
+ z 5.5 add z 0.5 add exp mul Euler z 5.5 add neg exp mul
+ end } bind def
+
/GAMMALN {dup dup dup 5.5 add dup ln 3 -1 roll .5 add mul sub neg 1.000000000190015
0 1 5 {
[76.18009172947146 -86.50532032941677 24.0140982483091 -1.231739572450155
.1208650973866179E-2 -.5395239384953E-5 2.5066282746310005] exch get
4 -1 roll 1 add dup 5 1 roll div add} for
4 -1 roll div 2.5066282746310005 mul ln add exch pop} bind def
-
/BETA {2 copy add GAMMALN neg exch GAMMALN 3 -1 roll GAMMALN EXP} bind def
/HORNER {aload length