Average Error: 17.2 → 0.0
Time: 3.5s
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 r423705 = x;
        double r423706 = y;
        double r423707 = r423705 * r423706;
        double r423708 = r423706 * r423706;
        double r423709 = r423707 + r423708;
        double r423710 = z;
        double r423711 = r423706 * r423710;
        double r423712 = r423709 - r423711;
        double r423713 = r423712 - r423708;
        return r423713;
}

double f(double x, double y, double z) {
        double r423714 = y;
        double r423715 = x;
        double r423716 = z;
        double r423717 = r423715 - r423716;
        double r423718 = r423714 * r423717;
        return r423718;
}

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

Derivation

  1. Initial program 17.2

    \[\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 2019304 
(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)))