Average Error: 12.9 → 0.0
Time: 22.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 r626176 = x;
        double r626177 = y;
        double r626178 = r626176 * r626177;
        double r626179 = r626177 * r626177;
        double r626180 = r626178 - r626179;
        double r626181 = r626180 + r626179;
        double r626182 = z;
        double r626183 = r626177 * r626182;
        double r626184 = r626181 - r626183;
        return r626184;
}

double f(double x, double y, double z) {
        double r626185 = x;
        double r626186 = z;
        double r626187 = r626185 - r626186;
        double r626188 = y;
        double r626189 = r626187 * r626188;
        return r626189;
}

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

Derivation

  1. Initial program 12.9

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