Average Error: 17.5 → 0.0
Time: 15.8s
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 r359361 = x;
        double r359362 = y;
        double r359363 = r359361 * r359362;
        double r359364 = r359362 * r359362;
        double r359365 = r359363 + r359364;
        double r359366 = z;
        double r359367 = r359362 * r359366;
        double r359368 = r359365 - r359367;
        double r359369 = r359368 - r359364;
        return r359369;
}

double f(double x, double y, double z) {
        double r359370 = x;
        double r359371 = z;
        double r359372 = r359370 - r359371;
        double r359373 = y;
        double r359374 = r359372 * r359373;
        return r359374;
}

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.5
Target0.0
Herbie0.0
\[\left(x - z\right) \cdot y\]

Derivation

  1. Initial program 17.5

    \[\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 2019209 
(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)))