summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/data/rec_sqrt0
-rw-r--r--tests/trec_sqrt.c10
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/data/rec_sqrt b/tests/data/rec_sqrt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/data/rec_sqrt
diff --git a/tests/trec_sqrt.c b/tests/trec_sqrt.c
index eba6f2496..3c7ffc200 100644
--- a/tests/trec_sqrt.c
+++ b/tests/trec_sqrt.c
@@ -111,6 +111,12 @@ bad_case1 (void)
mpfr_clears (x, y, z, (mpfr_ptr) 0);
}
+static int
+pm2 (mpfr_ptr y, mpfr_srcptr x, mp_rnd_t rnd_mode)
+{
+ return mpfr_pow_si (y, x, -2, rnd_mode);
+}
+
int
main (void)
{
@@ -120,6 +126,10 @@ main (void)
bad_case1 ();
test_generic (2, 300, 15);
+ data_check ("data/rec_sqrt", mpfr_rec_sqrt, "mpfr_rec_sqrt");
+ bad_cases (mpfr_rec_sqrt, pm2, "mpfr_rec_sqrt", 8, -256, 255, 4, 128,
+ 800, 50);
+
tests_end_mpfr ();
return 0;
}