Open
Conversation
Collaborator
|
It's a bit difficult to figure out what change regards what issue. And - the commits don't really correspond to the issues, and involve adding and removing code that eventually isn't used. I'd try to clean up the commit history, and quite possibly break up the PR into several smaller PRs (or even - incremental ones). |
KarlK90
pushed a commit
to qmk/printf
that referenced
this pull request
Jul 7, 2022
…` as a default upper bound on buffer sizes, due to the `int` return type of printf()-family functions). Thanks goes to Phillip Johnston <phillip@embeddedartistry.com>.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
I'm very impressed with your printf implementation .. I've been using it on an embedded project with a great improvement in memory usage.
However, I've recently just added eLua to the project and it uses "%.14g" as it's printed number representation and I noticed that there were quite a few issues with %g and %e support, as well as the 9 digit precision limitation.
Anyway, I've forked it and created a few enhancements to the overall float support, the main changes are:
It passes all the tests apart from two ... one that you have wrong (%0-15.3g) which actually shouldn't have any digits after the decimal place, and the one that checks for 9 digits of precision, since there is now 18.
I've run the tests on a 32bit and 64bit system and the behaviour is the same.
It should be similar in terms of memory consumption and performance, but I haven't run any detailed tests yet.
I do still need to fully replace the out_rev function with out_rev2, I'll work on that next, but thought it would be useful to create a pull request.
Hope this is useful -- very happy to receive any feedback you might have!
Lee.