Average Error: 6.6 → 2.6
Time: 10.4s
Precision: binary64
\[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(x \cdot y + \left(z \cdot t - \sqrt[3]{c} \cdot \left(\left(a + c \cdot b\right) \cdot \left(i \cdot {\left(\sqrt[3]{c}\right)}^{2}\right)\right)\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(x \cdot y + \left(z \cdot t - \sqrt[3]{c} \cdot \left(\left(a + c \cdot b\right) \cdot \left(i \cdot {\left(\sqrt[3]{c}\right)}^{2}\right)\right)\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) (* (cbrt c) (* (+ a (* c b)) (* i (pow (cbrt c) 2.0))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return ((double) (2.0 * ((double) (((double) (((double) (x * y)) + ((double) (z * t)))) - ((double) (((double) (((double) (a + ((double) (b * c)))) * c)) * i))))));
}
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return ((double) (2.0 * ((double) (((double) (x * y)) + ((double) (((double) (z * t)) - ((double) (((double) cbrt(c)) * ((double) (((double) (a + ((double) (c * b)))) * ((double) (i * ((double) pow(((double) cbrt(c)), 2.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

Bits error versus i

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

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

Derivation

  1. Initial program Error: 6.6 bits

    \[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. SimplifiedError: 5.0 bits

    \[\leadsto \color{blue}{2 \cdot \left(x \cdot y + \left(z \cdot t - c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\right)}\]
  3. Using strategy rm
  4. Applied add-cube-cbrtError: 5.3 bits

    \[\leadsto 2 \cdot \left(x \cdot y + \left(z \cdot t - \color{blue}{\left(\left(\sqrt[3]{c} \cdot \sqrt[3]{c}\right) \cdot \sqrt[3]{c}\right)} \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\right)\]
  5. Applied associate-*l*Error: 5.3 bits

    \[\leadsto 2 \cdot \left(x \cdot y + \left(z \cdot t - \color{blue}{\left(\sqrt[3]{c} \cdot \sqrt[3]{c}\right) \cdot \left(\sqrt[3]{c} \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)}\right)\right)\]
  6. SimplifiedError: 3.7 bits

    \[\leadsto 2 \cdot \left(x \cdot y + \left(z \cdot t - \left(\sqrt[3]{c} \cdot \sqrt[3]{c}\right) \cdot \color{blue}{\left(\left(a + c \cdot b\right) \cdot \left(i \cdot \sqrt[3]{c}\right)\right)}\right)\right)\]
  7. Using strategy rm
  8. Applied associate-*l*Error: 3.7 bits

    \[\leadsto 2 \cdot \left(x \cdot y + \left(z \cdot t - \color{blue}{\sqrt[3]{c} \cdot \left(\sqrt[3]{c} \cdot \left(\left(a + c \cdot b\right) \cdot \left(i \cdot \sqrt[3]{c}\right)\right)\right)}\right)\right)\]
  9. SimplifiedError: 2.6 bits

    \[\leadsto 2 \cdot \left(x \cdot y + \left(z \cdot t - \sqrt[3]{c} \cdot \color{blue}{\left(\left(a + c \cdot b\right) \cdot \left(i \cdot {\left(\sqrt[3]{c}\right)}^{2}\right)\right)}\right)\right)\]
  10. Final simplificationError: 2.6 bits

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

Reproduce

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