Average Error: 11.3 → 2.2
Time: 9.4s
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 r707038 = x;
        double r707039 = y;
        double r707040 = z;
        double r707041 = r707039 - r707040;
        double r707042 = r707038 * r707041;
        double r707043 = t;
        double r707044 = r707043 - r707040;
        double r707045 = r707042 / r707044;
        return r707045;
}

double f(double x, double y, double z, double t) {
        double r707046 = x;
        double r707047 = t;
        double r707048 = z;
        double r707049 = r707047 - r707048;
        double r707050 = y;
        double r707051 = r707050 - r707048;
        double r707052 = r707049 / r707051;
        double r707053 = r707046 / r707052;
        return r707053;
}

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

Derivation

  1. Initial program 11.3

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