Average Error: 13.3 → 0.0
Time: 11.4s
Precision: 64
\[\left(\left(x \cdot y - y \cdot y\right) + y \cdot y\right) - y \cdot z\]
\[y \cdot \left(-z\right) + x \cdot y\]
\left(\left(x \cdot y - y \cdot y\right) + y \cdot y\right) - y \cdot z
y \cdot \left(-z\right) + x \cdot y
double f(double x, double y, double z) {
        double r25737944 = x;
        double r25737945 = y;
        double r25737946 = r25737944 * r25737945;
        double r25737947 = r25737945 * r25737945;
        double r25737948 = r25737946 - r25737947;
        double r25737949 = r25737948 + r25737947;
        double r25737950 = z;
        double r25737951 = r25737945 * r25737950;
        double r25737952 = r25737949 - r25737951;
        return r25737952;
}

double f(double x, double y, double z) {
        double r25737953 = y;
        double r25737954 = z;
        double r25737955 = -r25737954;
        double r25737956 = r25737953 * r25737955;
        double r25737957 = x;
        double r25737958 = r25737957 * r25737953;
        double r25737959 = r25737956 + r25737958;
        return r25737959;
}

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

Derivation

  1. Initial program 13.3

    \[\left(\left(x \cdot y - y \cdot y\right) + y \cdot y\right) - y \cdot z\]
  2. Simplified0.0

    \[\leadsto \color{blue}{y \cdot \left(x - z\right)}\]
  3. Using strategy rm
  4. Applied sub-neg0.0

    \[\leadsto y \cdot \color{blue}{\left(x + \left(-z\right)\right)}\]
  5. Applied distribute-rgt-in0.0

    \[\leadsto \color{blue}{x \cdot y + \left(-z\right) \cdot y}\]
  6. Final simplification0.0

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

Reproduce

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