Average Error: 17.5 → 0.0
Time: 17.6s
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 r430275 = x;
        double r430276 = y;
        double r430277 = r430275 * r430276;
        double r430278 = r430276 * r430276;
        double r430279 = r430277 + r430278;
        double r430280 = z;
        double r430281 = r430276 * r430280;
        double r430282 = r430279 - r430281;
        double r430283 = r430282 - r430278;
        return r430283;
}

double f(double x, double y, double z) {
        double r430284 = x;
        double r430285 = z;
        double r430286 = r430284 - r430285;
        double r430287 = y;
        double r430288 = r430286 * r430287;
        return r430288;
}

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 2019209 +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)))