Average Error: 11.3 → 2.0
Time: 9.5s
Precision: 64
\[\frac{x \cdot \left(y - z\right)}{t - z}\]
\[\begin{array}{l} \mathbf{if}\;x \le -1.2829837846341168 \cdot 10^{+39}:\\ \;\;\;\;\frac{x}{t - z} \cdot \left(y - z\right)\\ \mathbf{elif}\;x \le -9.40081697359483 \cdot 10^{-169}:\\ \;\;\;\;\frac{x \cdot \left(y - z\right)}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - z}{t - z}\\ \end{array}\]
\frac{x \cdot \left(y - z\right)}{t - z}
\begin{array}{l}
\mathbf{if}\;x \le -1.2829837846341168 \cdot 10^{+39}:\\
\;\;\;\;\frac{x}{t - z} \cdot \left(y - z\right)\\

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

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

\end{array}
double f(double x, double y, double z, double t) {
        double r25160259 = x;
        double r25160260 = y;
        double r25160261 = z;
        double r25160262 = r25160260 - r25160261;
        double r25160263 = r25160259 * r25160262;
        double r25160264 = t;
        double r25160265 = r25160264 - r25160261;
        double r25160266 = r25160263 / r25160265;
        return r25160266;
}

double f(double x, double y, double z, double t) {
        double r25160267 = x;
        double r25160268 = -1.2829837846341168e+39;
        bool r25160269 = r25160267 <= r25160268;
        double r25160270 = t;
        double r25160271 = z;
        double r25160272 = r25160270 - r25160271;
        double r25160273 = r25160267 / r25160272;
        double r25160274 = y;
        double r25160275 = r25160274 - r25160271;
        double r25160276 = r25160273 * r25160275;
        double r25160277 = -9.40081697359483e-169;
        bool r25160278 = r25160267 <= r25160277;
        double r25160279 = r25160267 * r25160275;
        double r25160280 = r25160279 / r25160272;
        double r25160281 = r25160275 / r25160272;
        double r25160282 = r25160267 * r25160281;
        double r25160283 = r25160278 ? r25160280 : r25160282;
        double r25160284 = r25160269 ? r25160276 : r25160283;
        return r25160284;
}

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

Derivation

  1. Split input into 3 regimes
  2. if x < -1.2829837846341168e+39

    1. Initial program 25.4

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

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}}\]
    4. Using strategy rm
    5. Applied associate-/r/2.4

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

    if -1.2829837846341168e+39 < x < -9.40081697359483e-169

    1. Initial program 1.3

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

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}}\]
    4. Using strategy rm
    5. Applied associate-/r/9.7

      \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \left(y - z\right)}\]
    6. Using strategy rm
    7. Applied associate-*l/1.3

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

    if -9.40081697359483e-169 < x

    1. Initial program 9.6

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

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

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

      \[\leadsto \color{blue}{x} \cdot \frac{y - z}{t - z}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification2.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -1.2829837846341168 \cdot 10^{+39}:\\ \;\;\;\;\frac{x}{t - z} \cdot \left(y - z\right)\\ \mathbf{elif}\;x \le -9.40081697359483 \cdot 10^{-169}:\\ \;\;\;\;\frac{x \cdot \left(y - z\right)}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - z}{t - z}\\ \end{array}\]

Reproduce

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