On 21/06/12 14:07, Stephan Bergmann wrote:
On 06/20/2012 03:07 PM, Dennis E. Hamilton wrote:
I think it is necessary to look at round-trip out-in conversion preservation.
For out-in (which this is, presumably), you want to record a decimal expression of the internal
value that will convert back to the exact internal value on re-input. (The in-out case is that
the input conversion provide whatever internal representation that will convert to the read
value on re-output. Without additional information, it is generally very difficult to have
these be the same.)
It is also desirable, of course, that any other ODF consumer use the same technique so that its
in-out conversion satisfies the out-in condition of the original source of the decimal
expression of the value.
There are old technical papers on how to have this work. The name David Matula comes to mind.
There might be solutions in the conversions that exist in the basic Java classes for float data
types. I think this was addressed in Common Lisp also.
Hasn't there been progress in that field recently? Wait, yes,
<http://dl.acm.org/citation.cfm?id=1806623> "Printing floating-point
numbers quickly and accurately with integers" by Florian Loitsch.
i am in awe that it's possible to get a paper on this topic published in
this day and age; one would think this kind of problem would have been
solved 30 years ago, and the developers of popular office suites were
just ignorant of the solutions :)
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.