https://bugs.winehq.org/show_bug.cgi?id=51435
Bug ID: 51435 Summary: iostream float formatting broken Product: Wine Version: 6.12 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: msvcrt Assignee: wine-bugs@winehq.org Reporter: winebugz@t41t.com Distribution: ---
Created attachment 70288 --> https://bugs.winehq.org/attachment.cgi?id=70288 test case solution demonstrating the error
On wine-6.12-162-gd10887b8f56
Full solution is in the attachment, but Wine is improperly formatting floats when using printf "%g" or iostreams. A very simple example is: std::cout << 9.999999999999999e-5 << std::endl;
It should print "0.0001". It does print "0".
Of course, this affects much larger and more complicated programs, too.
Tested on Ubuntu 20.04, although I don't think it matters.
https://bugs.winehq.org/show_bug.cgi?id=51435
winebugz@t41t.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |testcase
https://bugs.winehq.org/show_bug.cgi?id=51435
--- Comment #1 from winebugz@t41t.com --- Created attachment 70289 --> https://bugs.winehq.org/attachment.cgi?id=70289 compiled executables
Also attaching executables as built by Visual Studio
https://bugs.winehq.org/show_bug.cgi?id=51435
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 CC| |focht@gmx.net Keywords| |regression Status|UNCONFIRMED |NEW
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming. Seems to be a regression between Wine 5.12 and 5.13
My bet would be on https://source.winehq.org/git/wine.git/commitdiff/1bc6f0c86174cf1b5e47f1f132... ("msvcrt: Reimplement floating point numbers printing.")
Regards
https://bugs.winehq.org/show_bug.cgi?id=51435
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |piotr@codeweavers.com Regression SHA1| |1bc6f0c86174cf1b5e47f1f1324 | |a3f733e0658a1 Summary|iostream float formatting |iostream float formatting |broken |broken since Wine | |5.12-170-g1bc6f0c8617
--- Comment #3 from Anastasius Focht focht@gmx.net --- Hello folks,
bet won ;-)
I've updated the ticket and CC'd the author of the commit. Thanks for the report, especially the test case.
Regards
https://bugs.winehq.org/show_bug.cgi?id=51435
Piotr Caban piotr.caban@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |piotr.caban@gmail.com
--- Comment #4 from Piotr Caban piotr.caban@gmail.com --- I've sent a patch that should fix it: https://source.winehq.org/patches/data/209581
https://bugs.winehq.org/show_bug.cgi?id=51435
--- Comment #5 from Piotr Caban piotr.caban@gmail.com --- It should be fixed by 2ffcf4402181e7e7e8c322b713924e5738506c88. Please retest.
https://bugs.winehq.org/show_bug.cgi?id=51435
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |2ffcf4402181e7e7e8c322b7139 | |24e5738506c88 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #6 from Gijs Vermeulen gijsvrm@gmail.com --- Can confirm identical output to Windows is produced now.
Marking FIXED.
https://bugs.winehq.org/show_bug.cgi?id=51435
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.14.
https://bugs.winehq.org/show_bug.cgi?id=51435
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |6.0.x
https://bugs.winehq.org/show_bug.cgi?id=51435
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|6.0.x |---
--- Comment #8 from Michael Stefaniuc mstefani@winehq.org --- Removing the 6.0.x milestone from bug fixes included in 6.0.3.