Average Error: 0.1 → 0.1
Time: 4.7min
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 + \left(z \cdot t\right) \cdot 0.0625\right) - \left(a \cdot b\right) \cdot 0.25\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 + \left(z \cdot t\right) \cdot 0.0625\right) - \left(a \cdot b\right) \cdot 0.25\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) 0.0625)) (* (* a b) 0.25))))
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) * 0.0625)) - ((a * b) * 0.25));
}

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
Error7.3
Cost1602
\[\begin{array}{l} \mathbf{if}\;c \leq -4.097095294052888 \cdot 10^{+136}:\\ \;\;\;\;c + \left(x \cdot y + \left(z \cdot t\right) \cdot 0.0625\right)\\ \mathbf{elif}\;c \leq 2.4631870211963303 \cdot 10^{+35}:\\ \;\;\;\;\left(x \cdot y + \left(z \cdot t\right) \cdot 0.0625\right) - \left(a \cdot b\right) \cdot 0.25\\ \mathbf{else}:\\ \;\;\;\;\left(c + \left(z \cdot t\right) \cdot 0.0625\right) - \left(a \cdot b\right) \cdot 0.25\\ \end{array}\]
Alternative 2
Error5.6
Cost1416
\[\begin{array}{l} \mathbf{if}\;z \cdot t \leq -1165833243.8390148 \lor \neg \left(z \cdot t \leq 1.03134720553203 \cdot 10^{+44}\right):\\ \;\;\;\;\left(c + \left(z \cdot t\right) \cdot 0.0625\right) - \left(a \cdot b\right) \cdot 0.25\\ \mathbf{else}:\\ \;\;\;\;\left(c + x \cdot y\right) - \left(a \cdot b\right) \cdot 0.25\\ \end{array}\]
Alternative 3
Error5.9
Cost1288
\[\begin{array}{l} \mathbf{if}\;z \cdot t \leq -1.5742283487193175 \cdot 10^{-37} \lor \neg \left(z \cdot t \leq 2.465681568524023 \cdot 10^{+53}\right):\\ \;\;\;\;c + \left(x \cdot y + \left(z \cdot t\right) \cdot 0.0625\right)\\ \mathbf{else}:\\ \;\;\;\;\left(c + x \cdot y\right) - \left(a \cdot b\right) \cdot 0.25\\ \end{array}\]
Alternative 4
Error8.6
Cost1288
\[\begin{array}{l} \mathbf{if}\;a \cdot b \leq -2.439098889765371 \cdot 10^{+162} \lor \neg \left(a \cdot b \leq 5.156438061693489 \cdot 10^{+114}\right):\\ \;\;\;\;c - \frac{a \cdot b}{4}\\ \mathbf{else}:\\ \;\;\;\;c + \left(x \cdot y + \left(z \cdot t\right) \cdot 0.0625\right)\\ \end{array}\]
Alternative 5
Error20.4
Cost4489
\[\begin{array}{l} \mathbf{if}\;z \cdot t \leq -2.550944240301187 \cdot 10^{+75}:\\ \;\;\;\;c + \left(z \cdot t\right) \cdot 0.0625\\ \mathbf{elif}\;z \cdot t \leq -8.318638720030703 \cdot 10^{+41}:\\ \;\;\;\;x \cdot y - \frac{a \cdot b}{4}\\ \mathbf{elif}\;z \cdot t \leq -130548462.50176886:\\ \;\;\;\;c + \left(z \cdot t\right) \cdot 0.0625\\ \mathbf{elif}\;z \cdot t \leq -1.4561202197569419 \cdot 10^{-33}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;z \cdot t \leq -9.881949301658587 \cdot 10^{-48}:\\ \;\;\;\;c + \left(z \cdot t\right) \cdot 0.0625\\ \mathbf{elif}\;z \cdot t \leq -1.75797290123241 \cdot 10^{-65}:\\ \;\;\;\;x \cdot y - \frac{a \cdot b}{4}\\ \mathbf{elif}\;z \cdot t \leq -3.9565553945991984 \cdot 10^{-196}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;z \cdot t \leq 4.8947229397138957 \cdot 10^{-23}:\\ \;\;\;\;c - \frac{a \cdot b}{4}\\ \mathbf{elif}\;z \cdot t \leq 6.625847781267964 \cdot 10^{+47}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{else}:\\ \;\;\;\;c + \left(z \cdot t\right) \cdot 0.0625\\ \end{array}\]
Alternative 6
Error20.1
Cost3591
\[\begin{array}{l} \mathbf{if}\;z \cdot t \leq -833050702.3029503:\\ \;\;\;\;c + \left(z \cdot t\right) \cdot 0.0625\\ \mathbf{elif}\;z \cdot t \leq -1.4561202197569419 \cdot 10^{-33}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;z \cdot t \leq -1.5742283487193175 \cdot 10^{-37}:\\ \;\;\;\;c + \left(z \cdot t\right) \cdot 0.0625\\ \mathbf{elif}\;z \cdot t \leq -2.8055470739736502 \cdot 10^{-64}:\\ \;\;\;\;c - \frac{a \cdot b}{4}\\ \mathbf{elif}\;z \cdot t \leq -1.3104068625429248 \cdot 10^{-197}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;z \cdot t \leq 4.087216117940705 \cdot 10^{-26}:\\ \;\;\;\;c - \frac{a \cdot b}{4}\\ \mathbf{elif}\;z \cdot t \leq 3.5542274761333456 \cdot 10^{+44}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{else}:\\ \;\;\;\;c + \left(z \cdot t\right) \cdot 0.0625\\ \end{array}\]
Alternative 7
Error26.8
Cost3476
\[\begin{array}{l} \mathbf{if}\;y \leq -1.3306403035146641 \cdot 10^{+246}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;y \leq -6.774063123753827 \cdot 10^{+171}:\\ \;\;\;\;c - \frac{a \cdot b}{4}\\ \mathbf{elif}\;y \leq -11040621339013.186:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;y \leq -8.036993331051399 \cdot 10^{-23}:\\ \;\;\;\;c - \frac{a \cdot b}{4}\\ \mathbf{elif}\;y \leq -1.8121548545790898 \cdot 10^{-171}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;y \leq -5.553614584554773 \cdot 10^{-184}:\\ \;\;\;\;\left(z \cdot t\right) \cdot 0.0625\\ \mathbf{elif}\;y \leq -1.27554105564082 \cdot 10^{-248}:\\ \;\;\;\;c - \frac{a \cdot b}{4}\\ \mathbf{elif}\;y \leq -4.411124523815241 \cdot 10^{-281}:\\ \;\;\;\;\left(z \cdot t\right) \cdot 0.0625\\ \mathbf{elif}\;y \leq 6.483263061416549 \cdot 10^{-67} \lor \neg \left(y \leq 1.914696444028209 \cdot 10^{+90}\right) \land y \leq 1.1663949347379813 \cdot 10^{+134}:\\ \;\;\;\;c - \frac{a \cdot b}{4}\\ \mathbf{else}:\\ \;\;\;\;c + x \cdot y\\ \end{array}\]
Alternative 8
Error24.1
Cost2116
\[\begin{array}{l} \mathbf{if}\;z \cdot t \leq -2.4665482392456064 \cdot 10^{+98}:\\ \;\;\;\;\left(z \cdot t\right) \cdot 0.0625\\ \mathbf{elif}\;z \cdot t \leq 1.0222530337866586 \cdot 10^{-132}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;z \cdot t \leq 3.810324525071643 \cdot 10^{-98}:\\ \;\;\;\;\left(a \cdot b\right) \cdot -0.25\\ \mathbf{elif}\;z \cdot t \leq 1.80130722294902 \cdot 10^{+84}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot t\right) \cdot 0.0625\\ \end{array}\]
Alternative 9
Error24.2
Cost904
\[\begin{array}{l} \mathbf{if}\;a \cdot b \leq -7.858024423314834 \cdot 10^{+216} \lor \neg \left(a \cdot b \leq 7.361610951053941 \cdot 10^{+65}\right):\\ \;\;\;\;\left(a \cdot b\right) \cdot -0.25\\ \mathbf{else}:\\ \;\;\;\;c + x \cdot y\\ \end{array}\]
Alternative 10
Error29.3
Cost320
\[c + x \cdot y\]
Alternative 11
Error35.5
Cost834
\[\begin{array}{l} \mathbf{if}\;c \leq -3.359723599938498 \cdot 10^{+21}:\\ \;\;\;\;c\\ \mathbf{elif}\;c \leq 7.776723485219759 \cdot 10^{+37}:\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;c\\ \end{array}\]
Alternative 12
Error43.6
Cost64
\[c\]

