Average Error: 0.1 → 0.1
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 r50041 = x;
        double r50042 = y;
        double r50043 = r50041 + r50042;
        double r50044 = z;
        double r50045 = r50043 - r50044;
        double r50046 = t;
        double r50047 = 2.0;
        double r50048 = r50046 * r50047;
        double r50049 = r50045 / r50048;
        return r50049;
}

double f(double x, double y, double z, double t) {
        double r50050 = x;
        double r50051 = y;
        double r50052 = r50050 + r50051;
        double r50053 = t;
        double r50054 = 2.0;
        double r50055 = r50053 * r50054;
        double r50056 = r50052 / r50055;
        double r50057 = z;
        double r50058 = r50057 / r50055;
        double r50059 = r50056 - r50058;
        return r50059;
}

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