Commits

camlspotter committed 348c8a8

get better float printing precision

Comments (0)

Files changed (1)

     let open Format in
     function
       | String s -> fprintf ppf "%S" s
-      | Number f -> fprintf ppf "%f" f
+      | Number f -> fprintf ppf "%.20G" f
       | Object o -> 
           fprintf ppf "{ @[%a }@]"
             (format_list ";@ " (fun ppf (s,v) -> fprintf ppf "@[%s= @[<2>%a@]@]" s format v)) o