if (abs_float r) > ((abs_float f2) /. 2.) then
(if r *. f2 > 0. then (r -. f2) else (r +. f2))
else r;;
+
+let format_of_file : string -> string =
+ fun (path : string) ->
+ let fragments = Str.split (Str.regexp "\.") path in
+ let n = List.length fragments in
+ List.nth fragments (n - 1);;