Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B

Percentage Accurate: 89.0% → 97.0%
Time: 13.5s
Alternatives: 15
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \end{array} \]
(FPCore (x y z t) :precision binary64 (/ x (* (- y z) (- t z))))
double code(double x, double y, double z, double t) {
	return x / ((y - z) * (t - z));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x / ((y - z) * (t - z))
end function
public static double code(double x, double y, double z, double t) {
	return x / ((y - z) * (t - z));
}
def code(x, y, z, t):
	return x / ((y - z) * (t - z))
function code(x, y, z, t)
	return Float64(x / Float64(Float64(y - z) * Float64(t - z)))
end
function tmp = code(x, y, z, t)
	tmp = x / ((y - z) * (t - z));
end
code[x_, y_, z_, t_] := N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 15 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 89.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \end{array} \]
(FPCore (x y z t) :precision binary64 (/ x (* (- y z) (- t z))))
double code(double x, double y, double z, double t) {
	return x / ((y - z) * (t - z));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x / ((y - z) * (t - z))
end function
public static double code(double x, double y, double z, double t) {
	return x / ((y - z) * (t - z));
}
def code(x, y, z, t):
	return x / ((y - z) * (t - z))
function code(x, y, z, t)
	return Float64(x / Float64(Float64(y - z) * Float64(t - z)))
end
function tmp = code(x, y, z, t)
	tmp = x / ((y - z) * (t - z));
end
code[x_, y_, z_, t_] := N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\end{array}

Alternative 1: 97.0% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \frac{\frac{1}{y - z}}{\frac{t - z}{x}} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t) :precision binary64 (/ (/ 1.0 (- y z)) (/ (- t z) x)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	return (1.0 / (y - z)) / ((t - z) / x);
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (1.0d0 / (y - z)) / ((t - z) / x)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	return (1.0 / (y - z)) / ((t - z) / x);
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	return (1.0 / (y - z)) / ((t - z) / x)
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	return Float64(Float64(1.0 / Float64(y - z)) / Float64(Float64(t - z) / x))
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
	tmp = (1.0 / (y - z)) / ((t - z) / x);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := N[(N[(1.0 / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{\frac{1}{y - z}}{\frac{t - z}{x}}
\end{array}
Derivation
  1. Initial program 91.0%

    \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. clear-numN/A

      \[\leadsto \frac{1}{\color{blue}{\frac{\left(y - z\right) \cdot \left(t - z\right)}{x}}} \]
    2. associate-/l*N/A

      \[\leadsto \frac{1}{\left(y - z\right) \cdot \color{blue}{\frac{t - z}{x}}} \]
    3. associate-/r*N/A

      \[\leadsto \frac{\frac{1}{y - z}}{\color{blue}{\frac{t - z}{x}}} \]
    4. flip3--N/A

      \[\leadsto \frac{\frac{1}{\frac{{y}^{3} - {z}^{3}}{y \cdot y + \left(z \cdot z + y \cdot z\right)}}}{\frac{t - \color{blue}{z}}{x}} \]
    5. clear-numN/A

      \[\leadsto \frac{\frac{y \cdot y + \left(z \cdot z + y \cdot z\right)}{{y}^{3} - {z}^{3}}}{\frac{\color{blue}{t - z}}{x}} \]
    6. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{y \cdot y + \left(z \cdot z + y \cdot z\right)}{{y}^{3} - {z}^{3}}\right), \color{blue}{\left(\frac{t - z}{x}\right)}\right) \]
    7. clear-numN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{\frac{{y}^{3} - {z}^{3}}{y \cdot y + \left(z \cdot z + y \cdot z\right)}}\right), \left(\frac{\color{blue}{t - z}}{x}\right)\right) \]
    8. flip3--N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{y - z}\right), \left(\frac{t - \color{blue}{z}}{x}\right)\right) \]
    9. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \left(y - z\right)\right), \left(\frac{\color{blue}{t - z}}{x}\right)\right) \]
    10. --lowering--.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, z\right)\right), \left(\frac{t - \color{blue}{z}}{x}\right)\right) \]
    11. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, z\right)\right), \mathsf{/.f64}\left(\left(t - z\right), \color{blue}{x}\right)\right) \]
    12. --lowering--.f6496.4%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, z\right)\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, z\right), x\right)\right) \]
  4. Applied egg-rr96.4%

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

