Subject: RE: [xsl] What is the shortest expression converting an xs:double to xs:integer? From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Sat, 4 Dec 2004 09:30:51 -0000 |
You could use 11 to (f:sqrt($pNum, 0.1E0) + 0.5) idiv 1 but it's not a great improvement. I'm trying to remember why round() returns a double - I think it's because of the problem of numbers that are too large for an xs:integer. Michael Kay > -----Original Message----- > From: Dimtre Novatchev [mailto:dnovatchev@xxxxxxxxx] > Sent: 04 December 2004 00:53 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] What is the shortest expression converting an > xs:double to xs:integer? > > In my code I had to use this expression: > > (11 to xs:integer(round(f:sqrt($pNum, 0.1E0)))) > > Can it be expressed in a more simple way? > > Cheers, > Dimitre
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] What is the shortest expressi, Dimtre Novatchev | Thread | Re: [xsl] What is the shortest expr, Colin Paul Adams |
Re: [xsl] Creating unique groups, Mukul Gandhi | Date | [xsl] HOW XSLT WILL BE, WHEN XML2XM, Arul Kumar |
Month |