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.
Stephan
_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice