[@@@import Basic, "basic.iml"]
[@@@import Math_ops, "math_ops.iml"]


let sum_three (a : real) (b : real) (c : real) : real =
  (* Add three numbers. *)
  Basic.add (Basic.add a b) c

let max_of_three (a : real) (b : real) (c : real) : real =
  (* Find maximum of three numbers. *)
  if a >=. b && a >=. c then
    a
  else if b >=. c then
    b
  else
    c

let circle_area (radius : real) : real =
  (* Calculate area of circle. *)
  let pi = 3.14159 in
  Basic.multiply pi (Math_ops.square radius)

let is_even (n : int) : bool =
  (* Check if integer is even. *)
  n mod 2 = 0
