blob: fb5e6368b542a10ffe7d5108a72bb1b0725449be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
#!/bin/bash
params=()
case "$(basename "$0")" in
rs-classic)
params=(--subdivision 1 --newton 0 --truncate 0 --sqrfree 0 --intprog 0)
explanation="classic RS simulation:
- subdivision at interval midpoints
- bisection only, no Newton-like acceleration
- full Taylor shifts"
;;
rs-adsc)
params=(--newton 0 --truncate 0 --sqrfree 0 --intprog 0)
explanation="ADsc default configuration:
- subdivision at admissible points
- bisection only, no Newton-like acceleration
- full Taylor shifts"
;;
rs-anewdsc)
params=(--intprog 0) # WORKAROUND for broken functionality in v2016-02-05
explanation="ANewDsc default configuration:
- subdivision at admissible points
- Newton iteration-like acceleration
- partial Taylor shifts"
;;
rs-anewdsc-notrunc)
params=(--truncate 0 --intprog 0) # WORKAROUND for broken functionality in v2016-02-05
explanation="ANewDsc without truncation:
- subdivision at admissible points
- Newton iteration-like acceleration
- full Taylor shifts"
;;
esac
usage () {
echo "RS-ANewDsc <https://anewdsc.mpi-inf.mpg.de/>
2016-02-05 by Kobel, Rouillier, Sagraloff
${explanation}
For custom options, see \`test_descartes_linux64 --help\`.
USAGE:
$0 [OPTIONS] <filename>
-h
this information
-v N
set verbosity level to N [default: 0]
-2: completely quiet
-1: only print the isolating intervals to stdout
0: print warnings and few statistics
> 0: various debug and progress messages in different levels
INPUT FILE FORMAT:
The input file encodes a single dense univariate polynomial with integer coefficients.
The first line contains the degree of the polynomial,
the following lines contain one coefficient each, starting from the trailing coefficient.
E.g., the input
2
-3
0
1
encodes the polynomial x^2 - 3 of degree 2.
No comments and/or blank lines are allowed in the input."
}
verbosity=0
while getopts ":hv:" opt; do
case "${opt}" in
h)
usage
exit 0
;;
v)
verbosity="${OPTARG}"
;;
\?)
usage
exit 1
;;
esac
done
shift $((OPTIND - 1))
if ! [ -r "$1" -o "$1" = "-" ]; then
usage
exit 1
fi
/usr/bin/test_descartes_linux64 "${params[@]}" --verbose "$verbosity" "$1"
|