diff options
author | thevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2013-11-08 16:10:53 +0000 |
---|---|---|
committer | thevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2013-11-08 16:10:53 +0000 |
commit | a7389444efd6ddd03bb25445c8f475053bf64c1a (patch) | |
tree | 32e345cb1866136b036f0e675f8d2a76524ea601 | |
parent | 8c3790ebc33bc81fcc0ef11eb77547ebc812ba90 (diff) | |
download | mpc-a7389444efd6ddd03bb25445c8f475053bf64c1a.tar.gz |
[tests/tpl_mpfr.c] Cosmetic changes.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/branches/benchs_tests@1333 211d60ee-9f03-0410-a15a-8952a2c7a4e4
-rw-r--r-- | tests/tpl_mpfr.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/tests/tpl_mpfr.c b/tests/tpl_mpfr.c index e10ab71..50d96d9 100644 --- a/tests/tpl_mpfr.c +++ b/tests/tpl_mpfr.c @@ -1,6 +1,6 @@ /* tpl_mpfr.c -- Helper functions for mpfr data. -Copyright (C) 2012 INRIA +Copyright (C) 2012, 2013 INRIA This file is part of GNU MPC. @@ -67,7 +67,8 @@ tpl_read_mpfr_mantissa (mpc_datafile_context_t* datafile_context, mpfr_ptr x) } void -tpl_read_mpfr (mpc_datafile_context_t* datafile_context, mpfr_ptr x, int *known_sign) +tpl_read_mpfr (mpc_datafile_context_t* datafile_context, mpfr_ptr x, + int* known_sign) { int sign; mpfr_set_prec (x, tpl_read_mpfr_prec (datafile_context)); @@ -102,14 +103,17 @@ tpl_read_mpfr_rnd (mpc_datafile_context_t* datafile_context, mpfr_rnd_t* rnd) break; default: printf ("Error: Unexpected rounding mode '%c' in file '%s' line %lu\n", - datafile_context->nextchar, datafile_context->pathname, datafile_context->line_number); + datafile_context->nextchar, + datafile_context->pathname, + datafile_context->line_number); exit (1); } datafile_context->nextchar = getc (datafile_context->fd); - if (datafile_context->nextchar != EOF && !isspace (datafile_context->nextchar)) { - printf ("Error: Rounding mode not followed by white space in file " - "'%s' line %lu\n", + if (datafile_context->nextchar != EOF + && !isspace (datafile_context->nextchar)) { + printf ("Error: Rounding mode not followed by white space " + "in file '%s' line %lu\n", datafile_context->pathname, datafile_context->line_number); exit (1); } @@ -118,16 +122,16 @@ tpl_read_mpfr_rnd (mpc_datafile_context_t* datafile_context, mpfr_rnd_t* rnd) void -tpl_read_mpfr_inex (mpc_datafile_context_t* datafile_context, int *nread) +tpl_read_mpfr_inex (mpc_datafile_context_t* datafile_context, int *ternary) { - tpl_read_ternary(datafile_context, nread); + tpl_read_ternary(datafile_context, ternary); } int tpl_same_mpfr_value (mpfr_ptr x1, mpfr_ptr x2, int known_sign) { - /* The sign of zeroes and infinities is checked only when - known_sign is true. */ + /* The sign of zeroes and infinities is checked only when known_sign is + true. */ if (mpfr_nan_p (x1)) return mpfr_nan_p (x2); if (mpfr_inf_p (x1)) |