RE: [xsl] Re: XPath incompatibilities

> > 3. Additional numeric types have been introduced, with the effect
> > that arithmetic may now be done as an integer, decimal, or
> > single-precision floating point calculation where previously it was
> > always performed as double-precision floating point. The most
> > notable difference (subject to resolution of an open issue) is that
> > 10 div 4 is now an integer division, with the result 2, rather than
> > a floating point division yielding 2.5.
> > ----------------------------------------
> >
> > I would prefer very strongly 1.0. Integer division as the default
> > behavior is unnatural.
> 
> I know that this used to be a problem with the F&O WD, but the new
> version of the F&O WD seems to have removed integer as a basic numeric
> type. According to the F&O WD, there are only three basic numeric
> types (decimal, float and double) and the operators are defined in
> terms of those basic numeric types.

There's an inconsistency between the working drafts here. A late decision
was made that arithmetic with integer operands should produce the same
result as arithmetic with decimal operands; this decision is reflected in
the published F&O draft but not (yet) in the "compatibility" appendix of the
main XPath document.

Mike Kay 

Received on Thursday, 27 December 2001 10:23:22 UTC