Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006296OCamlOCaml documentationpublic2014-01-18 08:332014-09-15 13:17
Assigned To 
PlatformOSOS Version
Product Version 
Target Version4.02.2+devFixed 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 [^]
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
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 => 4.02.1+dev
2014-07-16 13:47 doligez Status new => acknowledged
2014-09-04 00:25 doligez Target Version 4.02.1+dev => undecided
2014-09-15 13:17 doligez Target Version undecided => 4.02.2+dev

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker