W3C home > Mailing lists > Public > www-ql@w3.org > April to June 2003

RE: types of numeric literals and operators

From: Bas de Bakker <bas@x-hive.com>
Date: Tue, 24 Jun 2003 12:19:30 +0200
Message-ID: <41D11F414A26E942912B7E7696DC8E22155AE6@JAKARTA.xhive.archipel>
To: <www-ql@w3.org>

> Firstly, xs:integer does not have to be "arbitrary 
> precision". The Schema
> spec allows implementations to impose a limit, and allows 
> that limit to be
> as low as 64 bits.

But arbitrary precision can be useful in some applications.  So now we
have a choice between being efficient and allowing arbitrary precision.
I would prefer being able to do both.

> Secondly, there's nothing in the spec that stops you using 
> int or short
> arithmetic if you know statically that the values are in that range.

But you can almost never know this, unless the operands are constants.
You cannot use 32 bit machine arithmetic when adding two xs:int values,
because the result could overflow.

Bas de Bakker
X-Hive Corporation
Received on Tuesday, 24 June 2003 06:19:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:43:42 UTC