Average Error: 17.5 → 0.0
Time: 16.7s
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 r403521 = x;
        double r403522 = y;
        double r403523 = r403521 * r403522;
        double r403524 = z;
        double r403525 = r403522 * r403524;
        double r403526 = r403523 - r403525;
        double r403527 = r403522 * r403522;
        double r403528 = r403526 - r403527;
        double r403529 = r403528 + r403527;
        return r403529;
}

double f(double x, double y, double z) {
        double r403530 = x;
        double r403531 = z;
        double r403532 = r403530 - r403531;
        double r403533 = y;
        double r403534 = r403532 * r403533;
        return r403534;
}

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