summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-09-30 22:53:50 +0000
committerKarl Berry <karl@freefriends.org>2010-09-30 22:53:50 +0000
commit70f4dde5113ebf40e4ea4009f40cb2b77a5598a8 (patch)
treeb525b8e681f3bfce9772e0aed680de67e13cf382
parentc10f8829c217b6699fdd00dae7735deeece7a560 (diff)
pst-math (30sep10)
git-svn-id: svn://tug.org/texlive/trunk@19962 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/generic/pst-math/Changes2
-rw-r--r--Master/texmf-dist/doc/generic/pst-math/pst-math-doc.pdfbin200233 -> 203214 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-math/pst-math-doc.tex25
-rw-r--r--Master/texmf-dist/dvips/pst-math/pst-math.pro46
-rw-r--r--Master/texmf-dist/tex/latex/pst-math/pst-math.sty2
5 files changed, 71 insertions, 4 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-math/Changes b/Master/texmf-dist/doc/generic/pst-math/Changes
index 93d7aa9ccd8..7d5d5be346a 100644
--- a/Master/texmf-dist/doc/generic/pst-math/Changes
+++ b/Master/texmf-dist/doc/generic/pst-math/Changes
@@ -1,4 +1,6 @@
..... pst-math.pro
+0.6 2010-09-29 - added the inverse normal function
+ - added the vasicek density function
0.5 2009-08-27 modified SINC function (Patrice Megret)
0.4 2009-05-11 added SystemEqnSolver
0.3 2009-01-20 added SIMPSON for numeric integration (dr/hv)
diff --git a/Master/texmf-dist/doc/generic/pst-math/pst-math-doc.pdf b/Master/texmf-dist/doc/generic/pst-math/pst-math-doc.pdf
index ed0ec9d7c3a..130e4c40218 100644
--- a/Master/texmf-dist/doc/generic/pst-math/pst-math-doc.pdf
+++ b/Master/texmf-dist/doc/generic/pst-math/pst-math-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-math/pst-math-doc.tex b/Master/texmf-dist/doc/generic/pst-math/pst-math-doc.tex
index 0379372b272..0b84fbba47b 100644
--- a/Master/texmf-dist/doc/generic/pst-math/pst-math-doc.tex
+++ b/Master/texmf-dist/doc/generic/pst-math/pst-math-doc.tex
@@ -295,7 +295,8 @@ num & \Lps{GAMMALN} & real & Return \Index{logarithm} of $\Gamma$ function of \t
\begin{center}
\begin{tabular}{@{} >{\sffamily}l l >{\sffamily}l l @{} }
\emph{Stack} & \emph{Operator} & \emph{Result} & \emph{Description} \\\hline
-num num /var $\lbrace$ function $\rbrace$ num & \Lps{SIMPSON} & real & Return $\displaystyle\int\limits_a^b f(t)\mathrm{d}t$
+num num /var $\lbrace$ function $\rbrace$ num & \Lps{SIMPSON} & real & Return $\displaystyle\int\limits_a^b f(t)\mathrm{d}t$\\
+num
\end{tabular}
\end{center}
@@ -449,6 +450,28 @@ nested.
\end{LTXexample}
+\section{Numerical functions}
+
+\begin{center}
+\begin{tabular}{@{} >{\sffamily}l l >{\sffamily}l l @{} }
+\emph{Stack} & \emph{Operator} & \emph{Result} & \emph{Description} \\\hline
+num & \Lps{norminv} & real & Return $\mathop{norminv}(num)$\\
+num & \Lps{vasicek} & real & Return $\mathop{vasicek}(num)$
+\end{tabular}
+\end{center}
+
+
+\begin{LTXexample}[width=5cm,wide=false]
+\psset{xunit=5}
+\begin{pspicture}(0,-3)(1,4)
+\psaxes{->}(0,0)(0,-3)(1,4)
+\psplot[plotpoints=200,algebraic,linecolor=red]{0}{0.9999}{norminv(x)}
+\psplot[plotpoints=200,algebraic,linecolor=blue]{0}{0.9999}{vasicek(x)}
+\end{pspicture}
+\end{LTXexample}
+
+
+These functions return the inverse normal and the vasicek density.
\bgroup
\raggedright
diff --git a/Master/texmf-dist/dvips/pst-math/pst-math.pro b/Master/texmf-dist/dvips/pst-math/pst-math.pro
index e2570773379..ae1b1db1436 100644
--- a/Master/texmf-dist/dvips/pst-math/pst-math.pro
+++ b/Master/texmf-dist/dvips/pst-math/pst-math.pro
@@ -4,8 +4,8 @@
% Author : Christophe JORSSEN
% Author : Herbert Voß <hvoss@tug.org>
% Created the : Sat 20 March 2004
-% Last Mod : $Date: 2009/08/27 $
-% Version : 0.5 $
+% Last Mod : $Date: 2010/09/29 $
+% Version : 0.6 $
%
/PI 3.14159265359 def
/ENeperian 2.71828182846 def
@@ -224,5 +224,47 @@ end
end
} def
%
+/c@_0 2.515517 def
+/c@_1 0.802853 def
+/c@_2 0.010328 def
+/d@_1 1.432788 def
+/d@_2 0.189269 def
+/d@_3 0.001308 def
+/norminv {
+ 5 dict begin
+ neg 1 add 1 exch div ln 2 mul sqrt
+ /t exch def
+ /t2 t dup mul def
+ /t3 t2 t mul def
+ c@_0 c@_1 t mul add c@_2 t2 mul add 1 d@_1 t mul add
+ d@_2 t2 mul add d@_3 t3 mul add div neg t add
+ end
+} def
+%end{norminv Michael Sharpe}
+%
+/vasicek{ %density=sqrt((1-R2)/R2)*exp(1/2*(norminv(x)2 - (1/sqrt(R2)*((sqrt(1-R2)*norminv(x)-norminv(pd)))2))
+ 2 dict begin
+ /pd 0.22 def % (0,1) probability of default of portfolio
+ /R2 0.11 def % (0,1) R_Squared of portfolio
+ dup % x x
+ norminv % x norminv(x)
+ dup mul % x norminv(x)^2
+ exch % norminv(x)2 x
+ norminv % norminv(x)2 norminv(x)
+ 1 R2 sub sqrt mul % norminv(x)2 sqrt(1-R2)*norminv(x)
+ pd norminv sub % norminv(x)2 sqrt(1-R2)*norminv(x)-norminv(pd)
+ R2 sqrt div % norminv(x)2 1/sqrt(R2)*(sqrt(1-R2)*norminv(x)-norminv(pd))
+ dup mul % norminv(x)2 (1/sqrt(R2)*(sqrt(1-R2)*norminv(x)-norminv(pd)))2
+ sub % norminv(x)2 -(1/sqrt(R2)*(sqrt(1-R2)*norminv(x)-norminv(pd)))2
+ 2 div % 1/2*(norminv(x)2 -(1/sqrt(R2)*(sqrt(1-R2)*norminv(x)-norminv(pd)))2)
+ ENeperian exch exp % exp(1/2*(norminv(x)2 -(1/sqrt(R2)*(sqrt(1-R2)*norminv(x)-norminv(pd)))2)
+ 1 R2 sub % exp(1/2*(norminv(x)2 -(1/sqrt(R2)*(sqrt(1-R2)*norminv(x)-norminv(pd)))2) 1-R2
+ R2 div % exp(1/2*(norminv(x)2 -(1/sqrt(R2)*(sqrt(1-R2)*norminv(x)-norminv(pd)))2) (1-R2)/R2
+ sqrt % exp(1/2*(norminv(x)2 -(1/sqrt(R2)*(sqrt(1-R2)*norminv(x)-norminv(pd)))2) sqrt((1-R2)/R2)
+ mul % sqrt((1-R2)/R2)*exp(1/2*(norminv(x)2 - (1/sqrt(R2)*((sqrt(1-R2)*norminv(x)-norminv(pd)))2))
+ end
+} def
+%end{vasicek density}
+%
%
% END pst-math.pro
diff --git a/Master/texmf-dist/tex/latex/pst-math/pst-math.sty b/Master/texmf-dist/tex/latex/pst-math/pst-math.sty
index 8da9f0018b8..9486fb72a3c 100644
--- a/Master/texmf-dist/tex/latex/pst-math/pst-math.sty
+++ b/Master/texmf-dist/tex/latex/pst-math/pst-math.sty
@@ -4,6 +4,6 @@
[\filedate\space v\fileversion\space `PST-math' (hv)]
\IfFileExists{pst-math.pro}{%
\ProvidesFile{pst-math.pro}
- [2009/08/27 v. 0.5, PostScript prologue file (hv)]
+ [2010/09/29 v. 0.6, PostScript prologue file (hv)]
\@addtofilelist{pst-math.pro}}{}%
\endinput