Average Error: 11.9 → 2.0
Time: 9.9s
Precision: 64
\[\frac{x \cdot \left(y - z\right)}{t - z}\]
\[\frac{x}{\frac{t - z}{y - z}}\]
\frac{x \cdot \left(y - z\right)}{t - z}
\frac{x}{\frac{t - z}{y - z}}
double f(double x, double y, double z, double t) {
        double r484173 = x;
        double r484174 = y;
        double r484175 = z;
        double r484176 = r484174 - r484175;
        double r484177 = r484173 * r484176;
        double r484178 = t;
        double r484179 = r484178 - r484175;
        double r484180 = r484177 / r484179;
        return r484180;
}

double f(double x, double y, double z, double t) {
        double r484181 = x;
        double r484182 = t;
        double r484183 = z;
        double r484184 = r484182 - r484183;
        double r484185 = y;
        double r484186 = r484185 - r484183;
        double r484187 = r484184 / r484186;
        double r484188 = r484181 / r484187;
        return r484188;
}

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

Target

Original11.9
Target2.0
Herbie2.0
\[\frac{x}{\frac{t - z}{y - z}}\]

Derivation

  1. Initial program 11.9

    \[\frac{x \cdot \left(y - z\right)}{t - z}\]
  2. Using strategy rm
  3. Applied associate-/l*2.0

    \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}}\]
  4. Final simplification2.0

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

Reproduce

herbie shell --seed 2019294 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (/ x (/ (- t z) (- y z)))

  (/ (* x (- y z)) (- t z)))