mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-19 11:45:45 +00:00
ICU-821 gcc 3.0, AIX xlC and os/390 can not properly optimize
IEEEremainder, and we no longer use it. X-SVN-Rev: 6093
This commit is contained in:
parent
8c5742dded
commit
e35b3fc511
1 changed files with 28 additions and 31 deletions
|
@ -20,24 +20,8 @@
|
|||
#include "unicode/ustring.h"
|
||||
#include "cstring.h"
|
||||
|
||||
static void TestPUtilAPI(void);
|
||||
static void testIEEEremainder(void);
|
||||
static void remainderTest(double x, double y, double exp);
|
||||
static void doAssert(double expect, double got, const char *message);
|
||||
static UBool compareWithNAN(double x, double y);
|
||||
|
||||
void addPUtilTest(TestNode** root);
|
||||
static void TestErrorName();
|
||||
|
||||
void
|
||||
addPUtilTest(TestNode** root)
|
||||
{
|
||||
addTest(root, &TestPUtilAPI, "putiltst/TestPUtilAPI");
|
||||
addTest(root, &testIEEEremainder, "putiltst/testIEEEremainder");
|
||||
addTest(root, &TestErrorName, "putiltst/TestErrorName()");
|
||||
|
||||
|
||||
}
|
||||
static void doAssert(double expect, double got, const char *message);
|
||||
|
||||
static void TestPUtilAPI(){
|
||||
|
||||
|
@ -304,6 +288,7 @@ static void TestPUtilAPI(){
|
|||
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void testIEEEremainder()
|
||||
{
|
||||
double pinf = uprv_getInfinity();
|
||||
|
@ -338,20 +323,6 @@ static void testIEEEremainder()
|
|||
remainderTest(ninf, nzero, 1.25); */
|
||||
}
|
||||
|
||||
static UBool compareWithNAN(double x, double y)
|
||||
{
|
||||
if( uprv_isNaN(x) || uprv_isNaN(y) ) {
|
||||
if(!uprv_isNaN(x) || !uprv_isNaN(y) ) {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else if (y != x) { /* no NaN's involved */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void remainderTest(double x, double y, double exp)
|
||||
{
|
||||
double result = uprv_IEEEremainder(x,y);
|
||||
|
@ -368,6 +339,21 @@ static void remainderTest(double x, double y, double exp)
|
|||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
static UBool compareWithNAN(double x, double y)
|
||||
{
|
||||
if( uprv_isNaN(x) || uprv_isNaN(y) ) {
|
||||
if(!uprv_isNaN(x) || !uprv_isNaN(y) ) {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else if (y != x) { /* no NaN's involved */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void doAssert(double got, double expect, const char *message)
|
||||
{
|
||||
|
@ -414,3 +400,14 @@ static void TestErrorName(){
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void addPUtilTest(TestNode** root);
|
||||
|
||||
void
|
||||
addPUtilTest(TestNode** root)
|
||||
{
|
||||
addTest(root, &TestPUtilAPI, "putiltst/TestPUtilAPI");
|
||||
/* addTest(root, &testIEEEremainder, "putiltst/testIEEEremainder"); */
|
||||
addTest(root, &TestErrorName, "putiltst/TestErrorName()");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue