Average Error: 17.9 → 0.0
Time: 18.8s
Precision: 64
\[\left(\left(x \cdot y + y \cdot y\right) - y \cdot z\right) - y \cdot y\]
\[\left(x - z\right) \cdot y\]
\left(\left(x \cdot y + y \cdot y\right) - y \cdot z\right) - y \cdot y
\left(x - z\right) \cdot y
double f(double x, double y, double z) {
        double r595140 = x;
        double r595141 = y;
        double r595142 = r595140 * r595141;
        double r595143 = r595141 * r595141;
        double r595144 = r595142 + r595143;
        double r595145 = z;
        double r595146 = r595141 * r595145;
        double r595147 = r595144 - r595146;
        double r595148 = r595147 - r595143;
        return r595148;
}

double f(double x, double y, double z) {
        double r595149 = x;
        double r595150 = z;
        double r595151 = r595149 - r595150;
        double r595152 = y;
        double r595153 = r595151 * r595152;
        return r595153;
}

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

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

Derivation

  1. Initial program 17.9

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

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

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