log_space.ml1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25type t = float let zero = neg_infinity let one = 0.0 let mul = ( +. ) let div = ( -. ) let of_float = log let to_float = exp let unsafe_cast = Fun.id let min (x : t) (y : t) = if x < y then x else y let compare = Float.compare let equal = Float.equal let hash = Hashtbl.hash let pp fmtr l = Format.fprintf fmtr "%f [log=%f]" (to_float l) l