[Cfp-interest 1391] Re: Math functions & range errors
Rajan Bhakta
rbhakta at us.ibm.com
Mon Aug 26 06:30:21 PDT 2019
The wording we agreed to (from the minutes) for 7.12.6.3#2 was "magnitude
of positive finite x is too large".
Regards,
Rajan Bhakta
z/OS XL C/C++ Compiler Technical Architect
ISO C Standards Representative for Canada, PL22.11 Chair (USA)
C Compiler Development
Contact: rbhakta at us.ibm.com, Rajan Bhakta/Houston/IBM
From: "Fred J. Tydeman" <tydeman at tybor.com>
To: "Jim Thomas" <jaswthomas at sbcglobal.net>
Cc: CFP <cfp-interest at ucbtest.org>
Date: 08/25/2019 08:13 PM
Subject: [EXTERNAL] [Cfp-interest 1390] Re: Math functions & range
errors
Sent by: cfp-interest-bounces at oakapple.net
Thanks for reviewing.
On Sun, 25 Aug 2019 15:15:34 -0700 Jim Thomas wrote:
>
>> Some implementations consider f(infinity) as a range error based upon
the text: A range error occurs if [the magnitude
>of] x is too
>>
>Consider changing to: "Some implementations incorrectly treat ".
Done.
>> 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 finite positive x is too large or if the
magnitude of nonzero x is too small.
>I recall David suggesting this be "A range error occurs if the magnitude
of finite positive x is too large ." but am not sure
>what we agreed to.
I also do not recall what we agreed to.
>With that change we'd be saying "magnitude" wherever talking about too
large or too small. Without
>that change we'd be saying "magnitude" just where needed for
correctness.
>> The compoundn functions
>> Change 7.12.7.2#2 from
>>
>> A range error may occur if n is too large, depending on x.
>> to
>>
>> A range error may occur if n is too large, depending on finite x.
>Do we mean if the magnitude of n is too large?
Yes. Changed.
>> The tgamma functions
>> Change 7.12.8.4#2
>>
>> A range error occurs if the magnitude of x is too large and may occur
if the magnitude of x is too small.
>> to:
>>
>> A range error occurs if the magnitude of finite x is too large and may
occur if the magnitude of non-zero x is too small.
>How is there a range error if the magnitude of negative x is too large?
With the FP systems still in use that I know about, all large FP values
are integers. So, large negative values would
be integers, so would be domain or pole errors.
> Can't there be range errors for moderate magnitude
>negative x?
Yes. I think "moderate negative x" could still be considered "too large".
But, I am open to
other wording.
>A general question: What does "may occur" mean?
Does not always happen. For example, on IBM S/360 hex FP, there are no
subnormal numbers,
so underflows will not happen for many functions, that do happen when
subnormals are supported.
An alternative wording: A range errors occurs for some finite arguments.
---
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:
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.tybor.com&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=MPb4GyWs7nd-w3OlFPs29W1dB3gHMdsdghhjcQMf428&m=TddYX-nRIc2kumuRFCtZZODyQI0EvNmjiulkuTF-GZU&s=EkikqFWXxh7JokAbGY9pEDG6aoXCFFOp_zmzcLMz9A8&e=
Savers sleep well, investors eat well, spenders work forever.
_______________________________________________
Cfp-interest mailing list
Cfp-interest at oakapple.net
https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.oakapple.net_mailman_listinfo_cfp-2Dinterest&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=MPb4GyWs7nd-w3OlFPs29W1dB3gHMdsdghhjcQMf428&m=TddYX-nRIc2kumuRFCtZZODyQI0EvNmjiulkuTF-GZU&s=ur4Z5zOMmhRopKD7YRt8VrqUG9_gbADeOLijeNgl0SY&e=
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20190826/846bace7/attachment.html
More information about the Cfp-interest
mailing list