[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Re: XPath incompatibilities
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|