Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001829OCaml~DO NOT USE (was: OCaml general)public2003-09-14 01:092016-12-06 22:43
Assigned Toshinwell 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001829: accurate floating-point printing
DescriptionFull_Name: Wheeler Ruml
Version: 3.06
OS: linux
Submission from: (

I see from the mailing list archive
( [^]) 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 ( [^]), 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,


TagsNo tags attached.
Attached Files

- Relationships
related to 0001154resolved string_of_float loosing precision 

-  Notes
shinwell (developer)
2016-12-06 22:43

Fixed by [^]

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue
2012-01-26 18:30 doligez Relationship added related to 0001154
2016-12-06 22:43 shinwell Note Added: 0016678
2016-12-06 22:43 shinwell Status acknowledged => resolved
2016-12-06 22:43 shinwell Resolution open => fixed
2016-12-06 22:43 shinwell Assigned To => shinwell
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker