%%%%%%%%%%% constantes mathematiques %%%%%%%%%%%%%%
/pi 3.14159 def
/e 2.71828 def
%%%%%%%%%%% fonctions mathematiques %%%%%%%%%%%%%%%
/rd {180 pi div mul} def %% transforme des rd en degres
/deg {pi mul 180 div} def %% transforme des degres en rd
/log {ln 10 ln div} def
/Exp {e exch exp} def
/Cos {rd cos} def
/Sin {rd sin} def
/tan {dup sin exch cos div} def
/cotan {dup cos exch sin div} def
/Tan {dup Sin exch Cos div} def
/Cotan {dup Cos exch Sin div} def
/coTan {Cotan} def
/arctan {
dup 0 ge
{1 atan}
{neg 1 atan neg}
ifelse
} def
/Arctan {arctan deg} def
/arccos {
dup
dup mul neg 1 add sqrt
exch
atan
} def
/Arccos {arccos deg} def
/arcsin {
dup 1 eq {
90
} {
dup
dup mul neg 1 add sqrt
atan
dup 90 lt
{}
{360 sub}
ifelse
} ifelse
} def
/Arcsin {arcsin deg} def
/cosh {dup Exp exch neg Exp add 2 div} def
/sinh {dup Exp exch neg Exp sub 2 div} def
/tanh {dup sinh exch cosh div} def
/cotanh {dup cosh exch sinh div} def
/argcosh {dup dup mul 1 sub sqrt add ln} def
/argsinh {dup dup mul 1 add sqrt add ln} def
/argtanh {
setxvar
x 1 add
1 x sub
div
ln
2 div
} def
/factorielle {
dup 0 eq
{pop 1}
{dup 1 sub factorielle mul}
ifelse
} def
/Gauss {
3 dict begin
/sigma exch def
/m exch def
/x exch def
x m sub dup mul sigma dup mul 2 mul div neg Exp
2 pi mul sigma dup mul mul sqrt div
end
} def
%% syntaxe : a n modulo
/modulo {
2 dict begin
/n exch def
/a exch def
{
a 0 lt {
/a a n add store
} {
exit
} ifelse
} loop
a n mod
end
} def
%%%%%%%%%%%%%% les axes et l'origine du repere %%%%%%%%%%%%%%%%
/Oy 0 def
/Ox 0 def
/O {Ox Oy} def
/OX {xmin Oy xmax Oy} def
/OY {Ox ymin Ox ymax} def
/sysexp {systemdict /exp get exec} def
/exp {
2 dict begin
/n exch def
/x exch def
x 0 eq n 0 eq and {
1
} {
x n sysexp
} ifelse
end
} def
|