Re: [PATCH v2] lib/string_helpers: renormalize string_get_size() after rounding carry
From: Shuvam Pandey
Date: Mon Apr 20 2026 - 23:38:25 EST
Hi James,
> Well firstly I would note that the original behaviour isn't a bug.
> ...
> However, if the desire is for this only ever to print out three
> significant figures ...
> Isn't right.
Thanks, that clarifies it.
I was looking at the 1000 kB / 1024 KiB cases as a narrow formatting
issue after the rounding carry, but that is too narrow a reading. As
you point out, the current helper is not based on a strict always 3
significant figures rule, and my patch only adjusts one carry case
rather than addressing the broader behaviour.
So I agree this should not go forward as a bug fix in its current form.
I'll drop this patch here and revisit it only if I can come back with a
better understanding of the intended semantics.
Thanks,
Shuvam