Average Error: 13.0 → 0.0
Time: 25.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 r423343 = x;
        double r423344 = y;
        double r423345 = r423343 * r423344;
        double r423346 = r423344 * r423344;
        double r423347 = r423345 - r423346;
        double r423348 = r423347 + r423346;
        double r423349 = z;
        double r423350 = r423344 * r423349;
        double r423351 = r423348 - r423350;
        return r423351;
}

double f(double x, double y, double z) {
        double r423352 = x;
        double r423353 = z;
        double r423354 = r423352 - r423353;
        double r423355 = y;
        double r423356 = r423354 * r423355;
        return r423356;
}

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

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

Derivation

  1. Initial program 13.0

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