Average Error: 6.2 → 1.7
Time: 15.5s
Precision: binary64
Cost: 1216
\[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)\]
\[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(a + c \cdot b\right) \cdot \left(c \cdot i\right)\right)\]
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(a + c \cdot b\right) \cdot \left(c \cdot i\right)\right)
(FPCore (x y z t a b c i)
 :precision binary64
 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
(FPCore (x y z t a b c i)
 :precision binary64
 (* 2.0 (- (+ (* x y) (* z t)) (* (+ a (* c b)) (* c i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return 2.0 * (((x * y) + (z * t)) - ((a + (c * b)) * (c * i)));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Bits error versus c

Bits error versus i

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original6.2
Target1.7
Herbie1.7
\[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)\]

Alternatives

Alternative 1
Error4.0
Cost1544
\[\begin{array}{l} \mathbf{if}\;c \leq -1.4440070586394473 \cdot 10^{+82} \lor \neg \left(c \leq 1.362006270738487 \cdot 10^{+77}\right):\\ \;\;\;\;2 \cdot \left(z \cdot t - \left(a + c \cdot b\right) \cdot \left(c \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(c \cdot \left(a + c \cdot b\right)\right)\right)\\ \end{array}\]
Alternative 2
Error7.3
Cost1544
\[\begin{array}{l} \mathbf{if}\;x \cdot y \leq -1.404325109175153 \cdot 10^{-104} \lor \neg \left(x \cdot y \leq 5.682672477284548 \cdot 10^{-111}\right):\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - a \cdot \left(c \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - \left(a + c \cdot b\right) \cdot \left(c \cdot i\right)\right)\\ \end{array}\]
Alternative 3
Error8.5
Cost1288
\[\begin{array}{l} \mathbf{if}\;c \leq -18826200670.13257 \lor \neg \left(c \leq 1.321391563360253 \cdot 10^{-13}\right):\\ \;\;\;\;2 \cdot \left(z \cdot t - \left(a + c \cdot b\right) \cdot \left(c \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\right)\\ \end{array}\]
Alternative 4
Error10.2
Cost1288
\[\begin{array}{l} \mathbf{if}\;c \leq -1.2627519629973034 \cdot 10^{+80} \lor \neg \left(c \leq 9.165609646455902 \cdot 10^{+118}\right):\\ \;\;\;\;\left(\left(a + c \cdot b\right) \cdot \left(c \cdot i\right)\right) \cdot -2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\right)\\ \end{array}\]
Alternative 5
Error13.7
Cost1544
\[\begin{array}{l} \mathbf{if}\;x \cdot y \leq -1.5289489626241633 \cdot 10^{-103} \lor \neg \left(x \cdot y \leq 2.5255928342778342 \cdot 10^{-12}\right):\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(c \cdot \left(a + c \cdot b\right)\right)\right)\\ \end{array}\]
Alternative 6
Error19.9
Cost1032
\[\begin{array}{l} \mathbf{if}\;c \leq -1.1384506923570265 \cdot 10^{+80} \lor \neg \left(c \leq 2.083022499510345 \cdot 10^{-09}\right):\\ \;\;\;\;\left(\left(a + c \cdot b\right) \cdot \left(c \cdot i\right)\right) \cdot -2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \end{array}\]
Alternative 7
Error19.1
Cost1800
\[\begin{array}{l} \mathbf{if}\;x \cdot y + z \cdot t \leq -1.2742797768484663 \cdot 10^{-123} \lor \neg \left(x \cdot y + z \cdot t \leq 1.1942588256078403 \cdot 10^{-68}\right):\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(i \cdot \left(c \cdot \left(a + c \cdot b\right)\right)\right) \cdot -2\\ \end{array}\]
Alternative 8
Error22.2
Cost2691
\[\begin{array}{l} \mathbf{if}\;x \cdot y + z \cdot t \leq -1.2742797768484663 \cdot 10^{-123}:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \mathbf{elif}\;x \cdot y + z \cdot t \leq 1.5465766376045767 \cdot 10^{-257}:\\ \;\;\;\;\left(a \cdot \left(c \cdot i\right)\right) \cdot -2\\ \mathbf{elif}\;x \cdot y + z \cdot t \leq 1.1942588256078403 \cdot 10^{-68}:\\ \;\;\;\;-2 \cdot \left(i \cdot \left(b \cdot \left(c \cdot c\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \end{array}\]
Alternative 9
Error22.3
Cost904
\[\begin{array}{l} \mathbf{if}\;a \leq -1.187469692550406 \cdot 10^{+220} \lor \neg \left(a \leq 2.6823562299796203 \cdot 10^{+162}\right):\\ \;\;\;\;\left(a \cdot \left(c \cdot i\right)\right) \cdot -2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\ \end{array}\]
Alternative 10
Error31.9
Cost1425
\[\begin{array}{l} \mathbf{if}\;z \cdot t \leq -4.478062946668265 \cdot 10^{-08} \lor \neg \left(z \cdot t \leq 2.0650522016065681 \cdot 10^{-75} \lor \neg \left(z \cdot t \leq 0.003344819045572408\right) \land z \cdot t \leq 1.2439936353141164 \cdot 10^{+91}\right):\\ \;\;\;\;2 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \end{array}\]
Alternative 11
Error42.8
Cost320
\[2 \cdot \left(x \cdot y\right)\]
Alternative 12
Error61.9
Cost64
\[-1\]
Alternative 13
Error61.9
Cost64
\[1\]

Error

Derivation

  1. Initial program 6.2

    \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)\]
  2. Using strategy rm
  3. Applied associate-*l*_binary64_197971.7

    \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \color{blue}{\left(a + b \cdot c\right) \cdot \left(c \cdot i\right)}\right)\]
  4. Simplified1.7

    \[\leadsto \color{blue}{2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(a + c \cdot b\right) \cdot \left(c \cdot i\right)\right)}\]
  5. Final simplification1.7

    \[\leadsto 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(a + c \cdot b\right) \cdot \left(c \cdot i\right)\right)\]

Reproduce

herbie shell --seed 2021044 
(FPCore (x y z t a b c i)
  :name "Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A"
  :precision binary64

  :herbie-target
  (* 2.0 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i))))

  (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))