Average Error: 18.0 → 0.0
Time: 17.2s
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 r545111 = x;
        double r545112 = y;
        double r545113 = r545111 * r545112;
        double r545114 = r545112 * r545112;
        double r545115 = r545113 + r545114;
        double r545116 = z;
        double r545117 = r545112 * r545116;
        double r545118 = r545115 - r545117;
        double r545119 = r545118 - r545114;
        return r545119;
}

double f(double x, double y, double z) {
        double r545120 = x;
        double r545121 = z;
        double r545122 = r545120 - r545121;
        double r545123 = y;
        double r545124 = r545122 * r545123;
        return r545124;
}

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

Original18.0
Target0.0
Herbie0.0
\[\left(x - z\right) \cdot y\]

Derivation

  1. Initial program 18.0

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