|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0415 Details
Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges
This page provides all information on Problem Report 0415.
Report 0415 Actions
Problem Report Number 0415 Submitter's Classification Test Suite problem State Resolved Resolution Rejected (REJ) Problem Resolution ID REJ.X.0034 Raised 1993-09-08 08:00 Updated 2003-03-13 08:00 Published null Product Standard Internationalised System Calls and Libraries (XPG4) Certification Program The Open Brand certification program Test Suite VSX4 version 4.2.4 Test Identification ANSI.os/mathS/log10 4 Problem Summary PG4R.034 >From a mathematical perspective, log10() of 0 is undefined and so, 0 is out of domain. Therefore our implementation generates a EDOM error and, the value is set to -HUGE_VAL when the input argument i... Problem Text
>From a mathematical perspective, log10() of 0 is undefined and so, 0 is out of domain.
Therefore our implementation generates a EDOM error and, the value is set to -HUGE_VAL when
the input argument is 0. This behaviour
is in line with your definitions of EDOM and ERANGE as described in the XPG4 specification
on system interfaces and headers, Issue 4 section 2.3 ( page 20).
However, the manpage on log10() says that errno may be set to ERANGE and the return
value to -HUGE_VAL for an input of 0. This behaviour is similar to the requirement
in the ISO 9899 standard ( programming languages - C) on page 111, section 7.5.1:
"For all functions, a domain error occurs if an input argument is outside the
domain over which the mathematical function is defined."
Then, in section 7.5.4.5, it says for log10():
"A range error may occur if the argument is zero."
The ISO standard takes a lenient stand ( by saying "may") for the log10() function
behaviour when the input argument is 0 ( which is outside the domain ).
We think that the XPG4 specification, likewise, takes
a lenient stand for this function to align itself to the ISO standard 9899. Additionally,
this behaviour also conforms to the SVID specification ( which actually requires EDOM
to be set but in requiring so, is not in violation to the ISO standard ).
The XPG4 test suite, however, mandates that log10() must set errno to ERANGE and return
- -HUGE_VAL when the input argument is 0. This is inconsistent with the XPG4 specification,
the ISO standard, and the SVID specification. We, therefore, ask that a waiver be granted
to us.Test Output
/tset/ANSI.os/maths/log/T.log 4 Failed
/tset/ANSI.os/maths/log10/T.log10 4 Failed
Test Description:
log10(), when called with a zero argument, returns -HUGE_VAL and may
set errno to ERANGE. (In XPG3 mode, log10() either returns -HUGE_VAL
and sets errno to EDOM or ERANGE, or returns NaN and may set errno to
EDOM or ERANGE.)
Test Strategy:
CALCULATE floating point constants using mlmachar().
CREATE child
REASSIGN stderr to /dev/null to avoid error output from maths
functions.
CALL log10() with a zero argument.
VERIFY return value and errno are set as expected.
Test Information:
ERRNO VALUES: expected: 34 (ERANGE), observed: 33 (EDOM)Review Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
The test code allows for two cases when a zero argument is given to log().
These are that -HUGE_VAL is returned and the error indicator either remains
unchanged or is set to [ERANGE]. This matches the specification in XPG4
which does not allow the error indicator to be set to [EDOM] in these
circumstances.
This is not considered to be a test suite deficiency.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Rejected (REJ) Review Conclusion
This interpretation request is refused.
Problem Reporting System Options:
- View Report 0415
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority