Changeset 11455 in vbox
- Timestamp:
- Aug 18, 2008 8:47:54 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/recompiler/Sun/testmath.c
r8189 r11455 18 18 #endif 19 19 20 #if defined(__GNUC__) && ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) || (__GNUC__ > 4)) 21 /* gcc starting with version 4.3 uses the MPFR library which results in more accurate results */ 22 # define SIN180 -0.8011526357338304777463731115L 23 #else 24 # define SIN180 -0.801152635733830477871L 25 #endif 20 /* gcc starting with version 4.3 uses the MPFR library which results in more accurate results. gcc-4.3.1 seems to emit the less accurate result. So just allow both results. */ 21 #define SIN180a -0.8011526357338304777463731115L 22 #define SIN180b -0.801152635733830477871L 26 23 27 24 static void bitch(const char *pszWhat, const long double *plrdResult, const long double *plrdExpected) … … 54 51 extern int testsin(void) 55 52 { 56 return sinl(180.0L) == SIN180 ;53 return sinl(180.0L) == SIN180a || sinl(180.0L) == SIN180b; 57 54 } 58 55 … … 292 289 lrd = 180.0L; 293 290 CHECK(sinl(lrd), -0.801152635733830477871L); 291 #if 0 294 292 CHECK(sinl(180.0L), SIN180); 293 #else 294 lrdExpect = SIN180a; 295 lrdResult = sinl(180.0L); 296 if (lrdResult != lrdExpect) 297 { 298 lrdExpect = SIN180b; 299 if (lrdResult != lrdExpect) 300 { 301 bitch("sinl(180.0L)", &lrdResult, &lrdExpect); 302 cErrors++; 303 } 304 } 305 #endif 295 306 CHECKLL(testsin(), 1); 296 307
Note:
See TracChangeset
for help on using the changeset viewer.