Skip to content
New issue

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? Sign in to your account

accurate floating-point printing #8279

Closed
vicuna opened this issue Sep 13, 2003 · 1 comment
Closed

accurate floating-point printing #8279

vicuna opened this issue Sep 13, 2003 · 1 comment
Assignees

Comments

@vicuna
Copy link

vicuna commented Sep 13, 2003

Original bug ID: 1829
Reporter: administrator
Assigned to: @mshinwell
Status: resolved (set by @mshinwell on 2016-12-06T21:43:43Z)
Resolution: fixed
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)
Related to: #3352

Bug description

Full_Name: Wheeler Ruml
Version: 3.06
OS: linux
Submission from: katsura.parc.xerox.com (13.2.18.21)

I see from the mailing list archive
(http://caml.inria.fr/archives/200205/msg00100.html) that it is well-known that
there is no built-in way in OCaml to print a floating-point number accurately
(such that the same number can be recovered from the printed representation).
Xavier may believe that this is justifiable on pragmatic or even philosophical
grounds (http://caml.inria.fr/archives/200205/msg00084.html), but I did want to
point out that it makes life very difficult for advanced users and very
confusing for beginning users. In my case, it means that data structures cannot
be printed to files without either resorting to Marshalling and therefore
abandoning type safety or laboriously truncating all floating point values.
(Floating point values are used as look-up keys in my application.) It would be
very convenient if accurate floating-point printing were built-in! I'm sure
there are more exciting things to work on, but I did want to submit this feature
for your consideration.

Thanks very much,

Wheeler

@vicuna
Copy link
Author

vicuna commented Dec 6, 2016

Comment author: @mshinwell

Fixed by #268

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants