[cfp-interest 3683] Re: "function value" and "result"
Jim Thomas
jaswthomas at sbcglobal.net
Sun Oct 26 16:50:52 PDT 2025
> On Oct 26, 2025, at 3:11 PM, Damian McGuckin <damianm at esi.com.au> wrote:
>
>
> Hi Jim,
>
> On Sun, 26 Oct 2025, Jim Thomas wrote:
>
>> Regarding action
>>
>> Jim: Write a note about the locution of "result" vs. "result
>> value" vs. "return value" in some problematical functions where
>> the language is not best today.
>> see
>>
>> https://wiki.edg.com/pub/CFP/WebHome/22function value22 and
>> 22result22-20251026.pdf
>
> Currently, Annex F or Annex G uses the word "result" rather than "return value" across the board. At the moment, Annex F never uses "return value".
Good point. Then “result” would be the right choice to replace “function value" for F.10..9.3.
Regarding comments below, the action here is just about use of “function value” and “result”. The suggestion attempts to deal with the misuses of “function value” separate from other editorial matters.
- Jim Thomas
>
> I note that the Annex F example from the current standard that is quoted is confusing. The 'for' clause has a qualification whose ordering is:
>
> domain and range
>
> and the second has a qualification whose ordering is
>
> range and domain
>
> The standardized syntax, distilled from the most common usage in current Anne F and Annex G, addresses both this confusion and the handling of the and/or precedence question. The use of the word "result" is nothing new. The old syntax only ever used "result".
>
> As seen in the postings in the last two weeks, the standardized syntax for the nextafter() routine says that the text should be:
>
> nextafter (x, y) raises the "overflow" floating point exception
> and the "inexact" floating point exception when |x| < OO and the
> result infinite.
>
> nextafter (x, y) raises the "underflow" floating point exception
> and the "inexact" floating point exception when x != y and the
> result subnormal or zero.
>
> Sorry, the best I could do symbol-wise was using OO for Infinity.
>
> For completeness, if you want to specify domains with a mix of adjectives and inequalities, the first case is written as
>
> nextafter (x, y) raises the "overflow" floating point exception
> and the "inexact" floating point exception when finite x and the
> result infinite.
>
> I am no expert about the syntax in Section 7 or Annex I but I would agree with your ideas there.
>
> Thanks - Damian
More information about the cfp-interest
mailing list