Average Error: 11.5 → 2.4
Time: 11.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 r485164 = x;
        double r485165 = y;
        double r485166 = z;
        double r485167 = r485165 - r485166;
        double r485168 = r485164 * r485167;
        double r485169 = t;
        double r485170 = r485169 - r485166;
        double r485171 = r485168 / r485170;
        return r485171;
}

double f(double x, double y, double z, double t) {
        double r485172 = x;
        double r485173 = t;
        double r485174 = z;
        double r485175 = r485173 - r485174;
        double r485176 = y;
        double r485177 = r485176 - r485174;
        double r485178 = r485175 / r485177;
        double r485179 = r485172 / r485178;
        return r485179;
}

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

Derivation

  1. Initial program 11.5

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

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

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

Reproduce

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