Average Error: 11.7 → 2.0
Time: 5.4s
Precision: binary64
\[\frac{x \cdot \left(y - z\right)}{t - z}\]
\[\begin{array}{l} \mathbf{if}\;z \le -1.1286509858861362 \cdot 10^{-265} \lor \neg \left(z \le 4.38805792391361004 \cdot 10^{-143}\right):\\ \;\;\;\;\frac{x}{\frac{t - z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \left(y - z\right)}{t - z}\\ \end{array}\]
\frac{x \cdot \left(y - z\right)}{t - z}
\begin{array}{l}
\mathbf{if}\;z \le -1.1286509858861362 \cdot 10^{-265} \lor \neg \left(z \le 4.38805792391361004 \cdot 10^{-143}\right):\\
\;\;\;\;\frac{x}{\frac{t - z}{y - z}}\\

\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(y - z\right)}{t - z}\\

\end{array}
double code(double x, double y, double z, double t) {
	return ((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z))));
}
double code(double x, double y, double z, double t) {
	double VAR;
	if (((z <= -1.1286509858861362e-265) || !(z <= 4.38805792391361e-143))) {
		VAR = ((double) (x / ((double) (((double) (t - z)) / ((double) (y - z))))));
	} else {
		VAR = ((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z))));
	}
	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.7
Target2.3
Herbie2.0
\[\frac{x}{\frac{t - z}{y - z}}\]

Derivation

  1. Split input into 2 regimes
  2. if z < -1.1286509858861362e-265 or 4.38805792391361004e-143 < z

    1. Initial program 12.8

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

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

    if -1.1286509858861362e-265 < z < 4.38805792391361004e-143

    1. Initial program 5.1

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \le -1.1286509858861362 \cdot 10^{-265} \lor \neg \left(z \le 4.38805792391361004 \cdot 10^{-143}\right):\\ \;\;\;\;\frac{x}{\frac{t - z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \left(y - z\right)}{t - z}\\ \end{array}\]

Reproduce

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