Debian Codegraph @

test-suite/primitive/float/gen_compare.sh

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
•1 #!/usr/bin/bashscip-shell filesystem . . `/usr/bin/bash`.
2 # -*- compile-command: "mv -f compare.v{,~} && ./gen_compare.sh" -*-
3 set -e
4
5 exec > compare.v
6
7 catscip-shell system . . cat. <<EOF
8 (* DO NOT EDIT THIS FILE: automatically generated by ./gen_compare.sh *)
9 Require Import PrimFloat.
10 Local Open Scope float_scope.
11
12 Definition min_denorm := 0x0.0000000000001p-1022%float. (* Z.ldexp one (-1074)%Z *)
13
14 Definition min_norm := 0x0.4p-1022%float. (* Z.ldexp_one (-1024)%Z *)
15
16 EOF
17
18 genTestscip-shell shell shell-project 0.0.0 genTest().() {
19 if [scip-shell system . . `[`. $# -ne 10 ]; then
20 echoscip-shell system . . echo. >&2 "genTest expects 10 arguments"
21 fi
22 OPS=("=?" "<?" "<=?" "?=")
23 x="$1"
24 y="$2"
25 OPS1=("$3" "$4" "$5" "$6") # for x y
26 OPS2=("$7" "$8" "$9" "${10}") # for y x
27 for i in {0..3}; do
28 op="${OPS[$i]}"
29 op1="${OPS1[$i]}"
30 op2="${OPS2[$i]}"
31 echoscip-shell system . . echo. "Check (eq_refl : ($x $op $y) = $op1)."
32 echoscip-shell system . . echo. "Check (eq_refl : ($y $op $x) = $op2)."
33 echoscip-shell system . . echo.
34 done
35 }
36
37 genTestscip-shell shell shell-project 0.0.0 genTest(). nan nan \
38 false false false FNotComparable \
39 false false false FNotComparable
40 genTestscip-shell shell shell-project 0.0.0 genTest(). nan "- nan" \
41 false false false FNotComparable \
42 false false false FNotComparable
43
44 EQ=(true false true FEq \
45 true false true FEq)
46
47 genTestscip-shell shell shell-project 0.0.0 genTest(). one one "${EQ[@]}"
48 genTestscip-shell shell shell-project 0.0.0 genTest(). zero zero "${EQ[@]}"
49 genTestscip-shell shell shell-project 0.0.0 genTest(). zero "- zero" "${EQ[@]}"
50 genTestscip-shell shell shell-project 0.0.0 genTest(). "- zero" "- zero" "${EQ[@]}"
51 genTestscip-shell shell shell-project 0.0.0 genTest(). infinity infinity "${EQ[@]}"
52 genTestscip-shell shell shell-project 0.0.0 genTest(). "- infinity" "- infinity" "${EQ[@]}"
53
54 LT=(false true true FLt \
55 false false false FGt)
56
57 genTestscip-shell shell shell-project 0.0.0 genTest(). min_denorm min_norm "${LT[@]}"
58 genTestscip-shell shell shell-project 0.0.0 genTest(). min_denorm one "${LT[@]}"
59 genTestscip-shell shell shell-project 0.0.0 genTest(). min_norm one "${LT[@]}"
60 genTestscip-shell shell shell-project 0.0.0 genTest(). one infinity "${LT[@]}"
61 genTestscip-shell shell shell-project 0.0.0 genTest(). "- infinity" infinity "${LT[@]}"
62 genTestscip-shell shell shell-project 0.0.0 genTest(). "- infinity" one "${LT[@]}"