From a7d7542dc646a5fd124ef71e71ce260889f1701b Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Tue, 2 Feb 2016 19:24:50 +0100 Subject: Moved to 1415 directory --- 1415/files/practicum/EllipsOmtrek.icl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 1415/files/practicum/EllipsOmtrek.icl (limited to '1415/files/practicum/EllipsOmtrek.icl') diff --git a/1415/files/practicum/EllipsOmtrek.icl b/1415/files/practicum/EllipsOmtrek.icl new file mode 100644 index 0000000..66f04ac --- /dev/null +++ b/1415/files/practicum/EllipsOmtrek.icl @@ -0,0 +1,16 @@ +implementation module EllipsOmtrek + +import StdEnv + +Start = ( perimeter pr (4.0,3.0) // approximated perimeter of ellipse with radii 4.0 and 3.0 + , perimeter pr (4.0,4.0) // approximated perimeter of circle with radius 4.0 + , 2.0 * pi * 4.0 // perimeter of circle with radius 4.0 + ) +where pr = 0.0001 + +/* perimeter precision (r1,r2) approximates the perimeter of an ellipse with radii r1 and r2 given + the requested precision. + All arguments must be positive Reals. +*/ +perimeter :: Real (Real,Real) -> Real +perimeter precision (r1,r2) ... -- cgit v1.2.3