ASP Error: 70
Description: Permission denied
Source: Microsoft VBScript runtime error

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

RE: XPath number with 20 digits gives you a head ache

Subject: RE: XPath number with 20 digits gives you a head ache
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Thu, 25 Jan 2001 10:25:06 -0000
digi digits
> Simple XPath question regarding string to number conversions. Should
>
>   <xsl:value-of select="number(string('92125374252539897737'))" />
>
> return
>
>   92125374252539897737
>
> since most processors return
>
>   92125374252539900000
>
> which is not what one would want. Is this XPath spec or XSLT
> implementation related issue?

The spec requires IEEE 754 double-precision floating point arithmetic, which
is about 17 digits of precision. The rules are very strict and a processor
isn't allowed to give you greater precision even if it wants to, nor is it
allowed to "optimize out" the conversion of a string to a number and then
back to a string.

I hesitate to assert that the above is actually correct, but if you're
getting it from several processors then the chances are that it is.

Incidentally calling the string() function on a string literal seems rather
superfluous!

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.