Average Error: 17.8 → 0.0
Time: 11.1s
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 r377506 = x;
        double r377507 = y;
        double r377508 = r377506 * r377507;
        double r377509 = z;
        double r377510 = r377507 * r377509;
        double r377511 = r377508 - r377510;
        double r377512 = r377507 * r377507;
        double r377513 = r377511 - r377512;
        double r377514 = r377513 + r377512;
        return r377514;
}

double f(double x, double y, double z) {
        double r377515 = x;
        double r377516 = z;
        double r377517 = r377515 - r377516;
        double r377518 = y;
        double r377519 = r377517 * r377518;
        return r377519;
}

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

Derivation

  1. Initial program 17.8

    \[\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 2019235 
(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)))