Average Error: 12.4 → 0.0
Time: 7.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 r7760288 = x;
        double r7760289 = y;
        double r7760290 = r7760288 * r7760289;
        double r7760291 = r7760289 * r7760289;
        double r7760292 = r7760290 - r7760291;
        double r7760293 = r7760292 + r7760291;
        double r7760294 = z;
        double r7760295 = r7760289 * r7760294;
        double r7760296 = r7760293 - r7760295;
        return r7760296;
}

double f(double x, double y, double z) {
        double r7760297 = x;
        double r7760298 = z;
        double r7760299 = r7760297 - r7760298;
        double r7760300 = y;
        double r7760301 = r7760299 * r7760300;
        return r7760301;
}

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

Derivation

  1. Initial program 12.4

    \[\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 2019156 +o rules:numerics
(FPCore (x y z)
  :name "Linear.Quaternion:$c/ from linear-1.19.1.3, D"

  :herbie-target
  (* (- x z) y)

  (- (+ (- (* x y) (* y y)) (* y y)) (* y z)))