Average Error: 17.4 → 0.0
Time: 12.7s
Precision: 64
\[\left(\left(x \cdot y - y \cdot z\right) - y \cdot y\right) + y \cdot y\]
\[\left(x - z\right) \cdot y\]
\left(\left(x \cdot y - y \cdot z\right) - y \cdot y\right) + y \cdot y
\left(x - z\right) \cdot y
double f(double x, double y, double z) {
        double r20151 = x;
        double r20152 = y;
        double r20153 = r20151 * r20152;
        double r20154 = z;
        double r20155 = r20152 * r20154;
        double r20156 = r20153 - r20155;
        double r20157 = r20152 * r20152;
        double r20158 = r20156 - r20157;
        double r20159 = r20158 + r20157;
        return r20159;
}

double f(double x, double y, double z) {
        double r20160 = x;
        double r20161 = z;
        double r20162 = r20160 - r20161;
        double r20163 = y;
        double r20164 = r20162 * r20163;
        return r20164;
}

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

Derivation

  1. Initial program 17.4

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

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

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