Skip to content

Conversation

@matthew-reynolds
Copy link

@matthew-reynolds matthew-reynolds commented Sep 11, 2025

Followup to #84 / 25bd5df.

The PRINTF_USE_DOUBLE_INTERNALLY macro can be used to select whether the library uses double or float types for internal floating-point calculations. However, there still exist a few expressions that contain uncasted floating point literals, resulting in double-typed literals and thus double-precision operations. Cast these literals to floating_point_t to remove remaining double operations when using floats internally.

Tested in an embedded environment that prohibits doubles (Except for f2d and d2f, for passing floats through the varargs).

All unit tests pass.

@eyalroz
Copy link
Owner

eyalroz commented Sep 11, 2025

Mathew, please reform this PR to be against the development, rather than the master, branch... changes go on that branch. I will then gladly review it.

@matthew-reynolds matthew-reynolds changed the base branch from master to develop September 11, 2025 19:50
@matthew-reynolds
Copy link
Author

@eyalroz thanks - Rebased against develop

@eyalroz eyalroz merged commit d39b7ef into eyalroz:develop Sep 11, 2025
1 of 2 checks passed
@eyalroz
Copy link
Owner

eyalroz commented Sep 11, 2025

Oh, I see, how careless of me, I forgot to cast the literals. Thanks for noticing.

@eyalroz
Copy link
Owner

eyalroz commented Sep 11, 2025

Please poke me in a couple of weeks or so - maybe it's time I made another release.

@eyalroz eyalroz added bug Something isn't working resolved-on-develop A changeset fixing this issue has been commiutted to the development branch labels Sep 11, 2025
@eyalroz
Copy link
Owner

eyalroz commented Oct 11, 2025

v6.3.0 has been released with the fix integrated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working resolved-on-develop A changeset fixing this issue has been commiutted to the development branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants