Skip to content

Conversation

LarsTimm
Copy link

Backported ARMmbed#14179 to fix printing floats.
3.3 would be printed as 3.03, as would 3.4 as the integer value was printed after the decimal point also.

Even with this fix there where another corner case.
0.9976 would be printed as 0.100 as 99 was rounded up without overflowing to the integer value.
With this change 0.9976 is printed as 0.99 (Overflow to integer quite complex...)

Copy link

@jeppefrandsen jeppefrandsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

Copy link
Collaborator

@hansbinderup hansbinderup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

@LarsTimm LarsTimm merged commit de5b003 into mbed-os-6.7.0-patched Mar 17, 2021
@LarsTimm LarsTimm deleted the minimal_printf_fix_float branch March 17, 2021 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants