Average Error: 17.0 → 0.0
Time: 16.9s
Precision: 64
\[\left(\left(x \cdot y - y \cdot z\right) - y \cdot y\right) + y \cdot y\]
\[\left(x - z\right) \cdot y\]
\left(\left(x \cdot y - y \cdot z\right) - y \cdot y\right) + y \cdot y
\left(x - z\right) \cdot y
double f(double x, double y, double z) {
        double r446400 = x;
        double r446401 = y;
        double r446402 = r446400 * r446401;
        double r446403 = z;
        double r446404 = r446401 * r446403;
        double r446405 = r446402 - r446404;
        double r446406 = r446401 * r446401;
        double r446407 = r446405 - r446406;
        double r446408 = r446407 + r446406;
        return r446408;
}

double f(double x, double y, double z) {
        double r446409 = x;
        double r446410 = z;
        double r446411 = r446409 - r446410;
        double r446412 = y;
        double r446413 = r446411 * r446412;
        return r446413;
}

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

Derivation

  1. Initial program 17.0

    \[\left(\left(x \cdot y - y \cdot z\right) - y \cdot y\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 2019323 +o rules:numerics
(FPCore (x y z)
  :name "Linear.Quaternion:$c/ from linear-1.19.1.3, B"
  :precision binary64

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

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