Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001829OCamlOCaml generalpublic2003-09-14 01:092012-01-26 18:30
Reporteradministrator 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001829: accurate floating-point printing
DescriptionFull_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

TagsNo tags attached.
Attached Files

- Relationships
related to 0001154resolved string_of_float loosing precision 

-  Notes
There are no notes attached to this issue.

- 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


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker