Average Error: 0.1 → 0.1
Time: 11.9s
Precision: 64
\[\frac{\left(x + y\right) - z}{t \cdot 2}\]
\[\frac{x + y}{t \cdot 2} - \frac{\frac{z}{t}}{2}\]
\frac{\left(x + y\right) - z}{t \cdot 2}
\frac{x + y}{t \cdot 2} - \frac{\frac{z}{t}}{2}
double f(double x, double y, double z, double t) {
        double r27728 = x;
        double r27729 = y;
        double r27730 = r27728 + r27729;
        double r27731 = z;
        double r27732 = r27730 - r27731;
        double r27733 = t;
        double r27734 = 2.0;
        double r27735 = r27733 * r27734;
        double r27736 = r27732 / r27735;
        return r27736;
}

double f(double x, double y, double z, double t) {
        double r27737 = x;
        double r27738 = y;
        double r27739 = r27737 + r27738;
        double r27740 = t;
        double r27741 = 2.0;
        double r27742 = r27740 * r27741;
        double r27743 = r27739 / r27742;
        double r27744 = z;
        double r27745 = r27744 / r27740;
        double r27746 = r27745 / r27741;
        double r27747 = r27743 - r27746;
        return r27747;
}

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. Simplified0.1

    \[\leadsto \color{blue}{\frac{y + x}{t \cdot 2}} - \frac{z}{t \cdot 2}\]
  5. Simplified0.1

    \[\leadsto \frac{y + x}{t \cdot 2} - \color{blue}{\frac{\frac{z}{t}}{2}}\]
  6. Final simplification0.1

    \[\leadsto \frac{x + y}{t \cdot 2} - \frac{\frac{z}{t}}{2}\]

Reproduce

herbie shell --seed 2019174 +o rules:numerics
(FPCore (x y z t)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, B"
  (/ (- (+ x y) z) (* t 2.0)))