1 (***********************************************************************)
5 (* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
7 (* Copyright 1996 Institut National de Recherche en Informatique et *)
8 (* en Automatique. All rights reserved. This file is distributed *)
9 (* under the terms of the Q Public License version 1.0. *)
11 (***********************************************************************)
15 (function "square" (x: float)
18 (function "integr" (f: addr low: float high: float n: int)
19 (let (h (/f (-f high low) (floatofint n))
24 (assign s (+f s (app f x float)))
29 (function "test" (n: int)
30 (app "integr" "square" 0.0 1.0 n float))