Skip to content

Commit

Permalink
fixup! rrd: output json numbers more consistently
Browse files Browse the repository at this point in the history
Change formatting string for floats to not lose precision on small
values
  • Loading branch information
psafont committed Jul 20, 2023
1 parent db8fa92 commit 2ee1aea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rrd_utils.ml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ let rec setify = function
let f_to_s f =
match classify_float f with
| FP_normal | FP_subnormal ->
Printf.sprintf "%0.4f" f
Printf.sprintf "%0.4g" f
| FP_nan ->
"NaN"
| FP_infinite ->
Expand Down

0 comments on commit 2ee1aea

Please sign in to comment.