Average Error: 0.1 → 0.1
Time: 2.4s
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 r36838 = x;
        double r36839 = y;
        double r36840 = r36838 + r36839;
        double r36841 = z;
        double r36842 = r36840 - r36841;
        double r36843 = t;
        double r36844 = 2.0;
        double r36845 = r36843 * r36844;
        double r36846 = r36842 / r36845;
        return r36846;
}

double f(double x, double y, double z, double t) {
        double r36847 = x;
        double r36848 = y;
        double r36849 = r36847 + r36848;
        double r36850 = t;
        double r36851 = 2.0;
        double r36852 = r36850 * r36851;
        double r36853 = r36849 / r36852;
        double r36854 = z;
        double r36855 = r36854 / r36852;
        double r36856 = r36853 - r36855;
        return r36856;
}

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