Average Error: 0.1 → 0.1
Time: 2.3s
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 r20388 = x;
        double r20389 = y;
        double r20390 = r20388 + r20389;
        double r20391 = z;
        double r20392 = r20390 - r20391;
        double r20393 = t;
        double r20394 = 2.0;
        double r20395 = r20393 * r20394;
        double r20396 = r20392 / r20395;
        return r20396;
}

double f(double x, double y, double z, double t) {
        double r20397 = x;
        double r20398 = y;
        double r20399 = r20397 + r20398;
        double r20400 = t;
        double r20401 = 2.0;
        double r20402 = r20400 * r20401;
        double r20403 = r20399 / r20402;
        double r20404 = z;
        double r20405 = r20404 / r20402;
        double r20406 = r20403 - r20405;
        return r20406;
}

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 2020034 +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)))