Next in thread → Next in month →

Re: [xml-dev] Quiz: which is better 1 div $x or pow($x,-1)?

From
David Carlisle <>
To
Dimitre Novatchev <>
Date
2020-06-27T20:04:45Z
ID
<>
Thread
Re: [xml-dev] Quiz: which is better 1 div $x or pow($x,-1)?


On Sat, 27 Jun 2020 at 20:55, Dimitre Novatchev <[email protected]> wrote:
> you didn't highlight it but -1 is a double so math:pow($x,-1) is quite a tricky function, math:pow($x(xs:int(-1)) with an integer power is much simpler to define.

In case the IEEE 754-2008 Standard for Floating-Point Arithmetic implements pown() with division when the exponent is a negative integer, then they actually transform expression (2) to expression (1), therefore it seems meaningful just to use expression (1).

Dimitre



Ah thanks for the correction.

David


 
Next in thread → Next in month →