Average Error: 0.1 → 0.1
Time: 2.0s
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 r37745 = x;
        double r37746 = y;
        double r37747 = r37745 + r37746;
        double r37748 = z;
        double r37749 = r37747 - r37748;
        double r37750 = t;
        double r37751 = 2.0;
        double r37752 = r37750 * r37751;
        double r37753 = r37749 / r37752;
        return r37753;
}

double f(double x, double y, double z, double t) {
        double r37754 = x;
        double r37755 = y;
        double r37756 = r37754 + r37755;
        double r37757 = t;
        double r37758 = 2.0;
        double r37759 = r37757 * r37758;
        double r37760 = r37756 / r37759;
        double r37761 = z;
        double r37762 = r37761 / r37759;
        double r37763 = r37760 - r37762;
        return r37763;
}

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 2020002 
(FPCore (x y z t)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, B"
  :precision binary64
  (/ (- (+ x y) z) (* t 2)))