Average Error: 17.7 → 0.0
Time: 22.5s
Precision: 64
\[\left(\left(x \cdot y + y \cdot y\right) - y \cdot z\right) - y \cdot y\]
\[\left(x - z\right) \cdot y\]
\left(\left(x \cdot y + y \cdot y\right) - y \cdot z\right) - y \cdot y
\left(x - z\right) \cdot y
double f(double x, double y, double z) {
        double r268756 = x;
        double r268757 = y;
        double r268758 = r268756 * r268757;
        double r268759 = r268757 * r268757;
        double r268760 = r268758 + r268759;
        double r268761 = z;
        double r268762 = r268757 * r268761;
        double r268763 = r268760 - r268762;
        double r268764 = r268763 - r268759;
        return r268764;
}

double f(double x, double y, double z) {
        double r268765 = x;
        double r268766 = z;
        double r268767 = r268765 - r268766;
        double r268768 = y;
        double r268769 = r268767 * r268768;
        return r268769;
}

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

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

Reproduce

herbie shell --seed 2019212 +o rules:numerics
(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)))