diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-10-02 17:17:59 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-10-02 17:17:59 +0000 |
commit | 29963d6597d7fdc221eef8df533a8ad55bd7425f (patch) | |
tree | 27570a058b82424e0e0b08eb142ff248d4fb17ae /tests/tdiv_ui.c | |
parent | c4681b7961763f6c05e2ce4858787d146cde7219 (diff) | |
download | mpfr-29963d6597d7fdc221eef8df533a8ad55bd7425f.tar.gz |
Updated documentation. In particular, mpfr_set_str_raw renamed
as mpfr_set_str_binary. This function and mpfr_print_binary are
now internal functions. mpfr_print_binary no longer prints the
non-significant 0 bits. Updated the source to match the manual.
mpfr_print_binary has been completely rewritten (now directly
prints to stdout, without using an intermediate string). In
mpfr_set_str_binary, replaced atol by strtol + error checking.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2466 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tdiv_ui.c')
-rw-r--r-- | tests/tdiv_ui.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/tdiv_ui.c b/tests/tdiv_ui.c index ced6cd364..8e468bdfa 100644 --- a/tests/tdiv_ui.c +++ b/tests/tdiv_ui.c @@ -24,7 +24,9 @@ MA 02111-1307, USA. */ #include <float.h> #include <time.h> #include "gmp.h" +#include "gmp-impl.h" #include "mpfr.h" +#include "mpfr-impl.h" #include "mpfr-test.h" static void @@ -79,9 +81,9 @@ special (void) /* bug found by Norbert Mueller, 21 Aug 2001 */ mpfr_set_prec (x, 110); mpfr_set_prec (y, 60); - mpfr_set_str_raw (x, "0.110101110011111110011111001110011001110111000000111110001000111011000011E-44"); + mpfr_set_str_binary (x, "0.110101110011111110011111001110011001110111000000111110001000111011000011E-44"); mpfr_div_ui (y, x, 17, GMP_RNDN); - mpfr_set_str_raw (x, "0.11001010100101100011101110000001100001010110101001010011011E-48"); + mpfr_set_str_binary (x, "0.11001010100101100011101110000001100001010110101001010011011E-48"); if (mpfr_cmp (x, y)) { printf ("Error in x/17 for x=1/16!\n"); @@ -96,7 +98,7 @@ special (void) for (xprec = 53; xprec <= 128; xprec++) { mpfr_set_prec (x, xprec); - mpfr_set_str_raw (x, "0.1100100100001111110011111000000011011100001100110111E2"); + mpfr_set_str_binary (x, "0.1100100100001111110011111000000011011100001100110111E2"); for (yprec = 53; yprec <= 128; yprec++) { mpfr_set_prec (y, yprec); |