W3C home > Mailing lists > Public > www-ql@w3.org > October to December 2003

Re: precision on op:numeric-divide

From: Michael Brundage <xquery@comcast.net>
Date: Thu, 11 Dec 2003 01:07:13 -0800
To: "Kay, Michael" <Michael.Kay@softwareag.com>, Michael Rys <mrys@microsoft.com>, <Damien@sodatech.com>
Cc: "www-ql@w3.org 2" <www-ql@w3.org>
Message-ID: <BBFD73C1.9FA%xquery@comcast.net>

On 12/10/03 11:44 AM, "Kay, Michael" <Michael.Kay@softwareag.com> wrote:
>> Correct, but I don't think it is the XQuery's WG task to
>> solve the problem of the heterogeneity of arithmetic across
>> different implementation platforms, even though it is tempting...
> 
> And speaking for myself, I think it's a shame we ducked out of this one. It
> wasn't possible to standardize arithmetic with 1970s languages like C and
> SQL because of the sheer variety (and slowness) of hardware, but for a 2000s
> language, the sights have been set too low.
> 
> Most people will be implementing decimal in software anyway, so there are
> very few good excuses for implementations to differ.

The irony is that, for example, XPath completely specifies how doubles
should be converted to string (differing from printf but matching ECMA).  So
in places arithmetic operations are highly specified, and in places they're
not specified at all.

Unfortunately, it probably doesn't really matter what the standard says on
this matter, because most database vendors will deviate from the XQuery
specs if necessary (as they deviate from SQL) to implement whatever
arithmetic rules they already have.  SQL Server, Oracle, and DB2 all have
their idiomatic quirks when it comes to SQL, and I have no reason to expect
XQuery to end up any different.


Cheers,
michael
Received on Thursday, 11 December 2003 04:07:19 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:17:16 UTC