Average Error: 11.1 → 2.2
Time: 4.0s
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 r839575 = x;
        double r839576 = y;
        double r839577 = z;
        double r839578 = r839576 - r839577;
        double r839579 = r839575 * r839578;
        double r839580 = t;
        double r839581 = r839580 - r839577;
        double r839582 = r839579 / r839581;
        return r839582;
}

double f(double x, double y, double z, double t) {
        double r839583 = x;
        double r839584 = t;
        double r839585 = z;
        double r839586 = r839584 - r839585;
        double r839587 = y;
        double r839588 = r839587 - r839585;
        double r839589 = r839586 / r839588;
        double r839590 = r839583 / r839589;
        return r839590;
}

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

Derivation

  1. Initial program 11.1

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