summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2002-03-26 18:39:57 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2002-03-26 18:39:57 +0000
commitb6ca46407474e07a435ec12b45dc77e067ff6779 (patch)
treec646f424e87e47b64f46d65670ec564f9c206cdf /tests
parent966581fea9ed11672ce12db8436d8bd72fa47e95 (diff)
downloadmpfr-b6ca46407474e07a435ec12b45dc77e067ff6779.tar.gz
- use mpfr_test_init to initialize harware floats
- use #ifdef HAVE_INFS when using DBL_NAN, ... - fixed some problems with wrongly converted f-p values (esp. under IRIX) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1783 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.in920
-rw-r--r--tests/tabs.c42
-rw-r--r--tests/tadd.c45
-rw-r--r--tests/tadd_ui.c16
-rw-r--r--tests/tagm.c2
-rw-r--r--tests/tcmp2.c9
-rw-r--r--tests/tcos.c8
-rw-r--r--tests/tdiv.c29
-rw-r--r--tests/tdiv_ui.c22
-rw-r--r--tests/texp.c16
-rw-r--r--tests/tfma.c20
-rw-r--r--tests/tget_d.c22
-rw-r--r--tests/tget_str.c8
-rw-r--r--tests/tlog.c17
-rw-r--r--tests/tmul.c38
-rw-r--r--tests/tmul_ui.c6
-rw-r--r--tests/tpow.c16
-rw-r--r--tests/tset_d.c27
-rw-r--r--tests/tset_q.c7
-rw-r--r--tests/tsin.c2
-rw-r--r--tests/tsin_cos.c8
-rw-r--r--tests/tsqrt.c27
-rw-r--r--tests/tsqrt_ui.c33
-rw-r--r--tests/tsub_ui.c18
-rw-r--r--tests/ttan.c8
-rw-r--r--tests/tui_div.c37
-rw-r--r--tests/tui_sub.c22
27 files changed, 1193 insertions, 232 deletions
diff --git a/tests/Makefile.in b/tests/Makefile.in
new file mode 100644
index 000000000..4cdbe3005
--- /dev/null
+++ b/tests/Makefile.in
@@ -0,0 +1,920 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+CC = @CC@
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+MAKEINFO = @MAKEINFO@
+MISCFLAGS = @MISCFLAGS@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+VERSION = @VERSION@
+
+check_PROGRAMS = reuse tabs tadd tagm tcan_round tcmp tcmp2 tcmp_ui tdiv tdiv_ui tdump teq texp tget_str tlog tconst_log2 tmul tmul_2exp tmul_ui tout_str tconst_pi tpow trandom tround_prec tset_d tset_f tset_q tset_si tset_str tset_z tsqrt tsqrt_ui tui_div tui_sub tswap ttrunc trint tisnan tget_d tatan tcosh tsinh ttanh tacosh tasinh tatanh thyperbolic texp2 tfactorial tsub tasin tconst_euler tcos tsin ttan tsub_ui tset tlog1p texpm1 tlog2 tlog10 tui_pow tpow3 tadd_ui texceptions tfma thypot tacos
+EXTRA_DIST = tgeneric.c
+
+LDADD = $(top_builddir)/libmpfr.a @LDADD@
+INCLUDES = -I$(top_srcdir) @INCLUDES@
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_CLEAN_FILES =
+
+DEFS = @DEFS@ -I. -I$(srcdir)
+CPPFLAGS = @CPPFLAGS@
+LIBS = @LIBS@
+reuse_SOURCES = reuse.c
+reuse_OBJECTS = reuse.o
+reuse_LDADD = $(LDADD)
+reuse_DEPENDENCIES = $(top_builddir)/libmpfr.a
+reuse_LDFLAGS =
+tabs_SOURCES = tabs.c
+tabs_OBJECTS = tabs.o
+tabs_LDADD = $(LDADD)
+tabs_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tabs_LDFLAGS =
+tadd_SOURCES = tadd.c
+tadd_OBJECTS = tadd.o
+tadd_LDADD = $(LDADD)
+tadd_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tadd_LDFLAGS =
+tagm_SOURCES = tagm.c
+tagm_OBJECTS = tagm.o
+tagm_LDADD = $(LDADD)
+tagm_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tagm_LDFLAGS =
+tcan_round_SOURCES = tcan_round.c
+tcan_round_OBJECTS = tcan_round.o
+tcan_round_LDADD = $(LDADD)
+tcan_round_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tcan_round_LDFLAGS =
+tcmp_SOURCES = tcmp.c
+tcmp_OBJECTS = tcmp.o
+tcmp_LDADD = $(LDADD)
+tcmp_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tcmp_LDFLAGS =
+tcmp2_SOURCES = tcmp2.c
+tcmp2_OBJECTS = tcmp2.o
+tcmp2_LDADD = $(LDADD)
+tcmp2_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tcmp2_LDFLAGS =
+tcmp_ui_SOURCES = tcmp_ui.c
+tcmp_ui_OBJECTS = tcmp_ui.o
+tcmp_ui_LDADD = $(LDADD)
+tcmp_ui_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tcmp_ui_LDFLAGS =
+tdiv_SOURCES = tdiv.c
+tdiv_OBJECTS = tdiv.o
+tdiv_LDADD = $(LDADD)
+tdiv_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tdiv_LDFLAGS =
+tdiv_ui_SOURCES = tdiv_ui.c
+tdiv_ui_OBJECTS = tdiv_ui.o
+tdiv_ui_LDADD = $(LDADD)
+tdiv_ui_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tdiv_ui_LDFLAGS =
+tdump_SOURCES = tdump.c
+tdump_OBJECTS = tdump.o
+tdump_LDADD = $(LDADD)
+tdump_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tdump_LDFLAGS =
+teq_SOURCES = teq.c
+teq_OBJECTS = teq.o
+teq_LDADD = $(LDADD)
+teq_DEPENDENCIES = $(top_builddir)/libmpfr.a
+teq_LDFLAGS =
+texp_SOURCES = texp.c
+texp_OBJECTS = texp.o
+texp_LDADD = $(LDADD)
+texp_DEPENDENCIES = $(top_builddir)/libmpfr.a
+texp_LDFLAGS =
+tget_str_SOURCES = tget_str.c
+tget_str_OBJECTS = tget_str.o
+tget_str_LDADD = $(LDADD)
+tget_str_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tget_str_LDFLAGS =
+tlog_SOURCES = tlog.c
+tlog_OBJECTS = tlog.o
+tlog_LDADD = $(LDADD)
+tlog_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tlog_LDFLAGS =
+tconst_log2_SOURCES = tconst_log2.c
+tconst_log2_OBJECTS = tconst_log2.o
+tconst_log2_LDADD = $(LDADD)
+tconst_log2_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tconst_log2_LDFLAGS =
+tmul_SOURCES = tmul.c
+tmul_OBJECTS = tmul.o
+tmul_LDADD = $(LDADD)
+tmul_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tmul_LDFLAGS =
+tmul_2exp_SOURCES = tmul_2exp.c
+tmul_2exp_OBJECTS = tmul_2exp.o
+tmul_2exp_LDADD = $(LDADD)
+tmul_2exp_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tmul_2exp_LDFLAGS =
+tmul_ui_SOURCES = tmul_ui.c
+tmul_ui_OBJECTS = tmul_ui.o
+tmul_ui_LDADD = $(LDADD)
+tmul_ui_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tmul_ui_LDFLAGS =
+tout_str_SOURCES = tout_str.c
+tout_str_OBJECTS = tout_str.o
+tout_str_LDADD = $(LDADD)
+tout_str_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tout_str_LDFLAGS =
+tconst_pi_SOURCES = tconst_pi.c
+tconst_pi_OBJECTS = tconst_pi.o
+tconst_pi_LDADD = $(LDADD)
+tconst_pi_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tconst_pi_LDFLAGS =
+tpow_SOURCES = tpow.c
+tpow_OBJECTS = tpow.o
+tpow_LDADD = $(LDADD)
+tpow_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tpow_LDFLAGS =
+trandom_SOURCES = trandom.c
+trandom_OBJECTS = trandom.o
+trandom_LDADD = $(LDADD)
+trandom_DEPENDENCIES = $(top_builddir)/libmpfr.a
+trandom_LDFLAGS =
+tround_prec_SOURCES = tround_prec.c
+tround_prec_OBJECTS = tround_prec.o
+tround_prec_LDADD = $(LDADD)
+tround_prec_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tround_prec_LDFLAGS =
+tset_d_SOURCES = tset_d.c
+tset_d_OBJECTS = tset_d.o
+tset_d_LDADD = $(LDADD)
+tset_d_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tset_d_LDFLAGS =
+tset_f_SOURCES = tset_f.c
+tset_f_OBJECTS = tset_f.o
+tset_f_LDADD = $(LDADD)
+tset_f_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tset_f_LDFLAGS =
+tset_q_SOURCES = tset_q.c
+tset_q_OBJECTS = tset_q.o
+tset_q_LDADD = $(LDADD)
+tset_q_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tset_q_LDFLAGS =
+tset_si_SOURCES = tset_si.c
+tset_si_OBJECTS = tset_si.o
+tset_si_LDADD = $(LDADD)
+tset_si_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tset_si_LDFLAGS =
+tset_str_SOURCES = tset_str.c
+tset_str_OBJECTS = tset_str.o
+tset_str_LDADD = $(LDADD)
+tset_str_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tset_str_LDFLAGS =
+tset_z_SOURCES = tset_z.c
+tset_z_OBJECTS = tset_z.o
+tset_z_LDADD = $(LDADD)
+tset_z_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tset_z_LDFLAGS =
+tsqrt_SOURCES = tsqrt.c
+tsqrt_OBJECTS = tsqrt.o
+tsqrt_LDADD = $(LDADD)
+tsqrt_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tsqrt_LDFLAGS =
+tsqrt_ui_SOURCES = tsqrt_ui.c
+tsqrt_ui_OBJECTS = tsqrt_ui.o
+tsqrt_ui_LDADD = $(LDADD)
+tsqrt_ui_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tsqrt_ui_LDFLAGS =
+tui_div_SOURCES = tui_div.c
+tui_div_OBJECTS = tui_div.o
+tui_div_LDADD = $(LDADD)
+tui_div_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tui_div_LDFLAGS =
+tui_sub_SOURCES = tui_sub.c
+tui_sub_OBJECTS = tui_sub.o
+tui_sub_LDADD = $(LDADD)
+tui_sub_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tui_sub_LDFLAGS =
+tswap_SOURCES = tswap.c
+tswap_OBJECTS = tswap.o
+tswap_LDADD = $(LDADD)
+tswap_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tswap_LDFLAGS =
+ttrunc_SOURCES = ttrunc.c
+ttrunc_OBJECTS = ttrunc.o
+ttrunc_LDADD = $(LDADD)
+ttrunc_DEPENDENCIES = $(top_builddir)/libmpfr.a
+ttrunc_LDFLAGS =
+trint_SOURCES = trint.c
+trint_OBJECTS = trint.o
+trint_LDADD = $(LDADD)
+trint_DEPENDENCIES = $(top_builddir)/libmpfr.a
+trint_LDFLAGS =
+tisnan_SOURCES = tisnan.c
+tisnan_OBJECTS = tisnan.o
+tisnan_LDADD = $(LDADD)
+tisnan_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tisnan_LDFLAGS =
+tget_d_SOURCES = tget_d.c
+tget_d_OBJECTS = tget_d.o
+tget_d_LDADD = $(LDADD)
+tget_d_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tget_d_LDFLAGS =
+tatan_SOURCES = tatan.c
+tatan_OBJECTS = tatan.o
+tatan_LDADD = $(LDADD)
+tatan_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tatan_LDFLAGS =
+tcosh_SOURCES = tcosh.c
+tcosh_OBJECTS = tcosh.o
+tcosh_LDADD = $(LDADD)
+tcosh_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tcosh_LDFLAGS =
+tsinh_SOURCES = tsinh.c
+tsinh_OBJECTS = tsinh.o
+tsinh_LDADD = $(LDADD)
+tsinh_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tsinh_LDFLAGS =
+ttanh_SOURCES = ttanh.c
+ttanh_OBJECTS = ttanh.o
+ttanh_LDADD = $(LDADD)
+ttanh_DEPENDENCIES = $(top_builddir)/libmpfr.a
+ttanh_LDFLAGS =
+tacosh_SOURCES = tacosh.c
+tacosh_OBJECTS = tacosh.o
+tacosh_LDADD = $(LDADD)
+tacosh_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tacosh_LDFLAGS =
+tasinh_SOURCES = tasinh.c
+tasinh_OBJECTS = tasinh.o
+tasinh_LDADD = $(LDADD)
+tasinh_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tasinh_LDFLAGS =
+tatanh_SOURCES = tatanh.c
+tatanh_OBJECTS = tatanh.o
+tatanh_LDADD = $(LDADD)
+tatanh_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tatanh_LDFLAGS =
+thyperbolic_SOURCES = thyperbolic.c
+thyperbolic_OBJECTS = thyperbolic.o
+thyperbolic_LDADD = $(LDADD)
+thyperbolic_DEPENDENCIES = $(top_builddir)/libmpfr.a
+thyperbolic_LDFLAGS =
+texp2_SOURCES = texp2.c
+texp2_OBJECTS = texp2.o
+texp2_LDADD = $(LDADD)
+texp2_DEPENDENCIES = $(top_builddir)/libmpfr.a
+texp2_LDFLAGS =
+tfactorial_SOURCES = tfactorial.c
+tfactorial_OBJECTS = tfactorial.o
+tfactorial_LDADD = $(LDADD)
+tfactorial_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tfactorial_LDFLAGS =
+tsub_SOURCES = tsub.c
+tsub_OBJECTS = tsub.o
+tsub_LDADD = $(LDADD)
+tsub_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tsub_LDFLAGS =
+tasin_SOURCES = tasin.c
+tasin_OBJECTS = tasin.o
+tasin_LDADD = $(LDADD)
+tasin_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tasin_LDFLAGS =
+tconst_euler_SOURCES = tconst_euler.c
+tconst_euler_OBJECTS = tconst_euler.o
+tconst_euler_LDADD = $(LDADD)
+tconst_euler_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tconst_euler_LDFLAGS =
+tcos_SOURCES = tcos.c
+tcos_OBJECTS = tcos.o
+tcos_LDADD = $(LDADD)
+tcos_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tcos_LDFLAGS =
+tsin_SOURCES = tsin.c
+tsin_OBJECTS = tsin.o
+tsin_LDADD = $(LDADD)
+tsin_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tsin_LDFLAGS =
+ttan_SOURCES = ttan.c
+ttan_OBJECTS = ttan.o
+ttan_LDADD = $(LDADD)
+ttan_DEPENDENCIES = $(top_builddir)/libmpfr.a
+ttan_LDFLAGS =
+tsub_ui_SOURCES = tsub_ui.c
+tsub_ui_OBJECTS = tsub_ui.o
+tsub_ui_LDADD = $(LDADD)
+tsub_ui_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tsub_ui_LDFLAGS =
+tset_SOURCES = tset.c
+tset_OBJECTS = tset.o
+tset_LDADD = $(LDADD)
+tset_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tset_LDFLAGS =
+tlog1p_SOURCES = tlog1p.c
+tlog1p_OBJECTS = tlog1p.o
+tlog1p_LDADD = $(LDADD)
+tlog1p_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tlog1p_LDFLAGS =
+texpm1_SOURCES = texpm1.c
+texpm1_OBJECTS = texpm1.o
+texpm1_LDADD = $(LDADD)
+texpm1_DEPENDENCIES = $(top_builddir)/libmpfr.a
+texpm1_LDFLAGS =
+tlog2_SOURCES = tlog2.c
+tlog2_OBJECTS = tlog2.o
+tlog2_LDADD = $(LDADD)
+tlog2_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tlog2_LDFLAGS =
+tlog10_SOURCES = tlog10.c
+tlog10_OBJECTS = tlog10.o
+tlog10_LDADD = $(LDADD)
+tlog10_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tlog10_LDFLAGS =
+tui_pow_SOURCES = tui_pow.c
+tui_pow_OBJECTS = tui_pow.o
+tui_pow_LDADD = $(LDADD)
+tui_pow_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tui_pow_LDFLAGS =
+tpow3_SOURCES = tpow3.c
+tpow3_OBJECTS = tpow3.o
+tpow3_LDADD = $(LDADD)
+tpow3_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tpow3_LDFLAGS =
+tadd_ui_SOURCES = tadd_ui.c
+tadd_ui_OBJECTS = tadd_ui.o
+tadd_ui_LDADD = $(LDADD)
+tadd_ui_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tadd_ui_LDFLAGS =
+texceptions_SOURCES = texceptions.c
+texceptions_OBJECTS = texceptions.o
+texceptions_LDADD = $(LDADD)
+texceptions_DEPENDENCIES = $(top_builddir)/libmpfr.a
+texceptions_LDFLAGS =
+tfma_SOURCES = tfma.c
+tfma_OBJECTS = tfma.o
+tfma_LDADD = $(LDADD)
+tfma_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tfma_LDFLAGS =
+thypot_SOURCES = thypot.c
+thypot_OBJECTS = thypot.o
+thypot_LDADD = $(LDADD)
+thypot_DEPENDENCIES = $(top_builddir)/libmpfr.a
+thypot_LDFLAGS =
+tacos_SOURCES = tacos.c
+tacos_OBJECTS = tacos.o
+tacos_LDADD = $(LDADD)
+tacos_DEPENDENCIES = $(top_builddir)/libmpfr.a
+tacos_LDFLAGS =
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON = Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+DEP_FILES = .deps/reuse.P .deps/tabs.P .deps/tacos.P .deps/tacosh.P \
+.deps/tadd.P .deps/tadd_ui.P .deps/tagm.P .deps/tasin.P .deps/tasinh.P \
+.deps/tatan.P .deps/tatanh.P .deps/tcan_round.P .deps/tcmp.P \
+.deps/tcmp2.P .deps/tcmp_ui.P .deps/tconst_euler.P .deps/tconst_log2.P \
+.deps/tconst_pi.P .deps/tcos.P .deps/tcosh.P .deps/tdiv.P \
+.deps/tdiv_ui.P .deps/tdump.P .deps/teq.P .deps/texceptions.P \
+.deps/texp.P .deps/texp2.P .deps/texpm1.P .deps/tfactorial.P \
+.deps/tfma.P .deps/tget_d.P .deps/tget_str.P .deps/thyperbolic.P \
+.deps/thypot.P .deps/tisnan.P .deps/tlog.P .deps/tlog10.P \
+.deps/tlog1p.P .deps/tlog2.P .deps/tmul.P .deps/tmul_2exp.P \
+.deps/tmul_ui.P .deps/tout_str.P .deps/tpow.P .deps/tpow3.P \
+.deps/trandom.P .deps/trint.P .deps/tround_prec.P .deps/tset.P \
+.deps/tset_d.P .deps/tset_f.P .deps/tset_q.P .deps/tset_si.P \
+.deps/tset_str.P .deps/tset_z.P .deps/tsin.P .deps/tsinh.P \
+.deps/tsqrt.P .deps/tsqrt_ui.P .deps/tsub.P .deps/tsub_ui.P \
+.deps/tswap.P .deps/ttan.P .deps/ttanh.P .deps/ttrunc.P .deps/tui_div.P \
+.deps/tui_pow.P .deps/tui_sub.P
+SOURCES = reuse.c tabs.c tadd.c tagm.c tcan_round.c tcmp.c tcmp2.c tcmp_ui.c tdiv.c tdiv_ui.c tdump.c teq.c texp.c tget_str.c tlog.c tconst_log2.c tmul.c tmul_2exp.c tmul_ui.c tout_str.c tconst_pi.c tpow.c trandom.c tround_prec.c tset_d.c tset_f.c tset_q.c tset_si.c tset_str.c tset_z.c tsqrt.c tsqrt_ui.c tui_div.c tui_sub.c tswap.c ttrunc.c trint.c tisnan.c tget_d.c tatan.c tcosh.c tsinh.c ttanh.c tacosh.c tasinh.c tatanh.c thyperbolic.c texp2.c tfactorial.c tsub.c tasin.c tconst_euler.c tcos.c tsin.c ttan.c tsub_ui.c tset.c tlog1p.c texpm1.c tlog2.c tlog10.c tui_pow.c tpow3.c tadd_ui.c texceptions.c tfma.c thypot.c tacos.c
+OBJECTS = reuse.o tabs.o tadd.o tagm.o tcan_round.o tcmp.o tcmp2.o tcmp_ui.o tdiv.o tdiv_ui.o tdump.o teq.o texp.o tget_str.o tlog.o tconst_log2.o tmul.o tmul_2exp.o tmul_ui.o tout_str.o tconst_pi.o tpow.o trandom.o tround_prec.o tset_d.o tset_f.o tset_q.o tset_si.o tset_str.o tset_z.o tsqrt.o tsqrt_ui.o tui_div.o tui_sub.o tswap.o ttrunc.o trint.o tisnan.o tget_d.o tatan.o tcosh.o tsinh.o ttanh.o tacosh.o tasinh.o tatanh.o thyperbolic.o texp2.o tfactorial.o tsub.o tasin.o tconst_euler.o tcos.o tsin.o ttan.o tsub_ui.o tset.o tlog1p.o texpm1.o tlog2.o tlog10.o tui_pow.o tpow3.o tadd_ui.o texceptions.o tfma.o thypot.o tacos.o
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .o .s
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-checkPROGRAMS:
+
+clean-checkPROGRAMS:
+ -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+
+distclean-checkPROGRAMS:
+
+maintainer-clean-checkPROGRAMS:
+
+.s.o:
+ $(COMPILE) -c $<
+
+.S.o:
+ $(COMPILE) -c $<
+
+mostlyclean-compile:
+ -rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+ -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+reuse: $(reuse_OBJECTS) $(reuse_DEPENDENCIES)
+ @rm -f reuse
+ $(LINK) $(reuse_LDFLAGS) $(reuse_OBJECTS) $(reuse_LDADD) $(LIBS)
+
+tabs: $(tabs_OBJECTS) $(tabs_DEPENDENCIES)
+ @rm -f tabs
+ $(LINK) $(tabs_LDFLAGS) $(tabs_OBJECTS) $(tabs_LDADD) $(LIBS)
+
+tadd: $(tadd_OBJECTS) $(tadd_DEPENDENCIES)
+ @rm -f tadd
+ $(LINK) $(tadd_LDFLAGS) $(tadd_OBJECTS) $(tadd_LDADD) $(LIBS)
+
+tagm: $(tagm_OBJECTS) $(tagm_DEPENDENCIES)
+ @rm -f tagm
+ $(LINK) $(tagm_LDFLAGS) $(tagm_OBJECTS) $(tagm_LDADD) $(LIBS)
+
+tcan_round: $(tcan_round_OBJECTS) $(tcan_round_DEPENDENCIES)
+ @rm -f tcan_round
+ $(LINK) $(tcan_round_LDFLAGS) $(tcan_round_OBJECTS) $(tcan_round_LDADD) $(LIBS)
+
+tcmp: $(tcmp_OBJECTS) $(tcmp_DEPENDENCIES)
+ @rm -f tcmp
+ $(LINK) $(tcmp_LDFLAGS) $(tcmp_OBJECTS) $(tcmp_LDADD) $(LIBS)
+
+tcmp2: $(tcmp2_OBJECTS) $(tcmp2_DEPENDENCIES)
+ @rm -f tcmp2
+ $(LINK) $(tcmp2_LDFLAGS) $(tcmp2_OBJECTS) $(tcmp2_LDADD) $(LIBS)
+
+tcmp_ui: $(tcmp_ui_OBJECTS) $(tcmp_ui_DEPENDENCIES)
+ @rm -f tcmp_ui
+ $(LINK) $(tcmp_ui_LDFLAGS) $(tcmp_ui_OBJECTS) $(tcmp_ui_LDADD) $(LIBS)
+
+tdiv: $(tdiv_OBJECTS) $(tdiv_DEPENDENCIES)
+ @rm -f tdiv
+ $(LINK) $(tdiv_LDFLAGS) $(tdiv_OBJECTS) $(tdiv_LDADD) $(LIBS)
+
+tdiv_ui: $(tdiv_ui_OBJECTS) $(tdiv_ui_DEPENDENCIES)
+ @rm -f tdiv_ui
+ $(LINK) $(tdiv_ui_LDFLAGS) $(tdiv_ui_OBJECTS) $(tdiv_ui_LDADD) $(LIBS)
+
+tdump: $(tdump_OBJECTS) $(tdump_DEPENDENCIES)
+ @rm -f tdump
+ $(LINK) $(tdump_LDFLAGS) $(tdump_OBJECTS) $(tdump_LDADD) $(LIBS)
+
+teq: $(teq_OBJECTS) $(teq_DEPENDENCIES)
+ @rm -f teq
+ $(LINK) $(teq_LDFLAGS) $(teq_OBJECTS) $(teq_LDADD) $(LIBS)
+
+texp: $(texp_OBJECTS) $(texp_DEPENDENCIES)
+ @rm -f texp
+ $(LINK) $(texp_LDFLAGS) $(texp_OBJECTS) $(texp_LDADD) $(LIBS)
+
+tget_str: $(tget_str_OBJECTS) $(tget_str_DEPENDENCIES)
+ @rm -f tget_str
+ $(LINK) $(tget_str_LDFLAGS) $(tget_str_OBJECTS) $(tget_str_LDADD) $(LIBS)
+
+tlog: $(tlog_OBJECTS) $(tlog_DEPENDENCIES)
+ @rm -f tlog
+ $(LINK) $(tlog_LDFLAGS) $(tlog_OBJECTS) $(tlog_LDADD) $(LIBS)
+
+tconst_log2: $(tconst_log2_OBJECTS) $(tconst_log2_DEPENDENCIES)
+ @rm -f tconst_log2
+ $(LINK) $(tconst_log2_LDFLAGS) $(tconst_log2_OBJECTS) $(tconst_log2_LDADD) $(LIBS)
+
+tmul: $(tmul_OBJECTS) $(tmul_DEPENDENCIES)
+ @rm -f tmul
+ $(LINK) $(tmul_LDFLAGS) $(tmul_OBJECTS) $(tmul_LDADD) $(LIBS)
+
+tmul_2exp: $(tmul_2exp_OBJECTS) $(tmul_2exp_DEPENDENCIES)
+ @rm -f tmul_2exp
+ $(LINK) $(tmul_2exp_LDFLAGS) $(tmul_2exp_OBJECTS) $(tmul_2exp_LDADD) $(LIBS)
+
+tmul_ui: $(tmul_ui_OBJECTS) $(tmul_ui_DEPENDENCIES)
+ @rm -f tmul_ui
+ $(LINK) $(tmul_ui_LDFLAGS) $(tmul_ui_OBJECTS) $(tmul_ui_LDADD) $(LIBS)
+
+tout_str: $(tout_str_OBJECTS) $(tout_str_DEPENDENCIES)
+ @rm -f tout_str
+ $(LINK) $(tout_str_LDFLAGS) $(tout_str_OBJECTS) $(tout_str_LDADD) $(LIBS)
+
+tconst_pi: $(tconst_pi_OBJECTS) $(tconst_pi_DEPENDENCIES)
+ @rm -f tconst_pi
+ $(LINK) $(tconst_pi_LDFLAGS) $(tconst_pi_OBJECTS) $(tconst_pi_LDADD) $(LIBS)
+
+tpow: $(tpow_OBJECTS) $(tpow_DEPENDENCIES)
+ @rm -f tpow
+ $(LINK) $(tpow_LDFLAGS) $(tpow_OBJECTS) $(tpow_LDADD) $(LIBS)
+
+trandom: $(trandom_OBJECTS) $(trandom_DEPENDENCIES)
+ @rm -f trandom
+ $(LINK) $(trandom_LDFLAGS) $(trandom_OBJECTS) $(trandom_LDADD) $(LIBS)
+
+tround_prec: $(tround_prec_OBJECTS) $(tround_prec_DEPENDENCIES)
+ @rm -f tround_prec
+ $(LINK) $(tround_prec_LDFLAGS) $(tround_prec_OBJECTS) $(tround_prec_LDADD) $(LIBS)
+
+tset_d: $(tset_d_OBJECTS) $(tset_d_DEPENDENCIES)
+ @rm -f tset_d
+ $(LINK) $(tset_d_LDFLAGS) $(tset_d_OBJECTS) $(tset_d_LDADD) $(LIBS)
+
+tset_f: $(tset_f_OBJECTS) $(tset_f_DEPENDENCIES)
+ @rm -f tset_f
+ $(LINK) $(tset_f_LDFLAGS) $(tset_f_OBJECTS) $(tset_f_LDADD) $(LIBS)
+
+tset_q: $(tset_q_OBJECTS) $(tset_q_DEPENDENCIES)
+ @rm -f tset_q
+ $(LINK) $(tset_q_LDFLAGS) $(tset_q_OBJECTS) $(tset_q_LDADD) $(LIBS)
+
+tset_si: $(tset_si_OBJECTS) $(tset_si_DEPENDENCIES)
+ @rm -f tset_si
+ $(LINK) $(tset_si_LDFLAGS) $(tset_si_OBJECTS) $(tset_si_LDADD) $(LIBS)
+
+tset_str: $(tset_str_OBJECTS) $(tset_str_DEPENDENCIES)
+ @rm -f tset_str
+ $(LINK) $(tset_str_LDFLAGS) $(tset_str_OBJECTS) $(tset_str_LDADD) $(LIBS)
+
+tset_z: $(tset_z_OBJECTS) $(tset_z_DEPENDENCIES)
+ @rm -f tset_z
+ $(LINK) $(tset_z_LDFLAGS) $(tset_z_OBJECTS) $(tset_z_LDADD) $(LIBS)
+
+tsqrt: $(tsqrt_OBJECTS) $(tsqrt_DEPENDENCIES)
+ @rm -f tsqrt
+ $(LINK) $(tsqrt_LDFLAGS) $(tsqrt_OBJECTS) $(tsqrt_LDADD) $(LIBS)
+
+tsqrt_ui: $(tsqrt_ui_OBJECTS) $(tsqrt_ui_DEPENDENCIES)
+ @rm -f tsqrt_ui
+ $(LINK) $(tsqrt_ui_LDFLAGS) $(tsqrt_ui_OBJECTS) $(tsqrt_ui_LDADD) $(LIBS)
+
+tui_div: $(tui_div_OBJECTS) $(tui_div_DEPENDENCIES)
+ @rm -f tui_div
+ $(LINK) $(tui_div_LDFLAGS) $(tui_div_OBJECTS) $(tui_div_LDADD) $(LIBS)
+
+tui_sub: $(tui_sub_OBJECTS) $(tui_sub_DEPENDENCIES)
+ @rm -f tui_sub
+ $(LINK) $(tui_sub_LDFLAGS) $(tui_sub_OBJECTS) $(tui_sub_LDADD) $(LIBS)
+
+tswap: $(tswap_OBJECTS) $(tswap_DEPENDENCIES)
+ @rm -f tswap
+ $(LINK) $(tswap_LDFLAGS) $(tswap_OBJECTS) $(tswap_LDADD) $(LIBS)
+
+ttrunc: $(ttrunc_OBJECTS) $(ttrunc_DEPENDENCIES)
+ @rm -f ttrunc
+ $(LINK) $(ttrunc_LDFLAGS) $(ttrunc_OBJECTS) $(ttrunc_LDADD) $(LIBS)
+
+trint: $(trint_OBJECTS) $(trint_DEPENDENCIES)
+ @rm -f trint
+ $(LINK) $(trint_LDFLAGS) $(trint_OBJECTS) $(trint_LDADD) $(LIBS)
+
+tisnan: $(tisnan_OBJECTS) $(tisnan_DEPENDENCIES)
+ @rm -f tisnan
+ $(LINK) $(tisnan_LDFLAGS) $(tisnan_OBJECTS) $(tisnan_LDADD) $(LIBS)
+
+tget_d: $(tget_d_OBJECTS) $(tget_d_DEPENDENCIES)
+ @rm -f tget_d
+ $(LINK) $(tget_d_LDFLAGS) $(tget_d_OBJECTS) $(tget_d_LDADD) $(LIBS)
+
+tatan: $(tatan_OBJECTS) $(tatan_DEPENDENCIES)
+ @rm -f tatan
+ $(LINK) $(tatan_LDFLAGS) $(tatan_OBJECTS) $(tatan_LDADD) $(LIBS)
+
+tcosh: $(tcosh_OBJECTS) $(tcosh_DEPENDENCIES)
+ @rm -f tcosh
+ $(LINK) $(tcosh_LDFLAGS) $(tcosh_OBJECTS) $(tcosh_LDADD) $(LIBS)
+
+tsinh: $(tsinh_OBJECTS) $(tsinh_DEPENDENCIES)
+ @rm -f tsinh
+ $(LINK) $(tsinh_LDFLAGS) $(tsinh_OBJECTS) $(tsinh_LDADD) $(LIBS)
+
+ttanh: $(ttanh_OBJECTS) $(ttanh_DEPENDENCIES)
+ @rm -f ttanh
+ $(LINK) $(ttanh_LDFLAGS) $(ttanh_OBJECTS) $(ttanh_LDADD) $(LIBS)
+
+tacosh: $(tacosh_OBJECTS) $(tacosh_DEPENDENCIES)
+ @rm -f tacosh
+ $(LINK) $(tacosh_LDFLAGS) $(tacosh_OBJECTS) $(tacosh_LDADD) $(LIBS)
+
+tasinh: $(tasinh_OBJECTS) $(tasinh_DEPENDENCIES)
+ @rm -f tasinh
+ $(LINK) $(tasinh_LDFLAGS) $(tasinh_OBJECTS) $(tasinh_LDADD) $(LIBS)
+
+tatanh: $(tatanh_OBJECTS) $(tatanh_DEPENDENCIES)
+ @rm -f tatanh
+ $(LINK) $(tatanh_LDFLAGS) $(tatanh_OBJECTS) $(tatanh_LDADD) $(LIBS)
+
+thyperbolic: $(thyperbolic_OBJECTS) $(thyperbolic_DEPENDENCIES)
+ @rm -f thyperbolic
+ $(LINK) $(thyperbolic_LDFLAGS) $(thyperbolic_OBJECTS) $(thyperbolic_LDADD) $(LIBS)
+
+texp2: $(texp2_OBJECTS) $(texp2_DEPENDENCIES)
+ @rm -f texp2
+ $(LINK) $(texp2_LDFLAGS) $(texp2_OBJECTS) $(texp2_LDADD) $(LIBS)
+
+tfactorial: $(tfactorial_OBJECTS) $(tfactorial_DEPENDENCIES)
+ @rm -f tfactorial
+ $(LINK) $(tfactorial_LDFLAGS) $(tfactorial_OBJECTS) $(tfactorial_LDADD) $(LIBS)
+
+tsub: $(tsub_OBJECTS) $(tsub_DEPENDENCIES)
+ @rm -f tsub
+ $(LINK) $(tsub_LDFLAGS) $(tsub_OBJECTS) $(tsub_LDADD) $(LIBS)
+
+tasin: $(tasin_OBJECTS) $(tasin_DEPENDENCIES)
+ @rm -f tasin
+ $(LINK) $(tasin_LDFLAGS) $(tasin_OBJECTS) $(tasin_LDADD) $(LIBS)
+
+tconst_euler: $(tconst_euler_OBJECTS) $(tconst_euler_DEPENDENCIES)
+ @rm -f tconst_euler
+ $(LINK) $(tconst_euler_LDFLAGS) $(tconst_euler_OBJECTS) $(tconst_euler_LDADD) $(LIBS)
+
+tcos: $(tcos_OBJECTS) $(tcos_DEPENDENCIES)
+ @rm -f tcos
+ $(LINK) $(tcos_LDFLAGS) $(tcos_OBJECTS) $(tcos_LDADD) $(LIBS)
+
+tsin: $(tsin_OBJECTS) $(tsin_DEPENDENCIES)
+ @rm -f tsin
+ $(LINK) $(tsin_LDFLAGS) $(tsin_OBJECTS) $(tsin_LDADD) $(LIBS)
+
+ttan: $(ttan_OBJECTS) $(ttan_DEPENDENCIES)
+ @rm -f ttan
+ $(LINK) $(ttan_LDFLAGS) $(ttan_OBJECTS) $(ttan_LDADD) $(LIBS)
+
+tsub_ui: $(tsub_ui_OBJECTS) $(tsub_ui_DEPENDENCIES)
+ @rm -f tsub_ui
+ $(LINK) $(tsub_ui_LDFLAGS) $(tsub_ui_OBJECTS) $(tsub_ui_LDADD) $(LIBS)
+
+tset: $(tset_OBJECTS) $(tset_DEPENDENCIES)
+ @rm -f tset
+ $(LINK) $(tset_LDFLAGS) $(tset_OBJECTS) $(tset_LDADD) $(LIBS)
+
+tlog1p: $(tlog1p_OBJECTS) $(tlog1p_DEPENDENCIES)
+ @rm -f tlog1p
+ $(LINK) $(tlog1p_LDFLAGS) $(tlog1p_OBJECTS) $(tlog1p_LDADD) $(LIBS)
+
+texpm1: $(texpm1_OBJECTS) $(texpm1_DEPENDENCIES)
+ @rm -f texpm1
+ $(LINK) $(texpm1_LDFLAGS) $(texpm1_OBJECTS) $(texpm1_LDADD) $(LIBS)
+
+tlog2: $(tlog2_OBJECTS) $(tlog2_DEPENDENCIES)
+ @rm -f tlog2
+ $(LINK) $(tlog2_LDFLAGS) $(tlog2_OBJECTS) $(tlog2_LDADD) $(LIBS)
+
+tlog10: $(tlog10_OBJECTS) $(tlog10_DEPENDENCIES)
+ @rm -f tlog10
+ $(LINK) $(tlog10_LDFLAGS) $(tlog10_OBJECTS) $(tlog10_LDADD) $(LIBS)
+
+tui_pow: $(tui_pow_OBJECTS) $(tui_pow_DEPENDENCIES)
+ @rm -f tui_pow
+ $(LINK) $(tui_pow_LDFLAGS) $(tui_pow_OBJECTS) $(tui_pow_LDADD) $(LIBS)
+
+tpow3: $(tpow3_OBJECTS) $(tpow3_DEPENDENCIES)
+ @rm -f tpow3
+ $(LINK) $(tpow3_LDFLAGS) $(tpow3_OBJECTS) $(tpow3_LDADD) $(LIBS)
+
+tadd_ui: $(tadd_ui_OBJECTS) $(tadd_ui_DEPENDENCIES)
+ @rm -f tadd_ui
+ $(LINK) $(tadd_ui_LDFLAGS) $(tadd_ui_OBJECTS) $(tadd_ui_LDADD) $(LIBS)
+
+texceptions: $(texceptions_OBJECTS) $(texceptions_DEPENDENCIES)
+ @rm -f texceptions
+ $(LINK) $(texceptions_LDFLAGS) $(texceptions_OBJECTS) $(texceptions_LDADD) $(LIBS)
+
+tfma: $(tfma_OBJECTS) $(tfma_DEPENDENCIES)
+ @rm -f tfma
+ $(LINK) $(tfma_LDFLAGS) $(tfma_OBJECTS) $(tfma_LDADD) $(LIBS)
+
+thypot: $(thypot_OBJECTS) $(thypot_DEPENDENCIES)
+ @rm -f thypot
+ $(LINK) $(thypot_LDFLAGS) $(thypot_OBJECTS) $(thypot_LDADD) $(LIBS)
+
+tacos: $(tacos_OBJECTS) $(tacos_DEPENDENCIES)
+ @rm -f tacos
+ $(LINK) $(tacos_LDFLAGS) $(tacos_OBJECTS) $(tacos_LDADD) $(LIBS)
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = tests
+
+distdir: $(DISTFILES)
+ here=`cd $(top_builddir) && pwd`; \
+ top_distdir=`cd $(top_distdir) && pwd`; \
+ distdir=`cd $(distdir) && pwd`; \
+ cd $(top_srcdir) \
+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu tests/Makefile
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+
+DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
+
+-include $(DEP_FILES)
+
+mostlyclean-depend:
+
+clean-depend:
+
+distclean-depend:
+ -rm -rf .deps
+
+maintainer-clean-depend:
+
+%.o: %.c
+ @echo '$(COMPILE) -c $<'; \
+ $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+ @-cp .deps/$(*F).pp .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm .deps/$(*F).pp
+
+%.lo: %.c
+ @echo '$(LTCOMPILE) -c $<'; \
+ $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+ @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
+ < .deps/$(*F).pp > .deps/$(*F).P; \
+ tr ' ' '\012' < .deps/$(*F).pp \
+ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+ >> .deps/$(*F).P; \
+ rm -f .deps/$(*F).pp
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-checkPROGRAMS mostlyclean-compile \
+ mostlyclean-tags mostlyclean-depend mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-checkPROGRAMS clean-compile clean-tags clean-depend \
+ clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-checkPROGRAMS distclean-compile distclean-tags \
+ distclean-depend distclean-generic clean-am
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-checkPROGRAMS \
+ maintainer-clean-compile maintainer-clean-tags \
+ maintainer-clean-depend maintainer-clean-generic \
+ distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-checkPROGRAMS distclean-checkPROGRAMS \
+clean-checkPROGRAMS maintainer-clean-checkPROGRAMS mostlyclean-compile \
+distclean-compile clean-compile maintainer-clean-compile tags \
+mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
+distdir mostlyclean-depend distclean-depend clean-depend \
+maintainer-clean-depend info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+../libmpfr.a:
+ cd $(top_srcdir); make libmpfr.a
+
+check: all
+ for i in $(check_PROGRAMS); do echo Testing $$i ; ./$$i || echo "### $$i failed ###"; done
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tests/tabs.c b/tests/tabs.c
index 97ca29f7e..672e71963 100644
--- a/tests/tabs.c
+++ b/tests/tabs.c
@@ -23,6 +23,7 @@ MA 02111-1307, USA. */
#include <stdlib.h>
#include "gmp.h"
#include "mpfr.h"
+#include "mpfr-impl.h"
#include "mpfr-test.h"
void check_inexact _PROTO((void));
@@ -80,14 +81,11 @@ check_inexact (void)
int
main (int argc, char *argv[])
{
- mpfr_t x; int n, k, rnd; double d, dd;
-#ifdef __mips
- /* to get denormalized numbers on IRIX64 */
- union fpc_csr exp;
- exp.fc_word = get_fpc_csr();
- exp.fc_struct.flush = 0;
- set_fpc_csr(exp.fc_word);
-#endif
+ mpfr_t x;
+ int n, k, rnd;
+ double d, absd, dd;
+
+ mpfr_test_init ();
check_inexact ();
@@ -105,7 +103,7 @@ main (int argc, char *argv[])
fprintf(stderr, "Error in mpfr_abs(-1.0)\n"); exit(1);
}
- mpfr_set_d (x, -6/-0., GMP_RNDN);
+ mpfr_set_inf (x, 1);
mpfr_abs (x, x, GMP_RNDN);
if (!mpfr_inf_p(x) || (mpfr_sgn(x) <= 0))
{
@@ -113,7 +111,7 @@ main (int argc, char *argv[])
exit (1);
}
- mpfr_set_d (x, 2/-0., GMP_RNDN);
+ mpfr_set_inf (x, -1);
mpfr_abs (x, x, GMP_RNDN);
if (!mpfr_inf_p(x) || (mpfr_sgn(x) <= 0))
{
@@ -123,16 +121,26 @@ main (int argc, char *argv[])
n = (argc==1) ? 1000000 : atoi(argv[1]);
for (k = 1; k <= n; k++)
- {
- d = drand();
+ {
+ do
+ {
+ d = drand ();
+ absd = ABS(d);
+ }
+#ifdef HAVE_DENORMS
+ while (0);
+#else
+ while (absd <= 2.2e-307);
+#endif
rnd = LONG_RAND() % 4;
- mpfr_set_d(x, d, 0);
- mpfr_abs(x, x, rnd);
- dd = mpfr_get_d(x);
- if (!isnan(d) && dd != ABS(d))
+ mpfr_set_d (x, d, 0);
+ mpfr_abs (x, x, rnd);
+ dd = mpfr_get_d (x);
+ if (!isnan(d) && (dd != absd))
{
fprintf(stderr,
- "Mismatch on d = %1.18g\n", d);
+ "Mismatch on d = %.20e\n", d);
+ fprintf(stderr, "dd=%.20e\n", dd);
mpfr_print_binary(x); putchar('\n');
exit(1);
}
diff --git a/tests/tadd.c b/tests/tadd.c
index 2f0fcc450..b45c4df3c 100644
--- a/tests/tadd.c
+++ b/tests/tadd.c
@@ -56,7 +56,7 @@ check (double x, double y, mp_rnd_t rnd_mode, unsigned int px,
mpfr_set_d(xx, x, rnd_mode);
mpfr_set_d(yy, y, rnd_mode);
mpfr_add(zz, xx, yy, rnd_mode);
-#ifdef TEST
+#ifdef HAVE_FENV
mpfr_set_machine_rnd_mode(rnd_mode);
if (px==53 && py==53 && pz==53) cert=1;
#endif
@@ -84,7 +84,7 @@ checknan (double x, double y, mp_rnd_t rnd_mode, unsigned int px,
mpfr_set_d(xx, x, rnd_mode);
mpfr_set_d(yy, y, rnd_mode);
mpfr_add(zz, xx, yy, rnd_mode);
-#ifdef TEST
+#ifdef HAVE_FENV
mpfr_set_machine_rnd_mode(rnd_mode);
#endif
if (MPFR_IS_NAN(zz) == 0) { printf("Error, not an MPFR_NAN for xx = %1.20e, y = %1.20e\n", x, y); exit(1); }
@@ -94,7 +94,7 @@ checknan (double x, double y, mp_rnd_t rnd_mode, unsigned int px,
mpfr_clear(xx); mpfr_clear(yy); mpfr_clear(zz);
}
-#ifdef TEST
+#ifdef HAVE_FENV
/* idem than check for mpfr_add(x, x, y) */
void
check3 (double x, double y, mp_rnd_t rnd_mode)
@@ -640,19 +640,15 @@ check_inexact (void)
int
main (int argc, char *argv[])
{
-#ifdef TEST
+#ifdef HAVE_FENV
int prec, rnd_mode;
- int i, rnd;
- double x, y;
-#endif
-#ifdef __mips
- /* to get denormalized numbers on IRIX64 */
- union fpc_csr exp;
- exp.fc_word = get_fpc_csr();
- exp.fc_struct.flush = 0;
- set_fpc_csr(exp.fc_word);
+ int rnd;
+ double y;
#endif
+ double x;
+ int i;
+ mpfr_test_init ();
check_inexact ();
check_case_1b ();
check_case_2 ();
@@ -738,8 +734,9 @@ main (int argc, char *argv[])
GMP_RNDD, "-b.eae2643497ff6286b@-108");
check2a(-3.31624349995221499866e-22,107,-8.20150212714204839621e+156,79,99,
GMP_RNDD, "-2.63b22b55697e8000000000008@130");
- check2a(-1.08007920352320089721e+150,63,1.77607317509426332389e+73,64,64,
- GMP_RNDN, "-5.4781549356e1c@124");
+ x = -5943982715394951; for (i=0; i<446; i++) x *= 2.0;
+ check2a(x, 63, 1.77607317509426332389e+73, 64, 64, GMP_RNDN,
+ "-5.4781549356e1c@124");
check2a(4.49465557237618783128e+53,108,-2.45103927353799477871e+48,60,105,
GMP_RNDN, "4.b14f230f909dc803e@44");
check2a(2.26531902208967707071e+168,99,-2.67795218510613988524e+168,67,94,
@@ -785,18 +782,17 @@ main (int argc, char *argv[])
-2.96695924471135255027e27);
check53(1.74693641655743793422e-227, -7.71776956366861843469e-229, GMP_RNDN,
1.669758720920751867e-227);
+ x = -7883040437021647.0; for (i=0; i<468; i++) x = x / 2.0;
check53(-1.03432206392780011159e-125, 1.30127034799251347548e-133, GMP_RNDN,
- -1.0343220509150965661e-125);
+ x);
check53(1.05824655795525779205e+71, -1.06022698059744327881e+71, GMP_RNDZ,
-1.9804226421854867632e68);
check53(-5.84204911040921732219e+240, 7.26658169050749590763e+240, GMP_RNDD,
1.4245325800982785854e240);
- /* the following check double overflow */
- check53(6.27557402141211962228e+307, 1.32141396570101687757e+308,
- GMP_RNDZ, DBL_POS_INF);
check53(1.00944884131046636376e+221, 2.33809162651471520268e+215, GMP_RNDN,
1.0094511794020929787e221);
- check53(4.29232078932667367325e-278, 1.07735250473897938332e-281, GMP_RNDU,
+ x = 7045852550057985.0; for (i=0; i<986; i++) x = x / 2.0;
+ check53(4.29232078932667367325e-278, x, GMP_RNDU,
4.2933981418314132787e-278);
check53(5.27584773801377058681e-80, 8.91207657803547196421e-91, GMP_RNDN,
5.2758477381028917269e-80);
@@ -818,14 +814,19 @@ main (int argc, char *argv[])
/* test denormalized numbers too */
check53(8.06294740693074521573e-310, 6.95250701071929654575e-310, GMP_RNDU,
1.5015454417650041761e-309);
+#ifdef HAVE_INFS
+ /* the following check double overflow */
+ check53(6.27557402141211962228e+307, 1.32141396570101687757e+308,
+ GMP_RNDZ, DBL_POS_INF);
check53(DBL_POS_INF, 6.95250701071929654575e-310, GMP_RNDU, DBL_POS_INF);
check53(DBL_NEG_INF, 6.95250701071929654575e-310, GMP_RNDU, DBL_NEG_INF);
check53(6.95250701071929654575e-310, DBL_POS_INF, GMP_RNDU, DBL_POS_INF);
check53(6.95250701071929654575e-310, DBL_NEG_INF, GMP_RNDU, DBL_NEG_INF);
+ check53nan (DBL_POS_INF, DBL_NEG_INF, GMP_RNDN);
+#endif
check53(1.44791789689198883921e-140, -1.90982880222349071284e-121,
GMP_RNDN, -1.90982880222349071e-121);
- check53nan (DBL_POS_INF, DBL_NEG_INF, GMP_RNDN);
/* tests for particular cases (Vincent Lefevre, 22 Aug 2001) */
check53(9007199254740992.0, 1.0, GMP_RNDN, 9007199254740992.0);
@@ -834,7 +835,7 @@ main (int argc, char *argv[])
check53(9007199254740994.0, -1.0, GMP_RNDN, 9007199254740992.0);
check53(9007199254740996.0, -1.0, GMP_RNDN, 9007199254740996.0);
-#ifdef TEST
+#ifdef HAVE_FENV
prec = (argc<2) ? 53 : atoi(argv[1]);
rnd_mode = (argc<3) ? -1 : atoi(argv[2]);
/* Comparing to double precision using machine arithmetic */
diff --git a/tests/tadd_ui.c b/tests/tadd_ui.c
index d86afc021..05bc796f3 100644
--- a/tests/tadd_ui.c
+++ b/tests/tadd_ui.c
@@ -25,6 +25,7 @@ MA 02111-1307, USA. */
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
+#include <time.h>
#include "gmp.h"
#include "mpfr.h"
#include "mpfr-impl.h"
@@ -46,7 +47,7 @@ check3 (double x, unsigned long y, unsigned int rnd_mode, double z1)
mpfr_init2(zz, 53);
mpfr_set_d(xx, x, rnd_mode);
mpfr_add_ui(zz, xx, y, rnd_mode);
-#ifdef TEST
+#ifdef HAVE_FENV
mpfr_set_machine_rnd_mode(rnd_mode);
#endif
if (z1==0.0) z1 = x+y;
@@ -76,15 +77,10 @@ special (void)
int
main (int argc, char *argv[])
{
-#ifdef TEST
+#ifdef HAVE_FENV
double x; unsigned long y, N; int i,rnd_mode,rnd;
-#ifdef __mips
- /* to get denormalized numbers on IRIX64 */
- union fpc_csr exp;
- exp.fc_word = get_fpc_csr();
- exp.fc_struct.flush = 0;
- set_fpc_csr(exp.fc_word);
-#endif
+
+ mpfr_test_init ();
SEED_RAND (time(NULL));
N = (argc<2) ? 1000000 : atoi(argv[1]);
@@ -107,9 +103,11 @@ main (int argc, char *argv[])
check3 (-6.72658901114033715233e-165, 2000878121, GMP_RNDZ,
2.0008781209999997615e9);
check3 (-2.0769715792901673e-5, 880524, GMP_RNDN, 8.8052399997923023e5);
+#ifdef HAVE_INFS
check3 (DBL_POS_INF, 2394875, GMP_RNDN, DBL_POS_INF);
check3 (DBL_NEG_INF, 2394875, GMP_RNDN, DBL_NEG_INF);
check3 (DBL_NAN, 2394875, GMP_RNDN, DBL_NAN);
+#endif
return 0;
}
diff --git a/tests/tagm.c b/tests/tagm.c
index 9b05b2b1f..8a2e11343 100644
--- a/tests/tagm.c
+++ b/tests/tagm.c
@@ -89,7 +89,7 @@ check4 (double a, double b, mp_rnd_t rnd_mode, double res1)
mpfr_set_d(tb, b, rnd_mode);
mpfr_agm(tres, ta, tb, rnd_mode);
-#ifdef TEST
+#ifdef HAVE_FENV
mpfr_set_machine_rnd_mode(rnd_mode);
#endif
diff --git a/tests/tcmp2.c b/tests/tcmp2.c
index 1bb2db4e1..2b82f92bd 100644
--- a/tests/tcmp2.c
+++ b/tests/tcmp2.c
@@ -280,13 +280,8 @@ int
main (void)
{
int i,j; double x=1.0, y, z;
-#ifdef __mips
- /* to get denormalized numbers on IRIX64 */
- union fpc_csr exp;
- exp.fc_word = get_fpc_csr();
- exp.fc_struct.flush = 0;
- set_fpc_csr(exp.fc_word);
-#endif
+
+ mpfr_test_init ();
worst_cases ();
special ();
diff --git a/tests/tcos.c b/tests/tcos.c
index a32811e2e..10b25b983 100644
--- a/tests/tcos.c
+++ b/tests/tcos.c
@@ -104,9 +104,11 @@ main (int argc, char *argv[])
exit (1);
}
- check53 (DBL_NAN, DBL_NAN, GMP_RNDN);
- check53 (DBL_POS_INF, DBL_NAN, GMP_RNDN);
- check53 (DBL_NEG_INF, DBL_NAN, GMP_RNDN);
+#ifdef HAVE_INFS
+ check53 (DBL_NAN, DBL_NAN, GMP_RNDN);
+ check53 (DBL_POS_INF, DBL_NAN, GMP_RNDN);
+ check53 (DBL_NEG_INF, DBL_NAN, GMP_RNDN);
+#endif
/* worst case from PhD thesis of Vincent Lefe`vre: x=8980155785351021/2^54 */
check53 (4.984987858808754279e-1, 8.783012931285841817e-1, GMP_RNDN);
diff --git a/tests/tdiv.c b/tests/tdiv.c
index 444e3dd4f..aeb876f79 100644
--- a/tests/tdiv.c
+++ b/tests/tdiv.c
@@ -21,6 +21,7 @@ MA 02111-1307, USA. */
#include <stdio.h>
#include <stdlib.h>
+#include <time.h>
#include "gmp.h"
#include "gmp-impl.h"
#include "mpfr.h"
@@ -46,7 +47,7 @@ check4 (double N, double D, mp_rnd_t rnd_mode, int p, double Q)
mpfr_set_d(n, N, rnd_mode);
mpfr_set_d(d, D, rnd_mode);
mpfr_div(q, n, d, rnd_mode);
-#ifdef TEST
+#ifdef HAVE_FENV
mpfr_set_machine_rnd_mode(rnd_mode);
#endif
if (Q==0.0) Q = N/D;
@@ -450,16 +451,11 @@ main (int argc, char *argv[])
{
mpfr_t x, y, z;
-#ifdef TEST
+#ifdef HAVE_FENV
int N, i;
double n, d, e;
-#ifdef __mips
- /* to get denormalized numbers on IRIX64 */
- union fpc_csr exp;
- exp.fc_word = get_fpc_csr();
- exp.fc_struct.flush = 0;
- set_fpc_csr(exp.fc_word);
-#endif
+
+ mpfr_test_init ();
#endif
check_inexact();
@@ -498,15 +494,16 @@ main (int argc, char *argv[])
check53(1.04636807108079349236e-189, 3.72295730823253012954e-292, GMP_RNDZ,
2.810583051186143125e102);
-#ifdef TEST
+#ifdef HAVE_FENV
N = (argc>1) ? atoi(argv[1]) : 100000;
SEED_RAND (time(NULL));
- for (i=0;i<N;i++) {
- do { n = drand(); d = drand(); e = ABS(n)/ABS(d); }
- /* smallest normalized is 2^(-1022), largest is 2^(1023)*(2-2^(-52)) */
- while (e>=MAXNORM || e<MINNORM);
- check4(n, d, LONG_RAND() % 4, 53, 0.0);
- }
+ for (i=0;i<N;i++)
+ {
+ do { n = drand(); d = drand(); e = ABS(n)/ABS(d); }
+ /* smallest normalized is 2^(-1022), largest is 2^(1023)*(2-2^(-52)) */
+ while (e>=MAXNORM || e<MINNORM);
+ check4 (n, d, LONG_RAND() % 4, 53, 0.0);
+ }
#endif
mpfr_clear (x);
diff --git a/tests/tdiv_ui.c b/tests/tdiv_ui.c
index 82fc8305f..63fb04ab7 100644
--- a/tests/tdiv_ui.c
+++ b/tests/tdiv_ui.c
@@ -21,6 +21,7 @@ MA 02111-1307, USA. */
#include <stdio.h>
#include <stdlib.h>
+#include <time.h>
#include "gmp.h"
#include "mpfr.h"
#include "mpfr-test.h"
@@ -36,7 +37,7 @@ check (double d, unsigned long u, mp_rnd_t rnd, double e)
double f;
mpfr_init2(x, 53); mpfr_init2(y, 53);
-#ifdef TEST
+#ifdef HAVE_FENV
mpfr_set_machine_rnd_mode(rnd);
#endif
if (e==0.0) e = d / u;
@@ -173,15 +174,20 @@ int
main (int argc, char **argv)
{
mpfr_t x;
-#ifdef TEST
- int i; unsigned long u; double d;
+#ifdef HAVE_FENV
+ int i;
+ unsigned long u;
+ double d;
+
+ mpfr_test_init ();
SEED_RAND (time(NULL));
- for (i=0;i<1000000;i++) {
- do { u = LONG_RAND(); } while (u==0);
- do { d = drand(); } while (ABS(d/u)<2.2e-307);
- check(d, u, LONG_RAND() % 4, 0.0);
- }
+ for (i=0;i<1000000;i++)
+ {
+ do { u = LONG_RAND(); } while (u==0);
+ do { d = drand(); } while (ABS(d/u)<2.2e-307);
+ check (d, u, LONG_RAND() % 4, 0.0);
+ }
#endif
check_inexact ();
diff --git a/tests/texp.c b/tests/texp.c
index e8f8d6725..81a3f13db 100644
--- a/tests/texp.c
+++ b/tests/texp.c
@@ -22,6 +22,7 @@ MA 02111-1307, USA. */
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
+#include <time.h>
#include "gmp.h"
#include "mpfr.h"
#include "mpfr-test.h"
@@ -45,7 +46,7 @@ check3 (double d, mp_rnd_t rnd, double e)
mpfr_t x, y; double f; int u=0, ck=0;
mpfr_init2(x, 53); mpfr_init2(y, 53);
-#ifdef TEST
+#ifdef HAVE_FENV
mpfr_set_machine_rnd_mode(rnd);
#endif
if (e==0.0) e = exp(d); else ck=1; /* really check */
@@ -215,9 +216,11 @@ compare_exp2_exp3 (int n)
int
main (int argc, char *argv[])
{
-#ifdef TEST
- int i, N, s=0, e, maxe=0; double d, lo, hi;
+#ifdef HAVE_FENV
+ int i, N, s=0, e, maxe=0;
+ double lo, hi;
#endif
+ double d;
test_generic (2, 100, 100);
@@ -256,8 +259,9 @@ main (int argc, char *argv[])
check3(-2.46355324071459982349e+01, GMP_RNDZ, 1.9995129297760994791e-11);
check3(-2.23509444608605427618e+01, GMP_RNDZ, 1.9638492867489702307e-10);
check3(-2.41175390197331687148e+01, GMP_RNDD, 3.3564940885530624592e-11);
- check3(2.46363885231578088053e+01, GMP_RNDU, 5.0055014282693267822e10);
- check3(1.111263531080090984914932e2, GMP_RNDN, 1.8262572323517295459e48);
+ check3(2.46363885231578088053e+01, GMP_RNDU, 5.0055014282693267822e10);
+ d = 7819821913254249.0 / 70368744177664.0;
+ check3(d, GMP_RNDN, 1.8262572323517295459e48);
check3(-3.56196340354684821250e+02, GMP_RNDN, 2.0225297096141478156e-155);
check3(6.59678273772710895173e+02, GMP_RNDU, 3.1234469273830195529e286);
check3(5.13772529701934331570e+02, GMP_RNDD, 1.3445427121297197752e223);
@@ -268,7 +272,7 @@ main (int argc, char *argv[])
check3(5.30015757134837031117e+02, GMP_RNDD, 1.5237672861171573939e230);
check3(5.16239362447650933063e+02, GMP_RNDZ, 1.5845518406744492105e224);
check3(6.00812634798592370977e-01, GMP_RNDN, 1.823600119339019443);
-#ifdef TEST
+#ifdef HAVE_FENV
SEED_RAND (time(NULL));
N = (argc==1) ? 0 : atoi(argv[1]);
lo = (argc>=3) ? atof(argv[2]) : -7.083964185e2;
diff --git a/tests/tfma.c b/tests/tfma.c
index d40dffeb3..a3ea9d829 100644
--- a/tests/tfma.c
+++ b/tests/tfma.c
@@ -49,6 +49,19 @@ main (int argc, char *argv[])
mpfr_set_d (z, 0.375, GMP_RNDN);
mpfr_fma (s, x, y, z, GMP_RNDU); /* result is 0 */
+ mpfr_set_prec (x, 27);
+ mpfr_set_prec (y, 27);
+ mpfr_set_prec (z, 27);
+ mpfr_set_prec (s, 27);
+ mpfr_set_str_raw (x, "1.11111111111111111111111111e-1");
+ mpfr_set (y, x, GMP_RNDN);
+ mpfr_set_str_raw (z, "-1.00011110100011001011001001e-1");
+ if (mpfr_fma (s, x, y, z, GMP_RNDN) >= 0)
+ {
+ fprintf (stderr, "Wrong inexact flag for x=y=1-2^(-27)\n");
+ exit (1);
+ }
+
MPFR_SET_NAN(x);
mpfr_random(y);
mpfr_random(z);
@@ -294,6 +307,13 @@ main (int argc, char *argv[])
{
fprintf (stderr, "Wrong inexact flag for rnd=%s: expected %d, got %d\n",
mpfr_print_rnd_mode (rnd), compare, inexact);
+ fprintf (stderr, "x="); mpfr_out_str (stderr, 2, 0, x, GMP_RNDN);
+ fprintf (stderr, " y="); mpfr_out_str (stderr, 2, 0, y, GMP_RNDN);
+ fprintf (stderr, " z="); mpfr_out_str (stderr, 2, 0, z, GMP_RNDN);
+ fprintf (stderr, " s="); mpfr_out_str (stderr, 2, 0, s, GMP_RNDN);
+ fprintf (stderr, "\n");
+ fprintf (stderr, "z=%1.20e s=%1.20e\n", mpfr_get_d (z),
+ mpfr_get_d (s));
exit (1);
}
}
diff --git a/tests/tget_d.c b/tests/tget_d.c
index 4138c646d..4a009c93b 100644
--- a/tests/tget_d.c
+++ b/tests/tget_d.c
@@ -27,23 +27,6 @@ MA 02111-1307, USA. */
#include "mpfr-impl.h"
#include "mpfr-test.h"
-#if (defined (__i386__) || defined (__i486__))
-#ifdef __CYGWIN32__ /* no fpu_control.h under Cygnus */
-#define _FPU_EXTENDED 0x300
-#define _FPU_DOUBLE 0x200
-#define _FPU_DEFAULT 0x137f
-#define _FPU_RC_NEAREST 0x0
-#define _FPU_RC_DOWN 0x400
-#define _FPU_RC_UP 0x800
-#define _FPU_RC_ZERO 0xC00
-#else
-#include <fpu_control.h>
-#endif /* ifdef __CYGWIN32__ */
-#ifndef __setfpucw
-#define __setfpucw(cw) __asm__ ("fldcw %0" : : "m" (cw))
-#endif /* ifndef __setfpucw */
-#endif /* __i386__ */
-
int
main (void)
{
@@ -60,10 +43,7 @@ main (void)
mpfr_init2(x, 128);
mpfr_init2(y, 128);
-#if defined(__i386__)
- /* sets the precision to double */
- __setfpucw((_FPU_DEFAULT & (~_FPU_EXTENDED)) | _FPU_DOUBLE);
-#endif
+ mpfr_test_init ();
for (rnd_mode = 0; rnd_mode <= 3; rnd_mode++)
{
diff --git a/tests/tget_str.c b/tests/tget_str.c
index 2e40129b5..6a2994bed 100644
--- a/tests/tget_str.c
+++ b/tests/tget_str.c
@@ -23,9 +23,10 @@ MA 02111-1307, USA. */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <time.h>
#include "gmp.h"
#include "mpfr.h"
-#ifdef TEST
+#ifdef HAVE_FENV
#include "mpfr-test.h"
#endif
@@ -104,8 +105,9 @@ check_small (void)
int
main (int argc, char *argv[])
{
-#ifdef TEST
- int i; double d;
+#ifdef HAVE_FENV
+ int i;
+ double d;
SEED_RAND (time(NULL));
for (i=0;i<100000;i++) {
diff --git a/tests/tlog.c b/tests/tlog.c
index ab11959ea..6343012af 100644
--- a/tests/tlog.c
+++ b/tests/tlog.c
@@ -67,7 +67,7 @@ check1 (double a, mp_rnd_t rnd_mode, double res1, int ck, int max_ulp)
int diff=0;
/* ck=1 iff res1 is certified correct */
-#ifdef TEST
+#ifdef HAVE_FENV
mpfr_set_machine_rnd_mode(rnd_mode);
#endif
if (ck==0 && res1==0.0) res1=log(a);
@@ -269,7 +269,8 @@ special (void)
int
main (int argc, char *argv[])
{
- int N=0;
+ int N = 0;
+ double d;
SEED_RAND (time(NULL));
if (argc==4) { /* tlog x prec rnd */
@@ -304,14 +305,16 @@ main (int argc, char *argv[])
check2(44.0,GMP_RNDU,3.78418963391826146392e+00);
check2(1.01979300812244555452, GMP_RNDN, 1.95996734891603664741e-02);
/* bugs found by Vincent Lefe`vre */
- check2(0.99999599881598921769, GMP_RNDN, -4.0011920155404068690e-6);
+ d = -4723773766428415.0 / 1180591620717411303424.0;
+ check2(0.99999599881598921769, GMP_RNDN, d);
check2(9.99995576063808955247e-01, GMP_RNDZ, -4.42394597667932383816e-06);
check2(9.99993687357856209097e-01, GMP_RNDN, -6.31266206860017342601e-06);
check2(9.99995223520736886691e-01, GMP_RNDN, -4.77649067052670982220e-06);
check2(9.99993025794720935551e-01, GMP_RNDN, -6.97422959894716163837e-06);
check2(9.99987549017837484833e-01, GMP_RNDN, -1.24510596766369924330e-05);
check2(9.99985901426543311032e-01, GMP_RNDN, -1.40986728425098585229e-05);
- check2(9.99986053947420794330e-01, GMP_RNDN, -1.39461498263010849386e-05);
+ d = -8232353813100321.0 / 590295810358705651712.0;
+ check2(9.99986053947420794330e-01, GMP_RNDN, d);
check2(9.99971938247442126979e-01, GMP_RNDN, -2.80621462962173414790e-05);
/* other bugs found by Vincent Lefe`vre */
check2(1.18615436389927785905e+77, GMP_RNDN, 1.77469768607706015473e+02);
@@ -328,7 +331,8 @@ main (int argc, char *argv[])
check2(6.18784121531737948160e+19,GMP_RNDZ,4.55717030391710693493e+01);
check2(1.02560267603047283735e+00,GMP_RNDD,2.52804164149448735987e-02);
check2(7.53428236571286402512e+34,GMP_RNDZ,8.03073567492226345621e+01);
- check2(1.42470900831881198052e+49,GMP_RNDZ,1.13180637144887668910e+02);
+ d = 497773706319601.0 / 4398046511104.0;
+ check2(1.42470900831881198052e+49, GMP_RNDZ, d);
check2(1.08013816255293777466e+11,GMP_RNDN,2.54055249841782604392e+01);
check2(6.72783635300509015581e-37,GMP_RNDU,-8.32893948416799503320e+01);
@@ -348,7 +352,8 @@ main (int argc, char *argv[])
check2(2.22183639799464011100e-01,GMP_RNDN,-1.50425103275253957413e+00);
check2(2.27313466156682375540e+00,GMP_RNDD,8.21159787095675608448e-01);
check2(6.58057413965851156767e-01,GMP_RNDZ,-4.18463096196088235600e-01);
- check2(7.34302197248998461006e+43,GMP_RNDZ,1.01004909469513179942e+02);
+ d = 7107588635148285.0 / 70368744177664.0;
+ check2 (7.34302197248998461006e+43, GMP_RNDZ, d);
check2(6.09969788341579732815e+00,GMP_RNDD,1.80823924264386204363e+00);
}
diff --git a/tests/tmul.c b/tests/tmul.c
index 9583c9e26..a6eb050d8 100644
--- a/tests/tmul.c
+++ b/tests/tmul.c
@@ -21,6 +21,7 @@ MA 02111-1307, USA. */
#include <stdio.h>
#include <stdlib.h>
+#include <time.h>
#include "gmp.h"
#include "gmp-impl.h"
#include "mpfr.h"
@@ -51,7 +52,7 @@ check (double x, double y, mp_rnd_t rnd_mode, unsigned int px,
mpfr_set_d(xx, x, rnd_mode);
mpfr_set_d(yy, y, rnd_mode);
mpfr_mul(zz, xx, yy, rnd_mode);
-#ifdef TEST
+#ifdef HAVE_FENV
mpfr_set_machine_rnd_mode(rnd_mode);
#endif
z1 = (res==0.0) ? x*y : res;
@@ -93,7 +94,8 @@ check53 (double x, double y, mp_rnd_t rnd_mode, double z1)
void
check24 (float x, float y, mp_rnd_t rnd_mode, float z1)
{
- float z2; mpfr_t xx, yy, zz;
+ float z2;
+ mpfr_t xx, yy, zz;
mpfr_init2 (xx, 24);
mpfr_init2 (yy, 24);
@@ -102,12 +104,16 @@ check24 (float x, float y, mp_rnd_t rnd_mode, float z1)
mpfr_set_d (yy, y, rnd_mode);
mpfr_mul (zz, xx, yy, rnd_mode);
z2 = (float) mpfr_get_d (zz);
- if (z1!=z2) {
- printf("mpfr_mul failed for x=%1.0f y=%1.0f with prec=24 and rnd_mode=%s\n", x, y, mpfr_print_rnd_mode(rnd_mode));
- printf("libm.a gives %1.0f, mpfr_mul gives %1.0f\n", z1, z2);
- exit(1);
- }
- mpfr_clear(xx); mpfr_clear(yy); mpfr_clear(zz);
+ if (z1 != z2)
+ {
+ fprintf (stderr, "mpfr_mul failed for x=%1.0f y=%1.0f with prec=24 and"
+ "rnd=%s\n", x, y, mpfr_print_rnd_mode(rnd_mode));
+ fprintf (stderr, "libm.a gives %.10e, mpfr_mul gives %.10e\n", z1, z2);
+ exit (1);
+ }
+ mpfr_clear(xx);
+ mpfr_clear(yy);
+ mpfr_clear(zz);
}
/* the following examples come from the paper "Number-theoretic Test
@@ -115,6 +121,8 @@ check24 (float x, float y, mp_rnd_t rnd_mode, float z1)
void
check_float (void)
{
+ float z;
+
check24(8388609.0, 8388609.0, GMP_RNDN, 70368760954880.0);
check24(16777213.0, 8388609.0, GMP_RNDN, 140737479966720.0);
check24(8388611.0, 8388609.0, GMP_RNDN, 70368777732096.0);
@@ -127,7 +135,8 @@ check_float (void)
check24(8388609.0, 8388609.0, GMP_RNDZ, 70368760954880.0);
check24(16777213.0, 8388609.0, GMP_RNDZ, 140737471578112.0);
- check24(8388611.0, 8388609.0, GMP_RNDZ, 70368777732096.0);
+ z = 70368777732096.0;
+ check24(8388611.0, 8388609.0, GMP_RNDZ, z);
check24(12582911.0, 8388610.0, GMP_RNDZ, 105553124655104.0);
check24(12582914.0, 8388610.0, GMP_RNDZ, 105553158209536.0);
check24(13981013.0, 8388611.0, GMP_RNDZ, 117281271054336.0);
@@ -340,17 +349,22 @@ check_min(void)
int
main (int argc, char *argv[])
{
-#ifdef TEST
- double x, y, z; int i, prec, rnd_mode;
+#ifdef HAVE_FENV
+ double x, y, z;
+ int i, prec, rnd_mode;
+
+ mpfr_test_init ();
#endif
check_exact ();
check_float ();
+#ifdef HAVE_INFS
check53 (0.0, DBL_POS_INF, GMP_RNDN, DBL_NAN);
check53(1.0, DBL_POS_INF, GMP_RNDN, DBL_POS_INF);
check53(-1.0, DBL_POS_INF, GMP_RNDN, DBL_NEG_INF);
check53(DBL_NAN, 0.0, GMP_RNDN, DBL_NAN);
check53(1.0, DBL_NAN, GMP_RNDN, DBL_NAN);
+#endif
check53(6.9314718055994530941514e-1, 0.0, GMP_RNDZ, 0.0);
check53(0.0, 6.9314718055994530941514e-1, GMP_RNDZ, 0.0);
check_sign();
@@ -375,7 +389,7 @@ main (int argc, char *argv[])
49, 3, 2, 0.09375);
check_max();
check_min();
-#ifdef TEST
+#ifdef HAVE_FENV
SEED_RAND (time(NULL));
prec = (argc<2) ? 53 : atoi(argv[1]);
rnd_mode = (argc<3) ? -1 : atoi(argv[2]);
diff --git a/tests/tmul_ui.c b/tests/tmul_ui.c
index 3f269519a..4d35d98d6 100644
--- a/tests/tmul_ui.c
+++ b/tests/tmul_ui.c
@@ -112,15 +112,15 @@ main (int argc, char *argv[])
mpfr_set_inf (x, 1);
mpfr_mul_ui (x, x, 3, GMP_RNDU);
- if (mpfr_get_d (x) != DBL_POS_INF)
+ if (!mpfr_inf_p (x) || (mpfr_sgn (x) <= 0))
{
- fprintf (stderr, "Error in mpfr_mul_ui: Inf*3 does not give Inf\n");
+ fprintf (stderr, "Error in mpfr_mul_ui: +Inf*3 does not give +Inf\n");
exit (1);
}
mpfr_set_inf (x, -1);
mpfr_mul_ui (x, x, 3, GMP_RNDU);
- if (mpfr_get_d (x) != DBL_NEG_INF)
+ if (!mpfr_inf_p (x) || (mpfr_sgn (x) >= 0))
{
fprintf (stderr, "Error in mpfr_mul_ui: -Inf*3 does not give -Inf\n");
exit (1);
diff --git a/tests/tpow.c b/tests/tpow.c
index 9009eda40..dd2a1202c 100644
--- a/tests/tpow.c
+++ b/tests/tpow.c
@@ -51,15 +51,19 @@ check_pow_ui (void)
mpfr_set_inf (a, -1);
mpfr_pow_ui (a, a, 4049053855UL, GMP_RNDN);
- if (mpfr_get_d (a) != DBL_NEG_INF) {
- fprintf (stderr, "Error for (-Inf)^4049053855\n"); exit (1);
- }
+ if (!mpfr_inf_p (a) || (mpfr_sgn (a) >= 0))
+ {
+ fprintf (stderr, "Error for (-Inf)^4049053855\n");
+ exit (1);
+ }
mpfr_set_inf (a, -1);
mpfr_pow_ui (a, a, (unsigned long) 30002752, GMP_RNDN);
- if (mpfr_get_d (a) != DBL_POS_INF) {
- fprintf (stderr, "Error for (-Inf)^30002752\n"); exit (1);
- }
+ if (!mpfr_inf_p (a) || (mpfr_sgn (a) <= 0))
+ {
+ fprintf (stderr, "Error for (-Inf)^30002752\n");
+ exit (1);
+ }
mpfr_clear (a);
mpfr_clear (b);
diff --git a/tests/tset_d.c b/tests/tset_d.c
index 3934bc412..67fa6d15a 100644
--- a/tests/tset_d.c
+++ b/tests/tset_d.c
@@ -29,14 +29,11 @@ MA 02111-1307, USA. */
int
main (int argc, char *argv[])
{
- mpfr_t x,y,z; unsigned long k,n; double d, dd;
-#ifdef __mips
- /* to get denormalized numbers on IRIX64 */
- union fpc_csr exp;
- exp.fc_word = get_fpc_csr();
- exp.fc_struct.flush = 0;
- set_fpc_csr(exp.fc_word);
-#endif
+ mpfr_t x, y, z;
+ unsigned long k, n;
+ double d, dd;
+
+ mpfr_test_init ();
mpfr_init2 (x, 2);
@@ -91,9 +88,17 @@ main (int argc, char *argv[])
n = (argc==1) ? 1000000 : atoi(argv[1]);
for (k = 1; k <= n; k++)
{
- d = drand();
- mpfr_set_d(x, d, 0);
- dd = mpfr_get_d(x);
+ do
+ {
+ d = drand();
+ }
+#ifdef HAVE_DENORMS
+ while (0);
+#else
+ while (ABS(d) <= 2.2e-307);
+#endif
+ mpfr_set_d (x, d, 0);
+ dd = mpfr_get_d (x);
if (d != dd && (!isnan(d) || !isnan(dd)))
{
fprintf(stderr,
diff --git a/tests/tset_q.c b/tests/tset_q.c
index a4af2c5de..5a8886c5a 100644
--- a/tests/tset_q.c
+++ b/tests/tset_q.c
@@ -21,6 +21,7 @@ MA 02111-1307, USA. */
#include <stdio.h>
#include <stdlib.h>
+#include <time.h>
#include "gmp.h"
#include "mpfr.h"
#include "mpfr-test.h"
@@ -39,7 +40,7 @@ check (long int n, long int d, mp_rnd_t rnd, double y)
mpfr_init2 (t, mpfr_get_prec (x) + mp_bits_per_limb);
mpq_init (q);
mpq_set_si (q, n, d);
-#ifdef TEST
+#ifdef HAVE_FENV
mpfr_set_machine_rnd_mode (rnd);
y = (double) n / d;
#endif
@@ -79,12 +80,14 @@ check (long int n, long int d, mp_rnd_t rnd, double y)
int
main (void)
{
-#ifdef TEST
+#ifdef HAVE_FENV
long int i, n;
unsigned long int d;
double y;
unsigned char rnd;
+ mpfr_test_init ();
+
SEED_RAND(time(NULL));
for (i=0;i<1000000;i++) {
n = LONG_RAND();
diff --git a/tests/tsin.c b/tests/tsin.c
index a5a074f0e..a5ef84b1f 100644
--- a/tests/tsin.c
+++ b/tests/tsin.c
@@ -58,9 +58,11 @@ main (int argc, char *argv[])
{
mpfr_t x;
+#ifdef HAVE_INFS
check53 (DBL_NAN, DBL_NAN, GMP_RNDN);
check53 (DBL_POS_INF, DBL_NAN, GMP_RNDN);
check53 (DBL_NEG_INF, DBL_NAN, GMP_RNDN);
+#endif
/* worst case from PhD thesis of Vincent Lefe`vre: x=8980155785351021/2^54 */
check53 (4.984987858808754279e-1, 4.781075595393330379e-1, GMP_RNDN);
check53 (4.984987858808754279e-1, 4.781075595393329824e-1, GMP_RNDD);
diff --git a/tests/tsin_cos.c b/tests/tsin_cos.c
index cdc5d9f1f..82de72ece 100644
--- a/tests/tsin_cos.c
+++ b/tests/tsin_cos.c
@@ -121,9 +121,11 @@ main(int argc, char *argv[])
large_test (atoi (argv[1]), (argc > 2) ? atoi (argv[2]) : 1);
}
- check53 (DBL_NAN, DBL_NAN, DBL_NAN, GMP_RNDN);
- check53 (DBL_POS_INF, DBL_NAN, DBL_NAN, GMP_RNDN);
- check53 (DBL_NEG_INF, DBL_NAN, DBL_NAN, GMP_RNDN);
+#ifdef HAVE_INFS
+ check53 (DBL_NAN, DBL_NAN, DBL_NAN, GMP_RNDN);
+ check53 (DBL_POS_INF, DBL_NAN, DBL_NAN, GMP_RNDN);
+ check53 (DBL_NEG_INF, DBL_NAN, DBL_NAN, GMP_RNDN);
+#endif
/* worst case from PhD thesis of Vincent Lefe`vre: x=8980155785351021/2^54 */
check53 (4.984987858808754279e-1, 4.781075595393330379e-1,
8.783012931285841817e-1, GMP_RNDN);
diff --git a/tests/tsqrt.c b/tests/tsqrt.c
index c616f5ce0..e8c7dabf8 100644
--- a/tests/tsqrt.c
+++ b/tests/tsqrt.c
@@ -22,6 +22,7 @@ MA 02111-1307, USA. */
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
+#include <time.h>
#include "gmp.h"
#include "gmp-impl.h"
#include "mpfr.h"
@@ -48,7 +49,7 @@ check3 (double a, mp_rnd_t rnd_mode, double Q)
ck = (Q!=-1.0); /* if ck=1, then Q is certified correct */
mpfr_init2(q, 53);
mpfr_set_d(q, a, rnd_mode);
-#ifdef TEST
+#ifdef HAVE_FENV
mpfr_set_machine_rnd_mode(rnd_mode);
#endif
mpfr_sqrt(q, q, rnd_mode);
@@ -325,22 +326,18 @@ main (void)
double a;
mp_prec_t p;
int k;
-#ifdef TEST
- int i;
-#ifdef __mips
- /* to get denormalized numbers on IRIX64 */
- union fpc_csr exp;
- exp.fc_word = get_fpc_csr();
- exp.fc_struct.flush = 0;
- set_fpc_csr(exp.fc_word);
-#endif
+#ifdef HAVE_FENV
+ int i;
+
+ mpfr_test_init ();
SEED_RAND (time(NULL));
- for (i=0;i<100000;i++) {
- a = drand();
- if (a < 0.0) a = -a; /* ensures a is positive */
- check(a, LONG_RAND() % 4);
- }
+ for (i=0;i<100000;i++)
+ {
+ a = drand();
+ if (a < 0.0) a = -a; /* ensures a is positive */
+ check (a, LONG_RAND() % 4);
+ }
#endif
check_nan ();
diff --git a/tests/tsqrt_ui.c b/tests/tsqrt_ui.c
index 5bf0c16fc..69d475c86 100644
--- a/tests/tsqrt_ui.c
+++ b/tests/tsqrt_ui.c
@@ -22,6 +22,7 @@ MA 02111-1307, USA. */
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
+#include <time.h>
#include "gmp.h"
#include "mpfr.h"
#include "mpfr-test.h"
@@ -36,7 +37,7 @@ check (unsigned long a, mp_rnd_t rnd_mode, double Q)
mpfr_t q; double Q2; int u, ck;
mpfr_init2(q, 53);
-#ifdef TEST
+#ifdef HAVE_FENV
mpfr_set_machine_rnd_mode(rnd_mode);
#endif
mpfr_sqrt_ui(q, a, rnd_mode);
@@ -58,25 +59,23 @@ check (unsigned long a, mp_rnd_t rnd_mode, double Q)
int
main (void)
{
-#ifdef TEST
- int i; unsigned long a;
-#ifdef __mips
- /* to get denormalized numbers on IRIX64 */
- union fpc_csr exp;
- exp.fc_word = get_fpc_csr();
- exp.fc_struct.flush = 0;
- set_fpc_csr(exp.fc_word);
-#endif
+#ifdef HAVE_FENV
+ int i;
+ unsigned long a;
+
+ mpfr_test_init ();
SEED_RAND (time(NULL));
- for (i=0;i<1000000;i++) {
- a = LONG_RAND();
- /* machine arithmetic must agree if a <= 2.0^53 */
- if (1.0*a < 9007199254872064.0) check(a, LONG_RAND() % 4, -1.0);
- }
+ for (i=0;i<1000000;i++)
+ {
+ a = LONG_RAND();
+ /* machine arithmetic must agree if a <= 2.0^53 */
+ if (1.0*a < 9007199254872064.0)
+ check(a, LONG_RAND() % 4, -1.0);
+ }
#endif
- check(0, GMP_RNDN, 0.0);
- check(2116118, GMP_RNDU, 1.45468828276026215e3);
+ check (0, GMP_RNDN, 0.0);
+ check (2116118, GMP_RNDU, 1.45468828276026215e3);
return 0;
}
diff --git a/tests/tsub_ui.c b/tests/tsub_ui.c
index 5ede3642a..29c433ef8 100644
--- a/tests/tsub_ui.c
+++ b/tests/tsub_ui.c
@@ -22,6 +22,7 @@ MA 02111-1307, USA. */
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
+#include <time.h>
#include "gmp.h"
#include "mpfr.h"
#include "mpfr-impl.h"
@@ -46,7 +47,7 @@ check3 (double x, unsigned long y, mp_rnd_t rnd_mode, double z1)
mpfr_set_prec(zz, 53);
mpfr_set_d(xx, x, rnd_mode);
mpfr_sub_ui(zz, xx, y, rnd_mode);
-#ifdef TEST
+#ifdef HAVE_FENV
mpfr_set_machine_rnd_mode(rnd_mode);
#endif
if (z1==0.0) z1 = x-y;
@@ -113,16 +114,11 @@ main (int argc, char *argv[])
{
mp_prec_t p;
int k;
-#ifdef __mips
- /* to get denormalized numbers on IRIX64 */
- union fpc_csr exp;
- exp.fc_word = get_fpc_csr();
- exp.fc_struct.flush = 0;
- set_fpc_csr(exp.fc_word);
-#endif
-#ifdef TEST
+#ifdef HAVE_FENV
double x; unsigned long y, N; int i,rnd_mode,rnd;
+ mpfr_test_init ();
+
SEED_RAND (time(NULL));
N = (argc<2) ? 1000000 : atoi(argv[1]);
rnd_mode = (argc<3) ? -1 : atoi(argv[2]);
@@ -141,10 +137,12 @@ main (int argc, char *argv[])
for (k=0; k<200; k++)
check_two_sum (p);
- check3 (0.9999999999, 1, GMP_RNDN, -1.000000082740370999e-10);
+ check3 (0.9999999999, 1, GMP_RNDN, -56295.0 / 562949953421312.0);
+#ifdef HAVE_INFS
check3 (DBL_NAN, 1, GMP_RNDN, DBL_NAN);
check3 (DBL_POS_INF, 1, GMP_RNDN, DBL_POS_INF);
check3 (DBL_NEG_INF, 1, GMP_RNDN, DBL_NEG_INF);
+#endif
return 0;
}
diff --git a/tests/ttan.c b/tests/ttan.c
index 714ee104f..a85cd2d87 100644
--- a/tests/ttan.c
+++ b/tests/ttan.c
@@ -60,9 +60,11 @@ main(int argc, char *argv[])
unsigned int prec[10] = {14, 15, 19, 22, 23, 24, 25, 40, 41, 52};
unsigned int prec2[10] = {4, 5, 6, 19, 70, 95, 100, 106, 107, 108};
- check53 (DBL_NAN, DBL_NAN, GMP_RNDN);
- check53 (DBL_POS_INF, DBL_NAN, GMP_RNDN);
- check53 (DBL_NEG_INF, DBL_NAN, GMP_RNDN);
+#ifdef HAVE_INFS
+ check53 (DBL_NAN, DBL_NAN, GMP_RNDN);
+ check53 (DBL_POS_INF, DBL_NAN, GMP_RNDN);
+ check53 (DBL_NEG_INF, DBL_NAN, GMP_RNDN);
+#endif
mpfr_init (x);
diff --git a/tests/tui_div.c b/tests/tui_div.c
index 4d58735d9..bb990d5d9 100644
--- a/tests/tui_div.c
+++ b/tests/tui_div.c
@@ -22,6 +22,7 @@ MA 02111-1307, USA. */
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
+#include <time.h>
#include "gmp.h"
#include "gmp-impl.h"
#include "mpfr.h"
@@ -43,7 +44,7 @@ check (unsigned long y, double x, mp_rnd_t rnd_mode, double z1)
mpfr_init2(zz, 53);
mpfr_set_d(xx, x, rnd_mode);
mpfr_ui_div(zz, y, xx, rnd_mode);
-#ifdef TEST
+#ifdef HAVE_FENV
mpfr_set_machine_rnd_mode(rnd_mode);
#endif
if (z1==0.0) z1 = y/x;
@@ -151,29 +152,27 @@ check_nan (void)
int
main (int argc, char *argv[])
{
-#ifdef TEST
- {
- double x; unsigned long y, N; int i,rnd_mode,rnd;
-#ifdef __mips
- /* to get denormalized numbers on IRIX64 */
- union fpc_csr exp;
- exp.fc_word = get_fpc_csr();
- exp.fc_struct.flush = 0;
- set_fpc_csr(exp.fc_word);
-#endif
+#ifdef HAVE_FENV
+ double x;
+ unsigned long y, N;
+ int i, rnd_mode, rnd;
+
+ mpfr_test_init ();
SEED_RAND(time(NULL));
N = (argc<2) ? 1000000 : atoi(argv[1]);
rnd_mode = (argc<3) ? -1 : atoi(argv[2]);
- for (i=0;i<1000000;i++) {
- x = drand();
- y = LONG_RAND();
- if (ABS(x)>4e-286) {
- /* avoid denormalized numbers and overflows */
- rnd = (rnd_mode==-1) ? LONG_RAND()%4 : rnd_mode;
- check(y, x, rnd, 0.0);
+ for (i=0;i<1000000;i++)
+ {
+ x = drand();
+ y = LONG_RAND();
+ if (ABS(x)>4e-286)
+ {
+ /* avoid denormalized numbers and overflows */
+ rnd = (rnd_mode==-1) ? LONG_RAND()%4 : rnd_mode;
+ check(y, x, rnd, 0.0);
+ }
}
- }
#endif
check_inexact ();
check(948002822, 1.22191250737771397120e+20, GMP_RNDN,
diff --git a/tests/tui_sub.c b/tests/tui_sub.c
index 0e1ad40f3..6a3a0c6dc 100644
--- a/tests/tui_sub.c
+++ b/tests/tui_sub.c
@@ -22,6 +22,7 @@ MA 02111-1307, USA. */
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
+#include <time.h>
#include "gmp.h"
#include "mpfr.h"
#include "mpfr-impl.h"
@@ -139,7 +140,7 @@ check (unsigned long y, double x, mp_rnd_t rnd_mode, double z1)
mpfr_init2(zz, 53);
mpfr_set_d(xx, x, rnd_mode);
mpfr_ui_sub(zz, y, xx, rnd_mode);
-#ifdef TEST
+#ifdef HAVE_FENV
mpfr_set_machine_rnd_mode(rnd_mode);
#endif
if (z1==0.0) z1 = y-x;
@@ -203,17 +204,12 @@ main (int argc, char *argv[])
{
mp_prec_t p;
unsigned k;
-#ifdef TEST
+#ifdef HAVE_FENV
double x;
unsigned long y, N;
int i, rnd_mode, rnd;
-#ifdef __mips
- /* to get denormalized numbers on IRIX64 */
- union fpc_csr exp;
- exp.fc_word = get_fpc_csr();
- exp.fc_struct.flush = 0;
- set_fpc_csr(exp.fc_word);
-#endif
+
+ mpfr_test_init ();
SEED_RAND (time(NULL));
N = (argc<2) ? 1000000 : atoi(argv[1]);
@@ -232,9 +228,11 @@ main (int argc, char *argv[])
for (p=2; p<100; p++)
for (k=0; k<100; k++)
check_two_sum (p);
- check (1, DBL_POS_INF, GMP_RNDN, DBL_NEG_INF);
- check (1, DBL_NEG_INF, GMP_RNDN, DBL_POS_INF);
- check (1, DBL_NAN, GMP_RNDN, DBL_NAN);
+#ifdef HAVE_INFS
+ check (1, DBL_POS_INF, GMP_RNDN, DBL_NEG_INF);
+ check (1, DBL_NEG_INF, GMP_RNDN, DBL_POS_INF);
+ check (1, DBL_NAN, GMP_RNDN, DBL_NAN);
+#endif
check(1196426492, 1.4218093058435347e-3, GMP_RNDN, 1.1964264919985781e9);
check(1092583421, -1.0880649218158844e9, GMP_RNDN, 2.1806483428158845901e9);
check(948002822, 1.22191250737771397120e+20, GMP_RNDN,