XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Quiz: which is better 1 div $x or pow($x,-1)?



On Sat, 27 Jun 2020 at 20:55, Dimitre Novatchev <dnovatchev@gmail.com> 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


 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS