[xsd-users] losing double precision in output xml

David J Stockdill dstockdi at csc.com
Thu Dec 7 11:02:53 EST 2006





Boris,

That did it.  Thank you for the swift support.

Dave

David J. Stockdill



                                                                           
             Boris Kolpackov                                               
             <boris at codesynthe                                             
             sis.com>                                                   To 
                                       David J Stockdill/DEF/CSC at CSC       
             12/07/2006 10:24                                           cc 
             AM                        xsd-users at codesynthesis.com         
                                                                   Subject 
                                       Re: [xsd-users] losing double       
                                       precision in output xml             
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Hi David,

I've CC'ed xsd-users to my reply so that others can benefit from this
information.


David J Stockdill <dstockdi at csc.com> writes:

> 38.200000000001 is truncated to 38.2
> 38.20000000001 is not.  How do I specify to keep more than 11 digets
after
> the decimal?

I think I have finally found the right formula for the serialization
precision of floating-point types. See this paper for details:

http://www2.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1822.pdf


The fix is available here:

http://codesynthesis.com/download/xsd/2.3/xsd-2.3.0-fp-serialization-patch.zip

http://codesynthesis.com/download/xsd/2.3/xsd-2.3.0-fp-serialization-patch.tar.gz



Simply replace the libxsd/xsd/cxx/tree/serialization.hxx file with the
new revision. This fix will also appear in the upcoming 2.3.1 version.

Please let me know if things are working now and thanks for helping to
track this problem down!


-boris
(See attached file: signature.asc)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/octet-stream
Size: 666 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20061207/40e6eb32/signature.obj


More information about the xsd-users mailing list