Average Error: 11.6 → 2.0
Time: 2.8s
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 r659404 = x;
        double r659405 = y;
        double r659406 = z;
        double r659407 = r659405 - r659406;
        double r659408 = r659404 * r659407;
        double r659409 = t;
        double r659410 = r659409 - r659406;
        double r659411 = r659408 / r659410;
        return r659411;
}

double f(double x, double y, double z, double t) {
        double r659412 = x;
        double r659413 = t;
        double r659414 = z;
        double r659415 = r659413 - r659414;
        double r659416 = y;
        double r659417 = r659416 - r659414;
        double r659418 = r659415 / r659417;
        double r659419 = r659412 / r659418;
        return r659419;
}

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

Derivation

  1. Initial program 11.6

    \[\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 2020027 
(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)))