Average Error: 12.5 → 0.0
Time: 15.6s
Precision: 64
\[\left(\left(x \cdot y - y \cdot y\right) + y \cdot y\right) - y \cdot z\]
\[\left(x - z\right) \cdot y\]
\left(\left(x \cdot y - y \cdot y\right) + y \cdot y\right) - y \cdot z
\left(x - z\right) \cdot y
double f(double x, double y, double z) {
        double r375491 = x;
        double r375492 = y;
        double r375493 = r375491 * r375492;
        double r375494 = r375492 * r375492;
        double r375495 = r375493 - r375494;
        double r375496 = r375495 + r375494;
        double r375497 = z;
        double r375498 = r375492 * r375497;
        double r375499 = r375496 - r375498;
        return r375499;
}

double f(double x, double y, double z) {
        double r375500 = x;
        double r375501 = z;
        double r375502 = r375500 - r375501;
        double r375503 = y;
        double r375504 = r375502 * r375503;
        return r375504;
}

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}{\left(x - z\right) \cdot y}\]
  3. Final simplification0.0

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

Reproduce

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

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

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