Average Error: 0.1 → 0.1
Time: 14.7s
Precision: 64
\[\frac{\left(x + y\right) - z}{t \cdot 2}\]
\[\frac{y + x}{t \cdot 2} - \frac{z}{t \cdot 2}\]
\frac{\left(x + y\right) - z}{t \cdot 2}
\frac{y + x}{t \cdot 2} - \frac{z}{t \cdot 2}
double f(double x, double y, double z, double t) {
        double r2140721 = x;
        double r2140722 = y;
        double r2140723 = r2140721 + r2140722;
        double r2140724 = z;
        double r2140725 = r2140723 - r2140724;
        double r2140726 = t;
        double r2140727 = 2.0;
        double r2140728 = r2140726 * r2140727;
        double r2140729 = r2140725 / r2140728;
        return r2140729;
}

double f(double x, double y, double z, double t) {
        double r2140730 = y;
        double r2140731 = x;
        double r2140732 = r2140730 + r2140731;
        double r2140733 = t;
        double r2140734 = 2.0;
        double r2140735 = r2140733 * r2140734;
        double r2140736 = r2140732 / r2140735;
        double r2140737 = z;
        double r2140738 = r2140737 / r2140735;
        double r2140739 = r2140736 - r2140738;
        return r2140739;
}

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{y + x}{t \cdot 2} - \frac{z}{t \cdot 2}\]

Reproduce

herbie shell --seed 2019171 +o rules:numerics
(FPCore (x y z t)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, B"
  (/ (- (+ x y) z) (* t 2.0)))