Alternative 2: 72.6% accurate, 0.3× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{\frac{x}{z}}{z}\\ t_2 := \frac{x}{z \cdot \left(z - y\right)}\\ \mathbf{if}\;z \leq -8.6 \cdot 10^{+155}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{-94}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-39}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+157}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (/ x z) z)) (t_2 (/ x (* z (- z y)))))
   (if (<= z -8.6e+155)
     t_1
     (if (<= z -1.75e-94)
       t_2
       (if (<= z 2.3e-39) (/ (/ x t) y) (if (<= z 6.2e+157) t_2 t_1))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double t_1 = (x / z) / z;
	double t_2 = x / (z * (z - y));
	double tmp;
	if (z <= -8.6e+155) {
		tmp = t_1;
	} else if (z <= -1.75e-94) {
		tmp = t_2;
	} else if (z <= 2.3e-39) {
		tmp = (x / t) / y;
	} else if (z <= 6.2e+157) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (x / z) / z
    t_2 = x / (z * (z - y))
    if (z <= (-8.6d+155)) then
        tmp = t_1
    else if (z <= (-1.75d-94)) then
        tmp = t_2
    else if (z <= 2.3d-39) then
        tmp = (x / t) / y
    else if (z <= 6.2d+157) then
        tmp = t_2
    else
        tmp = t_1
    end if
    code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = (x / z) / z;
	double t_2 = x / (z * (z - y));
	double tmp;
	if (z <= -8.6e+155) {
		tmp = t_1;
	} else if (z <= -1.75e-94) {
		tmp = t_2;
	} else if (z <= 2.3e-39) {
		tmp = (x / t) / y;
	} else if (z <= 6.2e+157) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	t_1 = (x / z) / z
	t_2 = x / (z * (z - y))
	tmp = 0
	if z <= -8.6e+155:
		tmp = t_1
	elif z <= -1.75e-94:
		tmp = t_2
	elif z <= 2.3e-39:
		tmp = (x / t) / y
	elif z <= 6.2e+157:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(x / z) / z)
	t_2 = Float64(x / Float64(z * Float64(z - y)))
	tmp = 0.0
	if (z <= -8.6e+155)
		tmp = t_1;
	elseif (z <= -1.75e-94)
		tmp = t_2;
	elseif (z <= 2.3e-39)
		tmp = Float64(Float64(x / t) / y);
	elseif (z <= 6.2e+157)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = (x / z) / z;
	t_2 = x / (z * (z - y));
	tmp = 0.0;
	if (z <= -8.6e+155)
		tmp = t_1;
	elseif (z <= -1.75e-94)
		tmp = t_2;
	elseif (z <= 2.3e-39)
		tmp = (x / t) / y;
	elseif (z <= 6.2e+157)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.6e+155], t$95$1, If[LessEqual[z, -1.75e-94], t$95$2, If[LessEqual[z, 2.3e-39], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 6.2e+157], t$95$2, t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
t_2 := \frac{x}{z \cdot \left(z - y\right)}\\
\mathbf{if}\;z \leq -8.6 \cdot 10^{+155}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.75 \cdot 10^{-94}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 2.3 \cdot 10^{-39}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\

\mathbf{elif}\;z \leq 6.2 \cdot 10^{+157}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.6000000000000005e155 or 6.1999999999999994e157 < z

    1. Initial program 70.9%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left({z}^{2}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(z \cdot \color{blue}{z}\right)\right) \]
      3. *-lowering-*.f6470.9%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right) \]
    5. Simplified70.9%

      \[\leadsto \color{blue}{\frac{x}{z \cdot z}} \]
    6. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{z}\right), \color{blue}{z}\right) \]
      3. /-lowering-/.f6485.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), z\right) \]
    7. Applied egg-rr85.5%

      \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]

    if -8.6000000000000005e155 < z < -1.74999999999999999e-94 or 2.30000000000000008e-39 < z < 6.1999999999999994e157

    1. Initial program 95.0%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z \cdot \left(y - z\right)}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{x}{z \cdot \left(y - z\right)}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{x}{\color{blue}{\mathsf{neg}\left(z \cdot \left(y - z\right)\right)}} \]
      3. mul-1-negN/A

        \[\leadsto \frac{x}{-1 \cdot \color{blue}{\left(z \cdot \left(y - z\right)\right)}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(-1 \cdot \left(z \cdot \left(y - z\right)\right)\right)}\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(\mathsf{neg}\left(z \cdot \left(y - z\right)\right)\right)\right) \]
      6. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(\left(y - z\right)\right)\right)}\right)\right) \]
      7. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(z \cdot \left(-1 \cdot \color{blue}{\left(y - z\right)}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{\left(-1 \cdot \left(y - z\right)\right)}\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right)\right) \]
      10. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(\mathsf{neg}\left(\left(y + \left(\mathsf{neg}\left(z\right)\right)\right)\right)\right)\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(z\right)\right) + y\right)\right)\right)\right)\right) \]
      12. distribute-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) + \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right)\right)\right) \]
      13. unsub-negN/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) - \color{blue}{y}\right)\right)\right) \]
      14. remove-double-negN/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(z - y\right)\right)\right) \]
      15. --lowering--.f6463.9%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(z, \color{blue}{y}\right)\right)\right) \]
    5. Simplified63.9%

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

    if -1.74999999999999999e-94 < z < 2.30000000000000008e-39

    1. Initial program 97.9%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0

      \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(t \cdot y\right)}\right) \]
      2. *-lowering-*.f6472.5%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(t, \color{blue}{y}\right)\right) \]
    5. Simplified72.5%

      \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
    6. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \frac{\frac{x}{t}}{\color{blue}{y}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{t}\right), \color{blue}{y}\right) \]
      3. /-lowering-/.f6474.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, t\right), y\right) \]
    7. Applied egg-rr74.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 3: 75.6% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{\frac{x}{z}}{z}\\ \mathbf{if}\;z \leq -3.2 \cdot 10^{+47}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-23}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+157}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (/ x z) z)))
   (if (<= z -3.2e+47)
     t_1
     (if (<= z 1.6e-23)
       (/ x (* y (- t z)))
       (if (<= z 6.2e+157) (/ x (* z (- z y))) t_1)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double t_1 = (x / z) / z;
	double tmp;
	if (z <= -3.2e+47) {
		tmp = t_1;
	} else if (z <= 1.6e-23) {
		tmp = x / (y * (t - z));
	} else if (z <= 6.2e+157) {
		tmp = x / (z * (z - y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x / z) / z
    if (z <= (-3.2d+47)) then
        tmp = t_1
    else if (z <= 1.6d-23) then
        tmp = x / (y * (t - z))
    else if (z <= 6.2d+157) then
        tmp = x / (z * (z - y))
    else
        tmp = t_1
    end if
    code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = (x / z) / z;
	double tmp;
	if (z <= -3.2e+47) {
		tmp = t_1;
	} else if (z <= 1.6e-23) {
		tmp = x / (y * (t - z));
	} else if (z <= 6.2e+157) {
		tmp = x / (z * (z - y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	t_1 = (x / z) / z
	tmp = 0
	if z <= -3.2e+47:
		tmp = t_1
	elif z <= 1.6e-23:
		tmp = x / (y * (t - z))
	elif z <= 6.2e+157:
		tmp = x / (z * (z - y))
	else:
		tmp = t_1
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(x / z) / z)
	tmp = 0.0
	if (z <= -3.2e+47)
		tmp = t_1;
	elseif (z <= 1.6e-23)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif (z <= 6.2e+157)
		tmp = Float64(x / Float64(z * Float64(z - y)));
	else
		tmp = t_1;
	end
	return tmp
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = (x / z) / z;
	tmp = 0.0;
	if (z <= -3.2e+47)
		tmp = t_1;
	elseif (z <= 1.6e-23)
		tmp = x / (y * (t - z));
	elseif (z <= 6.2e+157)
		tmp = x / (z * (z - y));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -3.2e+47], t$95$1, If[LessEqual[z, 1.6e-23], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+157], N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.6 \cdot 10^{-23}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\

\mathbf{elif}\;z \leq 6.2 \cdot 10^{+157}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.2e47 or 6.1999999999999994e157 < z

    1. Initial program 75.4%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left({z}^{2}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(z \cdot \color{blue}{z}\right)\right) \]
      3. *-lowering-*.f6470.0%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right) \]
    5. Simplified70.0%

      \[\leadsto \color{blue}{\frac{x}{z \cdot z}} \]
    6. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{z}\right), \color{blue}{z}\right) \]
      3. /-lowering-/.f6481.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), z\right) \]
    7. Applied egg-rr81.6%

      \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]

    if -3.2e47 < z < 1.59999999999999988e-23

    1. Initial program 97.0%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(t - z\right)}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(y \cdot \left(t - z\right)\right)}\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(\left(t - z\right) \cdot \color{blue}{y}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\left(t - z\right), \color{blue}{y}\right)\right) \]
      4. --lowering--.f6476.5%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), y\right)\right) \]
    5. Simplified76.5%

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

    if 1.59999999999999988e-23 < z < 6.1999999999999994e157

    1. Initial program 96.1%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z \cdot \left(y - z\right)}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{x}{z \cdot \left(y - z\right)}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{x}{\color{blue}{\mathsf{neg}\left(z \cdot \left(y - z\right)\right)}} \]
      3. mul-1-negN/A

        \[\leadsto \frac{x}{-1 \cdot \color{blue}{\left(z \cdot \left(y - z\right)\right)}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(-1 \cdot \left(z \cdot \left(y - z\right)\right)\right)}\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(\mathsf{neg}\left(z \cdot \left(y - z\right)\right)\right)\right) \]
      6. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(\left(y - z\right)\right)\right)}\right)\right) \]
      7. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(z \cdot \left(-1 \cdot \color{blue}{\left(y - z\right)}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{\left(-1 \cdot \left(y - z\right)\right)}\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right)\right) \]
      10. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(\mathsf{neg}\left(\left(y + \left(\mathsf{neg}\left(z\right)\right)\right)\right)\right)\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(z\right)\right) + y\right)\right)\right)\right)\right) \]
      12. distribute-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) + \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right)\right)\right) \]
      13. unsub-negN/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) - \color{blue}{y}\right)\right)\right) \]
      14. remove-double-negN/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(z - y\right)\right)\right) \]
      15. --lowering--.f6474.7%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(z, \color{blue}{y}\right)\right)\right) \]
    5. Simplified74.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+47}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-23}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+157}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 93.7% accurate, 0.5× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -8.6 \cdot 10^{+155}:\\ \;\;\;\;\frac{\frac{x}{z - t}}{z}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+157}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - y}\\ \end{array} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (<= z -8.6e+155)
   (/ (/ x (- z t)) z)
   (if (<= z 6.2e+157) (/ x (* (- y z) (- t z))) (/ (/ x z) (- z y)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -8.6e+155) {
		tmp = (x / (z - t)) / z;
	} else if (z <= 6.2e+157) {
		tmp = x / ((y - z) * (t - z));
	} else {
		tmp = (x / z) / (z - y);
	}
	return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-8.6d+155)) then
        tmp = (x / (z - t)) / z
    else if (z <= 6.2d+157) then
        tmp = x / ((y - z) * (t - z))
    else
        tmp = (x / z) / (z - y)
    end if
    code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -8.6e+155) {
		tmp = (x / (z - t)) / z;
	} else if (z <= 6.2e+157) {
		tmp = x / ((y - z) * (t - z));
	} else {
		tmp = (x / z) / (z - y);
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if z <= -8.6e+155:
		tmp = (x / (z - t)) / z
	elif z <= 6.2e+157:
		tmp = x / ((y - z) * (t - z))
	else:
		tmp = (x / z) / (z - y)
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -8.6e+155)
		tmp = Float64(Float64(x / Float64(z - t)) / z);
	elseif (z <= 6.2e+157)
		tmp = Float64(x / Float64(Float64(y - z) * Float64(t - z)));
	else
		tmp = Float64(Float64(x / z) / Float64(z - y));
	end
	return tmp
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -8.6e+155)
		tmp = (x / (z - t)) / z;
	elseif (z <= 6.2e+157)
		tmp = x / ((y - z) * (t - z));
	else
		tmp = (x / z) / (z - y);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := If[LessEqual[z, -8.6e+155], N[(N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 6.2e+157], N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.6 \cdot 10^{+155}:\\
\;\;\;\;\frac{\frac{x}{z - t}}{z}\\

\mathbf{elif}\;z \leq 6.2 \cdot 10^{+157}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.6000000000000005e155

    1. Initial program 66.5%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z \cdot \left(t - z\right)}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{-1 \cdot x}{\color{blue}{z \cdot \left(t - z\right)}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-1 \cdot x}{\left(t - z\right) \cdot \color{blue}{z}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{-1 \cdot x}{t - z}}{\color{blue}{z}} \]
      4. associate-*r/N/A

        \[\leadsto \frac{-1 \cdot \frac{x}{t - z}}{z} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x}{t - z}\right), \color{blue}{z}\right) \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\frac{x}{t - z}\right)\right), z\right) \]
      7. distribute-neg-frac2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{\mathsf{neg}\left(\left(t - z\right)\right)}\right), z\right) \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{-1 \cdot \left(t - z\right)}\right), z\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(-1 \cdot \left(t - z\right)\right)\right), z\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(\mathsf{neg}\left(\left(t - z\right)\right)\right)\right), z\right) \]
      11. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(\mathsf{neg}\left(\left(t + \left(\mathsf{neg}\left(z\right)\right)\right)\right)\right)\right), z\right) \]
      12. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(z\right)\right) + t\right)\right)\right)\right), z\right) \]
      13. distribute-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) + \left(\mathsf{neg}\left(t\right)\right)\right)\right), z\right) \]
      14. unsub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) - t\right)\right), z\right) \]
      15. remove-double-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(z - t\right)\right), z\right) \]
      16. --lowering--.f6482.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(z, t\right)\right), z\right) \]
    5. Simplified82.5%

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

    if -8.6000000000000005e155 < z < 6.1999999999999994e157

    1. Initial program 96.5%

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

    if 6.1999999999999994e157 < z

    1. Initial program 74.6%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{t - z}} \]
      2. frac-2negN/A

        \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
      3. div-invN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{x}{y - z}\right)\right) \cdot \color{blue}{\frac{1}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
      4. distribute-neg-frac2N/A

        \[\leadsto \frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)} \cdot \frac{\color{blue}{1}}{\mathsf{neg}\left(\left(t - z\right)\right)} \]
      5. associate-*l/N/A

        \[\leadsto \frac{x \cdot \frac{1}{\mathsf{neg}\left(\left(t - z\right)\right)}}{\color{blue}{\mathsf{neg}\left(\left(y - z\right)\right)}} \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x \cdot \frac{1}{\mathsf{neg}\left(\left(t - z\right)\right)}\right), \color{blue}{\left(\mathsf{neg}\left(\left(y - z\right)\right)\right)}\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \left(\frac{1}{\mathsf{neg}\left(\left(t - z\right)\right)}\right)\right), \left(\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \left(\mathsf{neg}\left(\left(t - z\right)\right)\right)\right)\right), \left(\mathsf{neg}\left(\left(y - \color{blue}{z}\right)\right)\right)\right) \]
      9. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \left(0 - \left(t - z\right)\right)\right)\right), \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right) \]
      10. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \left(0 - \left(t + \left(\mathsf{neg}\left(z\right)\right)\right)\right)\right)\right), \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \left(0 - \left(\left(\mathsf{neg}\left(z\right)\right) + t\right)\right)\right)\right), \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right) \]
      12. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \left(\left(0 - \left(\mathsf{neg}\left(z\right)\right)\right) - t\right)\right)\right), \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right) \]
      13. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) - t\right)\right)\right), \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right) \]
      14. remove-double-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \left(z - t\right)\right)\right), \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right) \]
      15. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, t\right)\right)\right), \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right) \]
      16. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, t\right)\right)\right), \left(0 - \color{blue}{\left(y - z\right)}\right)\right) \]
      17. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, t\right)\right)\right), \left(0 - \left(y + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
      18. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, t\right)\right)\right), \left(0 - \left(\left(\mathsf{neg}\left(z\right)\right) + \color{blue}{y}\right)\right)\right) \]
      19. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, t\right)\right)\right), \left(\left(0 - \left(\mathsf{neg}\left(z\right)\right)\right) - \color{blue}{y}\right)\right) \]
      20. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, t\right)\right)\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) - y\right)\right) \]
      21. remove-double-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, t\right)\right)\right), \left(z - y\right)\right) \]
      22. --lowering--.f6499.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, t\right)\right)\right), \mathsf{\_.f64}\left(z, \color{blue}{y}\right)\right) \]
    4. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{x \cdot \frac{1}{z - t}}{z - y}} \]
    5. Taylor expanded in z around inf

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{x}{z}\right)}, \mathsf{\_.f64}\left(z, y\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f6491.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{\_.f64}\left(\color{blue}{z}, y\right)\right) \]
    7. Simplified91.0%

      \[\leadsto \frac{\color{blue}{\frac{x}{z}}}{z - y} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 5: 82.5% accurate, 0.5× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{-19}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{-145}:\\ \;\;\;\;\frac{\frac{x}{z - t}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t}\\ \end{array} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (<= y -8e-19)
   (/ (/ x y) (- t z))
   (if (<= y 4.6e-145) (/ (/ x (- z t)) z) (/ (/ x (- y z)) t))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -8e-19) {
		tmp = (x / y) / (t - z);
	} else if (y <= 4.6e-145) {
		tmp = (x / (z - t)) / z;
	} else {
		tmp = (x / (y - z)) / t;
	}
	return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= (-8d-19)) then
        tmp = (x / y) / (t - z)
    else if (y <= 4.6d-145) then
        tmp = (x / (z - t)) / z
    else
        tmp = (x / (y - z)) / t
    end if
    code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -8e-19) {
		tmp = (x / y) / (t - z);
	} else if (y <= 4.6e-145) {
		tmp = (x / (z - t)) / z;
	} else {
		tmp = (x / (y - z)) / t;
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if y <= -8e-19:
		tmp = (x / y) / (t - z)
	elif y <= 4.6e-145:
		tmp = (x / (z - t)) / z
	else:
		tmp = (x / (y - z)) / t
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -8e-19)
		tmp = Float64(Float64(x / y) / Float64(t - z));
	elseif (y <= 4.6e-145)
		tmp = Float64(Float64(x / Float64(z - t)) / z);
	else
		tmp = Float64(Float64(x / Float64(y - z)) / t);
	end
	return tmp
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -8e-19)
		tmp = (x / y) / (t - z);
	elseif (y <= 4.6e-145)
		tmp = (x / (z - t)) / z;
	else
		tmp = (x / (y - z)) / t;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := If[LessEqual[y, -8e-19], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e-145], N[(N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{-19}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\

\mathbf{elif}\;y \leq 4.6 \cdot 10^{-145}:\\
\;\;\;\;\frac{\frac{x}{z - t}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.9999999999999998e-19

    1. Initial program 94.1%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{t - z}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{y - z}\right), \color{blue}{\left(t - z\right)}\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(y - z\right)\right), \left(\color{blue}{t} - z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(y, z\right)\right), \left(t - z\right)\right) \]
      5. --lowering--.f6496.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{z}\right)\right) \]
    3. Simplified96.9%

      \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \color{blue}{y}\right), \mathsf{\_.f64}\left(t, z\right)\right) \]
    6. Step-by-step derivation
      1. Simplified89.2%

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

      if -7.9999999999999998e-19 < y < 4.60000000000000014e-145

      1. Initial program 88.9%

        \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in y around 0

        \[\leadsto \color{blue}{-1 \cdot \frac{x}{z \cdot \left(t - z\right)}} \]
      4. Step-by-step derivation
        1. associate-*r/N/A

          \[\leadsto \frac{-1 \cdot x}{\color{blue}{z \cdot \left(t - z\right)}} \]
        2. *-commutativeN/A

          \[\leadsto \frac{-1 \cdot x}{\left(t - z\right) \cdot \color{blue}{z}} \]
        3. associate-/r*N/A

          \[\leadsto \frac{\frac{-1 \cdot x}{t - z}}{\color{blue}{z}} \]
        4. associate-*r/N/A

          \[\leadsto \frac{-1 \cdot \frac{x}{t - z}}{z} \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x}{t - z}\right), \color{blue}{z}\right) \]
        6. mul-1-negN/A

          \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\frac{x}{t - z}\right)\right), z\right) \]
        7. distribute-neg-frac2N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{\mathsf{neg}\left(\left(t - z\right)\right)}\right), z\right) \]
        8. mul-1-negN/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{-1 \cdot \left(t - z\right)}\right), z\right) \]
        9. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(-1 \cdot \left(t - z\right)\right)\right), z\right) \]
        10. mul-1-negN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(\mathsf{neg}\left(\left(t - z\right)\right)\right)\right), z\right) \]
        11. sub-negN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(\mathsf{neg}\left(\left(t + \left(\mathsf{neg}\left(z\right)\right)\right)\right)\right)\right), z\right) \]
        12. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(z\right)\right) + t\right)\right)\right)\right), z\right) \]
        13. distribute-neg-inN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) + \left(\mathsf{neg}\left(t\right)\right)\right)\right), z\right) \]
        14. unsub-negN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) - t\right)\right), z\right) \]
        15. remove-double-negN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(z - t\right)\right), z\right) \]
        16. --lowering--.f6481.5%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(z, t\right)\right), z\right) \]
      5. Simplified81.5%

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

      if 4.60000000000000014e-145 < y

      1. Initial program 91.2%

        \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
      2. Step-by-step derivation
        1. associate-/r*N/A

          \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{t - z}} \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{y - z}\right), \color{blue}{\left(t - z\right)}\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(y - z\right)\right), \left(\color{blue}{t} - z\right)\right) \]
        4. --lowering--.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(y, z\right)\right), \left(t - z\right)\right) \]
        5. --lowering--.f6499.9%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{z}\right)\right) \]
      3. Simplified99.9%

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      4. Add Preprocessing
      5. Taylor expanded in t around inf

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(y, z\right)\right), \color{blue}{t}\right) \]
      6. Step-by-step derivation
        1. Simplified66.5%

          \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{t}} \]
      7. Recombined 3 regimes into one program.
      8. Add Preprocessing

      Alternative 6: 82.0% accurate, 0.5× speedup?

      \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{-158}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-28}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \end{array} \]
      NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
      (FPCore (x y z t)
       :precision binary64
       (if (<= t -2.6e-158)
         (/ (/ x (- t z)) y)
         (if (<= t 1.65e-28) (/ (/ x z) (- z y)) (/ (/ x t) (- y z)))))
      assert(x < y && y < z && z < t);
      double code(double x, double y, double z, double t) {
      	double tmp;
      	if (t <= -2.6e-158) {
      		tmp = (x / (t - z)) / y;
      	} else if (t <= 1.65e-28) {
      		tmp = (x / z) / (z - y);
      	} else {
      		tmp = (x / t) / (y - z);
      	}
      	return tmp;
      }
      
      NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
      real(8) function code(x, y, z, t)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8) :: tmp
          if (t <= (-2.6d-158)) then
              tmp = (x / (t - z)) / y
          else if (t <= 1.65d-28) then
              tmp = (x / z) / (z - y)
          else
              tmp = (x / t) / (y - z)
          end if
          code = tmp
      end function
      
      assert x < y && y < z && z < t;
      public static double code(double x, double y, double z, double t) {
      	double tmp;
      	if (t <= -2.6e-158) {
      		tmp = (x / (t - z)) / y;
      	} else if (t <= 1.65e-28) {
      		tmp = (x / z) / (z - y);
      	} else {
      		tmp = (x / t) / (y - z);
      	}
      	return tmp;
      }
      
      [x, y, z, t] = sort([x, y, z, t])
      def code(x, y, z, t):
      	tmp = 0
      	if t <= -2.6e-158:
      		tmp = (x / (t - z)) / y
      	elif t <= 1.65e-28:
      		tmp = (x / z) / (z - y)
      	else:
      		tmp = (x / t) / (y - z)
      	return tmp
      
      x, y, z, t = sort([x, y, z, t])
      function code(x, y, z, t)
      	tmp = 0.0
      	if (t <= -2.6e-158)
      		tmp = Float64(Float64(x / Float64(t - z)) / y);
      	elseif (t <= 1.65e-28)
      		tmp = Float64(Float64(x / z) / Float64(z - y));
      	else
      		tmp = Float64(Float64(x / t) / Float64(y - z));
      	end
      	return tmp
      end
      
      x, y, z, t = num2cell(sort([x, y, z, t])){:}
      function tmp_2 = code(x, y, z, t)
      	tmp = 0.0;
      	if (t <= -2.6e-158)
      		tmp = (x / (t - z)) / y;
      	elseif (t <= 1.65e-28)
      		tmp = (x / z) / (z - y);
      	else
      		tmp = (x / t) / (y - z);
      	end
      	tmp_2 = tmp;
      end
      
      NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
      code[x_, y_, z_, t_] := If[LessEqual[t, -2.6e-158], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.65e-28], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
      \\
      \begin{array}{l}
      \mathbf{if}\;t \leq -2.6 \cdot 10^{-158}:\\
      \;\;\;\;\frac{\frac{x}{t - z}}{y}\\
      
      \mathbf{elif}\;t \leq 1.65 \cdot 10^{-28}:\\
      \;\;\;\;\frac{\frac{x}{z}}{z - y}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\frac{x}{t}}{y - z}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if t < -2.6e-158

        1. Initial program 90.5%

          \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
        2. Step-by-step derivation
          1. associate-/r*N/A

            \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{t - z}} \]
          2. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{y - z}\right), \color{blue}{\left(t - z\right)}\right) \]
          3. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(y - z\right)\right), \left(\color{blue}{t} - z\right)\right) \]
          4. --lowering--.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(y, z\right)\right), \left(t - z\right)\right) \]
          5. --lowering--.f6496.5%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{z}\right)\right) \]
        3. Simplified96.5%

          \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
        4. Add Preprocessing
        5. Taylor expanded in y around inf

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \color{blue}{y}\right), \mathsf{\_.f64}\left(t, z\right)\right) \]
        6. Step-by-step derivation
          1. Simplified56.8%

            \[\leadsto \frac{\frac{x}{\color{blue}{y}}}{t - z} \]
          2. Step-by-step derivation
            1. associate-/l/N/A

              \[\leadsto \frac{x}{\color{blue}{\left(t - z\right) \cdot y}} \]
            2. associate-/r*N/A

              \[\leadsto \frac{\frac{x}{t - z}}{\color{blue}{y}} \]
            3. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{t - z}\right), \color{blue}{y}\right) \]
            4. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(t - z\right)\right), y\right) \]
            5. --lowering--.f6462.2%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(t, z\right)\right), y\right) \]
          3. Applied egg-rr62.2%

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

          if -2.6e-158 < t < 1.6500000000000001e-28

          1. Initial program 92.4%

            \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. associate-/r*N/A

              \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{t - z}} \]
            2. frac-2negN/A

              \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
            3. div-invN/A

              \[\leadsto \left(\mathsf{neg}\left(\frac{x}{y - z}\right)\right) \cdot \color{blue}{\frac{1}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
            4. distribute-neg-frac2N/A

              \[\leadsto \frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)} \cdot \frac{\color{blue}{1}}{\mathsf{neg}\left(\left(t - z\right)\right)} \]
            5. associate-*l/N/A

              \[\leadsto \frac{x \cdot \frac{1}{\mathsf{neg}\left(\left(t - z\right)\right)}}{\color{blue}{\mathsf{neg}\left(\left(y - z\right)\right)}} \]
            6. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(x \cdot \frac{1}{\mathsf{neg}\left(\left(t - z\right)\right)}\right), \color{blue}{\left(\mathsf{neg}\left(\left(y - z\right)\right)\right)}\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \left(\frac{1}{\mathsf{neg}\left(\left(t - z\right)\right)}\right)\right), \left(\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)\right)\right) \]
            8. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \left(\mathsf{neg}\left(\left(t - z\right)\right)\right)\right)\right), \left(\mathsf{neg}\left(\left(y - \color{blue}{z}\right)\right)\right)\right) \]
            9. neg-sub0N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \left(0 - \left(t - z\right)\right)\right)\right), \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right) \]
            10. sub-negN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \left(0 - \left(t + \left(\mathsf{neg}\left(z\right)\right)\right)\right)\right)\right), \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right) \]
            11. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \left(0 - \left(\left(\mathsf{neg}\left(z\right)\right) + t\right)\right)\right)\right), \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right) \]
            12. associate--r+N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \left(\left(0 - \left(\mathsf{neg}\left(z\right)\right)\right) - t\right)\right)\right), \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right) \]
            13. neg-sub0N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) - t\right)\right)\right), \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right) \]
            14. remove-double-negN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \left(z - t\right)\right)\right), \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right) \]
            15. --lowering--.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, t\right)\right)\right), \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right) \]
            16. neg-sub0N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, t\right)\right)\right), \left(0 - \color{blue}{\left(y - z\right)}\right)\right) \]
            17. sub-negN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, t\right)\right)\right), \left(0 - \left(y + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
            18. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, t\right)\right)\right), \left(0 - \left(\left(\mathsf{neg}\left(z\right)\right) + \color{blue}{y}\right)\right)\right) \]
            19. associate--r+N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, t\right)\right)\right), \left(\left(0 - \left(\mathsf{neg}\left(z\right)\right)\right) - \color{blue}{y}\right)\right) \]
            20. neg-sub0N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, t\right)\right)\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) - y\right)\right) \]
            21. remove-double-negN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, t\right)\right)\right), \left(z - y\right)\right) \]
            22. --lowering--.f6495.1%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, t\right)\right)\right), \mathsf{\_.f64}\left(z, \color{blue}{y}\right)\right) \]
          4. Applied egg-rr95.1%

            \[\leadsto \color{blue}{\frac{x \cdot \frac{1}{z - t}}{z - y}} \]
          5. Taylor expanded in z around inf

            \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{x}{z}\right)}, \mathsf{\_.f64}\left(z, y\right)\right) \]
          6. Step-by-step derivation
            1. /-lowering-/.f6478.7%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{\_.f64}\left(\color{blue}{z}, y\right)\right) \]
          7. Simplified78.7%

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

          if 1.6500000000000001e-28 < t

          1. Initial program 89.6%

            \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in t around inf

            \[\leadsto \color{blue}{\frac{x}{t \cdot \left(y - z\right)}} \]
          4. Step-by-step derivation
            1. associate-/r*N/A

              \[\leadsto \frac{\frac{x}{t}}{\color{blue}{y - z}} \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{t}\right), \color{blue}{\left(y - z\right)}\right) \]
            3. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, t\right), \left(\color{blue}{y} - z\right)\right) \]
            4. --lowering--.f6486.0%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, t\right), \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
          5. Simplified86.0%

            \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y - z}} \]
        7. Recombined 3 regimes into one program.
        8. Add Preprocessing

        Alternative 7: 82.0% accurate, 0.5× speedup?

        \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -2.3 \cdot 10^{-158}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-27}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \end{array} \]
        NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
        (FPCore (x y z t)
         :precision binary64
         (if (<= t -2.3e-158)
           (/ (/ x y) (- t z))
           (if (<= t 4.8e-27) (/ (/ x z) (- z y)) (/ (/ x t) (- y z)))))
        assert(x < y && y < z && z < t);
        double code(double x, double y, double z, double t) {
        	double tmp;
        	if (t <= -2.3e-158) {
        		tmp = (x / y) / (t - z);
        	} else if (t <= 4.8e-27) {
        		tmp = (x / z) / (z - y);
        	} else {
        		tmp = (x / t) / (y - z);
        	}
        	return tmp;
        }
        
        NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
        real(8) function code(x, y, z, t)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8), intent (in) :: t
            real(8) :: tmp
            if (t <= (-2.3d-158)) then
                tmp = (x / y) / (t - z)
            else if (t <= 4.8d-27) then
                tmp = (x / z) / (z - y)
            else
                tmp = (x / t) / (y - z)
            end if
            code = tmp
        end function
        
        assert x < y && y < z && z < t;
        public static double code(double x, double y, double z, double t) {
        	double tmp;
        	if (t <= -2.3e-158) {
        		tmp = (x / y) / (t - z);
        	} else if (t <= 4.8e-27) {
        		tmp = (x / z) / (z - y);
        	} else {
        		tmp = (x / t) / (y - z);
        	}
        	return tmp;
        }
        
        [x, y, z, t] = sort([x, y, z, t])
        def code(x, y, z, t):
        	tmp = 0
        	if t <= -2.3e-158:
        		tmp = (x / y) / (t - z)
        	elif t <= 4.8e-27:
        		tmp = (x / z) / (z - y)
        	else:
        		tmp = (x / t) / (y - z)
        	return tmp
        
        x, y, z, t = sort([x, y, z, t])
        function code(x, y, z, t)
        	tmp = 0.0
        	if (t <= -2.3e-158)
        		tmp = Float64(Float64(x / y) / Float64(t - z));
        	elseif (t <= 4.8e-27)
        		tmp = Float64(Float64(x / z) / Float64(z - y));
        	else
        		tmp = Float64(Float64(x / t) / Float64(y - z));
        	end
        	return tmp
        end
        
        x, y, z, t = num2cell(sort([x, y, z, t])){:}
        function tmp_2 = code(x, y, z, t)
        	tmp = 0.0;
        	if (t <= -2.3e-158)
        		tmp = (x / y) / (t - z);
        	elseif (t <= 4.8e-27)
        		tmp = (x / z) / (z - y);
        	else
        		tmp = (x / t) / (y - z);
        	end
        	tmp_2 = tmp;
        end
        
        NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
        code[x_, y_, z_, t_] := If[LessEqual[t, -2.3e-158], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.8e-27], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
        \\
        \begin{array}{l}
        \mathbf{if}\;t \leq -2.3 \cdot 10^{-158}:\\
        \;\;\;\;\frac{\frac{x}{y}}{t - z}\\
        
        \mathbf{elif}\;t \leq 4.8 \cdot 10^{-27}:\\
        \;\;\;\;\frac{\frac{x}{z}}{z - y}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\frac{x}{t}}{y - z}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if t < -2.2999999999999999e-158

          1. Initial program 90.5%

            \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
          2. Step-by-step derivation
            1. associate-/r*N/A

              \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{t - z}} \]
            2. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{y - z}\right), \color{blue}{\left(t - z\right)}\right) \]
            3. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(y - z\right)\right), \left(\color{blue}{t} - z\right)\right) \]
            4. --lowering--.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(y, z\right)\right), \left(t - z\right)\right) \]
            5. --lowering--.f6496.5%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{z}\right)\right) \]
          3. Simplified96.5%

            \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
          4. Add Preprocessing
          5. Taylor expanded in y around inf

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \color{blue}{y}\right), \mathsf{\_.f64}\left(t, z\right)\right) \]
          6. Step-by-step derivation
            1. Simplified56.8%

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

            if -2.2999999999999999e-158 < t < 4.80000000000000004e-27

            1. Initial program 92.5%

              \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. associate-/r*N/A

                \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{t - z}} \]
              2. frac-2negN/A

                \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
              3. div-invN/A

                \[\leadsto \left(\mathsf{neg}\left(\frac{x}{y - z}\right)\right) \cdot \color{blue}{\frac{1}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
              4. distribute-neg-frac2N/A

                \[\leadsto \frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)} \cdot \frac{\color{blue}{1}}{\mathsf{neg}\left(\left(t - z\right)\right)} \]
              5. associate-*l/N/A

                \[\leadsto \frac{x \cdot \frac{1}{\mathsf{neg}\left(\left(t - z\right)\right)}}{\color{blue}{\mathsf{neg}\left(\left(y - z\right)\right)}} \]
              6. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\left(x \cdot \frac{1}{\mathsf{neg}\left(\left(t - z\right)\right)}\right), \color{blue}{\left(\mathsf{neg}\left(\left(y - z\right)\right)\right)}\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \left(\frac{1}{\mathsf{neg}\left(\left(t - z\right)\right)}\right)\right), \left(\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)\right)\right) \]
              8. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \left(\mathsf{neg}\left(\left(t - z\right)\right)\right)\right)\right), \left(\mathsf{neg}\left(\left(y - \color{blue}{z}\right)\right)\right)\right) \]
              9. neg-sub0N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \left(0 - \left(t - z\right)\right)\right)\right), \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right) \]
              10. sub-negN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \left(0 - \left(t + \left(\mathsf{neg}\left(z\right)\right)\right)\right)\right)\right), \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right) \]
              11. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \left(0 - \left(\left(\mathsf{neg}\left(z\right)\right) + t\right)\right)\right)\right), \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right) \]
              12. associate--r+N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \left(\left(0 - \left(\mathsf{neg}\left(z\right)\right)\right) - t\right)\right)\right), \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right) \]
              13. neg-sub0N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) - t\right)\right)\right), \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right) \]
              14. remove-double-negN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \left(z - t\right)\right)\right), \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right) \]
              15. --lowering--.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, t\right)\right)\right), \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right) \]
              16. neg-sub0N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, t\right)\right)\right), \left(0 - \color{blue}{\left(y - z\right)}\right)\right) \]
              17. sub-negN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, t\right)\right)\right), \left(0 - \left(y + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right) \]
              18. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, t\right)\right)\right), \left(0 - \left(\left(\mathsf{neg}\left(z\right)\right) + \color{blue}{y}\right)\right)\right) \]
              19. associate--r+N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, t\right)\right)\right), \left(\left(0 - \left(\mathsf{neg}\left(z\right)\right)\right) - \color{blue}{y}\right)\right) \]
              20. neg-sub0N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, t\right)\right)\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) - y\right)\right) \]
              21. remove-double-negN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, t\right)\right)\right), \left(z - y\right)\right) \]
              22. --lowering--.f6495.2%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, t\right)\right)\right), \mathsf{\_.f64}\left(z, \color{blue}{y}\right)\right) \]
            4. Applied egg-rr95.2%

              \[\leadsto \color{blue}{\frac{x \cdot \frac{1}{z - t}}{z - y}} \]
            5. Taylor expanded in z around inf

              \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{x}{z}\right)}, \mathsf{\_.f64}\left(z, y\right)\right) \]
            6. Step-by-step derivation
              1. /-lowering-/.f6478.0%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{\_.f64}\left(\color{blue}{z}, y\right)\right) \]
            7. Simplified78.0%

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

            if 4.80000000000000004e-27 < t

            1. Initial program 89.5%

              \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
            2. Add Preprocessing
            3. Taylor expanded in t around inf

              \[\leadsto \color{blue}{\frac{x}{t \cdot \left(y - z\right)}} \]
            4. Step-by-step derivation
              1. associate-/r*N/A

                \[\leadsto \frac{\frac{x}{t}}{\color{blue}{y - z}} \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{t}\right), \color{blue}{\left(y - z\right)}\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, t\right), \left(\color{blue}{y} - z\right)\right) \]
              4. --lowering--.f6485.8%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, t\right), \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
            5. Simplified85.8%

              \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y - z}} \]
          7. Recombined 3 regimes into one program.
          8. Add Preprocessing

          Alternative 8: 79.8% accurate, 0.5× speedup?

          \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{-158}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-28}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \end{array} \]
          NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
          (FPCore (x y z t)
           :precision binary64
           (if (<= t -2.5e-158)
             (/ (/ x y) (- t z))
             (if (<= t 2.6e-28) (/ x (* z (- z y))) (/ (/ x t) (- y z)))))
          assert(x < y && y < z && z < t);
          double code(double x, double y, double z, double t) {
          	double tmp;
          	if (t <= -2.5e-158) {
          		tmp = (x / y) / (t - z);
          	} else if (t <= 2.6e-28) {
          		tmp = x / (z * (z - y));
          	} else {
          		tmp = (x / t) / (y - z);
          	}
          	return tmp;
          }
          
          NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
          real(8) function code(x, y, z, t)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8) :: tmp
              if (t <= (-2.5d-158)) then
                  tmp = (x / y) / (t - z)
              else if (t <= 2.6d-28) then
                  tmp = x / (z * (z - y))
              else
                  tmp = (x / t) / (y - z)
              end if
              code = tmp
          end function
          
          assert x < y && y < z && z < t;
          public static double code(double x, double y, double z, double t) {
          	double tmp;
          	if (t <= -2.5e-158) {
          		tmp = (x / y) / (t - z);
          	} else if (t <= 2.6e-28) {
          		tmp = x / (z * (z - y));
          	} else {
          		tmp = (x / t) / (y - z);
          	}
          	return tmp;
          }
          
          [x, y, z, t] = sort([x, y, z, t])
          def code(x, y, z, t):
          	tmp = 0
          	if t <= -2.5e-158:
          		tmp = (x / y) / (t - z)
          	elif t <= 2.6e-28:
          		tmp = x / (z * (z - y))
          	else:
          		tmp = (x / t) / (y - z)
          	return tmp
          
          x, y, z, t = sort([x, y, z, t])
          function code(x, y, z, t)
          	tmp = 0.0
          	if (t <= -2.5e-158)
          		tmp = Float64(Float64(x / y) / Float64(t - z));
          	elseif (t <= 2.6e-28)
          		tmp = Float64(x / Float64(z * Float64(z - y)));
          	else
          		tmp = Float64(Float64(x / t) / Float64(y - z));
          	end
          	return tmp
          end
          
          x, y, z, t = num2cell(sort([x, y, z, t])){:}
          function tmp_2 = code(x, y, z, t)
          	tmp = 0.0;
          	if (t <= -2.5e-158)
          		tmp = (x / y) / (t - z);
          	elseif (t <= 2.6e-28)
          		tmp = x / (z * (z - y));
          	else
          		tmp = (x / t) / (y - z);
          	end
          	tmp_2 = tmp;
          end
          
          NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
          code[x_, y_, z_, t_] := If[LessEqual[t, -2.5e-158], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e-28], N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
          
          \begin{array}{l}
          [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
          \\
          \begin{array}{l}
          \mathbf{if}\;t \leq -2.5 \cdot 10^{-158}:\\
          \;\;\;\;\frac{\frac{x}{y}}{t - z}\\
          
          \mathbf{elif}\;t \leq 2.6 \cdot 10^{-28}:\\
          \;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{\frac{x}{t}}{y - z}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if t < -2.49999999999999986e-158

            1. Initial program 90.5%

              \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
            2. Step-by-step derivation
              1. associate-/r*N/A

                \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{t - z}} \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{y - z}\right), \color{blue}{\left(t - z\right)}\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(y - z\right)\right), \left(\color{blue}{t} - z\right)\right) \]
              4. --lowering--.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(y, z\right)\right), \left(t - z\right)\right) \]
              5. --lowering--.f6496.5%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{z}\right)\right) \]
            3. Simplified96.5%

              \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
            4. Add Preprocessing
            5. Taylor expanded in y around inf

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \color{blue}{y}\right), \mathsf{\_.f64}\left(t, z\right)\right) \]
            6. Step-by-step derivation
              1. Simplified56.8%

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

              if -2.49999999999999986e-158 < t < 2.6e-28

              1. Initial program 92.4%

                \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in t around 0

                \[\leadsto \color{blue}{-1 \cdot \frac{x}{z \cdot \left(y - z\right)}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto \mathsf{neg}\left(\frac{x}{z \cdot \left(y - z\right)}\right) \]
                2. distribute-neg-frac2N/A

                  \[\leadsto \frac{x}{\color{blue}{\mathsf{neg}\left(z \cdot \left(y - z\right)\right)}} \]
                3. mul-1-negN/A

                  \[\leadsto \frac{x}{-1 \cdot \color{blue}{\left(z \cdot \left(y - z\right)\right)}} \]
                4. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(-1 \cdot \left(z \cdot \left(y - z\right)\right)\right)}\right) \]
                5. mul-1-negN/A

                  \[\leadsto \mathsf{/.f64}\left(x, \left(\mathsf{neg}\left(z \cdot \left(y - z\right)\right)\right)\right) \]
                6. distribute-rgt-neg-inN/A

                  \[\leadsto \mathsf{/.f64}\left(x, \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(\left(y - z\right)\right)\right)}\right)\right) \]
                7. mul-1-negN/A

                  \[\leadsto \mathsf{/.f64}\left(x, \left(z \cdot \left(-1 \cdot \color{blue}{\left(y - z\right)}\right)\right)\right) \]
                8. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{\left(-1 \cdot \left(y - z\right)\right)}\right)\right) \]
                9. mul-1-negN/A

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right)\right) \]
                10. sub-negN/A

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(\mathsf{neg}\left(\left(y + \left(\mathsf{neg}\left(z\right)\right)\right)\right)\right)\right)\right) \]
                11. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(z\right)\right) + y\right)\right)\right)\right)\right) \]
                12. distribute-neg-inN/A

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) + \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right)\right)\right) \]
                13. unsub-negN/A

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) - \color{blue}{y}\right)\right)\right) \]
                14. remove-double-negN/A

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(z - y\right)\right)\right) \]
                15. --lowering--.f6474.5%

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(z, \color{blue}{y}\right)\right)\right) \]
              5. Simplified74.5%

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

              if 2.6e-28 < t

              1. Initial program 89.6%

                \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in t around inf

                \[\leadsto \color{blue}{\frac{x}{t \cdot \left(y - z\right)}} \]
              4. Step-by-step derivation
                1. associate-/r*N/A

                  \[\leadsto \frac{\frac{x}{t}}{\color{blue}{y - z}} \]
                2. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{t}\right), \color{blue}{\left(y - z\right)}\right) \]
                3. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, t\right), \left(\color{blue}{y} - z\right)\right) \]
                4. --lowering--.f6486.0%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, t\right), \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
              5. Simplified86.0%

                \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y - z}} \]
            7. Recombined 3 regimes into one program.
            8. Add Preprocessing

            Alternative 9: 79.0% accurate, 0.5× speedup?

            \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -2.2 \cdot 10^{-158}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-29}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \end{array} \]
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            (FPCore (x y z t)
             :precision binary64
             (if (<= t -2.2e-158)
               (/ x (* y (- t z)))
               (if (<= t 7.5e-29) (/ x (* z (- z y))) (/ (/ x t) (- y z)))))
            assert(x < y && y < z && z < t);
            double code(double x, double y, double z, double t) {
            	double tmp;
            	if (t <= -2.2e-158) {
            		tmp = x / (y * (t - z));
            	} else if (t <= 7.5e-29) {
            		tmp = x / (z * (z - y));
            	} else {
            		tmp = (x / t) / (y - z);
            	}
            	return tmp;
            }
            
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            real(8) function code(x, y, z, t)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8) :: tmp
                if (t <= (-2.2d-158)) then
                    tmp = x / (y * (t - z))
                else if (t <= 7.5d-29) then
                    tmp = x / (z * (z - y))
                else
                    tmp = (x / t) / (y - z)
                end if
                code = tmp
            end function
            
            assert x < y && y < z && z < t;
            public static double code(double x, double y, double z, double t) {
            	double tmp;
            	if (t <= -2.2e-158) {
            		tmp = x / (y * (t - z));
            	} else if (t <= 7.5e-29) {
            		tmp = x / (z * (z - y));
            	} else {
            		tmp = (x / t) / (y - z);
            	}
            	return tmp;
            }
            
            [x, y, z, t] = sort([x, y, z, t])
            def code(x, y, z, t):
            	tmp = 0
            	if t <= -2.2e-158:
            		tmp = x / (y * (t - z))
            	elif t <= 7.5e-29:
            		tmp = x / (z * (z - y))
            	else:
            		tmp = (x / t) / (y - z)
            	return tmp
            
            x, y, z, t = sort([x, y, z, t])
            function code(x, y, z, t)
            	tmp = 0.0
            	if (t <= -2.2e-158)
            		tmp = Float64(x / Float64(y * Float64(t - z)));
            	elseif (t <= 7.5e-29)
            		tmp = Float64(x / Float64(z * Float64(z - y)));
            	else
            		tmp = Float64(Float64(x / t) / Float64(y - z));
            	end
            	return tmp
            end
            
            x, y, z, t = num2cell(sort([x, y, z, t])){:}
            function tmp_2 = code(x, y, z, t)
            	tmp = 0.0;
            	if (t <= -2.2e-158)
            		tmp = x / (y * (t - z));
            	elseif (t <= 7.5e-29)
            		tmp = x / (z * (z - y));
            	else
            		tmp = (x / t) / (y - z);
            	end
            	tmp_2 = tmp;
            end
            
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            code[x_, y_, z_, t_] := If[LessEqual[t, -2.2e-158], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e-29], N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
            
            \begin{array}{l}
            [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
            \\
            \begin{array}{l}
            \mathbf{if}\;t \leq -2.2 \cdot 10^{-158}:\\
            \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
            
            \mathbf{elif}\;t \leq 7.5 \cdot 10^{-29}:\\
            \;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{\frac{x}{t}}{y - z}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if t < -2.2000000000000001e-158

              1. Initial program 90.5%

                \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in y around inf

                \[\leadsto \color{blue}{\frac{x}{y \cdot \left(t - z\right)}} \]
              4. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(y \cdot \left(t - z\right)\right)}\right) \]
                2. *-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(x, \left(\left(t - z\right) \cdot \color{blue}{y}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\left(t - z\right), \color{blue}{y}\right)\right) \]
                4. --lowering--.f6453.7%

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), y\right)\right) \]
              5. Simplified53.7%

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

              if -2.2000000000000001e-158 < t < 7.50000000000000006e-29

              1. Initial program 92.4%

                \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in t around 0

                \[\leadsto \color{blue}{-1 \cdot \frac{x}{z \cdot \left(y - z\right)}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto \mathsf{neg}\left(\frac{x}{z \cdot \left(y - z\right)}\right) \]
                2. distribute-neg-frac2N/A

                  \[\leadsto \frac{x}{\color{blue}{\mathsf{neg}\left(z \cdot \left(y - z\right)\right)}} \]
                3. mul-1-negN/A

                  \[\leadsto \frac{x}{-1 \cdot \color{blue}{\left(z \cdot \left(y - z\right)\right)}} \]
                4. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(-1 \cdot \left(z \cdot \left(y - z\right)\right)\right)}\right) \]
                5. mul-1-negN/A

                  \[\leadsto \mathsf{/.f64}\left(x, \left(\mathsf{neg}\left(z \cdot \left(y - z\right)\right)\right)\right) \]
                6. distribute-rgt-neg-inN/A

                  \[\leadsto \mathsf{/.f64}\left(x, \left(z \cdot \color{blue}{\left(\mathsf{neg}\left(\left(y - z\right)\right)\right)}\right)\right) \]
                7. mul-1-negN/A

                  \[\leadsto \mathsf{/.f64}\left(x, \left(z \cdot \left(-1 \cdot \color{blue}{\left(y - z\right)}\right)\right)\right) \]
                8. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{\left(-1 \cdot \left(y - z\right)\right)}\right)\right) \]
                9. mul-1-negN/A

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right)\right) \]
                10. sub-negN/A

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(\mathsf{neg}\left(\left(y + \left(\mathsf{neg}\left(z\right)\right)\right)\right)\right)\right)\right) \]
                11. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(z\right)\right) + y\right)\right)\right)\right)\right) \]
                12. distribute-neg-inN/A

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) + \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right)\right)\right) \]
                13. unsub-negN/A

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) - \color{blue}{y}\right)\right)\right) \]
                14. remove-double-negN/A

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(z - y\right)\right)\right) \]
                15. --lowering--.f6474.5%

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(z, \color{blue}{y}\right)\right)\right) \]
              5. Simplified74.5%

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

              if 7.50000000000000006e-29 < t

              1. Initial program 89.6%

                \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in t around inf

                \[\leadsto \color{blue}{\frac{x}{t \cdot \left(y - z\right)}} \]
              4. Step-by-step derivation
                1. associate-/r*N/A

                  \[\leadsto \frac{\frac{x}{t}}{\color{blue}{y - z}} \]
                2. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{t}\right), \color{blue}{\left(y - z\right)}\right) \]
                3. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, t\right), \left(\color{blue}{y} - z\right)\right) \]
                4. --lowering--.f6486.0%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, t\right), \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
              5. Simplified86.0%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.2 \cdot 10^{-158}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-29}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]
            5. Add Preprocessing

            Alternative 10: 66.9% accurate, 0.6× speedup?

            \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{\frac{x}{z}}{z}\\ \mathbf{if}\;z \leq -1.25 \cdot 10^{+45}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-23}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            (FPCore (x y z t)
             :precision binary64
             (let* ((t_1 (/ (/ x z) z)))
               (if (<= z -1.25e+45) t_1 (if (<= z 1.8e-23) (/ (/ x y) t) t_1))))
            assert(x < y && y < z && z < t);
            double code(double x, double y, double z, double t) {
            	double t_1 = (x / z) / z;
            	double tmp;
            	if (z <= -1.25e+45) {
            		tmp = t_1;
            	} else if (z <= 1.8e-23) {
            		tmp = (x / y) / t;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            real(8) function code(x, y, z, t)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8) :: t_1
                real(8) :: tmp
                t_1 = (x / z) / z
                if (z <= (-1.25d+45)) then
                    tmp = t_1
                else if (z <= 1.8d-23) then
                    tmp = (x / y) / t
                else
                    tmp = t_1
                end if
                code = tmp
            end function
            
            assert x < y && y < z && z < t;
            public static double code(double x, double y, double z, double t) {
            	double t_1 = (x / z) / z;
            	double tmp;
            	if (z <= -1.25e+45) {
            		tmp = t_1;
            	} else if (z <= 1.8e-23) {
            		tmp = (x / y) / t;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            [x, y, z, t] = sort([x, y, z, t])
            def code(x, y, z, t):
            	t_1 = (x / z) / z
            	tmp = 0
            	if z <= -1.25e+45:
            		tmp = t_1
            	elif z <= 1.8e-23:
            		tmp = (x / y) / t
            	else:
            		tmp = t_1
            	return tmp
            
            x, y, z, t = sort([x, y, z, t])
            function code(x, y, z, t)
            	t_1 = Float64(Float64(x / z) / z)
            	tmp = 0.0
            	if (z <= -1.25e+45)
            		tmp = t_1;
            	elseif (z <= 1.8e-23)
            		tmp = Float64(Float64(x / y) / t);
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            x, y, z, t = num2cell(sort([x, y, z, t])){:}
            function tmp_2 = code(x, y, z, t)
            	t_1 = (x / z) / z;
            	tmp = 0.0;
            	if (z <= -1.25e+45)
            		tmp = t_1;
            	elseif (z <= 1.8e-23)
            		tmp = (x / y) / t;
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -1.25e+45], t$95$1, If[LessEqual[z, 1.8e-23], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], t$95$1]]]
            
            \begin{array}{l}
            [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
            \\
            \begin{array}{l}
            t_1 := \frac{\frac{x}{z}}{z}\\
            \mathbf{if}\;z \leq -1.25 \cdot 10^{+45}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;z \leq 1.8 \cdot 10^{-23}:\\
            \;\;\;\;\frac{\frac{x}{y}}{t}\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -1.25e45 or 1.7999999999999999e-23 < z

              1. Initial program 84.2%

                \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
              4. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left({z}^{2}\right)}\right) \]
                2. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(x, \left(z \cdot \color{blue}{z}\right)\right) \]
                3. *-lowering-*.f6466.4%

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right) \]
              5. Simplified66.4%

                \[\leadsto \color{blue}{\frac{x}{z \cdot z}} \]
              6. Step-by-step derivation
                1. associate-/r*N/A

                  \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z}} \]
                2. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{z}\right), \color{blue}{z}\right) \]
                3. /-lowering-/.f6473.0%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), z\right) \]
              7. Applied egg-rr73.0%

                \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]

              if -1.25e45 < z < 1.7999999999999999e-23

              1. Initial program 97.0%

                \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in z around 0

                \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
              4. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(t \cdot y\right)}\right) \]
                2. *-lowering-*.f6462.3%

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(t, \color{blue}{y}\right)\right) \]
              5. Simplified62.3%

                \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
              6. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \frac{x}{y \cdot \color{blue}{t}} \]
                2. associate-/r*N/A

                  \[\leadsto \frac{\frac{x}{y}}{\color{blue}{t}} \]
                3. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{y}\right), \color{blue}{t}\right) \]
                4. /-lowering-/.f6463.6%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, y\right), t\right) \]
              7. Applied egg-rr63.6%

                \[\leadsto \color{blue}{\frac{\frac{x}{y}}{t}} \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 11: 63.0% accurate, 0.6× speedup?

            \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{x}{z \cdot z}\\ \mathbf{if}\;z \leq -4.6 \cdot 10^{+45}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-24}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            (FPCore (x y z t)
             :precision binary64
             (let* ((t_1 (/ x (* z z))))
               (if (<= z -4.6e+45) t_1 (if (<= z 1.3e-24) (/ (/ x y) t) t_1))))
            assert(x < y && y < z && z < t);
            double code(double x, double y, double z, double t) {
            	double t_1 = x / (z * z);
            	double tmp;
            	if (z <= -4.6e+45) {
            		tmp = t_1;
            	} else if (z <= 1.3e-24) {
            		tmp = (x / y) / t;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            real(8) function code(x, y, z, t)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8) :: t_1
                real(8) :: tmp
                t_1 = x / (z * z)
                if (z <= (-4.6d+45)) then
                    tmp = t_1
                else if (z <= 1.3d-24) then
                    tmp = (x / y) / t
                else
                    tmp = t_1
                end if
                code = tmp
            end function
            
            assert x < y && y < z && z < t;
            public static double code(double x, double y, double z, double t) {
            	double t_1 = x / (z * z);
            	double tmp;
            	if (z <= -4.6e+45) {
            		tmp = t_1;
            	} else if (z <= 1.3e-24) {
            		tmp = (x / y) / t;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            [x, y, z, t] = sort([x, y, z, t])
            def code(x, y, z, t):
            	t_1 = x / (z * z)
            	tmp = 0
            	if z <= -4.6e+45:
            		tmp = t_1
            	elif z <= 1.3e-24:
            		tmp = (x / y) / t
            	else:
            		tmp = t_1
            	return tmp
            
            x, y, z, t = sort([x, y, z, t])
            function code(x, y, z, t)
            	t_1 = Float64(x / Float64(z * z))
            	tmp = 0.0
            	if (z <= -4.6e+45)
            		tmp = t_1;
            	elseif (z <= 1.3e-24)
            		tmp = Float64(Float64(x / y) / t);
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            x, y, z, t = num2cell(sort([x, y, z, t])){:}
            function tmp_2 = code(x, y, z, t)
            	t_1 = x / (z * z);
            	tmp = 0.0;
            	if (z <= -4.6e+45)
            		tmp = t_1;
            	elseif (z <= 1.3e-24)
            		tmp = (x / y) / t;
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.6e+45], t$95$1, If[LessEqual[z, 1.3e-24], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], t$95$1]]]
            
            \begin{array}{l}
            [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
            \\
            \begin{array}{l}
            t_1 := \frac{x}{z \cdot z}\\
            \mathbf{if}\;z \leq -4.6 \cdot 10^{+45}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;z \leq 1.3 \cdot 10^{-24}:\\
            \;\;\;\;\frac{\frac{x}{y}}{t}\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -4.60000000000000025e45 or 1.3e-24 < z

              1. Initial program 84.2%

                \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
              4. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left({z}^{2}\right)}\right) \]
                2. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(x, \left(z \cdot \color{blue}{z}\right)\right) \]
                3. *-lowering-*.f6466.4%

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right) \]
              5. Simplified66.4%

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

              if -4.60000000000000025e45 < z < 1.3e-24

              1. Initial program 97.0%

                \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in z around 0

                \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
              4. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(t \cdot y\right)}\right) \]
                2. *-lowering-*.f6462.3%

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(t, \color{blue}{y}\right)\right) \]
              5. Simplified62.3%

                \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
              6. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \frac{x}{y \cdot \color{blue}{t}} \]
                2. associate-/r*N/A

                  \[\leadsto \frac{\frac{x}{y}}{\color{blue}{t}} \]
                3. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{y}\right), \color{blue}{t}\right) \]
                4. /-lowering-/.f6463.6%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, y\right), t\right) \]
              7. Applied egg-rr63.6%

                \[\leadsto \color{blue}{\frac{\frac{x}{y}}{t}} \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 12: 63.3% accurate, 0.6× speedup?

            \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{x}{z \cdot z}\\ \mathbf{if}\;z \leq -8.8 \cdot 10^{+45}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-25}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            (FPCore (x y z t)
             :precision binary64
             (let* ((t_1 (/ x (* z z))))
               (if (<= z -8.8e+45) t_1 (if (<= z 5.5e-25) (/ (/ x t) y) t_1))))
            assert(x < y && y < z && z < t);
            double code(double x, double y, double z, double t) {
            	double t_1 = x / (z * z);
            	double tmp;
            	if (z <= -8.8e+45) {
            		tmp = t_1;
            	} else if (z <= 5.5e-25) {
            		tmp = (x / t) / y;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            real(8) function code(x, y, z, t)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8) :: t_1
                real(8) :: tmp
                t_1 = x / (z * z)
                if (z <= (-8.8d+45)) then
                    tmp = t_1
                else if (z <= 5.5d-25) then
                    tmp = (x / t) / y
                else
                    tmp = t_1
                end if
                code = tmp
            end function
            
            assert x < y && y < z && z < t;
            public static double code(double x, double y, double z, double t) {
            	double t_1 = x / (z * z);
            	double tmp;
            	if (z <= -8.8e+45) {
            		tmp = t_1;
            	} else if (z <= 5.5e-25) {
            		tmp = (x / t) / y;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            [x, y, z, t] = sort([x, y, z, t])
            def code(x, y, z, t):
            	t_1 = x / (z * z)
            	tmp = 0
            	if z <= -8.8e+45:
            		tmp = t_1
            	elif z <= 5.5e-25:
            		tmp = (x / t) / y
            	else:
            		tmp = t_1
            	return tmp
            
            x, y, z, t = sort([x, y, z, t])
            function code(x, y, z, t)
            	t_1 = Float64(x / Float64(z * z))
            	tmp = 0.0
            	if (z <= -8.8e+45)
            		tmp = t_1;
            	elseif (z <= 5.5e-25)
            		tmp = Float64(Float64(x / t) / y);
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            x, y, z, t = num2cell(sort([x, y, z, t])){:}
            function tmp_2 = code(x, y, z, t)
            	t_1 = x / (z * z);
            	tmp = 0.0;
            	if (z <= -8.8e+45)
            		tmp = t_1;
            	elseif (z <= 5.5e-25)
            		tmp = (x / t) / y;
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.8e+45], t$95$1, If[LessEqual[z, 5.5e-25], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
            
            \begin{array}{l}
            [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
            \\
            \begin{array}{l}
            t_1 := \frac{x}{z \cdot z}\\
            \mathbf{if}\;z \leq -8.8 \cdot 10^{+45}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;z \leq 5.5 \cdot 10^{-25}:\\
            \;\;\;\;\frac{\frac{x}{t}}{y}\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -8.8000000000000001e45 or 5.50000000000000004e-25 < z

              1. Initial program 84.2%

                \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
              4. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left({z}^{2}\right)}\right) \]
                2. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(x, \left(z \cdot \color{blue}{z}\right)\right) \]
                3. *-lowering-*.f6466.4%

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right) \]
              5. Simplified66.4%

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

              if -8.8000000000000001e45 < z < 5.50000000000000004e-25

              1. Initial program 97.0%

                \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in z around 0

                \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
              4. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(t \cdot y\right)}\right) \]
                2. *-lowering-*.f6462.3%

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(t, \color{blue}{y}\right)\right) \]
              5. Simplified62.3%

                \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
              6. Step-by-step derivation
                1. associate-/r*N/A

                  \[\leadsto \frac{\frac{x}{t}}{\color{blue}{y}} \]
                2. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{t}\right), \color{blue}{y}\right) \]
                3. /-lowering-/.f6465.7%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, t\right), y\right) \]
              7. Applied egg-rr65.7%

                \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 13: 61.6% accurate, 0.6× speedup?

            \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{x}{z \cdot z}\\ \mathbf{if}\;z \leq -1.25 \cdot 10^{+45}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-23}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            (FPCore (x y z t)
             :precision binary64
             (let* ((t_1 (/ x (* z z))))
               (if (<= z -1.25e+45) t_1 (if (<= z 1.7e-23) (/ x (* y t)) t_1))))
            assert(x < y && y < z && z < t);
            double code(double x, double y, double z, double t) {
            	double t_1 = x / (z * z);
            	double tmp;
            	if (z <= -1.25e+45) {
            		tmp = t_1;
            	} else if (z <= 1.7e-23) {
            		tmp = x / (y * t);
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            real(8) function code(x, y, z, t)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8) :: t_1
                real(8) :: tmp
                t_1 = x / (z * z)
                if (z <= (-1.25d+45)) then
                    tmp = t_1
                else if (z <= 1.7d-23) then
                    tmp = x / (y * t)
                else
                    tmp = t_1
                end if
                code = tmp
            end function
            
            assert x < y && y < z && z < t;
            public static double code(double x, double y, double z, double t) {
            	double t_1 = x / (z * z);
            	double tmp;
            	if (z <= -1.25e+45) {
            		tmp = t_1;
            	} else if (z <= 1.7e-23) {
            		tmp = x / (y * t);
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            [x, y, z, t] = sort([x, y, z, t])
            def code(x, y, z, t):
            	t_1 = x / (z * z)
            	tmp = 0
            	if z <= -1.25e+45:
            		tmp = t_1
            	elif z <= 1.7e-23:
            		tmp = x / (y * t)
            	else:
            		tmp = t_1
            	return tmp
            
            x, y, z, t = sort([x, y, z, t])
            function code(x, y, z, t)
            	t_1 = Float64(x / Float64(z * z))
            	tmp = 0.0
            	if (z <= -1.25e+45)
            		tmp = t_1;
            	elseif (z <= 1.7e-23)
            		tmp = Float64(x / Float64(y * t));
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            x, y, z, t = num2cell(sort([x, y, z, t])){:}
            function tmp_2 = code(x, y, z, t)
            	t_1 = x / (z * z);
            	tmp = 0.0;
            	if (z <= -1.25e+45)
            		tmp = t_1;
            	elseif (z <= 1.7e-23)
            		tmp = x / (y * t);
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.25e+45], t$95$1, If[LessEqual[z, 1.7e-23], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
            
            \begin{array}{l}
            [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
            \\
            \begin{array}{l}
            t_1 := \frac{x}{z \cdot z}\\
            \mathbf{if}\;z \leq -1.25 \cdot 10^{+45}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;z \leq 1.7 \cdot 10^{-23}:\\
            \;\;\;\;\frac{x}{y \cdot t}\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -1.25e45 or 1.7e-23 < z

              1. Initial program 84.2%

                \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

                \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
              4. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left({z}^{2}\right)}\right) \]
                2. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(x, \left(z \cdot \color{blue}{z}\right)\right) \]
                3. *-lowering-*.f6466.4%

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right) \]
              5. Simplified66.4%

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

              if -1.25e45 < z < 1.7e-23

              1. Initial program 97.0%

                \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in z around 0

                \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
              4. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(t \cdot y\right)}\right) \]
                2. *-lowering-*.f6462.3%

                  \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(t, \color{blue}{y}\right)\right) \]
              5. Simplified62.3%

                \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
            3. Recombined 2 regimes into one program.
            4. Final simplification64.2%

              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{+45}:\\ \;\;\;\;\frac{x}{z \cdot z}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-23}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot z}\\ \end{array} \]
            5. Add Preprocessing

            Alternative 14: 97.2% accurate, 1.0× speedup?

            \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \frac{\frac{x}{t - z}}{y - z} \end{array} \]
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            (FPCore (x y z t) :precision binary64 (/ (/ x (- t z)) (- y z)))
            assert(x < y && y < z && z < t);
            double code(double x, double y, double z, double t) {
            	return (x / (t - z)) / (y - z);
            }
            
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            real(8) function code(x, y, z, t)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                code = (x / (t - z)) / (y - z)
            end function
            
            assert x < y && y < z && z < t;
            public static double code(double x, double y, double z, double t) {
            	return (x / (t - z)) / (y - z);
            }
            
            [x, y, z, t] = sort([x, y, z, t])
            def code(x, y, z, t):
            	return (x / (t - z)) / (y - z)
            
            x, y, z, t = sort([x, y, z, t])
            function code(x, y, z, t)
            	return Float64(Float64(x / Float64(t - z)) / Float64(y - z))
            end
            
            x, y, z, t = num2cell(sort([x, y, z, t])){:}
            function tmp = code(x, y, z, t)
            	tmp = (x / (t - z)) / (y - z);
            end
            
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            code[x_, y_, z_, t_] := N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]
            
            \begin{array}{l}
            [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
            \\
            \frac{\frac{x}{t - z}}{y - z}
            \end{array}
            
            Derivation
            1. Initial program 91.0%

              \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. associate-/l/N/A

                \[\leadsto \frac{\frac{x}{t - z}}{\color{blue}{y - z}} \]
              2. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{t - z}\right), \color{blue}{\left(y - z\right)}\right) \]
              3. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(t - z\right)\right), \left(\color{blue}{y} - z\right)\right) \]
              4. --lowering--.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(t, z\right)\right), \left(y - z\right)\right) \]
              5. --lowering--.f6496.7%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(t, z\right)\right), \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
            4. Applied egg-rr96.7%

              \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y - z}} \]
            5. Add Preprocessing

            Alternative 15: 39.1% accurate, 1.8× speedup?

            \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \frac{x}{y \cdot t} \end{array} \]
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            (FPCore (x y z t) :precision binary64 (/ x (* y t)))
            assert(x < y && y < z && z < t);
            double code(double x, double y, double z, double t) {
            	return x / (y * t);
            }
            
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            real(8) function code(x, y, z, t)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                code = x / (y * t)
            end function
            
            assert x < y && y < z && z < t;
            public static double code(double x, double y, double z, double t) {
            	return x / (y * t);
            }
            
            [x, y, z, t] = sort([x, y, z, t])
            def code(x, y, z, t):
            	return x / (y * t)
            
            x, y, z, t = sort([x, y, z, t])
            function code(x, y, z, t)
            	return Float64(x / Float64(y * t))
            end
            
            x, y, z, t = num2cell(sort([x, y, z, t])){:}
            function tmp = code(x, y, z, t)
            	tmp = x / (y * t);
            end
            
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            code[x_, y_, z_, t_] := N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]
            
            \begin{array}{l}
            [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
            \\
            \frac{x}{y \cdot t}
            \end{array}
            
            Derivation
            1. Initial program 91.0%

              \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
            2. Add Preprocessing
            3. Taylor expanded in z around 0

              \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
            4. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(t \cdot y\right)}\right) \]
              2. *-lowering-*.f6441.0%

                \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(t, \color{blue}{y}\right)\right) \]
            5. Simplified41.0%

              \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
            6. Final simplification41.0%

              \[\leadsto \frac{x}{y \cdot t} \]
            7. Add Preprocessing

            Developer Target 1: 87.8% accurate, 0.4× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \left(t - z\right)\\ \mathbf{if}\;\frac{x}{t\_1} < 0:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{1}{t\_1}\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (let* ((t_1 (* (- y z) (- t z))))
               (if (< (/ x t_1) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 t_1)))))
            double code(double x, double y, double z, double t) {
            	double t_1 = (y - z) * (t - z);
            	double tmp;
            	if ((x / t_1) < 0.0) {
            		tmp = (x / (y - z)) / (t - z);
            	} else {
            		tmp = x * (1.0 / t_1);
            	}
            	return tmp;
            }
            
            real(8) function code(x, y, z, t)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8) :: t_1
                real(8) :: tmp
                t_1 = (y - z) * (t - z)
                if ((x / t_1) < 0.0d0) then
                    tmp = (x / (y - z)) / (t - z)
                else
                    tmp = x * (1.0d0 / t_1)
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t) {
            	double t_1 = (y - z) * (t - z);
            	double tmp;
            	if ((x / t_1) < 0.0) {
            		tmp = (x / (y - z)) / (t - z);
            	} else {
            		tmp = x * (1.0 / t_1);
            	}
            	return tmp;
            }
            
            def code(x, y, z, t):
            	t_1 = (y - z) * (t - z)
            	tmp = 0
            	if (x / t_1) < 0.0:
            		tmp = (x / (y - z)) / (t - z)
            	else:
            		tmp = x * (1.0 / t_1)
            	return tmp
            
            function code(x, y, z, t)
            	t_1 = Float64(Float64(y - z) * Float64(t - z))
            	tmp = 0.0
            	if (Float64(x / t_1) < 0.0)
            		tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - z));
            	else
            		tmp = Float64(x * Float64(1.0 / t_1));
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t)
            	t_1 = (y - z) * (t - z);
            	tmp = 0.0;
            	if ((x / t_1) < 0.0)
            		tmp = (x / (y - z)) / (t - z);
            	else
            		tmp = x * (1.0 / t_1);
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[Less[N[(x / t$95$1), $MachinePrecision], 0.0], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
            \mathbf{if}\;\frac{x}{t\_1} < 0:\\
            \;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\
            
            \mathbf{else}:\\
            \;\;\;\;x \cdot \frac{1}{t\_1}\\
            
            
            \end{array}
            \end{array}
            

            Reproduce

            ?
            herbie shell --seed 2024192 
            (FPCore (x y z t)
              :name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
              :precision binary64
            
              :alt
              (! :herbie-platform default (if (< (/ x (* (- y z) (- t z))) 0) (/ (/ x (- y z)) (- t z)) (* x (/ 1 (* (- y z) (- t z))))))
            
              (/ x (* (- y z) (- t z))))