Re: Question about number types

Thanks Michael. I'll definitely have a read. I'm presuming the  
document is
http://www.w3.org/TR/xpath-functions/
Let me know if otherwise.
-Alan

On Jul 2, 2008, at 3:29 PM, Michael Kay wrote:

>> Was there at any point explicit rejection of have a
>> mathematical real number datatype (possibly augmented with
>> some constants such as INF, -
>> INF) from which the rest of the numeric types were defined by
>> restriction?
>
> I don't know, but the XQuery/XSLT specs got around the problems, so  
> it's not
> impossible. The "type" called "numeric" in the QT specs is not  
> really a
> genuine data type, it's more of a specification macro, but all the  
> numeric
> operations in QT allow the three primitive numeric types to be mixed.
>
> If you want to define operations based on the XML Schema datatypes,  
> I would
> strongly suggest using the operations defined in XQuery/XSLT  
> Functions and
> Operators.
>
> Michael Kay
> http://www.saxonica.com/
>
>>
>> We have a discussion going in the OWL working group, part of
>> which is about the desirability of comparing a float to an
>> integer. If they are disjoint, then that doesn't seem
>> possible. However, it seems well defined to ask whether
>> "2.1"^^xsd:float > "2"^^xsd:int
>>
>> Thanks,
>> Alan
>>
>>
>>
>

Received on Thursday, 3 July 2008 01:52:43 UTC