[Bug 29171] [QT3TS] cbcl-numeric-idivide-008


Michael Kay <mike@saxonica.com> changed:

           What    |Removed                     |Added
                 CC|                            |mike@saxonica.com

--- Comment #1 from Michael Kay <mike@saxonica.com> ---
A little more rationale on this:

The spec of idiv (via op:numeric-integer-divide) says it returns "the largest
integer such that...."

so in principle an implementation that supports 75-digit integers ought to be
able to deliver a successful result.

However, the specification also allows the implementation to choose a different
algorithm that might have failure conditions if limits are exceeded, and it is
not prescriptive about what error codes might arise in this case. Saxon is
using the perfectly reasonable algorithm of doing an xs:float division and then
rounding down to an integer. In this case the xs:float division produces INF
and the rounding then fails.

For what it's worth, I've experimented with a different algorithm and it
but I suspect other approaches might deliver a slightly different but equally
valid result.

You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 2 October 2015 14:45:34 UTC