Average Error: 17.7 → 0.0
Time: 1.3s
Precision: 64
\[\left(\left(x \cdot y + y \cdot y\right) - y \cdot z\right) - y \cdot y\]
\[y \cdot \left(x - z\right)\]
\left(\left(x \cdot y + y \cdot y\right) - y \cdot z\right) - y \cdot y
y \cdot \left(x - z\right)
double f(double x, double y, double z) {
        double r562552 = x;
        double r562553 = y;
        double r562554 = r562552 * r562553;
        double r562555 = r562553 * r562553;
        double r562556 = r562554 + r562555;
        double r562557 = z;
        double r562558 = r562553 * r562557;
        double r562559 = r562556 - r562558;
        double r562560 = r562559 - r562555;
        return r562560;
}

double f(double x, double y, double z) {
        double r562561 = y;
        double r562562 = x;
        double r562563 = z;
        double r562564 = r562562 - r562563;
        double r562565 = r562561 * r562564;
        return r562565;
}

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}{y \cdot \left(x - z\right)}\]
  3. Final simplification0.0

    \[\leadsto y \cdot \left(x - z\right)\]

Reproduce

herbie shell --seed 2019353 
(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)))