Average Error: 0.1 → 0.1
Time: 8.8s
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 r33629 = x;
        double r33630 = y;
        double r33631 = r33629 + r33630;
        double r33632 = z;
        double r33633 = r33631 - r33632;
        double r33634 = t;
        double r33635 = 2.0;
        double r33636 = r33634 * r33635;
        double r33637 = r33633 / r33636;
        return r33637;
}

double f(double x, double y, double z, double t) {
        double r33638 = x;
        double r33639 = y;
        double r33640 = r33638 + r33639;
        double r33641 = t;
        double r33642 = 2.0;
        double r33643 = r33641 * r33642;
        double r33644 = r33640 / r33643;
        double r33645 = z;
        double r33646 = r33645 / r33643;
        double r33647 = r33644 - r33646;
        return r33647;
}

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