W3C home > Mailing lists > Public > public-xformsusers@w3.org > November 2017

Re: 4.3.6 The power() Function

From: C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com>
Date: Mon, 6 Nov 2017 16:37:35 -0700
Cc: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>, XForms <public-xformsusers@w3.org>
Message-Id: <0EDD525C-53E7-4054-9F93-B459025FFD38@blackmesatech.com>
To: Steven Pemberton <steven.pemberton@cwi.nl>

> On Nov 6, 2017, at 2:03 AM, Steven Pemberton <steven.pemberton@cwi.nl> wrote:
> https://www.w3.org/community/xformsusers/wiki/XPath_Expressions_Module#The_power.28.29_Function
> ...
> One possible wording is
> "Both arguments may be fractional and negative. If the possible results are real, it returns the positive one. Otherwise it returns NaN.”

The middle sentence makes sense immediately following a discussion of square
roots, but it will sound very odd to a reader thinking of power(2,7) and the like.
It’s also not clear to this reader how that rule applies to the example you gave of
power(-1, 0.2).  There are five results, but only one of them is real; is the intention
to return -1, or NaN?

Perhaps explicit quantification would help.  One of:

 If all possible results are real (as for power(4, 0.5)), then ...

 If any of the possible results are real, then … 

The current wording also seems to assume that at most one possible result will
be a positive real. (If that is guaranteed to be the case, that might be worth saying
in an aside or a note.)

(Removes language-lawyer hat and goes to get a cup of coffee.)

C. M. Sperberg-McQueen
Black Mesa Technologies LLC
Received on Monday, 6 November 2017 23:38:35 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:37:48 UTC