Average Error: 12.2 → 0.0
Time: 16.9s
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 r22630272 = x;
        double r22630273 = y;
        double r22630274 = r22630272 * r22630273;
        double r22630275 = r22630273 * r22630273;
        double r22630276 = r22630274 - r22630275;
        double r22630277 = r22630276 + r22630275;
        double r22630278 = z;
        double r22630279 = r22630273 * r22630278;
        double r22630280 = r22630277 - r22630279;
        return r22630280;
}

double f(double x, double y, double z) {
        double r22630281 = x;
        double r22630282 = z;
        double r22630283 = r22630281 - r22630282;
        double r22630284 = y;
        double r22630285 = r22630283 * r22630284;
        return r22630285;
}

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

Derivation

  1. Initial program 12.2

    \[\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 2019162 +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)))