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

RE: Floating point numbers in XPath

Subject: RE: Floating point numbers in XPath
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Tue, 9 Apr 2002 17:44:34 +0100
float numbers xsl
XPath 1.0 is completely prescriptive about the string representation of a
floating-point number. The result will never use scientific (exponent)
notation. The rules are in section 4.2 of the XPath specification; two
correct processors will always give the same result.

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of
> Richard Jinks
> Sent: 09 April 2002 13:00
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Floating point numbers in XPath
>
>
> Hi
>
> Is there any standard default rule governing the conversion
> of a double to a
> string when the double is of the form "0.x1" (where x is any
> number of 0s).
> i.e. should string(0.000001) return "0.000001", "1e-6",
> "1e-06", "1e-006",
> etc, or does the spec leave this open as implementation specific?
> If there is a specific rule hidden somewhere, where is the
> cut-off point for
> the number of 0s to output before the format changes to "1e-x"?
>
> I've checked the obvious places (XPath Spec, Java Language spec), but
> without any use.
> I don't know if the IEEE 754 spec has anything useful, but
> most of the C
> Compilers I've found don't agree, same with the XPath implementations.
>
> Thanks for any help,
> Richard
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 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.