Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006296OCamlOCaml documentationpublic2014-01-18 08:332015-07-25 09:07
Reporterhhugo 
Assigned To 
PrioritynormalSeveritytweakReproducibilityN/A
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version 
Target Version4.03.0+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 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 
related to 0006701acknowledged string_of_float and float_of_string are locale dependent 
related to 0006649feedback int_of_string fails on integers starting with a + 

-  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.
(0012722)
hhugo (reporter)
2014-12-08 18:09

related to https://github.com/mjambon/yojson/issues/13 [^]

- 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 / +rc1
2014-12-08 18:09 hhugo Note Added: 0012722
2015-01-15 18:56 doligez Relationship added related to 0006701
2015-01-15 18:57 doligez Target Version 4.02.2+dev / +rc1 => 4.03.0+dev
2015-07-25 09:07 xleroy Relationship added related to 0006649


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker