Average Error: 0.1 → 0.1
Time: 12.2s
Precision: 64
\[\frac{\left(x + y\right) - z}{t \cdot 2}\]
\[\frac{x + y}{t \cdot 2} - \frac{z}{t \cdot 2}\]
\frac{\left(x + y\right) - z}{t \cdot 2}
\frac{x + y}{t \cdot 2} - \frac{z}{t \cdot 2}
double f(double x, double y, double z, double t) {
        double r3136578 = x;
        double r3136579 = y;
        double r3136580 = r3136578 + r3136579;
        double r3136581 = z;
        double r3136582 = r3136580 - r3136581;
        double r3136583 = t;
        double r3136584 = 2.0;
        double r3136585 = r3136583 * r3136584;
        double r3136586 = r3136582 / r3136585;
        return r3136586;
}

double f(double x, double y, double z, double t) {
        double r3136587 = x;
        double r3136588 = y;
        double r3136589 = r3136587 + r3136588;
        double r3136590 = t;
        double r3136591 = 2.0;
        double r3136592 = r3136590 * r3136591;
        double r3136593 = r3136589 / r3136592;
        double r3136594 = z;
        double r3136595 = r3136594 / r3136592;
        double r3136596 = r3136593 - r3136595;
        return r3136596;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[\frac{\left(x + y\right) - z}{t \cdot 2}\]
  2. Using strategy rm
  3. Applied div-sub0.1

    \[\leadsto \color{blue}{\frac{x + y}{t \cdot 2} - \frac{z}{t \cdot 2}}\]
  4. Final simplification0.1

    \[\leadsto \frac{x + y}{t \cdot 2} - \frac{z}{t \cdot 2}\]

Reproduce

herbie shell --seed 2019174 +o rules:numerics
(FPCore (x y z t)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, B"
  (/ (- (+ x y) z) (* t 2.0)))