Re: Rationals

On 10 Nov 2008, at 21:02, Alan Ruttenberg wrote:
[snip]
> Note: Implementations of rational numbers I'm aware of use arbitrary
> precision arithmetic.

To get arbitrary precision rationals.

> As I recall, the reason we did not require
> arbitrary precision integer arithmetic for minimal conformance so as
> to avoid the necessity of all implementation using such.

Rationals and decimals are closely related. Just as we specced a  
lower bound of decimal support, we can spec a lower bound on rational  
support.
<http://www.w3.org/2007/OWL/wiki/Syntax#Numbers>
"""The literals of xsd:decimal and the datatypes derived from  
xsd:integer are mapped to arbitrarily large and arbitrarily precise  
numbers. An OWL 2 implementation may support all such literals;  
however, it must support at least the following literals, called core  
literals, which can be easily mapped to the primitive datatypes  
commonly found in modern implementation platforms:

All xsd:float and xsd:double literals are core literals.
A literal of type xsd:integer or of a type derived from xsd:integer  
is a core literal if its data value is in the value space of xsd:long.
A literal of type xsd:decimal is a core literal if its data value is  
a number with absolute value less than 1016 and the representation of  
the number requires at most 16 digits in total."""

In fact, we could easily adapt the lower bounds on decimals to  
rationals.

Cheers,
Bijan.

Received on Monday, 10 November 2008 21:31:14 UTC