W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2003

Overflow during computation of arithmetic functions

From: Michael Brundage <xquery@comcast.net>
Date: Thu, 25 Sep 2003 10:20:07 -0700
To: <public-qt-comments@w3.org>
Message-ID: <000001c38389$449aa6d0$6501a8c0@xpider>

How is overflow to be handled during the computation of arithmetic
functions?

For example, on implementations that choose to limit the precision of
xs:integer to (signed) 64 bit integers, should

let $max_int := xs:integer("9223372036854775807")
return avg(($max_int, $max_int))

succeed and return $max_int, fail with overflow, or is the behavior
implementation-dependent/defined?




Michael Brundage
xquery@comcast.net

Writing as
Author, "XQuery: The XML Query Language" (Addison-Wesley, to appear 2003)
Co-author, "Professional XML Databases" (Wrox Press, 2000)

not as
Technical Lead
Common Query Runtime/XML Query Processing
WebData XML Team
Microsoft
Received on Thursday, 25 September 2003 13:18:50 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:14 UTC