summaryrefslogtreecommitdiff
path: root/tests/trndna.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2012-09-20 09:33:30 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2012-09-20 09:33:30 +0000
commit41907045e3377126f75dc82ee63ea274f6369571 (patch)
treeb6fdf3605f98d3ae2ca229a3c95e23a91d2dab2a /tests/trndna.c
parentc79bfddcc853de8977b7db702a0f86e200be461d (diff)
downloadmpfr-41907045e3377126f75dc82ee63ea274f6369571.tar.gz
Applied patch (with minor changes) by Patrick PĂ©lissier to improve
the mpfr_round_nearest_away interface. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8419 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/trndna.c')
-rw-r--r--tests/trndna.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/trndna.c b/tests/trndna.c
index 087072966..22ce10c1b 100644
--- a/tests/trndna.c
+++ b/tests/trndna.c
@@ -32,7 +32,7 @@ test_special (void)
mpfr_init2 (y, MPFR_PREC_MIN);
mpfr_set_nan (x);
- inex = mpfr_round_nearest_away (y, x, mpfr_sin);
+ inex = mpfr_round_nearest_away (mpfr_sin, y, x);
if (inex != 0)
{
printf ("Wrong ternary value for sin(NaN)\n");
@@ -45,7 +45,7 @@ test_special (void)
}
mpfr_set_inf (x, 1);
- inex = mpfr_round_nearest_away (y, x, mpfr_exp);
+ inex = mpfr_round_nearest_away (mpfr_exp, y, x);
if (inex != 0)
{
printf ("Wrong ternary value for exp(+Inf)\n");
@@ -59,7 +59,7 @@ test_special (void)
}
mpfr_set_inf (x, -1);
- inex = mpfr_round_nearest_away (y, x, mpfr_cbrt);
+ inex = mpfr_round_nearest_away (mpfr_cbrt, y, x);
if (inex != 0)
{
printf ("Wrong ternary value for cbrt(-Inf)\n");
@@ -86,7 +86,7 @@ test_nonspecial (void)
/* case where the computation on n+1 bits ends with a '0' */
mpfr_set_ui (x, 2, MPFR_RNDN);
- inex = mpfr_round_nearest_away (y, x, mpfr_sin);
+ inex = mpfr_round_nearest_away (mpfr_sin, y, x);
if (inex >= 0)
{
printf ("Wrong ternary value for sin(2)\n");
@@ -100,7 +100,7 @@ test_nonspecial (void)
/* case where the computation on n+1 bits ends with a '1' and is exact */
mpfr_set_ui (x, 37, MPFR_RNDN);
- inex = mpfr_round_nearest_away (y, x, mpfr_sqr);
+ inex = mpfr_round_nearest_away (mpfr_sqr, y, x);
if (inex <= 0)
{
printf ("Wrong ternary value for sqr(37)\n");
@@ -114,7 +114,7 @@ test_nonspecial (void)
/* case where the computation on n+1 bits ends with a '1' but is inexact */
mpfr_set_ui (x, 91, MPFR_RNDN);
- inex = mpfr_round_nearest_away (y, x, mpfr_sqr);
+ inex = mpfr_round_nearest_away (mpfr_sqr, y, x);
if (inex <= 0)
{
printf ("Wrong ternary value for sqr(91)\n");
@@ -127,7 +127,7 @@ test_nonspecial (void)
}
mpfr_set_ui (x, 131, MPFR_RNDN);
- inex = mpfr_round_nearest_away (y, x, mpfr_sqr);
+ inex = mpfr_round_nearest_away (mpfr_sqr, y, x);
if (inex >= 0)
{
printf ("Wrong ternary value for sqr(131)\n");