Average Error: 17.8 → 0.0
Time: 14.7s
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 r1645247 = x;
        double r1645248 = y;
        double r1645249 = r1645247 * r1645248;
        double r1645250 = r1645248 * r1645248;
        double r1645251 = r1645249 + r1645250;
        double r1645252 = z;
        double r1645253 = r1645248 * r1645252;
        double r1645254 = r1645251 - r1645253;
        double r1645255 = r1645254 - r1645250;
        return r1645255;
}

double f(double x, double y, double z) {
        double r1645256 = x;
        double r1645257 = z;
        double r1645258 = r1645256 - r1645257;
        double r1645259 = y;
        double r1645260 = r1645258 * r1645259;
        return r1645260;
}

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