Average Error: 17.4 → 0.0
Time: 20.9s
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 r438466 = x;
        double r438467 = y;
        double r438468 = r438466 * r438467;
        double r438469 = r438467 * r438467;
        double r438470 = r438468 + r438469;
        double r438471 = z;
        double r438472 = r438467 * r438471;
        double r438473 = r438470 - r438472;
        double r438474 = r438473 - r438469;
        return r438474;
}

double f(double x, double y, double z) {
        double r438475 = x;
        double r438476 = z;
        double r438477 = r438475 - r438476;
        double r438478 = y;
        double r438479 = r438477 * r438478;
        return r438479;
}

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

Derivation

  1. Initial program 17.4

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