mpaland/printf

On 16-bit-integer platforms, we overflow the integer part of 32-bit float's

eyalroz opened this issue · 0 comments

This issue is reported in Stuart Gorman's PR #77 :

We currently use a native int to store the integral part of a floating-point value to be printed in regular notation. This only works if the PRINTF_MAX_FLOAT value - at which we switch to scientific notation, is small enough to fit in a native int. Well, 1e9, the current default, is too big when the native integer type is 16 bit wide.

The cutoff point must fit inside the type we use to store the value.