MODULE MTIMEF;   (* times floating point operations *)

   FROM Terminal IMPORT
      Write, WriteLn, WriteString;

   FROM MathLib IMPORT
      sin, cos, arctan, ln, exp;

   FROM ASCII IMPORT
      bel;

   VAR
      x, y, z : REAL;
      i : CARDINAL;


   PROCEDURE Delay (x : CARDINAL);   (* variable delay, x in milliseconds *)

      VAR
         i, j : CARDINAL;

      BEGIN
         FOR i := 1 TO x DO
            FOR j := 1 TO 18 DO
            END;
         END;   
      END Delay;


BEGIN
   x := 12.5;   y := 0.5;

   WriteString ('Blank');   WriteLn;
   Delay (500);
   Write (bel);
   i := 1;
   REPEAT
      z := y;
      i := i + 1;
   UNTIL i = 10000;
   Write (bel);
   Delay (4000);

   WriteString ('Addition');   WriteLn;
   Delay (500);
   Write (bel);
   i := 1;
   REPEAT
      z := x + y;
      i := i + 1;
   UNTIL i = 10000;
   Write (bel);
   Delay (4000);

   WriteString ('Subtraction');   WriteLn;
   Delay (500);
   Write (bel);
   i := 1;
   REPEAT
      z := x - y;
      i := i + 1;
   UNTIL i = 10000;
   Write (bel);
   Delay (4000);

   WriteString ('Multiplication');   WriteLn;
   Delay (500);
   Write (bel);
   i := 1;
   REPEAT
      z := x * y;
      i := i + 1;
   UNTIL i = 10000;
   Write (bel);
   Delay (4000);

   WriteString ('Division');   WriteLn;
   Delay (500);
   Write (bel);
   i := 1;
   REPEAT
      z := x / y;
      i := i + 1;
   UNTIL i = 10000;
   Write (bel);
   Delay (4000);

   WriteString ('Sine');   WriteLn;
   Delay (500);
   Write (bel);
   i := 1;
   REPEAT
      z := sin (y);
      i := i + 1;
   UNTIL i = 1000;
   Write (bel);
   Delay (4000);

   WriteString ('Cosine');   WriteLn;
   Delay (500);
   Write (bel);
   i := 1;
   REPEAT
      z := cos (y);
      i := i + 1;
   UNTIL i = 1000;
   Write (bel);
   Delay (4000);

   WriteString ('Arctangent');   WriteLn;
   Delay (500);
   Write (bel);
   i := 1;
   REPEAT
      z := arctan (x);
      i := i + 1;
   UNTIL i = 1000;
   Write (bel);
   Delay (4000);

   WriteString ('Natural Log');   WriteLn;
   Delay (500);
   Write (bel);
   i := 1;
   REPEAT
      z := ln (x);
      i := i + 1;
   UNTIL i = 1000;
   Write (bel);
   Delay (4000);

   WriteString ('Natural Antilog');   WriteLn;
   Delay (500);
   Write (bel);
   i := 1;
   REPEAT
      z := exp (y);
      i := i + 1;
   UNTIL i = 1000;
   Write (bel);
   Delay (4000);
END MTIMEF.
