Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006296OCamlOCaml documentationpublic2014-01-18 08:332014-07-16 13:47
Reporterhhugo 
Assigned To 
PrioritynormalSeveritytweakReproducibilityN/A
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version 
Target Versionafter-4.02.0Fixed in Version 
Summary0006296: inconsistent behavior of float_of_string (compare to "ints"_of_string)
Descriptionfloat_of_string does not understand the octal string representation where other conversion functions do.
`float_of_string "0o123"` -> fail
(int_/Int64./Int32.)of_string "0o132" -> work

need to document the behavior or to fix it.

also I just discovered (reading strtod manpage) the syntax "0x1p8".

would need either documentation of accepted formats (like is it done with int conversion) or link to documentation of underlying c function

related to http://caml.inria.fr/mantis/view.php?id=5829 [^]
TagsNo tags attached.
Attached Files

- Relationships
related to 0005829confirmed int_of_string failure 
related to 0004323resolvedgasche Big_int and Num "of_string" functions do not work with hexadecimal literals 

-  Notes
(0011842)
doligez (administrator)
2014-07-16 13:47

I find it strange to expect float_of_string to understand octal integer format.

Still, documenting the accepted formats would be good.

- Issue History
Date Modified Username Field Change
2014-01-18 08:33 hhugo New Issue
2014-01-18 08:36 gasche Relationship added related to 0005829
2014-01-18 08:39 gasche Relationship added related to 0004323
2014-07-16 13:47 doligez Note Added: 0011842
2014-07-16 13:47 doligez Severity minor => tweak
2014-07-16 13:47 doligez Category OCaml standard library => OCaml documentation
2014-07-16 13:47 doligez Target Version => after-4.02.0
2014-07-16 13:47 doligez Status new => acknowledged


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker