Average Error: 13.2 → 0.0
Time: 18.7s
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 r396307 = x;
        double r396308 = y;
        double r396309 = r396307 * r396308;
        double r396310 = r396308 * r396308;
        double r396311 = r396309 - r396310;
        double r396312 = r396311 + r396310;
        double r396313 = z;
        double r396314 = r396308 * r396313;
        double r396315 = r396312 - r396314;
        return r396315;
}

double f(double x, double y, double z) {
        double r396316 = x;
        double r396317 = z;
        double r396318 = r396316 - r396317;
        double r396319 = y;
        double r396320 = r396318 * r396319;
        return r396320;
}

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

Derivation

  1. Initial program 13.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 2019350 +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)))