Currently, the formatter for 0%-formatted cells (integer percentages) uses %d%%, which truncates input. This exposes floating-point errors in strange ways. Specifically, 57% is stored as 0.56999999999999995, which comes out of the formatter as 56%. Changing the format template to a 0-precision float, %.0f%%, instructs the formatter to round the input instead of truncating.
Summary
Fixes #547. Possibly related to #384?
Currently, the formatter for
0%
-formatted cells (integer percentages) uses%d%%
, which truncates input. This exposes floating-point errors in strange ways. Specifically,57%
is stored as0.56999999999999995
, which comes out of the formatter as56%
. Changing the format template to a 0-precision float,%.0f%%
, instructs the formatter to round the input instead of truncating.