Skip to content
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

Wrong @sprintf output with # flag #43129

Closed
mwlidar opened this issue Nov 18, 2021 · 10 comments · Fixed by #51254
Closed

Wrong @sprintf output with # flag #43129

mwlidar opened this issue Nov 18, 2021 · 10 comments · Fixed by #51254
Assignees
Labels
backport 1.6 Change should be backported to release-1.6 backport 1.8 Change should be backported to release-1.8 bug Indicates an unexpected problem or unintended behavior display and printing Aesthetics and correctness of printed representations of objects. forget me not PRs that one wants to make sure aren't forgotten regression Regression in behavior compared to a previous version

Comments

@mwlidar
Copy link

mwlidar commented Nov 18, 2021

julia> @sprintf("%#.3g", 100.0 - eps(100.0))
"1000"

julia> @sprintf("%#.3g", 100.0)
"100."

This is with Julia 1.6.3

@vtjnash vtjnash added backport 1.6 Change should be backported to release-1.6 backport 1.7 bug Indicates an unexpected problem or unintended behavior display and printing Aesthetics and correctness of printed representations of objects. regression Regression in behavior compared to a previous version labels Nov 19, 2021
@vtjnash vtjnash added this to the 1.8 milestone Aug 10, 2022
@inkydragon
Copy link
Member

inkydragon commented Aug 11, 2022

Test code

versioninfo()
using Printf
Printf.format(Printf.Format("%#.3g"), 100.0 - eps(100.0))
# should == "100."

@KristofferC
Copy link
Member

Why was this added to the 1.8 milestone?

@vtjnash
Copy link
Member

vtjnash commented Aug 11, 2022

Showing the wrong answer seems quite a bad regression

@KristofferC
Copy link
Member

Yes, but not vs 1.7. If all supported Julia versions are released with this bug, we surely can release 1.8 with it as well.

@JeffBezanson JeffBezanson removed this from the 1.8 milestone Aug 16, 2022
@gitboy16
Copy link
Contributor

Maybe worth adding the backport 1.8 flag on this one?

@inkydragon inkydragon added the backport 1.8 Change should be backported to release-1.8 label Aug 25, 2022
@gitboy16
Copy link
Contributor

Completely agree with @vtjnash , this is a bad regression. I think it should have fixed long time ago. Could it be that it has been forgotten because it is not on any milestone?

@KristofferC
Copy link
Member

I think it should have fixed long time ago

It's just waiting for an unsung hero to roll up their sleeves and get to work. Maybe you could be that hero?

@gitboy16
Copy link
Contributor

I really wish I had enough knowledge to do it.
In any case don't you think it should be add on a milestone (1.6 , 1.8 or 1.9) not to be forgotten?

@KristofferC KristofferC added the forget me not PRs that one wants to make sure aren't forgotten label Mar 23, 2023
@vtjnash vtjnash added this to the 1.10 milestone Aug 30, 2023
@KristofferC
Copy link
Member

Been an issue since 1.6 so removing from milestone.

@KristofferC KristofferC removed this from the 1.10 milestone Sep 1, 2023
@gitboy16
Copy link
Contributor

gitboy16 commented Sep 1, 2023

It seems it was an issue since 1.6.2. It was working in 1.6.0 and 1.6.1 hence the regression/bug flags I suppose. It should have been fixed long time ago I think.

nalimilan pushed a commit that referenced this issue Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.6 Change should be backported to release-1.6 backport 1.8 Change should be backported to release-1.8 bug Indicates an unexpected problem or unintended behavior display and printing Aesthetics and correctness of printed representations of objects. forget me not PRs that one wants to make sure aren't forgotten regression Regression in behavior compared to a previous version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants