Average Error: 17.0 → 0.0
Time: 17.0s
Precision: 64
\[\left(\left(x \cdot y + y \cdot y\right) - y \cdot z\right) - y \cdot y\]
\[\left(x - z\right) \cdot y\]
\left(\left(x \cdot y + y \cdot y\right) - y \cdot z\right) - y \cdot y
\left(x - z\right) \cdot y
double f(double x, double y, double z) {
        double r323486 = x;
        double r323487 = y;
        double r323488 = r323486 * r323487;
        double r323489 = r323487 * r323487;
        double r323490 = r323488 + r323489;
        double r323491 = z;
        double r323492 = r323487 * r323491;
        double r323493 = r323490 - r323492;
        double r323494 = r323493 - r323489;
        return r323494;
}

double f(double x, double y, double z) {
        double r323495 = x;
        double r323496 = z;
        double r323497 = r323495 - r323496;
        double r323498 = y;
        double r323499 = r323497 * r323498;
        return r323499;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original17.0
Target0.0
Herbie0.0
\[\left(x - z\right) \cdot y\]

Derivation

  1. Initial program 17.0

    \[\left(\left(x \cdot y + y \cdot y\right) - y \cdot z\right) - y \cdot y\]
  2. Simplified0.0

    \[\leadsto \color{blue}{\left(x - z\right) \cdot y}\]
  3. Final simplification0.0

    \[\leadsto \left(x - z\right) \cdot y\]

Reproduce

herbie shell --seed 2019323 
(FPCore (x y z)
  :name "Linear.Quaternion:$c/ from linear-1.19.1.3, C"
  :precision binary64

  :herbie-target
  (* (- x z) y)

  (- (- (+ (* x y) (* y y)) (* y z)) (* y y)))