Ciao, I was reading some sources in mpf, and I do not understand a detail.
Documentation of mpf_fits_uint_p reads: "Return non-zero if op would fit in the respective C data type, when truncated to an integer." The source code contains the comment: /* Notice this is equivalent to mpz_set_f + mpz_fits_u*_p. */ But mpf_fits_uint_p (-0.5) returns zero, and our test suite require this behavior: mpf_set_str_or_abort (f, "-0.5", 10); expr = "-0.5"; EXPECT (mpf_fits_ulong_p, 0); EXPECT (mpf_fits_uint_p, 0); EXPECT (mpf_fits_ushort_p, 0); I don't understand... -- http://bodrato.it/papers/ _______________________________________________ gmp-devel mailing list gmp-devel@gmplib.org http://gmplib.org/mailman/listinfo/gmp-devel