[xsde-users] Controlling double precision for xs:decimal

Boris Kolpackov boris at codesynthesis.com
Mon Apr 1 09:37:51 EDT 2019


Andrea Tessadri <tessadriandrea at gmail.com> writes:

> The result of the serialization for:
> Latitude().base_value(-83.12345);
> 
> will be:
> 
> <Latitude>-83.123450000000005</Latitude>
> 
> How to control double precision ?

You can either configure the built-in decimal serializer or provide your
own. See "Floating-Point Type Serializers":

https://codesynthesis.com/projects/xsde/documentation/cxx/serializer/guide/#7.1

BTW, please don't post new questions by replying to an existing email
since this breaks threading. See Posting Guidelines for this and other
points:

https://codesynthesis.com/support/posting-guidelines.xhtml



More information about the xsde-users mailing list