[Cfp-interest 1363] Re: Range errors

Fred J. Tydeman tydeman at tybor.com
Sat Jul 20 10:22:54 PDT 2019


On Sat, 20 Jul 2019 09:01:48 -0700 Jim Thomas wrote:
>
>> The exp10 functions
>> Change 7.12.6.2#2 from
>> 
>> A range error occurs if the magnitude of finite x is too large.
>> to
>> 
>> A range error occurs if the magnitude of x is too large.
>
>I don't think saying "finite" hurts. It's true, and the reader might think this statement has precedence over 7.12.1#5, or view them as contradictory.

Agree, it does not hurt.

In the past, I tried to add "finite" to many of the math functions
descriptions where infinity was not a range error.  The WG14
committee did not like that.  So, I am making it consistent by
removing it here (and elsewhere).

>> The exp10m1 functions
>> Change 7.12.6.3#2 from
>> 
>> A range error occurs if finite x is too large or if the magnitude of nonzero x is too small.
>> to
>> 
>> A range error occurs if positive x is too large or if the magnitude of nonzero x is too small.
>
>See above regarding "finite". This says x, not the magnitude of x, is too large. We refer to the magnitude of x when the sign is to be ignored. No need to say "positive". -2 is not larger than 1, and we should assume the reader understands that. 

I find "finite x is too large" ambiguous.  I see what you mean by magnitude, but
that is not stated in the standard.  Also, expm1, erfc, lgamma use "positive".


---
Fred J. Tydeman        Tydeman Consulting
tydeman at tybor.com      Testing, numerics, programming
+1 (702) 608-6093      Vice-chair of PL22.11 (ANSI "C")
Sample C99+FPCE tests: http://www.tybor.com
Savers sleep well, investors eat well, spenders work forever.



More information about the Cfp-interest mailing list