Average Error: 12.0 → 2.2
Time: 8.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 r401300 = x;
        double r401301 = y;
        double r401302 = z;
        double r401303 = r401301 - r401302;
        double r401304 = r401300 * r401303;
        double r401305 = t;
        double r401306 = r401305 - r401302;
        double r401307 = r401304 / r401306;
        return r401307;
}

double f(double x, double y, double z, double t) {
        double r401308 = x;
        double r401309 = t;
        double r401310 = z;
        double r401311 = r401309 - r401310;
        double r401312 = y;
        double r401313 = r401312 - r401310;
        double r401314 = r401311 / r401313;
        double r401315 = r401308 / r401314;
        return r401315;
}

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

Original12.0
Target2.2
Herbie2.2
\[\frac{x}{\frac{t - z}{y - z}}\]

Derivation

  1. Initial program 12.0

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

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

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

Reproduce

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