[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Re: XPath incompatibilities

Subject: RE: Re: XPath incompatibilities
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Wed, 2 Jan 2002 09:48:28 -0000
xpath calculation division
> Miloslav Nic wrote:
> > ========================================
> > 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.
>
In fact integer division was removed from the F&O draft as a late change,
and the "incompatibilities" appendix should have been updated to reflect
this change. 10 div 4 will now give a result that is the decimal value 2.5.
The draft currently leaves open what the result of 10 div 3 should be (i.e.
what the precision and scale of the result are): I'm sure the final spec
will have more to say on this.

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.