**Submitter:** Fred Tydeman (US)

**Submission Date:** 2001-02-25

**Source:**

**Reference Document:** ISO/IEC
WG14 N943

**Version:** 1.1

**Date:** 2001-10-16 12:50:00

**Subject:** ` tgamma(zero or negative
integer)` should be considered a pole error.

**Summary**

should be considered a pole error since the correct mathematical result is an exact infinity (whose sign depends upon the side that the limit is taken from). Annex F already does this for the zero argument case.tgamma(zero or negative integer)

**Details**

When the correct mathematical result is an exact infinity (from finite arguments), it is considered a pole or singularity error. This is true if the result's sign is independent of the direction of the limit. It is believed to be true that it still is a pole error if the sign of the infinite result depends upon the direction of the limit.Some symbolic math packages support the concept of +/-infinity in addition to +infinity and -infinity, and in those,

is +/-infinity.tgamma(zero or negative integer)Since +/-infinity cannot be represented in most (all?) floating-point formats, return +infinity for that value.

LIA-2 treats similar cases (math function with exact non-zero integer argument and a result of +/-infinity, such as tan(90 degrees)) as a pole error with the result of signed infinity.

Counter-argument: Forwe have the luxury of0.0and+0.0. Non-zero integers don't have "sides". There is no concept of +/-infinity in IEC 60559 (nor any other hardware floating-point representation), just +infinity and -infinity. If there is no one correct result for a given argument, then that case must be considered an invalid operation or a domain error.-0.0has two results (+infinity or -infinity), so must be considered invalid.tgamma(negative integer), astgamma(x)approaches -infinity, has no unique limit, so must also be considered invalid.x

**Suggested Technical Corrigendum**

In 7.12.8.4 ` tgamma`:

Change:

A domain error occurs iftois a negative integer or if the result cannot be represented whenxis zero.x

A range error may occur ifis a negative integer or zero.x

In F.9.5.4 ` tgamma`:

Change:

toreturns atgamma(x)and raises the "invalid" floating-point exception forNaNa negative integer.x

Change:returnstgamma(x)and raises the "divide-by-zero" floating-point exception for+INFa negative integer.x

toreturns atgamma(-INF)and raises the "invalid" floating-point exception.NaN

returnstgamma(-INF)and raises the "divide-by-zero" floating-point exception.+INF

**Proposed Technical Corrigendum**

In 7.12.8.4 ` tgamma`:

Change:

A domain error occurs iftois a negative integer or if the result cannot be represented whenxis zero.x

A domain error or range error may occur ifis a negative integer or zero.x