Average Error: 11.5 → 0.6
Time: 3.2min
Precision: binary64
\[\frac{x \cdot \left(y - z\right)}{t - z}\]
\[\begin{array}{l} \mathbf{if}\;\frac{x \cdot \left(y - z\right)}{t - z} = -inf.0:\\ \;\;\;\;x \cdot \frac{y - z}{t - z}\\ \mathbf{elif}\;\frac{x \cdot \left(y - z\right)}{t - z} \le -7.0388442481060592 \cdot 10^{-262} \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \le 8.4245780664397174 \cdot 10^{-243}\right) \land \frac{x \cdot \left(y - z\right)}{t - z} \le 1.575964542475215 \cdot 10^{276}:\\ \;\;\;\;\frac{x \cdot \left(y - z\right)}{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{x \cdot \left(y - z\right)}{t - z} = -inf.0:\\
\;\;\;\;x \cdot \frac{y - z}{t - z}\\

\mathbf{elif}\;\frac{x \cdot \left(y - z\right)}{t - z} \le -7.0388442481060592 \cdot 10^{-262} \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \le 8.4245780664397174 \cdot 10^{-243}\right) \land \frac{x \cdot \left(y - z\right)}{t - z} \le 1.575964542475215 \cdot 10^{276}:\\
\;\;\;\;\frac{x \cdot \left(y - z\right)}{t - z}\\

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

\end{array}
double code(double x, double y, double z, double t) {
	return (((double) (x * ((double) (y - z)))) / ((double) (t - z)));
}
double code(double x, double y, double z, double t) {
	double VAR;
	if (((((double) (x * ((double) (y - z)))) / ((double) (t - z))) <= -inf.0)) {
		VAR = ((double) (x * (((double) (y - z)) / ((double) (t - z)))));
	} else {
		double VAR_1;
		if ((((((double) (x * ((double) (y - z)))) / ((double) (t - z))) <= -7.038844248106059e-262) || (!((((double) (x * ((double) (y - z)))) / ((double) (t - z))) <= 8.424578066439717e-243) && ((((double) (x * ((double) (y - z)))) / ((double) (t - z))) <= 1.575964542475215e+276)))) {
			VAR_1 = (((double) (x * ((double) (y - z)))) / ((double) (t - z)));
		} else {
			VAR_1 = (x / (((double) (t - z)) / ((double) (y - z))));
		}
		VAR = VAR_1;
	}
	return VAR;
}

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

Derivation

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

    1. Initial program 64.0

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

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

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

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

    if -inf.0 < (/ (* x (- y z)) (- t z)) < -7.0388442481060592e-262 or 8.4245780664397174e-243 < (/ (* x (- y z)) (- t z)) < 1.575964542475215e276

    1. Initial program 0.3

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

    if -7.0388442481060592e-262 < (/ (* x (- y z)) (- t z)) < 8.4245780664397174e-243 or 1.575964542475215e276 < (/ (* x (- y z)) (- t z))

    1. Initial program 23.6

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x \cdot \left(y - z\right)}{t - z} = -inf.0:\\ \;\;\;\;x \cdot \frac{y - z}{t - z}\\ \mathbf{elif}\;\frac{x \cdot \left(y - z\right)}{t - z} \le -7.0388442481060592 \cdot 10^{-262} \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \le 8.4245780664397174 \cdot 10^{-243}\right) \land \frac{x \cdot \left(y - z\right)}{t - z} \le 1.575964542475215 \cdot 10^{276}:\\ \;\;\;\;\frac{x \cdot \left(y - z\right)}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{t - z}{y - z}}\\ \end{array}\]

Reproduce

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