Average Error: 0.1 → 0.1
Time: 11.5s
Precision: 64
\[\frac{\left(x + y\right) - z}{t \cdot 2}\]
\[\frac{\left(x + y\right) - z}{t \cdot 2}\]
\frac{\left(x + y\right) - z}{t \cdot 2}
\frac{\left(x + y\right) - z}{t \cdot 2}
double f(double x, double y, double z, double t) {
        double r49235 = x;
        double r49236 = y;
        double r49237 = r49235 + r49236;
        double r49238 = z;
        double r49239 = r49237 - r49238;
        double r49240 = t;
        double r49241 = 2.0;
        double r49242 = r49240 * r49241;
        double r49243 = r49239 / r49242;
        return r49243;
}

double f(double x, double y, double z, double t) {
        double r49244 = x;
        double r49245 = y;
        double r49246 = r49244 + r49245;
        double r49247 = z;
        double r49248 = r49246 - r49247;
        double r49249 = t;
        double r49250 = 2.0;
        double r49251 = r49249 * r49250;
        double r49252 = r49248 / r49251;
        return r49252;
}

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. Using strategy rm
  5. Applied sub-div0.1

    \[\leadsto \color{blue}{\frac{\left(x + y\right) - z}{t \cdot 2}}\]
  6. Final simplification0.1

    \[\leadsto \frac{\left(x + y\right) - z}{t \cdot 2}\]

Reproduce

herbie shell --seed 2019326 +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)))