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 r41350 = x;
        double r41351 = y;
        double r41352 = r41350 + r41351;
        double r41353 = z;
        double r41354 = r41352 - r41353;
        double r41355 = t;
        double r41356 = 2.0;
        double r41357 = r41355 * r41356;
        double r41358 = r41354 / r41357;
        return r41358;
}

double f(double x, double y, double z, double t) {
        double r41359 = x;
        double r41360 = y;
        double r41361 = r41359 + r41360;
        double r41362 = t;
        double r41363 = 2.0;
        double r41364 = r41362 * r41363;
        double r41365 = r41361 / r41364;
        double r41366 = z;
        double r41367 = r41366 / r41364;
        double r41368 = r41365 - r41367;
        return r41368;
}

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