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 r28544 = x;
        double r28545 = y;
        double r28546 = r28544 + r28545;
        double r28547 = z;
        double r28548 = r28546 - r28547;
        double r28549 = t;
        double r28550 = 2.0;
        double r28551 = r28549 * r28550;
        double r28552 = r28548 / r28551;
        return r28552;
}

double f(double x, double y, double z, double t) {
        double r28553 = x;
        double r28554 = y;
        double r28555 = r28553 + r28554;
        double r28556 = t;
        double r28557 = 2.0;
        double r28558 = r28556 * r28557;
        double r28559 = r28555 / r28558;
        double r28560 = z;
        double r28561 = r28560 / r28558;
        double r28562 = r28559 - r28561;
        return r28562;
}

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