Visual C++ 11: iostream bug: incorrect input streaming of the smallest normal double and some denormals - by Michal Anders

Status : 


Sign in
to vote
ID 778982 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 2/11/2013 10:30:55 AM
Access Restriction Public



The following bug was discovered during a process of migrating an application from Visual C++ 8 to Visual C++ 11. As the program in the "steps to reproduce" section demonstrates, the decimal representation of two particular doubles (std::numeric_limits<double>::min() and 4.26144921954407e-309 - lowest 16 bits being equal to 0 could be the pattern here?) cannot be streamed into a double from an istringstream. However, sscanf does not suffer from the same problem. The iostreams implementation in Visual C++ 8 does not exhibit the same issue either. 

We would appreciate your attention and a fix.

Kind regards,
Sign in to post a comment.
Posted by Stephan [MSFT] on 7/17/2013 at 1:30 PM
Unfortunately, we discovered a problem with our attempted fix - it broke the parsing of "4.1" - and we had to revert it, so 2013 RTM will behave like 2012 RTM. We'll try to fix this again in the next major version.

Stephan T. Lavavej
Senior Developer - Visual C++ Libraries
Posted by Stephan [MSFT] on 6/18/2013 at 2:51 PM
Hi again,

We've fixed this bug, and the fix will be available in VS 2013 RTM (but not Preview). Thanks again for reporting it - I've added your examples to a regression test in order to ensure that this doesn't break in the future.

Stephan T. Lavavej
Senior Developer - Visual C++ Libraries
Posted by Stephan [MSFT] on 2/13/2013 at 1:46 PM

Thanks for reporting this bug. I've resolved it as a duplicate of which was reported last month, and I've attached your test case to that bug in our internal database.

Note: Connect doesn't notify me about comments. If you have any further questions, please E-mail me.

Stephan T. Lavavej
Senior Developer - Visual C++ Libraries
Posted by Microsoft on 2/11/2013 at 10:14 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 2/11/2013 at 10:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(