summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAndreas Enge <andreas.enge@inria.fr>2009-02-21 11:22:56 +0000
committerAndreas Enge <andreas.enge@inria.fr>2009-02-21 11:22:56 +0000
commit9df960823292cb20d8f1d4b850a27059b1e1b49b (patch)
treed5725049e5f3077be19fa27ccb9f25a2f8b607ca /tools
parentc3529a5c5afa6d05fba8e2b447d319322d556dc3 (diff)
downloadmpc-git-9df960823292cb20d8f1d4b850a27059b1e1b49b.tar.gz
moved content of trunk/tools to misc
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/mpc/trunk@423 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'tools')
-rw-r--r--tools/README.coverage15
-rw-r--r--tools/README.pipol50
-rw-r--r--tools/README.testgen3
-rwxr-xr-xtools/coverage53
-rwxr-xr-xtools/pipol/nightly/multiopt248
-rw-r--r--tools/pipol/rc.amd64-linux-debian-etch4
-rwxr-xr-xtools/pipol/rc.amd64-linux-fedora9
-rwxr-xr-xtools/pipol/rc.amd64-linux-mandriva6
-rwxr-xr-xtools/pipol/rc.amd64-linux-suse-LES1015
-rwxr-xr-xtools/pipol/rc.amd64-linux-ubuntu-feisty8
-rwxr-xr-xtools/pipol/rc.amd64-linux-ubuntu-hardy6
-rwxr-xr-xtools/pipol/rc.fedora9
-rwxr-xr-xtools/pipol/rc.i386-linux-debian-etch26
-rwxr-xr-xtools/pipol/rc.i386-linux-debian-testing20
-rwxr-xr-xtools/pipol/rc.i386-linux-fedora-core89
-rwxr-xr-xtools/pipol/rc.i386-linux-fedora-core99
-rw-r--r--tools/pipol/rc.i386-linux-mandriva6
-rwxr-xr-xtools/pipol/rc.ia64-linux-fedora14
-rwxr-xr-xtools/pipol/rc.mac12
-rwxr-xr-xtools/pipol/rc.redhat15
-rwxr-xr-xtools/pipol/scripts/compile-svn.sh33
-rwxr-xr-xtools/pipol/scripts/get-svn.sh17
-rw-r--r--tools/pipol/yum.repos.d/fedora-development.repo48
-rw-r--r--tools/pipol/yum.repos.d/fedora-updates-testing.repo26
-rw-r--r--tools/pipol/yum.repos.d/fedora-updates.repo26
-rw-r--r--tools/pipol/yum.repos.d/fedora.repo26
-rw-r--r--tools/testgen/makefile30
-rw-r--r--tools/testgen/write_test.h231
-rw-r--r--tools/testgen/write_test_div.c68
-rw-r--r--tools/testgen/write_test_divfr.c60
-rw-r--r--tools/testgen/write_test_frdiv.c63
-rw-r--r--tools/testgen/write_test_frsub.c60
-rw-r--r--tools/testgen/write_test_mulfr.c60
-rw-r--r--tools/testgen/write_test_norm.c49
-rw-r--r--tools/testgen/write_test_subfr.c71
35 files changed, 0 insertions, 1405 deletions
diff --git a/tools/README.coverage b/tools/README.coverage
deleted file mode 100644
index 1fa271c..0000000
--- a/tools/README.coverage
+++ /dev/null
@@ -1,15 +0,0 @@
-The script "coverage" computes the test suite coverage of MPC
-in terms of lines of code and summarises it on web pages.
-You will need gcov and lcov (http://ltp.sourceforge.net/coverage/lcov.php).
-
-Usage:
-cd path_to_mpc_sources/tools
-./coverage additional_parameters_to_configure
-
-After execution, the html pages lie in the directory /tmp/ompc-gcov/html.
-
-Colour thresholds can be tuned in a configuration file $HOME/.lcovrc,
-containing, for instance:
-genhtml_hi_limit = 100
-genhtml_med_limit = 95
-genhtml_legend = yes
diff --git a/tools/README.pipol b/tools/README.pipol
deleted file mode 100644
index 30ae318..0000000
--- a/tools/README.pipol
+++ /dev/null
@@ -1,50 +0,0 @@
-This file details the files contained in the pipol directory and how to
-install nightly-build scripts on the PIPOL platform.
-
-Files
------
-yum.repos.d/fedora.repo
-yum.repos.d/fedora-updates.repo
-yum.repos.d/fedora-development.repo
-yum.repos.d/fedora-updates-testing.repo
-These repositories are usefull when upgrading RedHat EL-5.0 from non-official
-directories (copied by rc.redhat into /etc/yum.repos.d).
-
-rc.amd64-linux-debian-etch
-rc.amd64-linux-fedora
-rc.amd64-linux-mandriva
-rc.amd64-linux-suse-LES10
-rc.amd64-linux-ubuntu-feisty
-rc.amd64-linux-ubuntu-hardy
-rc.i386-linux-debian-etch
-rc.i386-linux-debian-testing
-rc.i386-linux-fedora-core8
-rc.i386-linux-fedora-core9
-rc.i386-linux-mandriva
-rc.ia64-linux-fedora
-rc.mac
-rc.redhat
-These 'run command' files update/install all the packages needed for mpfr and
-mpc compilation.
-Note that a binary mpfr-2.3.2 tarball is needed by rc.ia64-linux-fedora, read
-this file for further informations.
-
-nightly/multiopt
-The nightly-test script. It downloads the last development version of the
-code from the subversion repository and try to compile it. Results are
-recorded in a log file '.pipol/log/<date>-multiopt'.
-
-scripts/get-svn.sh
-Helper script that downloads code source. Run it without parameter to display
-help.
-
-scripts/compile-svn.sh
-Helper script that compiles code. Run it without parameter to display help.
-
-Nightly-build HOWTO
--------------------
-1. Copy 'pipol/' directory content into the '.pipol/' directory of your pipol
-homedir.
-2. Check that all scripts and run command files are executable.
-3. Wait until the scripts in the 'nightly/' directory are executed.
-4. Check results in '.pipol/log/' dir.
diff --git a/tools/README.testgen b/tools/README.testgen
deleted file mode 100644
index 281ee17..0000000
--- a/tools/README.testgen
+++ /dev/null
@@ -1,3 +0,0 @@
-The subdirectory "testgen" contains some C programs for computing with
-special values that are represented as strings "+inf", "nan" and so on.
-These have been used to obtain data files for some tests.
diff --git a/tools/coverage b/tools/coverage
deleted file mode 100755
index f73f916..0000000
--- a/tools/coverage
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/bash
-# Test coverage using gcov & lcov
-# download lcov in http://ltp.sourceforge.net/coverage/lcov.php
-#
-# An adaptation of Patrick Pelissier's script in MPFR
-# additional parameters to mpc configure are passed on the command line
-#
-# Copyright (C) 2008 Philippe Th\'eveny, Andreas Enge
-# This file is part of the MPC Library.
-
-# The MPC Library is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation; either version 2.1 of the License, or (at your
-# option) any later version.
-
-# The MPC Library is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
-# License for more details.
-
-# You should have received a copy of the GNU Lesser General Public License
-# along with the MPC Library; see the file COPYING.LIB. If not, write to
-# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-# MA 02111-1307, USA.
-
-SRC_DIR=`pwd`/..
-DEST_DIR=/tmp/ompc-gcov
-REVISION=$(cd ..; svn info|sed -n '/Revision: / p');
-
-# First Build MPC in /tmp/
-echo "Erasing previous " $DEST_DIR
-rm -rf $DEST_DIR
-mkdir $DEST_DIR
-echo "Copying MPC sources to "$DEST_DIR
-cp $SRC_DIR/* $DEST_DIR 2>/dev/null
-mkdir $DEST_DIR/doc
-cp $SRC_DIR/doc/* $DEST_DIR/doc
-mkdir $DEST_DIR/src
-cp $SRC_DIR/src/{Makefile*,*.h,*.c} $DEST_DIR/src
-mkdir $DEST_DIR/tests
-cp $SRC_DIR/tests/{Makefile*,*.h,*.c,*.dat} $DEST_DIR/tests
-cd $DEST_DIR
-echo "Building MPC"
-./configure --enable-assert --disable-shared --enable-static $@ \
- CFLAGS="-fprofile-arcs -ftest-coverage -g"
-make check -j -l 2
-
-mkdir html
-lcov -o html/mpc.capture -t "$REVISION" -d src -c
-lcov -o html/mpc.info -r html/mpc.capture *gmp*.h
-genhtml -o html --no-prefix -t "$REVISION" html/mpc.info
-
-echo "See results in "$DEST_DIR"/html/index.html"
diff --git a/tools/pipol/nightly/multiopt b/tools/pipol/nightly/multiopt
deleted file mode 100755
index c897c62..0000000
--- a/tools/pipol/nightly/multiopt
+++ /dev/null
@@ -1,248 +0,0 @@
-#!/bin/bash
-SCRIPTS_DIR=$PIPOL_HOMEDIR/.pipol/scripts
-
-# Return value (set it to 1 if a script fails)
-RET=0
-
-#
-# Set RANDOM_OPT to random compiler options
-# [no parameter]
-#
-function random_opt()
-{
-CONFIGURE_OPTIONS=(\
- --enable-assert=full \
- --disable-shared)
-# some options are not available everywhere
-case $PIPOL_IMAGE in
- *mac*)
- : ;;
- *linux*)
- CONFIGURE_OPTIONS[${#CONFIGURE_OPTIONS[*]}] = --enable-thread-safe
- ;;
-esac
-
-# we did already compile with --enable-assert=full, so don't use zero value
-local number=${RANDOM:-3}
-
-unset RANDOM_OPT
-for ((i=0; i < ${#CONFIGURE_OPTIONS[*]}; i++)); do
- if [ $(($((2**i)) & number)) -ne 0 ]; then
- RANDOM_OPT+=" "${CONFIGURE_OPTIONS[$i]}
- fi
-done
-
-unset CFLAGS_OPT
-CFLAGS_OPTIONS=(\
- -O3 \
- -ansi \
- -std=c99 \
- -fno-common)
-# some options are not available everywhere
-case $PIPOL_IMAGE in
- *mac*)
- : ;;
- *linux*)
- CFLAGS_OPTIONS[${#CFLAGS_OPTIONS[*]}]="-D_FORTIFY_SOURCE=2"
- CFLAGS_OPTIONS[${#CFLAGS_OPTIONS[*]}]="-D_XOPEN_SOURCE=500"
- ;;
-esac
-
-for ((i=0; i < ${#CFLAGS_OPTIONS[*]}; i++)); do
- j=$i+${#CONFIGURE_OPTIONS[*]}
- if [ $(($((2**j)) & number)) -ne 0 ]; then
- CFLAGS_OPT+=${CFLAGS_OPTIONS[$i]}" "
- fi
-done
-if [ -n "$CFLAGS_OPT" ]; then
- RANDOM_OPT+=" CFLAGS=\"$CFLAGS_OPT\""
-fi
-}
-
-#
-# Write script result in LOG_FILE
-# [first parameter: command to be executed while logging results]
-# [optional other parameters: command parameters]
-#
-LOG_FILE=$PIPOL_HOMEDIR/.pipol/log/`date +%y%m%d`-`basename $0`
-
-function log()
-{
-# execute and log in a temp file
-if $* >$PIPOL_WDIR/execution.tmp; then
- RESULT="OK: "
-else
- # something wrong happened: record execution log
- cat $PIPOL_WDIR/execution.tmp
- RESULT="FAILED:"
- RET=1
-fi;
-# write result in images global file
-SCRIPT_NAME=`basename $1`
-shift
-echo $RESULT $REVISION $PIPOL_IMAGE $PIPOL_JOB_ID $SCRIPT_NAME $* >>$LOG_FILE
-}
-
-#
-# Set REVISION to the current revision number of the parameter
-# [parameter: svn directory]
-#
-function get_revision()
-{
-REVISION=$(cd $1; svn info|sed -n 's/Revision: // p')
-}
-
-#
-# Make clean in compile directory without changing current working dir
-# [parameter: build directory]
-#
-function clean_compile_dir()
-{
-(
- cd $1;
- make clean >$PIPOL_WDIR/clean.tmp
- if [ $? != 0 ]; then
- # something wrong happened: save log file
- cat $PIPOL_WDIR/clean.tmp
- fi
-)
-}
-
-
-###
-
-#
-# Deploy images
-#
-#PIPOL esn amd64-linux-fedora-core9.dd.gz none 02:00 --silent --user
-#PIPOL esn i386-linux-fedora-core9.dd.gz none 02:00 --silent --user
-#PIPOL esn ia64-linux-fedora-core9.dd none 02:00 --silent --user
-#PIPOL esn i386-linux-debian-testing.dd.gz none 02:00 --silent --user
-
-#PIPOL esn i386_mac-mac-osx-server-leopard.dd.gz none 02:00 --silent --user
-
-###
-### Following commands are executed on each and all deployed images
-###
-
-#
-# image-dependant configurations
-#
-# architecture-dependant
-case $PIPOL_IMAGE in
- *i386-linux*) # set path to SUN studio compiler
- export PATH=/net/i386/sunstudio/sunstudio12/bin:$PATH
- # set path to Intel compiler (bin, lib, and so on)
- . /net/i386/icc/11.0.074/bin/iccvars.sh ia32
- ;;
- *amd64-linux*) # set path to Intel compiler (bin, lib, and so on)
- . /net/amd64/icc/11.0.074/bin/iccvars.sh intel64
- ;;
- *ia64-linux*) # set path to Intel compiler (bin, lib, and so on)
- . /net/ia64/icc/11.0.074/bin/iccvars.sh ia64
- ;;
-esac
-
-# system-dependant
-case $PIPOL_IMAGE in
- *mac*) # new packages are installed in /opt subdirectories
- export C_INCLUDE_PATH=/opt/local/include:$C_INCLUDE_PATH
- export LD_LIBRARY_PATH=/opt/local/lib:$LD_LIBRARY_PATH
- export LIBRARY_PATH=/opt/local/lib:$LIBRARY_PATH
- ;;
- *redhatEL*) # path to recent mpfr lib
- export C_INCLUDE_PATH=$PIPOL_WDIR/include:$C_INCLUDE_PATH
- export LD_LIBRARY_PATH=$PIPOL_WDIR/lib:$LD_LIBRARY_PATH
- export LIBRARY_PATH=$PIPOL_WDIR/lib:$LIBRARY_PATH
- ;;
-esac
-
-# Setting random seed enables replay
-#RANDOM=$PIPOL_JOB
-RANDOM=$$
-
-# this is understood by both mpc and mpfr compilation processes
-export GMP_CHECK_RANDOMIZE=1
-
-#
-# Get mpfr trunk and compile it with various options
-#
-unset REVISION
-log $SCRIPTS_DIR/get-svn.sh mpfr/trunk mpfr-trunk
-get_revision $PIPOL_WDIR/mpfr-trunk
-REVISION="mpfr(r$REVISION)"
-export MPFR_CHECK_MAX=1
-export MPFR_CHECK_SUSPICIOUS_OVERFLOW=1
-export MPFR_CHECK_LIBC_PRINTF=1
-log $SCRIPTS_DIR/compile-svn.sh mpfr-trunk
-
-clean_compile_dir $PIPOL_WDIR/mpfr-trunk
-log $SCRIPTS_DIR/compile-svn.sh mpfr-trunk --enable-assert=full
-
-clean_compile_dir $PIPOL_WDIR/mpfr-trunk
-random_opt
-log $SCRIPTS_DIR/compile-svn.sh mpfr-trunk $RANDOM_OPT
-
-# Compile mpfr with non-GNU compilers
-case $PIPOL_IMAGE in
- *i386-linux*)
- # SUN Studio compiler
- clean_compile_dir $PIPOL_WDIR/mpfr-trunk
- log $SCRIPTS_DIR/compile-svn.sh mpfr-trunk CC=cc
- # Intel compiler
- clean_compile_dir $PIPOL_WDIR/mpfr-trunk
- log $SCRIPTS_DIR/compile-svn.sh mpfr-trunk CC=icc CFLAGS=\"-Wno-error\"
- ;;
- *amd64-linux*)
- # Intel compiler
- clean_compile_dir $PIPOL_WDIR/mpfr-trunk
- log $SCRIPTS_DIR/compile-svn.sh mpfr-trunk CC="icc"
- ;;
- *ia64-linux*)
- # Intel compiler
- clean_compile_dir $PIPOL_WDIR/mpfr-trunk
- log $SCRIPTS_DIR/compile-svn.sh mpfr-trunk CC=icc CFLAGS=\"-Wno-error\"
- ;;
-esac
-
-#
-# Get mpc trunk and compile it
-#
-unset REVISION
-log $SCRIPTS_DIR/get-svn.sh mpc/trunk mpc-trunk
-get_revision $PIPOL_WDIR/mpc-trunk
-REVISION="mpc(r$REVISION)"
-log $SCRIPTS_DIR/compile-svn.sh mpc-trunk
-
-clean_compile_dir $PIPOL_WDIR/mpc-trunk
-log $SCRIPTS_DIR/compile-svn.sh mpc-trunk --disable-shared
-
-clean_compile_dir $PIPOL_WDIR/mpc-trunk
-log $SCRIPTS_DIR/compile-svn.sh mpc-trunk --disable-static
-
-# Compile mpc with non-GNU compilers
-case $PIPOL_IMAGE in
- *i386-linux*)
- # SUN Studio compiler
- clean_compile_dir $PIPOL_WDIR/mpc-trunk
- log $SCRIPTS_DIR/compile-svn.sh mpc-trunk CC="cc"
- # Intel compiler
- clean_compile_dir $PIPOL_WDIR/mpc-trunk
- log $SCRIPTS_DIR/compile-svn.sh mpc-trunk CC=icc CFLAGS=\"-Wno-error\"
- ;;
- *amd64-linux*)
- # Intel compiler
- clean_compile_dir $PIPOL_WDIR/mpc-trunk
- log $SCRIPTS_DIR/compile-svn.sh mpc-trunk CC=icc CFLAGS=\"-Wno-error\"
- ;;
- *ia64-linux*)
- # Intel compiler
- clean_compile_dir $PIPOL_WDIR/mpc-trunk
- log $SCRIPTS_DIR/compile-svn.sh mpc-trunk CC=icc CFLAGS=\"-Wno-error\"
- ;;
-esac
-
-#
-# Return value is 0 if no script failed
-#
-exit $RET;
diff --git a/tools/pipol/rc.amd64-linux-debian-etch b/tools/pipol/rc.amd64-linux-debian-etch
deleted file mode 100644
index 82d8d87..0000000
--- a/tools/pipol/rc.amd64-linux-debian-etch
+++ /dev/null
@@ -1,4 +0,0 @@
-apt-get update
-apt-get install -q=2 libgmp3-dev
-apt-get install -q=2 libmpfr-dev
-apt-get install -q=2 libstdc++5
diff --git a/tools/pipol/rc.amd64-linux-fedora b/tools/pipol/rc.amd64-linux-fedora
deleted file mode 100755
index bff9bb9..0000000
--- a/tools/pipol/rc.amd64-linux-fedora
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-yum -y remove ccache
-
-yum -y install compat-libstdc++-33
-yum -y upgrade automake
-yum -y install libtool
-yum -y install texinfo
-yum -y install gmp-devel
-yum -y install mpfr-devel
diff --git a/tools/pipol/rc.amd64-linux-mandriva b/tools/pipol/rc.amd64-linux-mandriva
deleted file mode 100755
index 832e9c2..0000000
--- a/tools/pipol/rc.amd64-linux-mandriva
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-urpmi.update -a --quiet
-urpmi --force --quiet lib64gmp3-devel
-urpmi --force --quiet lib64mpfr1
-urpmi --force --quiet lib64mpfr1-devel
-
diff --git a/tools/pipol/rc.amd64-linux-suse-LES10 b/tools/pipol/rc.amd64-linux-suse-LES10
deleted file mode 100755
index 04e994d..0000000
--- a/tools/pipol/rc.amd64-linux-suse-LES10
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-smart channel --yes --disable 'openSUSE:Tools'
-smart channel --yes --disable 'OpenOffice.org:STABLE'
-smart channel --yes --disable 'OpenOffice.org:EXTRAS'
-smart channel --yes --add openSUSE type=yast2 name=current baseurl="http://download.opensuse.org/distribution/SL-OSS-factory/inst-source/"
-smart channel --yes --enable openSUSE
-smart update
-smart install rpm --yes
-smart upgrade smart --yes
-smart install autoconf --yes
-smart install automake --yes
-smart install gmp-devel --yes
-smart install texinfo --yes
-smart install libmpfr1-2.3.1 --yes
-
diff --git a/tools/pipol/rc.amd64-linux-ubuntu-feisty b/tools/pipol/rc.amd64-linux-ubuntu-feisty
deleted file mode 100755
index 2af20ae..0000000
--- a/tools/pipol/rc.amd64-linux-ubuntu-feisty
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-dpkg --configure -a
-apt-get -q=2 install autoconf
-apt-get -q=2 install automake
-apt-get -q=2 install texinfo
-apt-get -q=2 install libtool
-apt-get -q=2 install libgmp3-dev
-apt-get -q=2 install libmpfr-dev
diff --git a/tools/pipol/rc.amd64-linux-ubuntu-hardy b/tools/pipol/rc.amd64-linux-ubuntu-hardy
deleted file mode 100755
index 3ccc36b..0000000
--- a/tools/pipol/rc.amd64-linux-ubuntu-hardy
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-apt-get -y -q=2 install automake
-apt-get -y -q=2 install texinfo
-apt-get -y -q=2 install libtool
-apt-get -y -q=2 install libgmp3-dev
-apt-get -y -q=2 install libmpfr-dev
diff --git a/tools/pipol/rc.fedora b/tools/pipol/rc.fedora
deleted file mode 100755
index 1112066..0000000
--- a/tools/pipol/rc.fedora
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-yum -y remove ccache
-
-yum --enablerepo=development -y install compat-libstdc++-33.i386
-yum --enablerepo=development -y upgrade automake
-yum --enablerepo=development -y install libtool
-yum --enablerepo=development -y install texinfo
-yum --enablerepo=development -y install gmp-devel
-yum --enablerepo=development -y install mpfr-devel
diff --git a/tools/pipol/rc.i386-linux-debian-etch b/tools/pipol/rc.i386-linux-debian-etch
deleted file mode 100755
index b3f2bc6..0000000
--- a/tools/pipol/rc.i386-linux-debian-etch
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# AUTOMAKE 1.10.1 is in version 'Lenny'
-cat >>/etc/apt/sources.list <<EOF
-
-deb http://ftp.fr.debian.org/debian/ testing main
-deb http://security.debian.org/ testing/updates main
-EOF
-
-cat >>/etc/apt/apt.conf.d/100MpfrChanges <<EOF
-APT::Cache-Limit 141943904;
-APT::Default-Release "stable";
-EOF
-
-apt-get -qq update
-apt-get -qq -u dist-upgrade
-
-apt-get -qq install bzip2 <&-
-apt-get -qq install autoconf <&-
-apt-get -qq install -t testing automake <&-
-apt-get -qq install libtool <&-
-apt-get -qq install libgmp3-dev <&-
-
-# mpc needs it
-apt-get -qq install libmpfr-dev <&-
-
diff --git a/tools/pipol/rc.i386-linux-debian-testing b/tools/pipol/rc.i386-linux-debian-testing
deleted file mode 100755
index 1dc3454..0000000
--- a/tools/pipol/rc.i386-linux-debian-testing
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-cat >>/etc/apt/apt.conf.d/100MpfrChanges <<EOF
-APT::Cache-Limit 141943904;
-APT::Default-Release "stable";
-EOF
-
-apt-get -qq update
-
-apt-get -q=2 install libstdc++5
-
-apt-get -qq install bzip2 <&-
-apt-get -qq install autoconf <&-
-apt-get -qq install automake <&-
-apt-get -qq install libtool <&-
-apt-get -qq install libgmp3-dev <&-
-
-# mpc needs it
-apt-get -qq install libmpfr-dev <&-
-
diff --git a/tools/pipol/rc.i386-linux-fedora-core8 b/tools/pipol/rc.i386-linux-fedora-core8
deleted file mode 100755
index 1112066..0000000
--- a/tools/pipol/rc.i386-linux-fedora-core8
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-yum -y remove ccache
-
-yum --enablerepo=development -y install compat-libstdc++-33.i386
-yum --enablerepo=development -y upgrade automake
-yum --enablerepo=development -y install libtool
-yum --enablerepo=development -y install texinfo
-yum --enablerepo=development -y install gmp-devel
-yum --enablerepo=development -y install mpfr-devel
diff --git a/tools/pipol/rc.i386-linux-fedora-core9 b/tools/pipol/rc.i386-linux-fedora-core9
deleted file mode 100755
index bff9bb9..0000000
--- a/tools/pipol/rc.i386-linux-fedora-core9
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-yum -y remove ccache
-
-yum -y install compat-libstdc++-33
-yum -y upgrade automake
-yum -y install libtool
-yum -y install texinfo
-yum -y install gmp-devel
-yum -y install mpfr-devel
diff --git a/tools/pipol/rc.i386-linux-mandriva b/tools/pipol/rc.i386-linux-mandriva
deleted file mode 100644
index 6a56ffd..0000000
--- a/tools/pipol/rc.i386-linux-mandriva
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-urpmi.update -a --quiet
-urpmi --force --quiet libgmp3-devel
-urpmi --force --quiet libmpfr1
-urpmi --force --quiet libmpfr1-devel
-
diff --git a/tools/pipol/rc.ia64-linux-fedora b/tools/pipol/rc.ia64-linux-fedora
deleted file mode 100755
index 44cc59b..0000000
--- a/tools/pipol/rc.ia64-linux-fedora
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-yum -y remove ccache
-
-yum -y install compat-libstdc++-33
-yum -y upgrade automake
-yum -y install libtool
-yum -y install texinfo
-yum -y install gmp-devel
-
-#mpfr for mpc
-# official package too old 2.3.0
-#yum -y install mpfr-devel
-cd /
-tar xjf $PIPOL_HOMEDIR/pkg/mpfr-2.3.2-ia64.tar.bz2
diff --git a/tools/pipol/rc.mac b/tools/pipol/rc.mac
deleted file mode 100755
index 2408029..0000000
--- a/tools/pipol/rc.mac
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-/opt/local/bin/port selfupdate
-/opt/local/bin/port install autoconf
-/opt/local/bin/port install automake
-/opt/local/bin/port install libtool
-/opt/local/bin/port install gzip
-/opt/local/bin/port install gmp +devel
-/opt/local/bin/port install mpfr +devel
-chmod 1777 /pipol
-rm -rf /usr/local/lib/*
-rm -rf /usr/local/include/*
-
diff --git a/tools/pipol/rc.redhat b/tools/pipol/rc.redhat
deleted file mode 100755
index e4ae1dc..0000000
--- a/tools/pipol/rc.redhat
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-# use fedora repositories
-cp $PIPOL_HOMEDIR/.pipol/yum.repos.d/* /etc/yum.repos.d
-
-#yum -y update yum
-
-# update tools
-yum --nogpgcheck -y update automake
-
-# get recent mpfr library
-yum --noplugins -y install gmp-devel
-#yum --disableplugin=rhnplugin -y install mpfr-devel
-cd /
-tar xjf $PIPOL_HOMEDIR/src/mpfr-2.3.2-ia64.tar.bz2
-
diff --git a/tools/pipol/scripts/compile-svn.sh b/tools/pipol/scripts/compile-svn.sh
deleted file mode 100755
index 092c6c1..0000000
--- a/tools/pipol/scripts/compile-svn.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-if [[ $# -lt 1 ]]; then
- echo Usage: `basename $0` dir [options];
- echo -n "Configure, compile, and check sources in \$PIPOL_WDIR/dir "
- echo passing options to the compiler;
- exit 1;
-else
- echo \*
- echo \* $0 $*
- echo \*
-fi
-
-cd $PIPOL_WDIR/$1
-if [[ ! -f configure ]]; then
- autoreconf -i || exit 1
-fi
-
-shift
-if grep -q "CFLAGS=" <<<"$@"; then
-# "$@" would also split the CFLAGS options so we have to separate configure
-# and CFLAGS options manually
- CONFIGURE_OPTIONS=`sed -ne 's/\(.*\)\ *CFLAGS=\"\(.*\)\"\(.*\)/\1\3/p' <<<"$@"`
- CFLAGS_OPTIONS=`sed -ne 's/\(.*\)\ *CFLAGS=\"\(.*\)\"\(.*\)/CFLAGS=\2/p' <<<"$@"`
- ./configure $CONFIGURE_OPTIONS "$CFLAGS_OPTIONS"
-else
- ./configure "$@"
-fi
-if [ $? != 0 ]; then
-# configure failed
- cat config.log
- exit 1
-fi
-make && make check
diff --git a/tools/pipol/scripts/get-svn.sh b/tools/pipol/scripts/get-svn.sh
deleted file mode 100755
index dab9285..0000000
--- a/tools/pipol/scripts/get-svn.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-#
-# Install sources from subversion repository in /pipol
-#
-REPO="https://scm.gforge.inria.fr/svn/"
-if [ $# -ne 2 ]; then
- echo "Usage: $0 svn_branch install_dir"
- echo -n "Check out code source from $REPO/svn_branch "
- echo "into \$PIPOL_WDIR/install_dir"
- exit 1;
-fi
-
-svn co ${REPO}$1 ${PIPOL_WDIR}/$2
-
-#cd $PIPOL_WDIR
-#svn co svn://scm.gforge.inria.fr/svn/mpfr/trunk svn-mpfr
-#svn co https://scm.gforge.inria.fr/svn/mpc/trunk svn-mpc
diff --git a/tools/pipol/yum.repos.d/fedora-development.repo b/tools/pipol/yum.repos.d/fedora-development.repo
deleted file mode 100644
index a23b706..0000000
--- a/tools/pipol/yum.repos.d/fedora-development.repo
+++ /dev/null
@@ -1,48 +0,0 @@
-# These packages are untested and still under development. This
-# repository is used for updates to test releases, and for
-# development of new releases.
-#
-# This repository can see significant daily turnover and major
-# functionality changes which cause unexpected problems with other
-# development packages. Please use these packages if you want to work
-# with the Fedora developers by testing these new development packages.
-#
-# fedora-test-list@redhat.com is available as a discussion forum for
-# testing and troubleshooting for development packages in conjunction
-# with new test releases.
-#
-# More information is available at http://fedoraproject.org/wiki/Testing
-#
-# Reproducible and reportable issues should be filed at
-# http://bugzilla.redhat.com/.
-#
-# Product: Fedora
-# Version: devel
-
-[development]
-name=Fedora - Development
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/development/$basearch/os/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=$basearch
-enabled=1
-gpgcheck=0
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
-
-[development-debuginfo]
-name=Fedora - Development - Debug
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/development/$basearch/debug/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide-debug&arch=$basearch
-enabled=0
-gpgcheck=0
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
-
-[development-source]
-name=Fedora - Development - Source
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/development/source/SRPMS/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide-source&arch=$basearch
-enabled=0
-gpgcheck=0
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
-
diff --git a/tools/pipol/yum.repos.d/fedora-updates-testing.repo b/tools/pipol/yum.repos.d/fedora-updates-testing.repo
deleted file mode 100644
index 513340e..0000000
--- a/tools/pipol/yum.repos.d/fedora-updates-testing.repo
+++ /dev/null
@@ -1,26 +0,0 @@
-[updates-testing]
-name=Fedora $releasever - $basearch - Test Updates
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/testing/$releasever/$basearch/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-f$releasever&arch=$basearch
-enabled=0
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test
-
-[updates-testing-debuginfo]
-name=Fedora $releasever - $basearch - Test Updates Debug
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/testing/$releasever/$basearch/debug/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-debug-f$releasever&arch=$basearch
-enabled=0
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test
-
-[updates-testing-source]
-name=Fedora $releasever - Test Updates Source
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/testing/$releasever/SRPMS/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-source-f$releasever&arch=$basearch
-enabled=0
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test
diff --git a/tools/pipol/yum.repos.d/fedora-updates.repo b/tools/pipol/yum.repos.d/fedora-updates.repo
deleted file mode 100644
index 24342bb..0000000
--- a/tools/pipol/yum.repos.d/fedora-updates.repo
+++ /dev/null
@@ -1,26 +0,0 @@
-[updates]
-name=Fedora $releasever - $basearch - Updates
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/$basearch/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch
-enabled=0
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
-
-[updates-debuginfo]
-name=Fedora $releasever - $basearch - Updates - Debug
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/$basearch/debug/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-debug-f$releasever&arch=$basearch
-enabled=0
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
-
-[updates-source]
-name=Fedora $releasever - Updates Source
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/SRPMS/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-source-f$releasever&arch=$basearch
-enabled=0
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
diff --git a/tools/pipol/yum.repos.d/fedora.repo b/tools/pipol/yum.repos.d/fedora.repo
deleted file mode 100644
index 7e5481f..0000000
--- a/tools/pipol/yum.repos.d/fedora.repo
+++ /dev/null
@@ -1,26 +0,0 @@
-[fedora]
-name=Fedora $releasever - $basearch
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
-enabled=0
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
-
-[fedora-debuginfo]
-name=Fedora $releasever - $basearch - Debug
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-$releasever&arch=$basearch
-enabled=0
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
-
-[fedora-source]
-name=Fedora $releasever - Source
-failovermethod=priority
-#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/
-mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-source-$releasever&arch=$basearch
-enabled=0
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
diff --git a/tools/testgen/makefile b/tools/testgen/makefile
deleted file mode 100644
index 5f94463..0000000
--- a/tools/testgen/makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-OPT = -pedantic -Wall -Werror -g --std=c99
-CC = gcc
-DIR = .
-
-write_test_frsub : write_test_frsub.o
- $(CC) -o $(DIR)/write_test_frsub write_test_frsub.o $(OPT)
-
-write_test_subfr : write_test_subfr.o
- $(CC) -o $(DIR)/write_test_subfr write_test_subfr.o $(OPT)
-
-write_test_frdiv : write_test_frdiv.o
- $(CC) -o $(DIR)/write_test_frdiv write_test_frdiv.o $(OPT)
-
-write_test_div : write_test_div.o
- $(CC) -o $(DIR)/write_test_div write_test_div.o $(OPT)
-
-write_test_divfr : write_test_divfr.o
- $(CC) -o $(DIR)/write_test_divfr write_test_divfr.o $(OPT)
-
-write_test_norm : write_test_norm.o
- $(CC) -o $(DIR)/write_test_norm write_test_norm.o $(OPT)
-
-write_test_mulfr : write_test_mulfr.o
- $(CC) -o $(DIR)/write_test_mulfr write_test_mulfr.o $(OPT)
-
-%.o : %.c write_test.h
- $(CC) $< -c -o $@ $(OPT)
-
-clean :
- rm -f *.o *~
diff --git a/tools/testgen/write_test.h b/tools/testgen/write_test.h
deleted file mode 100644
index 4c3f391..0000000
--- a/tools/testgen/write_test.h
+++ /dev/null
@@ -1,231 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-
-char* licence =
-"# This file is part of the MPC Library.\n"
-"#\n"
-"# The MPC Library is free software; you can redistribute it and/or modify\n"
-"# it under the terms of the GNU Lesser General Public License as published by\n"
-"# the Free Software Foundation; either version 2.1 of the License, or (at your\n"
-"# option) any later version.\n"
-"#\n"
-"# The MPC Library is distributed in the hope that it will be useful, but\n"
-"# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n"
-"# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public\n"
-"# License for more details.\n"
-"#\n"
-"# You should have received a copy of the GNU Lesser General Public License\n"
-"# along with the MPC Library; see the file COPYING.LIB. If not, write to\n"
-"# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,\n"
-"# MA 02111-1307, USA.\n"
-"#\n"
-;
-
-char* values [] = {"-inf", "-1", "-0", "+0", "1", "+inf", "nan"};
-int valueslen = 7;
-char* infvalues [] = {"-inf", "+inf", "nan"};
-int infvalueslen = 3;
-
-int equals (char* a, char* b) {
- return !strcmp (a, b);
-}
-
-int index (char** table, int length, char* value) {
- // returns the index of value in the table,
- // or -1 if it is not found
- int i;
- for (i = 0; i < length; i++)
- if (equals (table [i], value))
- return i;
- return -1;
-}
-
-char* mul_fr_fr (char *op1, char *op2) {
- // returns op1*op2
- if (equals (op1, "nan") || equals (op2, "nan"))
- return "nan";
- // none is nan
- else if (equals (op1, "-inf")) {
- // res = op1 * values
- char* res [] = {"+inf", "+inf", "nan", "nan", "-inf", "-inf", ""};
- return res [index (values, valueslen, op2)];
- }
- else if (equals (op1, "-1")) {
- char* res [] = {"+inf", "1", "+0", "-0", "-1", "-inf", ""};
- return res [index (values, valueslen, op2)];
- }
- else if (equals (op1, "-0")) {
- char* res [] = {"nan", "+0", "+0", "-0", "-0", "nan", ""};
- return res [index (values, valueslen, op2)];
- }
- else if (equals (op1, "+0")) {
- char* res [] = {"nan", "-0", "-0", "+0", "+0", "nan", ""};
- return res [index (values, valueslen, op2)];
- }
- else if (equals (op1, "1")) {
- char* res [] = {"-inf", "-1", "-0", "+0", "1", "+inf", ""};
- return res [index (values, valueslen, op2)];
- }
- else if (equals (op1, "+inf")) {
- char* res [] = {"-inf", "-inf", "nan", "nan", "+inf", "+inf", ""};
- return res [index (values, valueslen, op2)];
- }
- else
- return "?";
-}
-
-char* div_fr_fr (char *op1, char *op2) {
- // returns op1/op2
- char *r;
-// printf (" %s %s", op1, op2);
- if (equals (op1, "nan") || equals (op2, "nan"))
- r = "nan";
- else if (equals (op2, "-inf")) {
- char* res [] = {"nan", "+0", "+0", "-0", "-0", "nan", ""};
- r = res [index (values, valueslen, op1)];
- }
- else if (equals (op2, "-2")) {
- char* res [] = {"+inf", "0.5", "+0", "-0", "-0.5", "-inf", ""};
- if (equals (op1, "-2"))
- r = "1";
- else if (equals (op1, "2"))
- r = "-1";
- else if (equals (op1, "0"))
- r = "0";
- else
- r = res [index (values, valueslen, op1)];
- }
- else if (equals (op2, "-1")) {
- char* res [] = {"+inf", "1", "+0", "-0", "-1", "-inf", ""};
- r = res [index (values, valueslen, op1)];
- }
- else if (equals (op2, "-0")) {
- char* res [] = {"+inf", "+inf", "nan", "nan", "-inf", "-inf", ""};
- if (equals (op1, "0"))
- r = "nan";
- else
- r = res [index (values, valueslen, op1)];
- }
- else if (equals (op2, "+0")) {
- char* res [] = {"-inf", "-inf", "nan", "nan", "+inf", "+inf", ""};
- if (equals (op1, "0"))
- r = "nan";
- else
- r = res [index (values, valueslen, op1)];
- }
- else if (equals (op2, "1")) {
- char* res [] = {"-inf", "-1", "-0", "+0", "1", "+inf", ""};
- r = res [index (values, valueslen, op1)];
- }
- else if (equals (op2, "2")) {
- char* res [] = {"-inf", "-0.5", "-0", "+0", "0.5", "+inf", ""};
- if (equals (op1, "-2"))
- r = "-1";
- else if (equals (op1, "2"))
- r = "1";
- else if (equals (op1, "0"))
- r = "0";
- else
- r = res [index (values, valueslen, op1)];
- }
- else if (equals (op2, "+inf")) {
- char* res [] = {"nan", "-0", "-0", "+0", "+0", "nan", ""};
- r = res [index (values, valueslen, op1)];
- }
- else
- r = "?";
-// printf (" %s\n", r);
- return r;
-}
-
-char* add_fr_fr (char *op1, char *op2) {
- // returns op1+op2
- if (equals (op1, "nan") || equals (op2, "nan"))
- return "nan";
- else if (equals (op1, "-inf")) {
- char* res [] = {"-inf", "-inf", "-inf", "-inf", "-inf", "nan", ""};
- return res [index (values, valueslen, op2)];
- }
- else if (equals (op1, "-1")) {
- char* res [] = {"-inf", "-2", "-1", "-1", "0", "+inf", ""};
- return res [index (values, valueslen, op2)];
- }
- else if (equals (op1, "-0")) {
- char* res [] = {"-inf", "-1", "-0", "0", "1", "+inf", ""};
- return res [index (values, valueslen, op2)];
- }
- else if (equals (op1, "+0")) {
- char* res [] = {"-inf", "-1", "0", "+0", "1", "+inf", ""};
- return res [index (values, valueslen, op2)];
- }
- else if (equals (op1, "1")) {
- char* res [] = {"-inf", "0", "1", "1", "2", "+inf", ""};
- return res [index (values, valueslen, op2)];
- }
- else if (equals (op1, "+inf")) {
- char* res [] = {"nan", "+inf", "+inf", "+inf", "+inf", "+inf", ""};
- return res [index (values, valueslen, op2)];
- }
- else
- return "?";
-}
-
-char* neg_fr (char *op) {
- // returns -op
- if (index (values, valueslen, op) != -1) {
- char* res [] = {"+inf", "1", "+0", "-0", "-1", "-inf", "nan"};
- return res [index (values, valueslen, op)];
- }
- else if (equals (op, "0"))
- return "0";
- else
- return "?";
-}
-
-char* sub_fr_fr (char *op1, char *op2) {
- // returns op1-op2
- return add_fr_fr (op1, neg_fr (op2));
-}
-
-char* norm (char *opre, char *opim) {
- // returns opre^2+opim^2
- if (equals (opre, "nan") || equals (opim, "nan"))
- if ( (equals (opre, "-inf") || equals (opre, "+inf"))
- || (equals (opim, "-inf") || equals (opim, "+inf")))
- return "+inf";
- else
- return "nan";
- else
- return add_fr_fr (mul_fr_fr (opre, opre), mul_fr_fr (opim, opim));
-}
-
-char* div_re (char *op1re, char *op1im, char *op2re, char *op2im) {
- // returns real part of complex division
- if ( equals (op1re, "nan") || equals (op1im, "nan")
- || equals (op2re, "nan") || equals (op2im, "nan"))
- return "nan";
- else if (equals (op2im, "-0") || equals (op2im, "+0"))
- return div_fr_fr (op1re, op2re);
- else if (equals (op2re, "-0") || equals (op2re, "+0"))
- return div_fr_fr (op1im, op2im);
- else
- return div_fr_fr (
- add_fr_fr (mul_fr_fr (op1re, op2re), mul_fr_fr (op1im, op2im)),
- norm (op2re, op2im));
-}
-
-char* div_im (char *op1re, char *op1im, char *op2re, char *op2im) {
- // returns imaginary part of complex division
- if ( equals (op1re, "nan") || equals (op1im, "nan")
- || equals (op2re, "nan") || equals (op2im, "nan"))
- return "nan";
- else if (equals (op2im, "-0") || equals (op2im, "+0"))
- return div_fr_fr (op1im, op2re);
- else if (equals (op2re, "-0") || equals (op2re, "+0"))
- return neg_fr (div_fr_fr (op1re, op2im));
- else
- return div_fr_fr (
- sub_fr_fr (mul_fr_fr (op1im, op2re), mul_fr_fr (op1re, op2im)),
- norm (op2re, op2im));
-}
-
diff --git a/tools/testgen/write_test_div.c b/tools/testgen/write_test_div.c
deleted file mode 100644
index c00f577..0000000
--- a/tools/testgen/write_test_div.c
+++ /dev/null
@@ -1,68 +0,0 @@
-#include "write_test.h"
-
-char* header1 =
-"# Data file for mpc_div.\n"
-"#\n"
-"# Copyright (C) 2008 Andreas Enge\n"
-"#\n"
-;
-char* header2 =
-"# For explanations on the file format, see add.dat.\n\n"
-;
-
-int main () {
- int op1rei, op1imi, op2rei, op2imi;
- // index in values table
- char *op1re, *op1im, *op2re, *op2im;
-
- printf ("%s%s%s", header1, licence, header2);
-
- printf ("# special values\n");
- for (op1rei = 0; op1rei < valueslen; op1rei++)
- for (op1imi = 0; op1imi < valueslen; op1imi++)
- for (op2rei = 0; op2rei < valueslen; op2rei++)
- for (op2imi = 0; op2imi < valueslen; op2imi++)
- {
- op1re = values [op1rei];
- op1im = values [op1imi];
- op2re = values [op2rei];
- op2im = values [op2imi];
- if ( (index (infvalues, infvalueslen, op1re) != -1)
- || (index (infvalues, infvalueslen, op1im) != -1)
- || (index (infvalues, infvalueslen, op2re) != -1)
- || (index (infvalues, infvalueslen, op2im) != -1))
- {
- // at least one infinite value
- printf ("7 %4s 7 %4s ",
- div_re (op1re, op1im, op2re, op2im),
- div_im (op1re, op1im, op2re, op2im));
- printf ("7 %4s 7 %4s 7 %4s 7 %4s N N\n",
- op1re, op1im, op2re, op2im);
- }
- }
-
- printf ("\n# finite values\n");
- for (op1rei = 0; op1rei < valueslen; op1rei++)
- for (op1imi = 0; op1imi < valueslen; op1imi++)
- for (op2rei = 0; op2rei < valueslen; op2rei++)
- for (op2imi = 0; op2imi < valueslen; op2imi++)
- {
- op1re = values [op1rei];
- op1im = values [op1imi];
- op2re = values [op2rei];
- op2im = values [op2imi];
- if ( (index (infvalues, infvalueslen, op1re) == -1)
- && (index (infvalues, infvalueslen, op1im) == -1)
- && (index (infvalues, infvalueslen, op2re) == -1)
- && (index (infvalues, infvalueslen, op2im) == -1))
- {
- printf ("7 %4s 7 %4s ",
- div_re (op1re, op1im, op2re, op2im),
- div_im (op1re, op1im, op2re, op2im));
- printf ("7 %4s 7 %4s 7 %4s 7 %4s N N\n",
- op1re, op1im, op2re, op2im);
- }
- }
-
- return 1;
-}
diff --git a/tools/testgen/write_test_divfr.c b/tools/testgen/write_test_divfr.c
deleted file mode 100644
index 60d182f..0000000
--- a/tools/testgen/write_test_divfr.c
+++ /dev/null
@@ -1,60 +0,0 @@
-#include "write_test.h"
-
-char* header1 =
-"# Data file for mpc_div_fr.\n"
-"#\n"
-"# Copyright (C) 2008 Andreas Enge\n"
-"#\n"
-;
-char* header2 =
-"# For explanations on the file format, see add_fr.dat.\n\n"
-;
-
-int main () {
- int op1rei, op1imi, op2i;
- // index in values table
- char *op1re, *op1im, *op2;
-
- printf ("%s%s%s", header1, licence, header2);
-
- printf ("# special values\n");
- for (op1rei = 0; op1rei < valueslen; op1rei++)
- for (op1imi = 0; op1imi < valueslen; op1imi++)
- for (op2i = 0; op2i < valueslen; op2i++)
- {
- op1re = values [op1rei];
- op1im = values [op1imi];
- op2 = values [op2i];
- if ( (index (infvalues, infvalueslen, op1re) != -1)
- || (index (infvalues, infvalueslen, op1im) != -1)
- || (index (infvalues, infvalueslen, op2) != -1))
- {
- // at least one infinite value
- printf ("7 %4s 7 %4s ",
- div_fr_fr (op1re, op2), div_fr_fr (op1im, op2));
- printf ("7 %4s 7 %4s 7 %4s N N\n",
- op1re, op1im, op2);
- }
- }
-
- printf ("\n# values with only 1, -1, +0, -0\n");
- for (op1rei = 0; op1rei < valueslen; op1rei++)
- for (op1imi = 0; op1imi < valueslen; op1imi++)
- for (op2i = 0; op2i < valueslen; op2i++)
- {
- op1re = values [op1rei];
- op1im = values [op1imi];
- op2 = values [op2i];
- if ( (index (infvalues, infvalueslen, op1re) == -1)
- && (index (infvalues, infvalueslen, op1im) == -1)
- && (index (infvalues, infvalueslen, op2) == -1))
- {
- printf ("7 %4s 7 %4s ",
- div_fr_fr (op1re, op2), div_fr_fr (op1im, op2));
- printf ("7 %4s 7 %4s 7 %4s N N\n",
- op1re, op1im, op2);
- }
- }
-
- return 1;
-}
diff --git a/tools/testgen/write_test_frdiv.c b/tools/testgen/write_test_frdiv.c
deleted file mode 100644
index e7d9b38..0000000
--- a/tools/testgen/write_test_frdiv.c
+++ /dev/null
@@ -1,63 +0,0 @@
-#include "write_test.h"
-
-char* header1 =
-"# Data file for mpc_fr_div.\n"
-"#\n"
-"# Copyright (C) 2008 Andreas Enge\n"
-"#\n"
-;
-char* header2 =
-"# For explanations on the file format, see add.dat, and take into\n"
-"# account the necessary modifications for one real argument.\n\n"
-;
-
-int main () {
- int op1i, op2rei, op2imi;
- // index in values table
- char *op1, *op2re, *op2im;
-
- printf ("%s%s%s", header1, licence, header2);
-
- printf ("# special values\n");
- for (op1i = 0; op1i < valueslen; op1i++)
- for (op2rei = 0; op2rei < valueslen; op2rei++)
- for (op2imi = 0; op2imi < valueslen; op2imi++)
- {
- op1 = values [op1i];
- op2re = values [op2rei];
- op2im = values [op2imi];
- if ( (index (infvalues, infvalueslen, op1) != -1)
- || (index (infvalues, infvalueslen, op2re) != -1)
- || (index (infvalues, infvalueslen, op2im) != -1))
- {
- // at least one infinite value
- printf ("7 %4s 7 %4s ",
- div_re (op1, "+0", op2re, op2im),
- div_im (op1, "+0", op2re, op2im));
- printf ("7 %4s 7 %4s 7 %4s N N\n",
- op1, op2re, op2im);
- }
- }
-
- printf ("\n# finite values\n");
- for (op1i = 0; op1i < valueslen; op1i++)
- for (op2rei = 0; op2rei < valueslen; op2rei++)
- for (op2imi = 0; op2imi < valueslen; op2imi++)
- {
- op1 = values [op1i];
- op2re = values [op2rei];
- op2im = values [op2imi];
- if ( (index (infvalues, infvalueslen, op1) == -1)
- && (index (infvalues, infvalueslen, op2re) == -1)
- && (index (infvalues, infvalueslen, op2im) == -1))
- {
- printf ("7 %4s 7 %4s ",
- div_re (op1, "+0", op2re, op2im),
- div_im (op1, "+0", op2re, op2im));
- printf ("7 %4s 7 %4s 7 %4s N N\n",
- op1, op2re, op2im);
- }
- }
-
- return 1;
-}
diff --git a/tools/testgen/write_test_frsub.c b/tools/testgen/write_test_frsub.c
deleted file mode 100644
index e201ad6..0000000
--- a/tools/testgen/write_test_frsub.c
+++ /dev/null
@@ -1,60 +0,0 @@
-#include "write_test.h"
-
-char* header1 =
-"# Data file for mpc_fr_sub.\n"
-"#\n"
-"# Copyright (C) 2008 Andreas Enge\n"
-"#\n"
-;
-char* header2 =
-"# For explanations on the file format, see add_fr.dat.\n\n"
-;
-
-int main () {
- int op1i, op2rei, op2imi;
- // index in values table
- char *op1, *op2re, *op2im;
-
- printf ("%s%s%s", header1, licence, header2);
-
- printf ("# special values\n");
- for (op1i = 0; op1i < valueslen; op1i++)
- for (op2rei = 0; op2rei < valueslen; op2rei++)
- for (op2imi = 0; op2imi < valueslen; op2imi++)
- {
- op1 = values [op1i];
- op2re = values [op2rei];
- op2im = values [op2imi];
- if ( (index (infvalues, infvalueslen, op1) != -1)
- || (index (infvalues, infvalueslen, op2re) != -1)
- || (index (infvalues, infvalueslen, op2im) != -1))
- {
- // at least one infinite value
- printf ("7 %4s 7 %4s ",
- sub_fr_fr (op1, op2re), neg_fr (op2im));
- printf ("7 %4s 7 %4s 7 %4s N N\n",
- op1, op2re, op2im);
- }
- }
-
- printf ("\n# values with only 1, -1, +0, -0\n");
- for (op1i = 0; op1i < valueslen; op1i++)
- for (op2rei = 0; op2rei < valueslen; op2rei++)
- for (op2imi = 0; op2imi < valueslen; op2imi++)
- {
- op1 = values [op1i];
- op2re = values [op2rei];
- op2im = values [op2imi];
- if ( (index (infvalues, infvalueslen, op1) == -1)
- && (index (infvalues, infvalueslen, op2re) == -1)
- && (index (infvalues, infvalueslen, op2im) == -1))
- {
- printf ("7 %4s 7 %4s ",
- sub_fr_fr (op1, op2re), neg_fr (op2im));
- printf ("7 %4s 7 %4s 7 %4s N N\n",
- op1, op2re, op2im);
- }
- }
-
- return 1;
-}
diff --git a/tools/testgen/write_test_mulfr.c b/tools/testgen/write_test_mulfr.c
deleted file mode 100644
index 1dfc577..0000000
--- a/tools/testgen/write_test_mulfr.c
+++ /dev/null
@@ -1,60 +0,0 @@
-#include "write_test.h"
-
-char* header1 =
-"# Data file for mpc_mul_fr.\n"
-"#\n"
-"# Copyright (C) 2008 Andreas Enge\n"
-"#\n"
-;
-char* header2 =
-"# For explanations on the file format, see add_fr.dat.\n\n"
-;
-
-int main () {
- int op1rei, op1imi, op2i;
- // index in values table
- char *op1re, *op1im, *op2;
-
- printf ("%s%s%s", header1, licence, header2);
-
- printf ("# special values\n");
- for (op1rei = 0; op1rei < valueslen; op1rei++)
- for (op1imi = 0; op1imi < valueslen; op1imi++)
- for (op2i = 0; op2i < valueslen; op2i++)
- {
- op1re = values [op1rei];
- op1im = values [op1imi];
- op2 = values [op2i];
- if ( (index (infvalues, infvalueslen, op1re) != -1)
- || (index (infvalues, infvalueslen, op1im) != -1)
- || (index (infvalues, infvalueslen, op2) != -1))
- {
- // at least one infinite value
- printf ("7 %4s 7 %4s ",
- mul_fr_fr (op1re, op2), mul_fr_fr (op1im, op2));
- printf ("7 %4s 7 %4s 7 %4s N N\n",
- op1re, op1im, op2);
- }
- }
-
- printf ("\n# values with only 1, -1, +0, -0\n");
- for (op1rei = 0; op1rei < valueslen; op1rei++)
- for (op1imi = 0; op1imi < valueslen; op1imi++)
- for (op2i = 0; op2i < valueslen; op2i++)
- {
- op1re = values [op1rei];
- op1im = values [op1imi];
- op2 = values [op2i];
- if ( (index (infvalues, infvalueslen, op1re) == -1)
- && (index (infvalues, infvalueslen, op1im) == -1)
- && (index (infvalues, infvalueslen, op2) == -1))
- {
- printf ("7 %4s 7 %4s ",
- mul_fr_fr (op1re, op2), mul_fr_fr (op1im, op2));
- printf ("7 %4s 7 %4s 7 %4s N N\n",
- op1re, op1im, op2);
- }
- }
-
- return 1;
-}
diff --git a/tools/testgen/write_test_norm.c b/tools/testgen/write_test_norm.c
deleted file mode 100644
index 2532e8e..0000000
--- a/tools/testgen/write_test_norm.c
+++ /dev/null
@@ -1,49 +0,0 @@
-#include "write_test.h"
-
-char* header1 =
-"# Data file for mpc_norm.\n"
-"#\n"
-"# Copyright (C) 2008 Andreas Enge\n"
-"#\n"
-;
-char* header2 =
-"# For explanations on the file format, see abs.dat.\n\n"
-;
-
-int main () {
- int oprei, opimi;
- // index in values table
- char *opre, *opim;
-
- printf ("%s%s%s", header1, licence, header2);
-
- printf ("# special values\n");
- for (oprei = 0; oprei < valueslen; oprei++)
- for (opimi = 0; opimi < valueslen; opimi++)
- {
- opre = values [oprei];
- opim = values [opimi];
- if ( (index (infvalues, infvalueslen, opre) != -1)
- || (index (infvalues, infvalueslen, opim) != -1))
- {
- printf ("7 %4s ", norm (opre, opim));
- printf ("7 %4s 7 %4s N\n", opre, opim);
- }
- }
-
- printf ("\n# values with only 1, -1, +0, -0\n");
- for (oprei = 0; oprei < valueslen; oprei++)
- for (opimi = 0; opimi < valueslen; opimi++)
- {
- opre = values [oprei];
- opim = values [opimi];
- if ( (index (infvalues, infvalueslen, opre) == -1)
- && (index (infvalues, infvalueslen, opim) == -1))
- {
- printf ("7 %4s ", norm (opre, opim));
- printf ("7 %4s 7 %4s N\n", opre, opim);
- }
- }
-
- return 1;
-}
diff --git a/tools/testgen/write_test_subfr.c b/tools/testgen/write_test_subfr.c
deleted file mode 100644
index 393355c..0000000
--- a/tools/testgen/write_test_subfr.c
+++ /dev/null
@@ -1,71 +0,0 @@
-#include "write_test.h"
-
-char* header1 =
-"# Data file for mpc_sub_fr.\n"
-"#\n"
-"# Copyright (C) 2008 Paul Zimmermann, Andreas Enge\n"
-"#\n"
-;
-char* header2 =
-"# For explanations on the file format, see add_fr.dat.\n\n"
-;
-
-int main () {
- int op1rei, op1imi, op2i;
- // index in values table
- char *op1re, *op1im, *op2;
-
- printf ("%s%s%s", header1, licence, header2);
-
- printf ("# special values\n");
- for (op1rei = 0; op1rei < valueslen; op1rei++)
- for (op1imi = 0; op1imi < valueslen; op1imi++)
- for (op2i = 0; op2i < valueslen; op2i++)
- {
- op1re = values [op1rei];
- op1im = values [op1imi];
- op2 = values [op2i];
- if ( (index (infvalues, infvalueslen, op1re) != -1)
- || (index (infvalues, infvalueslen, op1im) != -1)
- || (index (infvalues, infvalueslen, op2) != -1))
- {
- // at least one infinite value
- printf ("7 %4s 7 %4s ",
- sub_fr_fr (op1re, op2), op1im);
- printf ("7 %4s 7 %4s 7 %4s N N\n",
- op1re, op1im, op2);
- }
- }
-
- printf ("\n# values with only 1, -1, +0, -0\n");
- for (op1rei = 0; op1rei < valueslen; op1rei++)
- for (op1imi = 0; op1imi < valueslen; op1imi++)
- for (op2i = 0; op2i < valueslen; op2i++)
- {
- op1re = values [op1rei];
- op1im = values [op1imi];
- op2 = values [op2i];
- if ( (index (infvalues, infvalueslen, op1re) == -1)
- && (index (infvalues, infvalueslen, op1im) == -1)
- && (index (infvalues, infvalueslen, op2) == -1))
- {
- printf ("7 %4s 7 %4s ",
- sub_fr_fr (op1re, op2), op1im);
- printf ("7 %4s 7 %4s 7 %4s N N\n",
- op1re, op1im, op2);
- }
- }
-
- printf (
- "\n# also check the imaginary part is correctly rounded\n"
- "2 nan 2 16 2 nan 5 17 2 nan N N\n"
- "2 nan 2 24 2 nan 5 17 2 nan N U\n"
- "2 nan 2 16 2 nan 5 17 2 nan N D\n"
- "2 nan 2 16 2 nan 5 17 2 nan N Z\n"
- "2 nan 2 -16 2 nan 5 -17 2 nan N N\n"
- "2 nan 2 -16 2 nan 5 -17 2 nan N U\n"
- "2 nan 2 -24 2 nan 5 -17 2 nan N D\n"
- "2 nan 2 -16 2 nan 5 -17 2 nan N Z\n");
-
- return 1;
-}