diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2012-02-22 11:33:24 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2012-02-22 11:33:24 +0000 |
commit | bc0a7b3c31ec608ef99453e6e45df07a782904e0 (patch) | |
tree | 6276ce97e6fd10c97665e748960bfae5b5ef2cce | |
parent | 9445e56544be7542b49bb57974ee635e797bacd4 (diff) | |
download | mpfr-bc0a7b3c31ec608ef99453e6e45df07a782904e0.tar.gz |
[tests/tinits.c] Improved r8026 (missing #include, support 16-bit prec).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8029 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | tests/tinits.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/tinits.c b/tests/tinits.c index b191989ec..d133249bb 100644 --- a/tests/tinits.c +++ b/tests/tinits.c @@ -20,12 +20,15 @@ along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <stdlib.h> + #include "mpfr-test.h" int main (void) { mpfr_t a, b, c; + long large_prec; tests_start_mpfr (); @@ -36,9 +39,11 @@ main (void) /* test for precision 2^31-1, see https://gforge.inria.fr/tracker/index.php?func=detail&aid=13918 */ - if (getenv ("MPFR_CHECK_LARGEMEM") != NULL) + large_prec = 2147483647; + if (getenv ("MPFR_CHECK_LARGEMEM") != NULL && + large_prec <= MPFR_PREC_MAX) { - mpfr_init2 (a, 2147483647); + mpfr_init2 (a, large_prec); mpfr_set_ui (a, 17, MPFR_RNDN); if (mpfr_get_ui (a, MPFR_RNDN) != 17) { |