diff options
author | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2004-01-09 09:50:45 +0000 |
---|---|---|
committer | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2004-01-09 09:50:45 +0000 |
commit | afa6c9e5fbed453df5f98e9aa28576da1ba068b8 (patch) | |
tree | d33e6bac8e0125311b389646e21829c42cf461d1 /mpfr-test.h | |
parent | bdf0dde535fbca439c268290c6c3d2806c16623f (diff) | |
download | mpfr-afa6c9e5fbed453df5f98e9aa28576da1ba068b8.tar.gz |
Add RND_RAND
Add SIGN_RAND
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2617 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'mpfr-test.h')
-rw-r--r-- | mpfr-test.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mpfr-test.h b/mpfr-test.h index 91c7e4219..25697d0c4 100644 --- a/mpfr-test.h +++ b/mpfr-test.h @@ -32,6 +32,12 @@ MA 02111-1307, USA. */ #define MINNORM 2.2250738585072013831e-308 /* 2^(-1022), smallest normalized */ #define MAXNORM 1.7976931348623157081e308 /* 2^(1023)*(2-2^(-52)) */ +/* Generates a random rounding mode */ +#define RND_RAND() (randlimb() % 4) + +/* Generates a random sign */ +#define SIGN_RAND() ( (randlimb()%2) ? MPFR_SIGN_POS : MPFR_SIGN_NEG) + /* The MAX, MIN and ABS macros may already be defined if gmp-impl.h has been included. They have the same semantics as in gmp-impl.h, but the expressions may be slightly different. So, it's better to undefine |