Average Error: 0.1 → 0.1
Time: 2.3s
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 r35691 = x;
        double r35692 = y;
        double r35693 = r35691 + r35692;
        double r35694 = z;
        double r35695 = r35693 - r35694;
        double r35696 = t;
        double r35697 = 2.0;
        double r35698 = r35696 * r35697;
        double r35699 = r35695 / r35698;
        return r35699;
}

double f(double x, double y, double z, double t) {
        double r35700 = x;
        double r35701 = y;
        double r35702 = r35700 + r35701;
        double r35703 = t;
        double r35704 = 2.0;
        double r35705 = r35703 * r35704;
        double r35706 = r35702 / r35705;
        double r35707 = z;
        double r35708 = r35707 / r35705;
        double r35709 = r35706 - r35708;
        return r35709;
}

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

Reproduce

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