[Cfp-interest 2866] Re: TS-4r and TS-5r changes

Jim Thomas jaswthomas at sbcglobal.net
Sat Aug 26 10:15:53 PDT 2023


You’ve noticed that the list of sub-exceptions is not complete. All 754 says about what sub-exceptions to support is:

Language standards should also define exception lists containing:
― allExceptions: all five exceptions listed in Clause 7, or
― any subset of sub-exceptions―sub-cases of the exceptions in Clause 7 (e.g., the sub-cases of the
invalid operation exception in 7.2); ...

754 doesn’t mention sub-exceptions for exceptions outside of Clause 7, thus not exception from mathematical operations in 754 9.2.

TS-5 goes a little beyond 754, though doesn’t try to be complete, and it allows implementations to add support for other sub-exceptions.

I believe we have sub-exceptions for the more common cases, which might be enough to allow implementers (then users) to try out the feature (which is one of the purposes of a TS).

- Jim Thomas

> On Aug 24, 2023, at 6:01 PM, Damian McGuckin <damianm at esi.com.au> wrote:
> 
> 
> Jim,
> 
> My sincere apologies if the following comment is way too late or out of place.
> 
> Please repost to list if my comments are remotely useful.
> 
> On Thu, 24 Aug 2023, Jim Thomas wrote:
> 
>> ? ?invalid? floating-point exceptions from conversions from floating to integer
>> types (C23 F.4),
>> not caused by signaling NaN input
>> FE_INVALID_INT
> 
> Why not
> 
> 	FE_INVALID_CONVERT

The only invalid conversions are from floating to integer types, for which we have FE_INVALID_INT.
> 
> There already is 8-letter _QUANTIZE so it is not like it is super long.
> 
>> ? ?divide-by-zero? floating-point exceptions from divide operators and functions
>> that divide
>> (C23 7.12.14.4, F.10.11)
>> FE_DIVBYZERO_ZERO
> 
> If there is FE_DIVBYZERO_LOG is about things for the LOG..arithm functions,
> 
> why not let FE_DIVBYZERO_DIV be about things for the DIV..ide operations ...

We have that: FE_DIVBYZERO_ZERO
> 
> Also, if you want to be really finicky, there is no way to distinguish
> 
> 	INF / INF
> and
> 	0 / 0
> 
> with
> 	FP_INVALID_DIV
> 
> Both of which are invalid but for different reasons.
> 
> My 2c.
> 
> Thanks - Damian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20230826/59e2841c/attachment.htm>


More information about the Cfp-interest mailing list