Average Error: 0.1 → 0.1
Time: 9.9s
Precision: 64
\[\frac{\left(x + y\right) - z}{t \cdot 2}\]
\[\frac{\frac{x}{t}}{2} - \frac{z - y}{2 \cdot t}\]
\frac{\left(x + y\right) - z}{t \cdot 2}
\frac{\frac{x}{t}}{2} - \frac{z - y}{2 \cdot t}
double f(double x, double y, double z, double t) {
        double r43064 = x;
        double r43065 = y;
        double r43066 = r43064 + r43065;
        double r43067 = z;
        double r43068 = r43066 - r43067;
        double r43069 = t;
        double r43070 = 2.0;
        double r43071 = r43069 * r43070;
        double r43072 = r43068 / r43071;
        return r43072;
}

double f(double x, double y, double z, double t) {
        double r43073 = x;
        double r43074 = t;
        double r43075 = r43073 / r43074;
        double r43076 = 2.0;
        double r43077 = r43075 / r43076;
        double r43078 = z;
        double r43079 = y;
        double r43080 = r43078 - r43079;
        double r43081 = r43076 * r43074;
        double r43082 = r43080 / r43081;
        double r43083 = r43077 - r43082;
        return r43083;
}

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

    \[\leadsto \color{blue}{\frac{\left(x - z\right) + y}{t \cdot 2}}\]
  3. Using strategy rm
  4. Applied associate-+l-0.1

    \[\leadsto \frac{\color{blue}{x - \left(z - y\right)}}{t \cdot 2}\]
  5. Applied div-sub0.1

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

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

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

Reproduce

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