diff options
author | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-11-04 13:15:26 +0000 |
---|---|---|
committer | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-11-04 13:15:26 +0000 |
commit | abfa7f839fabfe6a797057128abff86d598076d9 (patch) | |
tree | 478f997f6445673a3f535f08caf32f9e7075ea33 /tests/tacosh.c | |
parent | 342b90d25ebeab276e971826f3a1c8ffbb8f98a6 (diff) | |
download | mpfr-abfa7f839fabfe6a797057128abff86d598076d9.tar.gz |
+ Remove MPFR_CLEAR_NAN and MPFR_CLEAR_INF. Only use MPFR_CLEAR_FLAGS.
MPFR_SET_INF, MPFR_SET_ZERO and MPFR_SET_ZERO must clear the flags before setting them.
+ Add a new test in tacosh.c : check Inf / Nan flags.
+ Use MPFR_IS_SINGULAR in all the remaining files.
+ Fix the use of MPFR_CLEAR_FLAGS.
+ mpfr-impl.h auto include gmp.h, gmp-impl.h, mpfr.h and limits.h.
+ Rename _PROTO to _MPFR_PROTO, and remove _GMP_PROTO.
+ Add MPFR_INT_SIGN macro.
+ Encapsulate a few more the sign.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2529 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tacosh.c')
-rw-r--r-- | tests/tacosh.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/tacosh.c b/tests/tacosh.c index fec59cf5c..378f30307 100644 --- a/tests/tacosh.c +++ b/tests/tacosh.c @@ -32,6 +32,30 @@ MA 02111-1307, USA. */ #define RAND_FUNCTION(x) (mpfr_random (x), mpfr_ui_div (x, 1, x, GMP_RNDN)) #include "tgeneric.c" +static +void check_inf(void) +{ + mpfr_t x,y; + mpfr_init(x); + mpfr_init(y); + MPFR_SET_INF(x); + mpfr_set_ui(y, 1, GMP_RNDN); + mpfr_acosh(x, y, GMP_RNDN); + if (MPFR_IS_INF(x) || MPFR_IS_NAN(x) ) + { + printf("Inf flag not clears in acosh!"); + exit(1); + } + MPFR_SET_NAN(x); + mpfr_acosh(x, y, GMP_RNDN); + if (MPFR_IS_NAN(x) || MPFR_IS_INF(x) ) + { + printf("NAN flag not clears in acosh!"); + exit(1); + } +} + + int main (int argc, char *argv[]) { |