summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/dvips/pst-math
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-11-04 19:10:57 +0000
committerKarl Berry <karl@freefriends.org>2007-11-04 19:10:57 +0000
commitedf047bb79fdc9021502961e102ef79d103c6a6e (patch)
tree18fb300b4161f8f2161897575ad2864b04447453 /Master/texmf-dist/dvips/pst-math
parent54504a23e9f9492a6a6e31c58de4f6c460c5986e (diff)
pst-math update (1nov07)
git-svn-id: svn://tug.org/texlive/trunk@5333 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.pro40
1 files changed, 31 insertions, 9 deletions
diff --git a/Master/texmf-dist/dvips/pst-math/pst-math.pro b/Master/texmf-dist/dvips/pst-math/pst-math.pro
index 6b3e790aecb..333877ad284 100644
--- a/Master/texmf-dist/dvips/pst-math/pst-math.pro
+++ b/Master/texmf-dist/dvips/pst-math/pst-math.pro
@@ -5,9 +5,15 @@
% Author : Christophe JORSSEN <christophe.jorssen@libre.fr.invalid>
% ('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.1 $
+% Last Mod : Thu 01 November 2007
+% Version : 1.3
%
+/ArgumentOutOfRange {%
+ gsave /Times-Roman findfont 10 scalefont setfont 0 0 moveto
+ ([pst-math] At least one argument was out of range) show grestore} bind def
+
+/DIV { dup 0 eq { pop ArgumentOutOfRange} { div } ifelse } bind def
+
/PI 3.14159265359 def
/ENeperian 2.71828182846 def
@@ -19,21 +25,37 @@
/TAN {dup SIN exch COS Div} bind def
/tan {dup sin exch cos Div} bind def
/ATAN {neg -1 atan 180 sub DegToRad} bind def
-/ACOS {dup dup mul neg 1 add sqrt exch atan DegToRad} bind def
-/acos {dup dup mul neg 1 add sqrt exch atan} bind def
-/ASIN {neg dup dup mul neg 1 add sqrt neg atan 180 sub DegToRad} bind def
-/asin {neg dup dup mul neg 1 add sqrt neg atan 180 sub} bind def
+
+/sec {cos 1 exch Div} bind def
+/cosec {sin 1 exch Div} bind def
+/cotan {dup cos exch sin Div} bind def
+/SEC {RadToDeg sec} bind def
+/COSEC {RadToDeg cosec} bind def
+/COTAN {RadToDeg cotan} bind def
+
+/acos {dup dup -1 ge exch 1 le and
+ {dup dup mul neg 1 add sqrt exch atan}
+ {pop 0 ArgumentOutOfRange} ifelse} bind def
+/ACOS {acos DegToRad} bind def
+/asin {dup dup -1 ge exch 1 le and
+ {neg dup dup mul neg 1 add sqrt neg atan 180 sub}
+ {pop 0 ArgumentOutOfRange} ifelse} bind def
+/ASIN {asin DegToRad} bind def
/EXP {ENeperian exch exp} bind def
/COSH {dup EXP exch neg EXP add 2 div} bind def
/SINH {dup EXP exch neg EXP sub 2 div} bind def
/TANH {dup SINH exch COSH div} bind def
-/ACOSH {dup dup mul 1 sub sqrt add ln} bind def
+/ACOSH {dup 1 ge
+ {dup dup mul 1 sub sqrt add ln}
+ {pop 0 ArgumentOutOfRange} ifelse} bind def
/ASINH {dup dup mul 1 add sqrt add ln} bind def
-/ATANH {dup 1 add exch neg 1 add Div ln 2 div} bind def
+/ATANH {dup dup -1 gt exch 1 lt and
+ {dup 1 add exch neg 1 add Div ln 2 div}
+ {pop 0 ArgumentOutOfRange} ifelse} bind def
-/SINC {dup SIN exch Div} bind def
+/SINC {dup 0 eq {pop 1} {dup SIN exch Div} ifelse} bind def
/GAUSS {dup mul 2 mul dup 4 -2 roll sub dup mul exch div neg EXP exch PI mul sqrt div} bind def