]\n"); exit (EXIT_FAILURE); } dmax = atoi (argv[1]); n = atoi (argv[2]); p = argc == 3 ? n : atoi (argv[3]); if (p < n) { fprintf (stderr, "divworst: p must be greater or equal to n\n"); exit (EXIT_FAILURE); } mpfr_inits2 (n, PRECN, (mpfr_ptr) 0); mpfr_init2 (t, p); for (mpfr_set_ui_2exp (x, 1, -1, GMP_RNDN); mpfr_get_exp (x) <= dmax; mpfr_nextabove (x)) for (mpfr_set_ui_2exp (y, 1, -1, GMP_RNDN); mpfr_get_exp (y) == 0; mpfr_nextabove (y)) { unsigned long rz, rn; if (mpfr_sub (z, x, y, GMP_RNDZ) != 0) continue; /* x - y is not representable in precision n */ rz = eval (x, y, z, t, GMP_RNDZ); rn = eval (x, y, z, t, GMP_RNDN); if (rz == rn) continue; mpfr_printf ("x = %.*Rb ; y = %.*Rb ; Z: %lu ; N: %lu\n", n - 1, x, n - 1, y, rz, rn); } mpfr_clears (VARS, (mpfr_ptr) 0); return 0; }