Average Error: 11.8 → 1.3
Time: 4.5s
Precision: 64
\[\frac{x \cdot \left(y - z\right)}{t - z}\]
\[\begin{array}{l} \mathbf{if}\;\frac{x \cdot \left(y - z\right)}{t - z} \le -1.2281290268927713 \cdot 10^{250} \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \le 2.97242941231804261 \cdot 10^{302}\right):\\ \;\;\;\;\frac{x}{\frac{t}{y - z} - \frac{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}\;\frac{x \cdot \left(y - z\right)}{t - z} \le -1.2281290268927713 \cdot 10^{250} \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \le 2.97242941231804261 \cdot 10^{302}\right):\\
\;\;\;\;\frac{x}{\frac{t}{y - z} - \frac{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 ((x * (y - z)) / (t - z));
}
double code(double x, double y, double z, double t) {
	double temp;
	if (((((x * (y - z)) / (t - z)) <= -1.2281290268927713e+250) || !(((x * (y - z)) / (t - z)) <= 2.9724294123180426e+302))) {
		temp = (x / ((t / (y - z)) - (z / (y - z))));
	} else {
		temp = ((x * (y - z)) / (t - z));
	}
	return temp;
}

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

Derivation

  1. Split input into 2 regimes
  2. if (/ (* x (- y z)) (- t z)) < -1.2281290268927713e+250 or 2.9724294123180426e+302 < (/ (* x (- y z)) (- t z))

    1. Initial program 59.6

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

      \[\leadsto \color{blue}{\frac{x}{\frac{t - z}{y - z}}}\]
    4. Using strategy rm
    5. Applied div-sub0.7

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

    if -1.2281290268927713e+250 < (/ (* x (- y z)) (- t z)) < 2.9724294123180426e+302

    1. Initial program 1.4

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x \cdot \left(y - z\right)}{t - z} \le -1.2281290268927713 \cdot 10^{250} \lor \neg \left(\frac{x \cdot \left(y - z\right)}{t - z} \le 2.97242941231804261 \cdot 10^{302}\right):\\ \;\;\;\;\frac{x}{\frac{t}{y - z} - \frac{z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \left(y - z\right)}{t - z}\\ \end{array}\]

Reproduce

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