Average Error: 0.1 → 0.1
Time: 2.1s
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 r41071 = x;
        double r41072 = y;
        double r41073 = r41071 + r41072;
        double r41074 = z;
        double r41075 = r41073 - r41074;
        double r41076 = t;
        double r41077 = 2.0;
        double r41078 = r41076 * r41077;
        double r41079 = r41075 / r41078;
        return r41079;
}

double f(double x, double y, double z, double t) {
        double r41080 = x;
        double r41081 = y;
        double r41082 = r41080 + r41081;
        double r41083 = t;
        double r41084 = 2.0;
        double r41085 = r41083 * r41084;
        double r41086 = r41082 / r41085;
        double r41087 = z;
        double r41088 = r41087 / r41085;
        double r41089 = r41086 - r41088;
        return r41089;
}

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