[Bug 3250] definition of precisionDecimal

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3250





------- Comment #4 from davep@iit.edu  2006-05-11 15:32 -------
(In reply to comment #2)
> I think the main thrust of this point is that whereas xs:decimal refers to "the
> set of numbers that can be obtained by dividing an integer by a non-negative
> power of ten, i.e., expressible as i / 10n where i and n are integers and n
> ≥ 0", xs:precisionDecimal refers to a number of properties of the value,
> one of which (the most important of which!) is simply "a decimal number", not
> further elaborated.

Ah, I see.  Perhaps we should note somewhere that a decimal number is a number
that can be so represented.  I didn't think we had to explicitly define it, but
I'm
sure the editors will consider doing so.  Do we need also to define integer?

> The other part of the problem, I think, is that defining the infinite value
> space doesn't aid our understanding of the semantics of the data type all that
> much. We need to understand something of the mechanisms used to restrict the
> value space, and of the operations that are applicable to the data type.

The mechanisms that we provide to restrict the value space are the various
applicable facets.  They are all well-defined, I believe.  Recognizing that any
infinite datatype cannot be fully represented in a finite machine, we prescribe
that implementations can be partial, and provide that a partial implementation
must make it known that it cannot handle a given value when it tries to do
something that requires knowing that value precisely.

> (There's a real procedural problem here in trying to define a data type in XML
> Schema and then lobbing it over the fence to QT to define some suitable
> operations. I personally have no idea how to define an arithmetic that is
> sensitive to the "precision" component of these values, yet that is presumably
> what QT are expected to do.)

I've seen several different ways of handling precision in calculations, none of
which are best for all applications.  Barring some extremely complicated
mechanisms, QT might simply compute the operation on the numericalValues
as would be done for (non-precision) decimal values, then use some specific
algorithm to impute a precision for the result.  It is my impression that most
users that want to be able to handle precision nonetheless tend to ignore it
when calculating.  They want it mostly for recording uncomputed values, such
as measurements taken in the real world.

Received on Thursday, 11 May 2006 15:32:59 UTC