HomeAbout Us A-Z IndexSearch * Contact Us Register LoginPress Shop

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 0347 Details

Help Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges

This page provides all information on Problem Report 0347.


Report 0347 Actions


    Problem Report Number 0347
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Permanent Interpretation (PIN)
    Problem Resolution ID PIN.X.0063
    Raised 2003-02-12 08:00
    Updated 2003-03-13 08:00
    Published 2003-02-18 08:00
    Product Standard Internationalised System Calls and Libraries (XPG4)
    Certification Program The Open Brand certification program
    Test Suite VSX4 version 4.4.5
    Test Identification XOPEN.os/maths/lgamma 4
    Specification System Interfaces and Headers Issue 4
    Location in Spec See Problem Text
    Problem Summary PIN4.063 This problem is also present for /tset/XOPEN.os/maths/gamma/T.gamma 4 since lgamma() and gamma() are required to have the same behavior according to the Open Group specification. The latest (1999) ISO...
    Problem Text
    This problem is also present for /tset/XOPEN.os/maths/gamma/T.gamma 4
    since lgamma() and gamma() are required to have the same behavior
    according to the Open Group specification.

    The latest (1999) ISO C standard says the following for lgamma(x),
    lgammaf(x), and lgammal(x) in clause 7.12.8.3:
    A range error may occur if x is too large or if x is a
    negative integer or zero.
    And, for IEEE floating point systems it requires (clause F.9.5.3):
    lgamma(x) returns +inf and raises the divide-by-zero
    exception for a negative integer or zero.

    The "range error" category requires that errno be set to ERANGE in
    this case; see clause 7.12.1.

    The Open Group specification requires EDOM, which certainly matches
    most (if not all) historic practice. But, the Open Group has always
    deferred to and followed the lead of the C standard regarding the
    behavior of its library routines, and particularly so for the
    mathematical functions.

    As C99 now requires that lgamma() set errno to ERANGE for zero and
    negative integer argument values, it's clear that both ERANGE and
    EDOM must be valid for these tests.
    Test Output
    ************************************************************************
    /tset/XOPEN.os/maths/lgamma/T.lgamma 4 Failed

    Test Description:
    lgamma(), when called with an integral non-positive argument, either
    a. returns HUGE_VAL and may set errno to EDOM (in XPG3 mode, errno
    must be set); or,
    b. returns NaN and may set errno to EDOM.

    Test Strategy:
    PARENT process will
    CREATE [child process|process pair]
    CHILD process will
    CALL lgamma() with non-positive integral argument
    VERIFY that return value and errno are set as expected

    Test Information:
    lgamma(-2) gave incorrect value(s):
    ERRNO VALUES: expected: 33 (EDOM), observed: 34 (ERANGE)
    lgamma(0) gave incorrect value(s):
    ERRNO VALUES: expected: 33 (EDOM), observed: 34 (ERANGE)

    ************************************************************************

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    A Permanent Interpretation is recommended, to allow systems to
    follow this future direction.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution Permanent Interpretation (PIN)
    Review Conclusion
    A Permanent Interpretation is granted.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority