Average Error: 13.3 → 0.0
Time: 2.2s
Precision: 64
\[\left(\left(x \cdot y - y \cdot y\right) + y \cdot y\right) - y \cdot z\]
\[y \cdot \left(x - z\right)\]
\left(\left(x \cdot y - y \cdot y\right) + y \cdot y\right) - y \cdot z
y \cdot \left(x - z\right)
double f(double x, double y, double z) {
        double r555380 = x;
        double r555381 = y;
        double r555382 = r555380 * r555381;
        double r555383 = r555381 * r555381;
        double r555384 = r555382 - r555383;
        double r555385 = r555384 + r555383;
        double r555386 = z;
        double r555387 = r555381 * r555386;
        double r555388 = r555385 - r555387;
        return r555388;
}

double f(double x, double y, double z) {
        double r555389 = y;
        double r555390 = x;
        double r555391 = z;
        double r555392 = r555390 - r555391;
        double r555393 = r555389 * r555392;
        return r555393;
}

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

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

Derivation

  1. Initial program 13.3

    \[\left(\left(x \cdot y - y \cdot y\right) + y \cdot y\right) - y \cdot z\]
  2. Simplified0.0

    \[\leadsto \color{blue}{y \cdot \left(x - z\right)}\]
  3. Final simplification0.0

    \[\leadsto y \cdot \left(x - z\right)\]

Reproduce

herbie shell --seed 2020060 +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)))