Average Error: 17.7 → 0.0
Time: 24.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 r338378 = x;
        double r338379 = y;
        double r338380 = r338378 * r338379;
        double r338381 = r338379 * r338379;
        double r338382 = r338380 + r338381;
        double r338383 = z;
        double r338384 = r338379 * r338383;
        double r338385 = r338382 - r338384;
        double r338386 = r338385 - r338381;
        return r338386;
}

double f(double x, double y, double z) {
        double r338387 = x;
        double r338388 = z;
        double r338389 = r338387 - r338388;
        double r338390 = y;
        double r338391 = r338389 * r338390;
        return r338391;
}

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