-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
printf %g sometimes unnecessarily adds trailing space #14331
Comments
Thanks for the report; I'll check it out this weekend if no one has already. |
If it's alright, I'm working on code coverage for printf.jl and have gotten pretty familiar with the printf code lately, I could take it. I actually noticed this bug as well and was going to check if it was supposed to do that the next time I worked on it. |
Thanks both for testing this and working on it. |
@mason-bially Go for it! Be warned, the |
So I found the problem, but...
Also, ok, can we talk about this module?
|
…t implementation and usage.
|
Sure I can do that. I think they are all the same bug, I'll even fix them (I'm still in the middle of improving code coverage for this module. But I'll also create a new topic for the printf.jl thing.
I would say in general it seems problematic but that's me. |
…t implementation and usage.
The global array thing is definitely not workable with threads impending (was not a concern in Jan 2012) and moreover is just kind of ugly, but at the time I wrote that code was the only way I could get adequate performance. Printf definitely needs an overhaul as I've described elsewhere. If someone feels like taking a crack at it, that would be great. High-level advice:
|
I'll have the increased code coverage for the module this weekend, maybe add a couple perf tests. And I'd be willing to rewrite this module. However my goal in doing so is so that it can be removed from Base and stuffed in some sort "compatibility for c" utility library in the future. Currently that's impossible because of it's dependencies. And failing that, at least it won't be a pain to look at. |
Fixing original issue #14331 by cleaning up print_fixed_point
The examples I gave above have all been fixed on 0.5 (most likely due to ddd0f05). |
The printf
%g
specifier will at times output an additional, unnecessary trailing space:CC @dfannius (#11941)
The text was updated successfully, but these errors were encountered: