Average Error: 12.5 → 0.0
Time: 14.0s
Precision: 64
\[\left(\left(x \cdot y - y \cdot y\right) + y \cdot y\right) - y \cdot z\]
\[y \cdot \left(-z\right) + x \cdot y\]
\left(\left(x \cdot y - y \cdot y\right) + y \cdot y\right) - y \cdot z
y \cdot \left(-z\right) + x \cdot y
double f(double x, double y, double z) {
        double r25175450 = x;
        double r25175451 = y;
        double r25175452 = r25175450 * r25175451;
        double r25175453 = r25175451 * r25175451;
        double r25175454 = r25175452 - r25175453;
        double r25175455 = r25175454 + r25175453;
        double r25175456 = z;
        double r25175457 = r25175451 * r25175456;
        double r25175458 = r25175455 - r25175457;
        return r25175458;
}

double f(double x, double y, double z) {
        double r25175459 = y;
        double r25175460 = z;
        double r25175461 = -r25175460;
        double r25175462 = r25175459 * r25175461;
        double r25175463 = x;
        double r25175464 = r25175463 * r25175459;
        double r25175465 = r25175462 + r25175464;
        return r25175465;
}

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

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

Derivation

  1. Initial program 12.5

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

    \[\leadsto \color{blue}{y \cdot \left(x - z\right)}\]
  3. Using strategy rm
  4. Applied sub-neg0.0

    \[\leadsto y \cdot \color{blue}{\left(x + \left(-z\right)\right)}\]
  5. Applied distribute-rgt-in0.0

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

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

Reproduce

herbie shell --seed 2019171 
(FPCore (x y z)
  :name "Linear.Quaternion:$c/ from linear-1.19.1.3, D"

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

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