Average Error: 0.1 → 0.1
Time: 3.0s
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 r62227 = x;
        double r62228 = y;
        double r62229 = r62227 + r62228;
        double r62230 = z;
        double r62231 = r62229 - r62230;
        double r62232 = t;
        double r62233 = 2.0;
        double r62234 = r62232 * r62233;
        double r62235 = r62231 / r62234;
        return r62235;
}

double f(double x, double y, double z, double t) {
        double r62236 = x;
        double r62237 = y;
        double r62238 = r62236 + r62237;
        double r62239 = t;
        double r62240 = 2.0;
        double r62241 = r62239 * r62240;
        double r62242 = r62238 / r62241;
        double r62243 = z;
        double r62244 = r62243 / r62241;
        double r62245 = r62242 - r62244;
        return r62245;
}

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