Average Error: 18.2 → 0.0
Time: 24.0s
Precision: 64
\[\left(\left(x \cdot y + y \cdot y\right) - y \cdot z\right) - y \cdot y\]
\[x \cdot y + \left(-y \cdot z\right)\]
\left(\left(x \cdot y + y \cdot y\right) - y \cdot z\right) - y \cdot y
x \cdot y + \left(-y \cdot z\right)
double f(double x, double y, double z) {
        double r337444 = x;
        double r337445 = y;
        double r337446 = r337444 * r337445;
        double r337447 = r337445 * r337445;
        double r337448 = r337446 + r337447;
        double r337449 = z;
        double r337450 = r337445 * r337449;
        double r337451 = r337448 - r337450;
        double r337452 = r337451 - r337447;
        return r337452;
}

double f(double x, double y, double z) {
        double r337453 = x;
        double r337454 = y;
        double r337455 = r337453 * r337454;
        double r337456 = z;
        double r337457 = r337454 * r337456;
        double r337458 = -r337457;
        double r337459 = r337455 + r337458;
        return r337459;
}

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

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

Derivation

  1. Initial program 18.2

    \[\left(\left(x \cdot y + y \cdot y\right) - y \cdot z\right) - y \cdot y\]
  2. Using strategy rm
  3. Applied associate--l+18.2

    \[\leadsto \color{blue}{\left(x \cdot y + \left(y \cdot y - y \cdot z\right)\right)} - y \cdot y\]
  4. Applied associate--l+13.4

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

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

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

Reproduce

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