Average Error: 0.0 → 0.0
Time: 36.0s
Precision: 64
\[\frac{\left(x + y\right) - z}{t \cdot 2.0}\]
\[\frac{y + x}{t \cdot 2.0} - \frac{z}{t \cdot 2.0}\]
\frac{\left(x + y\right) - z}{t \cdot 2.0}
\frac{y + x}{t \cdot 2.0} - \frac{z}{t \cdot 2.0}
double f(double x, double y, double z, double t) {
        double r2689736 = x;
        double r2689737 = y;
        double r2689738 = r2689736 + r2689737;
        double r2689739 = z;
        double r2689740 = r2689738 - r2689739;
        double r2689741 = t;
        double r2689742 = 2.0;
        double r2689743 = r2689741 * r2689742;
        double r2689744 = r2689740 / r2689743;
        return r2689744;
}

double f(double x, double y, double z, double t) {
        double r2689745 = y;
        double r2689746 = x;
        double r2689747 = r2689745 + r2689746;
        double r2689748 = t;
        double r2689749 = 2.0;
        double r2689750 = r2689748 * r2689749;
        double r2689751 = r2689747 / r2689750;
        double r2689752 = z;
        double r2689753 = r2689752 / r2689750;
        double r2689754 = r2689751 - r2689753;
        return r2689754;
}

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.0

    \[\frac{\left(x + y\right) - z}{t \cdot 2.0}\]
  2. Using strategy rm
  3. Applied div-sub0.0

    \[\leadsto \color{blue}{\frac{x + y}{t \cdot 2.0} - \frac{z}{t \cdot 2.0}}\]
  4. Final simplification0.0

    \[\leadsto \frac{y + x}{t \cdot 2.0} - \frac{z}{t \cdot 2.0}\]

Reproduce

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