|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Any difference between 1 div $x and math:pow($x, -
Roger L Costello costello@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
writes:
> Hi Folks,
>
> My XSLT program computes this expression many times for different values of
$x:
>
> 1 div (1 + math:exp(-$x))
>
> Here is an equivalent expression:
>
> math:pow(1 + math:exp(-$x), -1)
As David points out, theybre not strictly equivalent.
> - produces more accurate results
> - is faster
The best way to answer those questions is to run some experiments.
> - is easier to understand, more intuitive
Thatbs going to depend on whobs looking at the code, I guess. If I think
about it, I can work out that math:pow($x, -1) is like 1/$x but this
many years removed from regular mathematical exercise, I have to think
about it for a moment.
Be seeing you,
norm
--
Norman Tovey-Walsh <ndw@xxxxxxxxxx>
https://nwalsh.com/
> Everything has been said before, but since nobody every listens we have
> to keep going back and beginning all over again.--AndrC) Gide
[demime 1.01d removed an attachment of type application/pgp-signature which had a name of signature.asc]
|
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
|

Cart








