Average Error: 17.5 → 0.0
Time: 12.0s
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 r620394 = x;
        double r620395 = y;
        double r620396 = r620394 * r620395;
        double r620397 = z;
        double r620398 = r620395 * r620397;
        double r620399 = r620396 - r620398;
        double r620400 = r620395 * r620395;
        double r620401 = r620399 - r620400;
        double r620402 = r620401 + r620400;
        return r620402;
}

double f(double x, double y, double z) {
        double r620403 = x;
        double r620404 = z;
        double r620405 = r620403 - r620404;
        double r620406 = y;
        double r620407 = r620405 * r620406;
        return r620407;
}

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

Derivation

  1. Initial program 17.5

    \[\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 2019209 
(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)))