Average Error: 0.1 → 0.1
Time: 4.5s
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 r280 = x;
        double r281 = y;
        double r282 = r280 + r281;
        double r283 = z;
        double r284 = r282 - r283;
        double r285 = t;
        double r286 = 2.0;
        double r287 = r285 * r286;
        double r288 = r284 / r287;
        return r288;
}

double f(double x, double y, double z, double t) {
        double r289 = x;
        double r290 = y;
        double r291 = r289 + r290;
        double r292 = t;
        double r293 = 2.0;
        double r294 = r292 * r293;
        double r295 = r291 / r294;
        double r296 = z;
        double r297 = r296 / r294;
        double r298 = r295 - r297;
        return r298;
}

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 2020025 +o rules:numerics
(FPCore (x y z t)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, B"
  :precision binary64
  (/ (- (+ x y) z) (* t 2)))