Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007069OCamlstandard librarypublic2015-12-01 10:512017-04-10 14:40
Assigned To 
PlatformOSOS Version
Product Version4.03.0+dev / +beta1 
Target VersionFixed in Version 
Summary0007069: Scanf "%F" or "%H" and float_of_string are broken for "nan" on Windows
DescriptionI had to disable my Printf->Scanf round-tripping test for %H on nan values on Windows, because it breaks on MSVC. [^]

In 0004688 we decided to fix Printf / string_of_float's handling of nan and infinite values by the MSVC runtime. I think it would be good to extend this sanitization principle to Scanf / float_of_string, to give reliable guarantees on the behavior of %F and the new %H format across platforms.
TagsNo tags attached.
Attached Files

- Relationships
related to 0004688closedfrisch Special floating-point values aren't converted to strings correctly under Windows 

-  Notes
dra (developer)
2015-12-10 16:51

Note that on mingw64, float_of_string works without any patching (but scanf "%F" does not) - this means it works on the old MSVCRT that mingw64 compiles against, but it's then been broken in more recent versions!

- Issue History
Date Modified Username Field Change
2015-12-01 10:51 gasche New Issue
2015-12-01 10:51 gasche Relationship added related to 0004688
2015-12-10 16:51 dra Note Added: 0015110
2016-02-03 16:14 doligez Status new => acknowledged
2016-02-03 16:14 doligez Target Version => 4.03.0+dev / +beta1
2016-04-15 15:05 doligez Target Version 4.03.0+dev / +beta1 => 4.03.1+dev
2017-02-16 14:01 doligez Target Version 4.03.1+dev => undecided
2017-02-23 16:43 doligez Category OCaml standard library => standard library
2017-04-10 14:40 doligez Target Version undecided =>

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker