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.