Average Error: 17.4 → 0.0
Time: 22.5s
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 r351793 = x;
        double r351794 = y;
        double r351795 = r351793 * r351794;
        double r351796 = z;
        double r351797 = r351794 * r351796;
        double r351798 = r351795 - r351797;
        double r351799 = r351794 * r351794;
        double r351800 = r351798 - r351799;
        double r351801 = r351800 + r351799;
        return r351801;
}

double f(double x, double y, double z) {
        double r351802 = x;
        double r351803 = z;
        double r351804 = r351802 - r351803;
        double r351805 = y;
        double r351806 = r351804 * r351805;
        return r351806;
}

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

Derivation

  1. Initial program 17.4

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