On 22/06/15 02:26, Pádraig Brady wrote:
> Due to existing limits this is usually triggered
> with an increased precision. We also add further
> restrictions to the output of increased precision numbers.
>
> * src/numfmt.c (simple_round): Avoid intmax_t overflow.
> (simple_strtod_int): Count digits consistently
> for precision loss and overflow detection.
> (prepare_padded_number): Include the precision
> when excluding numbers to output, since the precision
> determines the ultimate values used in the rounding scheme
> in double_to_human().
> * tests/misc/numfmt.pl: Add previously failing test cases.
> * NEWS: Mention the fix.
Related to more portable precision handling,
I's squash this in:
-enum { MAX_UNSCALED_DIGITS = 18 };
+enum { MAX_UNSCALED_DIGITS = LDBL_DIG };
cheers,
Pádraig.