Average Error: 17.5 → 0.0
Time: 23.9s
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 r775611 = x;
        double r775612 = y;
        double r775613 = r775611 * r775612;
        double r775614 = r775612 * r775612;
        double r775615 = r775613 + r775614;
        double r775616 = z;
        double r775617 = r775612 * r775616;
        double r775618 = r775615 - r775617;
        double r775619 = r775618 - r775614;
        return r775619;
}

double f(double x, double y, double z) {
        double r775620 = x;
        double r775621 = z;
        double r775622 = r775620 - r775621;
        double r775623 = y;
        double r775624 = r775622 * r775623;
        return r775624;
}

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

Derivation

  1. Initial program 17.5

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