I have a piece of XSL code to do some mapping in PI 7.1 which works correctly in XML Spy, but when imported into PI gives an incorrect result.
The source XML contains
<HEADER> <BALANCE>333.33</BALANCE> </HEADER> <DATA> <DEBIT>15.42</DEBIT> <CREDIT>0.00</CREDIT> </DATA> <DATA> <DEBIT>0.00</DEBIT> <CREDIT>14.00</CREDIT> </DATA>
The code is
<xsl:value-of select="//HEADER/BALANCE + //DATA/CREDIT - //DATA/DEBIT"/>
Pretty basic stuff. However PI is returning a value of 331.90999999999997 instead of 331.91
Yes, it's close, but this is addition. It should be exact.