DEFINITION MODULE LongMathLib0;

VAR Pi, E : LONGREAL;

PROCEDURE Entier(x : LONGREAL) : LONGINT;

PROCEDURE LongReal(x : LONGINT) : LONGREAL;

PROCEDURE Ln  (A : LONGREAL) : LONGREAL;

PROCEDURE Exp (A : LONGREAL) : LONGREAL;

PROCEDURE Sqrt(A : LONGREAL) : LONGREAL;

PROCEDURE Sin (A : LONGREAL) : LONGREAL;

PROCEDURE Cos (A : LONGREAL) : LONGREAL;

PROCEDURE Tan (A : LONGREAL) : LONGREAL;

PROCEDURE Arctan(A : LONGREAL) : LONGREAL;

PROCEDURE Arctan2 (A,B : LONGREAL) : LONGREAL;

(* Arctan2 returns the angle (in radians) with tangent A/B
   Arctan2(A,B)=Arctan(A/B)

   Also, Arctan2 returns a value in the range 0 to 2*pi 
   Whereas Arctan returns the value in the range -pi/2..pi/2

   This means that Arctan2 can be used directly for rectangular
   to polar co-ordinates. In addition, Arctan2 works when B=0.0 *)

END LongMathLib0.

