Average Error: 11.7 → 2.1
Time: 2.7s
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 r688184 = x;
        double r688185 = y;
        double r688186 = z;
        double r688187 = r688185 - r688186;
        double r688188 = r688184 * r688187;
        double r688189 = t;
        double r688190 = r688189 - r688186;
        double r688191 = r688188 / r688190;
        return r688191;
}

double f(double x, double y, double z, double t) {
        double r688192 = x;
        double r688193 = t;
        double r688194 = z;
        double r688195 = r688193 - r688194;
        double r688196 = y;
        double r688197 = r688196 - r688194;
        double r688198 = r688195 / r688197;
        double r688199 = r688192 / r688198;
        return r688199;
}

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.7
Target2.1
Herbie2.1
\[\frac{x}{\frac{t - z}{y - z}}\]

Derivation

  1. Initial program 11.7

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

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

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

Reproduce

herbie shell --seed 2020001 
(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)))