Average Error: 10.8 → 1.4
Time: 11.5s
Precision: 64
\[\frac{x \cdot \left(y - z\right)}{t - z}\]
\[\begin{array}{l} \mathbf{if}\;\frac{\left(y - z\right) \cdot x}{t - z} = -\infty:\\ \;\;\;\;\frac{x}{\frac{t - z}{y - z}}\\ \mathbf{elif}\;\frac{\left(y - z\right) \cdot x}{t - z} \le 8.316561094589475 \cdot 10^{+242}:\\ \;\;\;\;\frac{\left(y - z\right) \cdot x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{t - z}{y - z}}\\ \end{array}\]
\frac{x \cdot \left(y - z\right)}{t - z}
\begin{array}{l}
\mathbf{if}\;\frac{\left(y - z\right) \cdot x}{t - z} = -\infty:\\
\;\;\;\;\frac{x}{\frac{t - z}{y - z}}\\

\mathbf{elif}\;\frac{\left(y - z\right) \cdot x}{t - z} \le 8.316561094589475 \cdot 10^{+242}:\\
\;\;\;\;\frac{\left(y - z\right) \cdot x}{t - z}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{t - z}{y - z}}\\

\end{array}
double f(double x, double y, double z, double t) {
        double r33601053 = x;
        double r33601054 = y;
        double r33601055 = z;
        double r33601056 = r33601054 - r33601055;
        double r33601057 = r33601053 * r33601056;
        double r33601058 = t;
        double r33601059 = r33601058 - r33601055;
        double r33601060 = r33601057 / r33601059;
        return r33601060;
}

double f(double x, double y, double z, double t) {
        double r33601061 = y;
        double r33601062 = z;
        double r33601063 = r33601061 - r33601062;
        double r33601064 = x;
        double r33601065 = r33601063 * r33601064;
        double r33601066 = t;
        double r33601067 = r33601066 - r33601062;
        double r33601068 = r33601065 / r33601067;
        double r33601069 = -inf.0;
        bool r33601070 = r33601068 <= r33601069;
        double r33601071 = r33601067 / r33601063;
        double r33601072 = r33601064 / r33601071;
        double r33601073 = 8.316561094589475e+242;
        bool r33601074 = r33601068 <= r33601073;
        double r33601075 = r33601074 ? r33601068 : r33601072;
        double r33601076 = r33601070 ? r33601072 : r33601075;
        return r33601076;
}

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

Original10.8
Target2.1
Herbie1.4
\[\frac{x}{\frac{t - z}{y - z}}\]

Derivation

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

    1. Initial program 54.4

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

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

    if -inf.0 < (/ (* x (- y z)) (- t z)) < 8.316561094589475e+242

    1. Initial program 1.4

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(y - z\right) \cdot x}{t - z} = -\infty:\\ \;\;\;\;\frac{x}{\frac{t - z}{y - z}}\\ \mathbf{elif}\;\frac{\left(y - z\right) \cdot x}{t - z} \le 8.316561094589475 \cdot 10^{+242}:\\ \;\;\;\;\frac{\left(y - z\right) \cdot x}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{t - z}{y - z}}\\ \end{array}\]

Reproduce

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