Average Error: 11.9 → 2.1
Time: 11.2s
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 r366311 = x;
        double r366312 = y;
        double r366313 = z;
        double r366314 = r366312 - r366313;
        double r366315 = r366311 * r366314;
        double r366316 = t;
        double r366317 = r366316 - r366313;
        double r366318 = r366315 / r366317;
        return r366318;
}

double f(double x, double y, double z, double t) {
        double r366319 = x;
        double r366320 = t;
        double r366321 = z;
        double r366322 = r366320 - r366321;
        double r366323 = y;
        double r366324 = r366323 - r366321;
        double r366325 = r366322 / r366324;
        double r366326 = r366319 / r366325;
        return r366326;
}

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.1
Herbie2.1
\[\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.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 2019174 +o rules:numerics
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"

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

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