|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 1638 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 1638.
Report 1638 Actions
Problem Report Number 1638 Submitter's Classification Test Suite problem State Resolved Resolution Permanent Interpretation (PIN) Problem Resolution ID PIN.X.0195 Raised 2000-03-08 08:00 Updated 2003-03-13 08:00 Published 2000-03-23 08:00 Product Standard Internationalised System Calls and Libraries Extended V2 (UNIX 98) Certification Program The Open Brand certification program Test Suite VSU version 5.0.4 Test Identification CAPI.os/maths/ilogb 2 Specification System Interfaces and Headers Issue 5 Location in Spec See Problem Text Problem Summary PIN4U.00061 This interpretation allows ilogb(0) to return INT_MIN for UNIX98. Problem Text
This test is failing as our implementation returns INT_MIN for
ilogb(0) and the expected value is -INT_MAX. INT_MIN is the value
expected by XSH, Issue 4, Version 2. PIN4U.00037 was granted against
XSH4.2 and the request claimed that the value returned should be -INT_MAX,
stressing historical reasons and representational problems in a
one's complement architecture. This called for a change to the spec.
Apparently an error was made while changing the specification for
XSH Issue 5, and it says the return value should be -INT_MIN, which
is obviously wrong. Since the test is not aligned with the specifications
and there is no corrigendum to correct this situation, we would request
that a TSD be granted for this test.Test Output
TEST PURPOSE #2
A call to int ilogb(double x) when x is 0 shall return
-INT_MAX.
TEST: ilogb(0) returns -INT_MAX
ERROR: ilogb(0) returned incorrect value
Expected -INT_MAX
Received -2147483648
2 FAILReview Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
The specification issues pertaining to this test are as follows:
1. In XSH4.2 the requirement was for ilogb(0) to return INT_MIN.
2. The intended requirement for UNIX98, as stated in PIN4U.00037,
was for ilogb(0) to return -INT_MAX.
3. This intended future direction was not implemented correctly in
the published version of XSH5. Instead XSH5 requires the
return of -INT_MIN, which is impossible on some architectures
(including the most common one).
4. The new 1999 C Standard allows ilogb(0) to return either INT_MIN
or -INT_MAX, and a future revision of XSH will no doubt align
with C99. (Although this does not automatically mean the XSH
revision would allow both - it could impose a restriction to
only one of the behaviours allowed by C99.)
Since returning INT_MIN was required for UNIX95, and is allowed by the
current C Standard, it is recommended that a permanent interpretation
is granted to allow this behaviour for UNIX98. However, this matter
should first be reviewed by the base working group.
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:
- View Report 1638
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority