Hi Shuxin,

Thanks for the new test case. I think you got it right, it looks like
a corner case, which is caused by an internal optimization. It can be
explained via the following expression, which yields "false" and
"true" (while one might expect "false" and "false"):

0 * 3780298429396748056 = 1,
0 = 1 div 3780298429396748056

As 1 div 3780298429396748056 is defined to return the decimal value 0,
the result will be changed if the right-hand operand of the
multiplication is moved to the right-hand side of the comparison –
which is precisely what our optimizer does when compiling your test
expression:

//A1[((count(./*) idiv 3) * -1763118392 * 2144097893) != 1]

We decided to do so because it works out fine in all practical use
cases we encountered so far.

But thanks anyway for your feedback! Maybe we can refine our processor
to suppress optimizations for which we can statically detect that the
result would change.

Best regards, and looking forward to your next reports,
Christian

Reply via email to