Average Error: 12.5 → 0.0
Time: 16.6s
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 r454179 = x;
        double r454180 = y;
        double r454181 = r454179 * r454180;
        double r454182 = r454180 * r454180;
        double r454183 = r454181 - r454182;
        double r454184 = r454183 + r454182;
        double r454185 = z;
        double r454186 = r454180 * r454185;
        double r454187 = r454184 - r454186;
        return r454187;
}

double f(double x, double y, double z) {
        double r454188 = x;
        double r454189 = z;
        double r454190 = r454188 - r454189;
        double r454191 = y;
        double r454192 = r454190 * r454191;
        return r454192;
}

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

Derivation

  1. Initial program 12.5

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

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

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