Average Error: 0.0 → 0.0
Time: 2.7s
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 r43809 = x;
        double r43810 = y;
        double r43811 = r43809 + r43810;
        double r43812 = z;
        double r43813 = r43811 - r43812;
        double r43814 = t;
        double r43815 = 2.0;
        double r43816 = r43814 * r43815;
        double r43817 = r43813 / r43816;
        return r43817;
}

double f(double x, double y, double z, double t) {
        double r43818 = x;
        double r43819 = y;
        double r43820 = r43818 + r43819;
        double r43821 = t;
        double r43822 = 2.0;
        double r43823 = r43821 * r43822;
        double r43824 = r43820 / r43823;
        double r43825 = z;
        double r43826 = r43825 / r43823;
        double r43827 = r43824 - r43826;
        return r43827;
}

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