Average Error: 17.5 → 0.0
Time: 13.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 r680754 = x;
        double r680755 = y;
        double r680756 = r680754 * r680755;
        double r680757 = r680755 * r680755;
        double r680758 = r680756 + r680757;
        double r680759 = z;
        double r680760 = r680755 * r680759;
        double r680761 = r680758 - r680760;
        double r680762 = r680761 - r680757;
        return r680762;
}

double f(double x, double y, double z) {
        double r680763 = x;
        double r680764 = z;
        double r680765 = r680763 - r680764;
        double r680766 = y;
        double r680767 = r680765 * r680766;
        return r680767;
}

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 2020042 +o rules:numerics
(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)))