Average Error: 12.0 → 2.2
Time: 12.9s
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 r447582 = x;
        double r447583 = y;
        double r447584 = z;
        double r447585 = r447583 - r447584;
        double r447586 = r447582 * r447585;
        double r447587 = t;
        double r447588 = r447587 - r447584;
        double r447589 = r447586 / r447588;
        return r447589;
}

double f(double x, double y, double z, double t) {
        double r447590 = x;
        double r447591 = t;
        double r447592 = z;
        double r447593 = r447591 - r447592;
        double r447594 = y;
        double r447595 = r447594 - r447592;
        double r447596 = r447593 / r447595;
        double r447597 = r447590 / r447596;
        return r447597;
}

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)))