Average Error: 11.6 → 2.0
Time: 13.1s
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 r444651 = x;
        double r444652 = y;
        double r444653 = z;
        double r444654 = r444652 - r444653;
        double r444655 = r444651 * r444654;
        double r444656 = t;
        double r444657 = r444656 - r444653;
        double r444658 = r444655 / r444657;
        return r444658;
}

double f(double x, double y, double z, double t) {
        double r444659 = x;
        double r444660 = t;
        double r444661 = z;
        double r444662 = r444660 - r444661;
        double r444663 = y;
        double r444664 = r444663 - r444661;
        double r444665 = r444662 / r444664;
        double r444666 = r444659 / r444665;
        return r444666;
}

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

Derivation

  1. Initial program 11.6

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

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

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

Reproduce

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