Average Error: 17.5 → 0.0
Time: 19.6s
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 r466648 = x;
        double r466649 = y;
        double r466650 = r466648 * r466649;
        double r466651 = r466649 * r466649;
        double r466652 = r466650 + r466651;
        double r466653 = z;
        double r466654 = r466649 * r466653;
        double r466655 = r466652 - r466654;
        double r466656 = r466655 - r466651;
        return r466656;
}

double f(double x, double y, double z) {
        double r466657 = x;
        double r466658 = z;
        double r466659 = r466657 - r466658;
        double r466660 = y;
        double r466661 = r466659 * r466660;
        return r466661;
}

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