/*

'http://en.wikipedia.org/wiki/Hyperbolic_function

Function sgn (Single a) as single                 'sign
  single sgn 
  iF a < 0  
     sgn= -1
  Else  
     sgn = 1
  End iF
Return sgn
End Function

Function Sec(single x) as single                    'Secant
Return 1 / Cos(x)
End Function

Function CoSec(single x) as single                  'CoSecant         
Return 1 / Sin(x)
End Function

Function CoTan(single x) as single                   'CoTangent  
Return 1 / Tan(x)
End Function

Function ArcSin(single x) as single                  'Inverse Sine
Return Atn(x / Sqr(-x*x+1)) 
End Function

Function ArcCos(single x) as single                  'Inverse Cosine
Return Atn(-x / Sqr(-x*x+1))+2*Atn(1) 
End Function

Function ArcSec(single x) as single
Return Atn(x / Sqr(x*x-1))+Sgn((x)-1)*(2* Atn(1))  'Inverse Secant
End Function

Function HSin(single x) as single                    'Hyperbolic Sine
Return (Exp(x)-Exp(-x)) /2
End Function

Function HCos(single x) as single                    'Hyperbolic Cosine 
Return (Exp(x) + Exp(-x)) /2
End Function

Function HTan(single x) as single                    'Hyperbolic Tangent
Return (Exp(x)-Exp(-x)) / (Exp(x)+Exp(-x))
End Functionv
*/

def ArcTan atan
def Arctn atn
def ArcSin asin
def ArcCos acos

deff Secant
fcos : fld1 : fdivrp st1
end deff

deff Cosecant
fsin : fld1 : fdivrp st1
end deff

deff Cotan
fptan : fld1 : fdivrp st1
end deff

deff ArcCotan
fld1 : fdivrp st1
fpatan
end deff

deff ArcSecant
fld1 : fdivrp st1
fld st0 : fmul st0 : fld1 : fsubp st1,st0 : fchs : fsqrt : fxch : fpatan
end deff

deff ArcCoSecant
fld1 : fdivrp st1
fld st0 : fmul st0 : fld1 : fsubp st1,st0 : fchs : fsqrt : fpatan
end deff



deff sgn
fldz
fcomip
fstp st0
(
  ja fwd lt
  jb fwd gt
  fldz : exit
  .gt
  fld1 : exit
  .lt
  fld1 : fchs
)
end deff


jmp fwd nex
.exp_
sub esp,16 : fstcw [esp] : fstcw [esp+2] : or [esp],0xc00 : fldcw [esp]
fldl2e : fmulp st1 : fld st0 : frndint : fsub st1,st0
fxch : f2xm1 : fld1 : faddp st1 : fscale : fstp st1
fldcw [esp+2] : add esp,16
ret
.nex

deff sinh
'(Exp(x) - Exp(-x)) /2 'Hyperbolic Sine
fld st0
call exp_
fxch st1
fchs
call exp_
fld st1
fsub st1
fld1
fadd st0
fdivp st1
fxch st2
fstp st0
fstp st0
end deff



deff cosh
'(Exp(x) + Exp(-x)) /2 'Hyperbolic Cosine
fld st0
call exp_
fxch st1
fchs
call exp_
fld st1
fadd st1
fld1
fadd st0
fdivp st1
fxch st2
fstp st0
fstp st0
end deff


deff tanh
'(Exp(x)-Exp(-x)) / (Exp(x)+Exp(-x)) 'Hyperbolic Tan
fld st0
call exp_
fxch st1
fchs
call exp_
fld st1
fsub st1
fld st2
fadd st2
fdivp st1
fxch st2
fstp st0
fstp st0
end deff

print 4*arccosecant (1.414)