[basex-talk] sum() is returning inaccurate sums

2020-06-17 Thread Jay Straw
Hi all, I'm building a budgeting system for home use, using XSLTForms and -- ready for it? -- BaseX! sum() has been behaving weird. I'm adding USD, which means only 2 decimals of precision. But depending on the combination of elements I add, I'll get a long double that's inaccurate. Sometimes it

Re: [basex-talk] sum() is returning inaccurate sums

2020-06-17 Thread Martin Honnen
Am 17.06.2020 um 10:37 schrieb Jay Straw: Hi all, I'm building a budgeting system for home use, using XSLTForms and -- ready for it? -- BaseX! sum() has been behaving weird. I'm adding USD, which means only 2 decimals of precision. But depending on the combination of elements I add, I'll get a

Re: [basex-talk] sum() is returning inaccurate sums

2020-06-17 Thread Martin Honnen
Am 17.06.2020 um 10:50 schrieb Martin Honnen: Whether you do that with a long `for .. return` or simply with   //gross/xs:decimal(.) or   //gross!xs:decimal(.) is up to you. Schema-aware XQuery could also help of the `gross` elements were declared as `xs:decimal`, but I don't think XQuery