There are several ways to contribute to MPFR:
The Reporting Bugs section of the MPFR manual gives details on how to report new bugs.
Assume you want to write the code, say mpfr_foo
,
for a new mathematical function (say foo):
float
,
double
, etc.);MPFR_CAN_ROUND (approx, approx_err, out_prec, rnd_mode)
exp2
(1) = 2,
sqrt
(25) = 5, etc.;data_check
function in tests/tests.c;foo(x)
with say p bits, then
foo(x)
with p+10 bits, and check that
both results are compatible. A useful function that does that
automatically is test_generic
from
tests/tgeneric.c;bad_cases
function from
tests/tests.c can be used;mpfr_foo (a, a, ...)
. See the
reuse.c test program.mpfr_foo
function in the
file mpfr.texi.git diff
) with
respect to the development version to the MPFR
developers. They will review your contribution to decide if it will be
included in MPFR. In that case, your
contribution will be acknowledged in the corresponding source files and
in the documentation.mpfr_add17
function to
MPFR (note: this patch predates the
source reorganization, so that some files should actually be in the
doc or src directories; moreover, the new
add17.c and tadd17.c files are not provided
in this example).