Average Error: 0.0 → 0.0
Time: 958.0ms
Precision: 64
\[\left(\frac{1}{8} \cdot x - \frac{y \cdot z}{2}\right) + t\]
\[\frac{1}{8} \cdot x + \left(t - \frac{y \cdot z}{2}\right)\]
\left(\frac{1}{8} \cdot x - \frac{y \cdot z}{2}\right) + t
\frac{1}{8} \cdot x + \left(t - \frac{y \cdot z}{2}\right)
double code(double x, double y, double z, double t) {
	return ((((1.0 / 8.0) * x) - ((y * z) / 2.0)) + t);
}
double code(double x, double y, double z, double t) {
	return (((1.0 / 8.0) * x) + (t - ((y * z) / 2.0)));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.0
Target0.0
Herbie0.0
\[\left(\frac{x}{8} + t\right) - \frac{z}{2} \cdot y\]

Derivation

  1. Initial program 0.0

    \[\left(\frac{1}{8} \cdot x - \frac{y \cdot z}{2}\right) + t\]
  2. Using strategy rm
  3. Applied sub-neg0.0

    \[\leadsto \color{blue}{\left(\frac{1}{8} \cdot x + \left(-\frac{y \cdot z}{2}\right)\right)} + t\]
  4. Applied associate-+l+0.0

    \[\leadsto \color{blue}{\frac{1}{8} \cdot x + \left(\left(-\frac{y \cdot z}{2}\right) + t\right)}\]
  5. Simplified0.0

    \[\leadsto \frac{1}{8} \cdot x + \color{blue}{\left(t - \frac{y \cdot z}{2}\right)}\]
  6. Final simplification0.0

    \[\leadsto \frac{1}{8} \cdot x + \left(t - \frac{y \cdot z}{2}\right)\]

Reproduce

herbie shell --seed 2020053 
(FPCore (x y z t)
  :name "Diagrams.Solve.Polynomial:quartForm  from diagrams-solve-0.1, B"
  :precision binary64

  :herbie-target
  (- (+ (/ x 8) t) (* (/ z 2) y))

  (+ (- (* (/ 1 8) x) (/ (* y z) 2)) t))