

let add (a : real) (b : real) : real =
  (* Add two numbers. *)
  a +. b

let subtract (a : real) (b : real) : real =
  (* Subtract b from a. *)
  a -. b

let multiply (a : real) (b : real) : real =
  (* Multiply two numbers. *)
  a *. b

let is_positive (x : real) : bool =
  (* Check if number is positive. *)
  x >. 0.0

let absolute (x : real) : real =
  (* Return absolute value. *)
  if x >=. 0.0 then x else ~-.x