Error

Time

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. Using strategy rm
  3. Applied add-sqr-sqrt_binary64_896632.6

    \[\leadsto \color{blue}{\sqrt{\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c} \cdot \sqrt{\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c}}\]
  4. Simplified32.6

    \[\leadsto \color{blue}{\sqrt{c + \left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right)}} \cdot \sqrt{\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c}\]
  5. Simplified32.6

    \[\leadsto \sqrt{c + \left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right)} \cdot \color{blue}{\sqrt{c + \left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right)}}\]
  6. Taylor expanded around 0 0.1

    \[\leadsto \color{blue}{\left(x \cdot y + \left(0.0625 \cdot \left(t \cdot z\right) + c\right)\right) - 0.25 \cdot \left(a \cdot b\right)}\]
  7. Simplified0.1

    \[\leadsto \color{blue}{c + \left(\left(x \cdot y + \left(z \cdot t\right) \cdot 0.0625\right) - \left(a \cdot b\right) \cdot 0.25\right)}\]
  8. Simplified0.1

    \[\leadsto \color{blue}{c + \left(\left(x \cdot y + \left(z \cdot t\right) \cdot 0.0625\right) - \left(a \cdot b\right) \cdot 0.25\right)}\]
  9. Final simplification0.1

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

Reproduce

herbie shell --seed 2021040 
(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))