Average Error: 13.4 → 0.0
Time: 26.7s
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 r473687 = x;
        double r473688 = y;
        double r473689 = r473687 * r473688;
        double r473690 = r473688 * r473688;
        double r473691 = r473689 - r473690;
        double r473692 = r473691 + r473690;
        double r473693 = z;
        double r473694 = r473688 * r473693;
        double r473695 = r473692 - r473694;
        return r473695;
}

double f(double x, double y, double z) {
        double r473696 = x;
        double r473697 = z;
        double r473698 = r473696 - r473697;
        double r473699 = y;
        double r473700 = r473698 * r473699;
        return r473700;
}

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

Derivation

  1. Initial program 13.4

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