[Cfp-interest 2276] Re: tgamma()

Fred J. Tydeman tydeman at tybor.com
Sat Nov 20 09:23:16 PST 2021


On Sat, 20 Nov 2021 09:27:35 +1100 (AEDT) Damian McGuckin wrote:
>
>On Fri, 19 Nov 2021, Fred J. Tydeman wrote:
>
>>Should 7.12.8.4 tgamma()
>>
>>A domain error or pole error may occur if x is a negative integer or zero.
>>
>>be changed to
>>
>>A domain error shall occur if x is a negative integer.
>>A pole error shall occur is x is zero.
>
>Far clearer. I like it. That said, There is no errno which is a pole error.

While there is no EPOLE as a value for errno, there is a pole error
(see 7.12.1 Treatment of error conditions, paragraph 3).

There might some objection of 'shall' in my rewrite.
It could be replaced with 'should' or 'may'.

Also, if we change lgamma() this way, we should also change tgamma()
in the same way.


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