Average Error: 11.7 → 11.7
Time: 4.5s
Precision: 64
\[\frac{x \cdot \left(y - z\right)}{t - z}\]
\[\frac{x \cdot \left(y - z\right)}{t - z}\]
\frac{x \cdot \left(y - z\right)}{t - z}
\frac{x \cdot \left(y - z\right)}{t - z}
double f(double x, double y, double z, double t) {
        double r596373 = x;
        double r596374 = y;
        double r596375 = z;
        double r596376 = r596374 - r596375;
        double r596377 = r596373 * r596376;
        double r596378 = t;
        double r596379 = r596378 - r596375;
        double r596380 = r596377 / r596379;
        return r596380;
}

double f(double x, double y, double z, double t) {
        double r596381 = x;
        double r596382 = y;
        double r596383 = z;
        double r596384 = r596382 - r596383;
        double r596385 = r596381 * r596384;
        double r596386 = t;
        double r596387 = r596386 - r596383;
        double r596388 = r596385 / r596387;
        return r596388;
}

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

Derivation

  1. Split input into 2 regimes
  2. if (/ (* x (- y z)) (- t z)) < -inf.0 or -1.3467944262591026e-270 < (/ (* x (- y z)) (- t z))

    1. Initial program 17.6

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

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

    if -inf.0 < (/ (* x (- y z)) (- t z)) < -1.3467944262591026e-270

    1. Initial program 0.3

      \[\frac{x \cdot \left(y - z\right)}{t - z}\]
    2. Using strategy rm
    3. Applied *-un-lft-identity0.3

      \[\leadsto \frac{x \cdot \left(y - z\right)}{\color{blue}{1 \cdot \left(t - z\right)}}\]
    4. Applied times-frac2.8

      \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{y - z}{t - z}}\]
    5. Simplified2.8

      \[\leadsto \color{blue}{x} \cdot \frac{y - z}{t - z}\]
    6. Using strategy rm
    7. Applied associate-*r/0.3

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - z\right)}{t - z}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification11.7

    \[\leadsto \frac{x \cdot \left(y - z\right)}{t - z}\]

Reproduce

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