[cfp-interest 3681] Re: "function value" and "result"

Damian McGuckin damianm at esi.com.au
Sun Oct 26 15:11:08 PDT 2025


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".

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