Average Error: 12.8 → 0.0
Time: 7.0s
Precision: 64
\[\left(\left(x \cdot y - y \cdot y\right) + y \cdot y\right) - y \cdot z\]
\[\left(x - z\right) \cdot y\]
\left(\left(x \cdot y - y \cdot y\right) + y \cdot y\right) - y \cdot z
\left(x - z\right) \cdot y
double f(double x, double y, double z) {
        double r20092176 = x;
        double r20092177 = y;
        double r20092178 = r20092176 * r20092177;
        double r20092179 = r20092177 * r20092177;
        double r20092180 = r20092178 - r20092179;
        double r20092181 = r20092180 + r20092179;
        double r20092182 = z;
        double r20092183 = r20092177 * r20092182;
        double r20092184 = r20092181 - r20092183;
        return r20092184;
}

double f(double x, double y, double z) {
        double r20092185 = x;
        double r20092186 = z;
        double r20092187 = r20092185 - r20092186;
        double r20092188 = y;
        double r20092189 = r20092187 * r20092188;
        return r20092189;
}

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

Original12.8
Target0.0
Herbie0.0
\[\left(x - z\right) \cdot y\]

Derivation

  1. Initial program 12.8

    \[\left(\left(x \cdot y - y \cdot y\right) + y \cdot y\right) - y \cdot z\]
  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 2019163 +o rules:numerics
(FPCore (x y z)
  :name "Linear.Quaternion:$c/ from linear-1.19.1.3, D"

  :herbie-target
  (* (- x z) y)

  (- (+ (- (* x y) (* y y)) (* y y)) (* y z)))