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

RE: Calculate mantissa and exponent?

Subject: RE: Calculate mantissa and exponent?
From: "Tim Watts" <timw@xxxxxxx>
Date: Fri, 10 Aug 2001 07:40:48 +1000
find mantissa and exponent
Edward,

Have you looked into using the format-number function?

you could do something like ...

  <xsl:value-of select="format-number(12345, '##0.####E0') />

for an output of 1.2345E4

More info in contained in MK's book (XSLT Programmer's Reference) pp455-459
(First Edition)

It would also be useful to look into xsl:decimal-format to find more about
the display of numbers,

Regards, Tim Watts

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Mitchell,
> Edmund
> Sent: Thursday, 9 August 2001 10:19 PM
> To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
> Subject:  Calculate mantissa and exponent?
>
>
> Hello all,
> I have to calculate a numbers' mantissa and exponent.
> So if I have 123456, it should be normalized as 1,23456e+5.
> Unfortunately, I have to use only pure xsl, no extension functions or
> scripts are allowed.
> XSLTSL & EXSLT don't seem to have this functionality.
>
> To avoid re-inventing the wheel, has anyone solved this before?
>
> Thanks,
>
> Edmund
>
>  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.