To see the teletype output from the 903 click here.

For a directory listing click here.

If your compilation was successful, you can go BACK to run your program.

    0: Jensen;
    1: "begin"
    2:    "comment" program to integrate f(x,y) over triangle (0,0), (1,0), (1,1);
    3:    "comment" using Jensen"s device -- David Ho;

    4:    "real" x, y;

    5:    "real" "procedure" int(a, b, x, f);
    6:    "comment" integrates f(x) over range a to b;
    7:    "value" a, b; "real" a, b, x, f;
    8:    "begin"
    9:       "real" "procedure" intint(a, b, fa, fb);
   10:       "value" a, b, fa, fb;  "real" a, b, fa, fb;
   11:       "begin"
   12:          "real" c, fc, ff;
   13:          x := c := (a + b) / 2;
   14:          fc := f;
   15:          ff := (fa + 4×fc + fb)/6;
   16:          "comment" answer is good enough if simrule no better than trapezoidal;
   17:          "if"  abs( fa + fb - ff×2 ) < 0.001
   18:          "then"
   19:             intint := ff × (b - a)
   20:          "else"
   21:             intint := 0.0;
   22:       "end";
   23:       "real" fa;
   24:       x := a;   fa := f;  x := b;
   25:       int := intint(a, b, fa, f);
   26:    "end";

   27:    "real" answer;

   28: "comment"   writetext(30, [int(0, 1, x, int(0, x, y, x×x + y×y))[c]]);
   29:    answer := int(0, 1, x, x×x);
   30: "comment"   output(30, answer);

   31: "end"

Teletype Output


 JENSEN 4574
ERROR NO     5
LINE NO     30
   ANSWER := INT(0, 1, X, X*X);
                             ^
E           ADR  101
*WARNING  
Y     

FAIL

-
-