Average Error: 17.4 → 0.0
Time: 28.8s
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 r386737 = x;
        double r386738 = y;
        double r386739 = r386737 * r386738;
        double r386740 = r386738 * r386738;
        double r386741 = r386739 + r386740;
        double r386742 = z;
        double r386743 = r386738 * r386742;
        double r386744 = r386741 - r386743;
        double r386745 = r386744 - r386740;
        return r386745;
}

double f(double x, double y, double z) {
        double r386746 = x;
        double r386747 = z;
        double r386748 = r386746 - r386747;
        double r386749 = y;
        double r386750 = r386748 * r386749;
        return r386750;
}

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 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 2019306 
(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)))