void tests_end_mpfr (void) { int err = 0; if (mpfr_get_emin () != default_emin) { printf ("Default emin value has not been restored!\n"); err = 1; } if (mpfr_get_emax () != default_emax) { printf ("Default emax value has not been restored!\n"); err = 1; } mpfr_free_cache (); mpfr_free_cache2 (MPFR_FREE_GLOBAL_CACHE); tests_rand_end (); #ifndef MPFR_USE_MINI_GMP tests_memory_end (); #endif #ifdef MPFR_TESTS_DIVBYZERO /* Define to test the use of MPFR_ERRDIVZERO */ if (fetestexcept (FE_DIVBYZERO|FE_INVALID)) { printf ("A floating-point division by 0 or an invalid operation" " occurred!\n"); #ifdef MPFR_ERRDIVZERO /* This should never occur because the purpose of defining MPFR_ERRDIVZERO is to avoid all the FP divisions by 0. */ err = 1; #endif } #endif if (err) exit (err); }
void tests_end (void) { tests_rand_end (); tests_memory_end (); }