Average Error: 0.1 → 0.1
Time: 1.8s
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 r33463 = x;
        double r33464 = y;
        double r33465 = r33463 + r33464;
        double r33466 = z;
        double r33467 = r33465 - r33466;
        double r33468 = t;
        double r33469 = 2.0;
        double r33470 = r33468 * r33469;
        double r33471 = r33467 / r33470;
        return r33471;
}

double f(double x, double y, double z, double t) {
        double r33472 = x;
        double r33473 = y;
        double r33474 = r33472 + r33473;
        double r33475 = t;
        double r33476 = 2.0;
        double r33477 = r33475 * r33476;
        double r33478 = r33474 / r33477;
        double r33479 = z;
        double r33480 = r33479 / r33477;
        double r33481 = r33478 - r33480;
        return r33481;
}

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