Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
to your account
Original bug ID: 6296
Status: closed (set by @xavierleroy on 2017-09-24T15:32:15Z)
Target version: 4.03.0+dev / +beta1
Fixed in version: 4.03.0+dev / +beta1
Related to: #4323 #5829 #6649 #6701
Monitored by: braibant
float_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 #5829
The text was updated successfully, but these errors were encountered:
Comment author: @damiendoligez
I find it strange to expect float_of_string to understand octal integer format.
Still, documenting the accepted formats would be good.
Sorry, something went wrong.
Comment author: @hhugo
related to ocaml-community/yojson#13
Comment author: @xavierleroy
Added some documentation for float_of_string, commit [trunk 4d478a0].
Hexadecimal floating-point notation is now officially supported starting with 4.03.
We will not support octal notation. (Nobody does, and octal is a survivance of the past.)
No branches or pull requests