VirtualBox

Changeset 6517 in vbox for trunk/src/recompiler/InnoTek


Ignore:
Timestamp:
Jan 25, 2008 5:33:32 PM (17 years ago)
Author:
vboxsync
Message:

gcc-4.3 fix (improved accuracy)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/recompiler/InnoTek/testmath.c

    r3752 r6517  
    1818#endif
    1919
     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
     26
    2027static void bitch(const char *pszWhat, const long double *plrdResult, const long double *plrdExpected)
    2128{
     
    4754extern int testsin(void)
    4855{
    49     return sinl(180.0L) == -0.801152635733830477871L;
     56    return sinl(180.0L) == SIN180;
    5057}
    5158
     
    282289    lrd = 180.0L;
    283290    CHECK(sinl(lrd), -0.801152635733830477871L);
    284     CHECK(sinl(180.0L), -0.801152635733830477871L);
     291    CHECK(sinl(180.0L), SIN180);
    285292    CHECKLL(testsin(), 1);
    286293
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette