Average Error: 17.6 → 0.0
Time: 2.6s
Precision: 64
\[\left(\left(x \cdot y + y \cdot y\right) - y \cdot z\right) - y \cdot y\]
\[y \cdot \left(x - z\right)\]
\left(\left(x \cdot y + y \cdot y\right) - y \cdot z\right) - y \cdot y
y \cdot \left(x - z\right)
double f(double x, double y, double z) {
        double r613534 = x;
        double r613535 = y;
        double r613536 = r613534 * r613535;
        double r613537 = r613535 * r613535;
        double r613538 = r613536 + r613537;
        double r613539 = z;
        double r613540 = r613535 * r613539;
        double r613541 = r613538 - r613540;
        double r613542 = r613541 - r613537;
        return r613542;
}

double f(double x, double y, double z) {
        double r613543 = y;
        double r613544 = x;
        double r613545 = z;
        double r613546 = r613544 - r613545;
        double r613547 = r613543 * r613546;
        return r613547;
}

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

Derivation

  1. Initial program 17.6

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