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

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 0089 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 0089.


Report 0089 Actions


    Problem Report Number 0089
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.0089
    Raised 1993-08-27 08:00
    Updated 2003-03-13 08:00
    Published 1993-09-03 08:00
    Product Standard Internationalised System Calls and Libraries (XPG4)
    Certification Program The Open Brand certification program
    Test Suite VSX4 version 4.2.4
    Test Identification XOPEN.os/maths/j0 4 5
    Problem Summary TSD4.089 The bessel function j0, j1, jn, y0, y1 and yn are essentially damped sin/cos functions. For large values of x, the bessel functions are asymtoticly approximated by: J(n,x) = sqrt(2/(x*pi))*[P(n,x)*cos...
    Problem Text

    The bessel function j0, j1, jn, y0, y1 and yn are essentially damped sin/cos
    functions. For large values of x, the bessel functions are asymtoticly
    approximated by:

    J(n,x) = sqrt(2/(x*pi))*[P(n,x)*cos(z(n,x)) - Q(n,x)*sin(z(n,x))]
    Y(n,x) = sqrt(2/(x*pi))*[P(n,x)*cos(z(n,x)) + Q(n,x)*sin(z(n,x))]

    where z(n,x) = x - (2*n+1)*(pi/4) and P(n,x) and Q(n,x) are rational
    approximations in x. As noted above, many libraries prior to the
    1980, were not capable of computing sin and cos of large arguments.
    Consequently,
    it was not possible to accurately compute the bessel functions for large
    arguments.
    The SVID2 standard ( from where this XPG4 specification has been derived from )
    recognized this difficulty by specifying:

    Arguments too large in magnitude cause the functions j0, j1, jn and
    y0 and y1 to return zero and to set errno to ERANGE...

    Part of the SVVS3 ( System Five Verification Suite 3 ) and so, likewise, the XPG4/VSX
    tests implement this restriction by checking that j0(HUGE_VAL) =
    j1(HUGE_VAL) = jn(9, HUGE_VAL) = y0(HUGE_VAL) = y1(HUGE_VAL) = yn(9, HUGE_VAL) = 0
    when HUGE_VAL is defined to be DBL_MAX.

    We feel that this test is inappropriate because
    it is an arbitrary and unnecessary restriction on the function,

    By implementing the argument scheme by Payne and Hanek for the trig functions
    and
    using special entry points it is possible to accurately evaluate sin(z(n,x)) and
    cos(z(n,x)) regardless of the size of n or x. Moreover, as x gets large,
    P(n,x) --> 1 and Q(n,x) --> [n^2 - 1/4]/x. Consequently the bessel functions
    are
    asymtotic to sqrt(2/(pi*x))*sin(z(n,x)) which may or may not underflow.
    However,
    computation of the correct result is simple and straight forward. The current
    DPML version of the bessel functions implement the appropriate argument
    reduction
    and special trig entry points for correct evaluation of the bessel functions.

    The XP3G standard states:

    Upon successful completion, j0(), j1() and jn() return the relevant
    Bessel value of x ...

    If the x argument is too large in magnitude, the value zero is returned
    and errno may be set to indicate the error.

    The current version of the DPML bessel function satisfies the first clause and
    consequently returns the appropriate value and does not set errno.

    To sum up, the current version of the DPML bessel functions are compliant with
    XPG4 and provides users with the maximum possible
    utility. Therefore we believe that the XPG4 requirement j0(HUGE_VAL) =
    j1(HUGE_VAL) = jn(9, HUGE_VAL) = y0(HUGE_VAL) = y1(HUGE_VAL) = yn(9, HUGE_VAL) = 0 when HUGE_VAL is
    defined to be DBL_MAX should be waived.


    Test Output
    /tset/XOPEN.os/maths/j0/T.j0 4 Failed

    Test Description:
    j0(), when called with a large argument, returns zero and may set
    errno to ERANGE.

    Test Strategy:
    PARENT process will
    CREATE [child process|process pair]
    CHILD process will
    INITIALISE variables using mlsetglobals() - (tsetlib)
    SET range and accuracy of test
    CALCULATE the value of j0 using j0(maxdble)
    VERIFY results of tests using mlresults() - (tsetlib)

    Test Information:
    RETURN VALUES: expected: 0, observed: -4.18699e-155
    Bit Representation: expected value: \000\000\000\000\000\000\000\000
    Bit Representation: observed value: \147\236\122\316\331\366\341\237
    ERRNO VALUES: expected: 34 (ERANGE), observed: 0 (NO ERROR)

    /tset/XOPEN.os/maths/j0/T.j0 5 Failed

    This test also fails for the same reason.

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    This is a case where this implementation is providing an improved
    implementation over that described in the XPG and it does not seem
    appropriate for the implementation to be criticised on this count.

    Effectively, this implementation is able to provide Bessel function
    results for all valid values and the test for the error return condition
    cannot be conducted in these circumstances.

    It is accepted that this should be treated as a test suite deficiency.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution Test Suite Deficiency (TSD)
    Review Conclusion
    This is an agreed test suite deficiency.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority