Average Error: 0.1 → 0.1
Time: 5.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 r33880 = x;
        double r33881 = y;
        double r33882 = r33880 + r33881;
        double r33883 = z;
        double r33884 = r33882 - r33883;
        double r33885 = t;
        double r33886 = 2.0;
        double r33887 = r33885 * r33886;
        double r33888 = r33884 / r33887;
        return r33888;
}

double f(double x, double y, double z, double t) {
        double r33889 = x;
        double r33890 = y;
        double r33891 = r33889 + r33890;
        double r33892 = t;
        double r33893 = 2.0;
        double r33894 = r33892 * r33893;
        double r33895 = r33891 / r33894;
        double r33896 = z;
        double r33897 = r33896 / r33894;
        double r33898 = r33895 - r33897;
        return r33898;
}

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