Average Error: 0.0 → 0.0
Time: 2.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 r56800 = x;
        double r56801 = y;
        double r56802 = r56800 + r56801;
        double r56803 = z;
        double r56804 = r56802 - r56803;
        double r56805 = t;
        double r56806 = 2.0;
        double r56807 = r56805 * r56806;
        double r56808 = r56804 / r56807;
        return r56808;
}

double f(double x, double y, double z, double t) {
        double r56809 = x;
        double r56810 = y;
        double r56811 = r56809 + r56810;
        double r56812 = t;
        double r56813 = 2.0;
        double r56814 = r56812 * r56813;
        double r56815 = r56811 / r56814;
        double r56816 = z;
        double r56817 = r56816 / r56814;
        double r56818 = r56815 - r56817;
        return r56818;
}

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}\]
  2. Using strategy rm
  3. Applied div-sub0.0

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

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

Reproduce

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