let log ?base x = match base with | None -> Pervasives.log x | Some b -> (Pervasives.log x) /. (Pervasives.log b)