Average Error: 17.2 → 0.0
Time: 18.2s
Precision: 64
\[\left(\left(x \cdot y - y \cdot z\right) - y \cdot y\right) + y \cdot y\]
\[y \cdot \left(x - z\right)\]
\left(\left(x \cdot y - y \cdot z\right) - y \cdot y\right) + y \cdot y
y \cdot \left(x - z\right)
double f(double x, double y, double z) {
        double r305503 = x;
        double r305504 = y;
        double r305505 = r305503 * r305504;
        double r305506 = z;
        double r305507 = r305504 * r305506;
        double r305508 = r305505 - r305507;
        double r305509 = r305504 * r305504;
        double r305510 = r305508 - r305509;
        double r305511 = r305510 + r305509;
        return r305511;
}

double f(double x, double y, double z) {
        double r305512 = y;
        double r305513 = x;
        double r305514 = z;
        double r305515 = r305513 - r305514;
        double r305516 = r305512 * r305515;
        return r305516;
}

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

Derivation

  1. Initial program 17.2

    \[\left(\left(x \cdot y - y \cdot z\right) - y \cdot y\right) + y \cdot y\]
  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 2019304 
(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)))