ICU-821 gcc 3.0, AIX xlC and os/390 can not properly optimize IEEEremainder

X-SVN-Rev: 6086
This commit is contained in:
George Rhoten 2001-10-05 18:47:09 +00:00
parent 21b8e60b11
commit 197318a1c2
4 changed files with 9 additions and 5 deletions

View File

@ -419,6 +419,8 @@ uprv_pow10(int32_t x)
* and is preferred; the latter may work on platforms where the former * and is preferred; the latter may work on platforms where the former
* fails, but will introduce inaccuracies. * fails, but will introduce inaccuracies.
*/ */
#if 0
/* Several compilers can't optimize this properly, and no one uses it. */
double double
uprv_IEEEremainder(double x, double p) uprv_IEEEremainder(double x, double p)
{ {
@ -505,6 +507,7 @@ uprv_IEEEremainder(double x, double p)
return x; return x;
#endif #endif
} }
#endif
double double
uprv_fmax(double x, double y) uprv_fmax(double x, double y)

View File

@ -57,7 +57,6 @@ U_CAPI double U_EXPORT2 uprv_fabs(double x);
U_CAPI double U_EXPORT2 uprv_modf(double x, double* y); U_CAPI double U_EXPORT2 uprv_modf(double x, double* y);
U_CAPI double U_EXPORT2 uprv_fmod(double x, double y); U_CAPI double U_EXPORT2 uprv_fmod(double x, double y);
U_CAPI double U_EXPORT2 uprv_pow10(int32_t x); U_CAPI double U_EXPORT2 uprv_pow10(int32_t x);
U_CAPI double U_EXPORT2 uprv_IEEEremainder(double x, double y);
U_CAPI double U_EXPORT2 uprv_fmax(double x, double y); U_CAPI double U_EXPORT2 uprv_fmax(double x, double y);
U_CAPI double U_EXPORT2 uprv_fmin(double x, double y); U_CAPI double U_EXPORT2 uprv_fmin(double x, double y);
U_CAPI int32_t U_EXPORT2 uprv_max(int32_t x, int32_t y); U_CAPI int32_t U_EXPORT2 uprv_max(int32_t x, int32_t y);

View File

@ -16,13 +16,14 @@ PUtilTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /
//if (exec) logln("TestSuite PUtilTest: "); //if (exec) logln("TestSuite PUtilTest: ");
switch (index) { switch (index) {
CASE(0, testIEEEremainder) CASE(0, testMaxMin)
CASE(1, testMaxMin) // CASE(1, testIEEEremainder)
default: name = ""; break; //needed to end loop default: name = ""; break; //needed to end loop
} }
} }
#if 0
void void
PUtilTest::testIEEEremainder() PUtilTest::testIEEEremainder()
{ {
@ -87,6 +88,7 @@ PUtilTest::remainderTest(double x, double y, double exp)
logln(UnicodeString("OK: IEEEremainder(") + x + ", " + y + ") is " + result); logln(UnicodeString("OK: IEEEremainder(") + x + ", " + y + ") is " + result);
} }
#endif
void void
PUtilTest::testMaxMin() PUtilTest::testMaxMin()

View File

@ -18,11 +18,11 @@ class PUtilTest : public IntlTest {
void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ); void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
public: public:
void testIEEEremainder(void); // void testIEEEremainder(void);
void testMaxMin(void); void testMaxMin(void);
private: private:
void remainderTest(double x, double y, double exp); // void remainderTest(double x, double y, double exp);
void maxMinTest(double a, double b, double exp, UBool max); void maxMinTest(double a, double b, double exp, UBool max);
}; };