Average Error: 0.1 → 0.1
Time: 14.7s
Precision: binary64
Cost: 1088
\[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c\]
\[c + \left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right)\]
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c
c + \left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right)
(FPCore (x y z t a b c)
 :precision binary64
 (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))
(FPCore (x y z t a b c)
 :precision binary64
 (+ c (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
double code(double x, double y, double z, double t, double a, double b, double c) {
	return c + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0));
}

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

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Alternatives

Alternative 1
Error5.5
Cost1288
\[\begin{array}{l} \mathbf{if}\;a \cdot b \leq -1.532480843029793 \cdot 10^{+50} \lor \neg \left(a \cdot b \leq 0.10661736267558243\right):\\ \;\;\;\;c + \left(x \cdot y - \frac{a \cdot b}{4}\right)\\ \mathbf{else}:\\ \;\;\;\;c + \left(x \cdot y + \left(z \cdot t\right) \cdot 0.0625\right)\\ \end{array}\]
Alternative 2
Error14.2
Cost1297
\[\begin{array}{l} \mathbf{if}\;a \leq -1.3231688107501704 \cdot 10^{+71} \lor \neg \left(a \leq 3073345225.9116893 \lor \neg \left(a \leq 9.692911137527406 \cdot 10^{+55}\right) \land a \leq 2.6263893327281536 \cdot 10^{+132}\right):\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \mathbf{else}:\\ \;\;\;\;c + \left(x \cdot y + \left(z \cdot t\right) \cdot 0.0625\right)\\ \end{array}\]
Alternative 3
Error19.8
Cost3142
\[\begin{array}{l} \mathbf{if}\;x \cdot y \leq -3.615936827437096 \cdot 10^{+86}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;x \cdot y \leq -9.385427873437756 \cdot 10^{-126}:\\ \;\;\;\;c + \left(z \cdot t\right) \cdot 0.0625\\ \mathbf{elif}\;x \cdot y \leq -8.218045453473396 \cdot 10^{-293}:\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;x \cdot y \leq 8.672268771872651 \cdot 10^{-202}:\\ \;\;\;\;c + \left(z \cdot t\right) \cdot 0.0625\\ \mathbf{elif}\;x \cdot y \leq 8.009589208064184 \cdot 10^{-114}:\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;x \cdot y \leq 6.462018491154386 \cdot 10^{+16}:\\ \;\;\;\;c + \left(z \cdot t\right) \cdot 0.0625\\ \mathbf{else}:\\ \;\;\;\;c + x \cdot y\\ \end{array}\]
Alternative 4
Error24.3
Cost1732
\[\begin{array}{l} \mathbf{if}\;y \leq -2.1533246304888406 \cdot 10^{+23}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;y \leq -1.5616303301921585 \cdot 10^{-283}:\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;y \leq -9.132868394912338 \cdot 10^{-303}:\\ \;\;\;\;\left(z \cdot t\right) \cdot 0.0625\\ \mathbf{elif}\;y \leq 7.152315654575672 \cdot 10^{-106}:\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \mathbf{else}:\\ \;\;\;\;c + x \cdot y\\ \end{array}\]
Alternative 5
Error29.7
Cost2197
\[\begin{array}{l} \mathbf{if}\;c \leq -7.054443217155709 \cdot 10^{-141}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;c \leq -1.2107859948877856 \cdot 10^{-206}:\\ \;\;\;\;\left(z \cdot t\right) \cdot 0.0625\\ \mathbf{elif}\;c \leq 5.677149543371174 \cdot 10^{-247}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;c \leq 3.2206639494689515 \cdot 10^{-53}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;c \leq 1.4750853007832847 \cdot 10^{-36} \lor \neg \left(c \leq 2.5417493863749028 \cdot 10^{-11} \lor \neg \left(c \leq 1.47128723417187 \cdot 10^{+59}\right) \land c \leq 1.6951859786841058 \cdot 10^{+87}\right):\\ \;\;\;\;c + x \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot t\right) \cdot 0.0625\\ \end{array}\]
Alternative 6
Error35.3
Cost2246
\[\begin{array}{l} \mathbf{if}\;c \leq -3.8973855616132646 \cdot 10^{+94}:\\ \;\;\;\;c\\ \mathbf{elif}\;c \leq -5.618601961131919 \cdot 10^{+39}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;c \leq -4.450659508288294 \cdot 10^{-116}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;c \leq 1.2815553257417498 \cdot 10^{-246}:\\ \;\;\;\;\left(z \cdot t\right) \cdot 0.0625\\ \mathbf{elif}\;c \leq 5.207788186786441 \cdot 10^{-41}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;c \leq 3.0791839645975366 \cdot 10^{+87}:\\ \;\;\;\;\left(z \cdot t\right) \cdot 0.0625\\ \mathbf{else}:\\ \;\;\;\;c\\ \end{array}\]
Alternative 7
Error35.5
Cost1925
\[\begin{array}{l} \mathbf{if}\;c \leq -1.7903099245224467 \cdot 10^{+94}:\\ \;\;\;\;c\\ \mathbf{elif}\;c \leq -1.3172674795396669 \cdot 10^{+37}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;c \leq -2.151506464726503 \cdot 10^{-115}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;c \leq 2.9322843351625466 \cdot 10^{-245}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;c \leq 2.3147206839008112 \cdot 10^{+98}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \mathbf{else}:\\ \;\;\;\;c\\ \end{array}\]
Alternative 8
Error35.0
Cost834
\[\begin{array}{l} \mathbf{if}\;c \leq -1.3902021058068836 \cdot 10^{+94}:\\ \;\;\;\;c\\ \mathbf{elif}\;c \leq 1.4589589106019716 \cdot 10^{+51}:\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;c\\ \end{array}\]
Alternative 9
Error43.3
Cost64
\[c\]
Alternative 10
Error62.1
Cost64
\[-1\]
Alternative 11
Error62.1
Cost64
\[1\]

Error

Derivation

  1. Initial program 0.1

    \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c\]
  2. Simplified0.1

    \[\leadsto \color{blue}{c + \left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right)}\]
  3. Final simplification0.1

    \[\leadsto c + \left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right)\]

Reproduce

herbie shell --seed 2021044 
(FPCore (x y z t a b c)
  :name "Diagrams.Solve.Polynomial:quartForm  from diagrams-solve-0.1, C"
  :precision binary64
  (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))