Average Error: 17.7 → 0.0
Time: 17.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 r425029 = x;
        double r425030 = y;
        double r425031 = r425029 * r425030;
        double r425032 = r425030 * r425030;
        double r425033 = r425031 + r425032;
        double r425034 = z;
        double r425035 = r425030 * r425034;
        double r425036 = r425033 - r425035;
        double r425037 = r425036 - r425032;
        return r425037;
}

double f(double x, double y, double z) {
        double r425038 = x;
        double r425039 = z;
        double r425040 = r425038 - r425039;
        double r425041 = y;
        double r425042 = r425040 * r425041;
        return r425042;
}

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

Derivation

  1. Initial program 17.7

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