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 r37673 = x;
        double r37674 = y;
        double r37675 = r37673 + r37674;
        double r37676 = z;
        double r37677 = r37675 - r37676;
        double r37678 = t;
        double r37679 = 2.0;
        double r37680 = r37678 * r37679;
        double r37681 = r37677 / r37680;
        return r37681;
}

double f(double x, double y, double z, double t) {
        double r37682 = x;
        double r37683 = y;
        double r37684 = r37682 + r37683;
        double r37685 = t;
        double r37686 = 2.0;
        double r37687 = r37685 * r37686;
        double r37688 = r37684 / r37687;
        double r37689 = z;
        double r37690 = r37689 / r37687;
        double r37691 = r37688 - r37690;
        return r37691;
}

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