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 r39551 = x;
        double r39552 = y;
        double r39553 = r39551 + r39552;
        double r39554 = z;
        double r39555 = r39553 - r39554;
        double r39556 = t;
        double r39557 = 2.0;
        double r39558 = r39556 * r39557;
        double r39559 = r39555 / r39558;
        return r39559;
}

double f(double x, double y, double z, double t) {
        double r39560 = x;
        double r39561 = y;
        double r39562 = r39560 + r39561;
        double r39563 = t;
        double r39564 = 2.0;
        double r39565 = r39563 * r39564;
        double r39566 = r39562 / r39565;
        double r39567 = z;
        double r39568 = r39567 / r39565;
        double r39569 = r39566 - r39568;
        return r39569;
}

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