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

Percentage Accurate: 88.5% → 98.9%
Time: 11.8s
Alternatives: 16
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 16 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: 88.5% 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: 98.9% accurate, 0.3× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} t_1 := \frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\ \mathbf{if}\;t_1 \leq -5 \cdot 10^{-282} \lor \neg \left(t_1 \leq 0\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y - z}\\ \end{array} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ x (* (- y z) (- t z)))))
   (if (or (<= t_1 -5e-282) (not (<= t_1 0.0)))
     t_1
     (/ (/ x (- t z)) (- y z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double t_1 = x / ((y - z) * (t - z));
	double tmp;
	if ((t_1 <= -5e-282) || !(t_1 <= 0.0)) {
		tmp = t_1;
	} else {
		tmp = (x / (t - z)) / (y - z);
	}
	return tmp;
}
NOTE: y 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 / ((y - z) * (t - z))
    if ((t_1 <= (-5d-282)) .or. (.not. (t_1 <= 0.0d0))) then
        tmp = t_1
    else
        tmp = (x / (t - z)) / (y - z)
    end if
    code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = x / ((y - z) * (t - z));
	double tmp;
	if ((t_1 <= -5e-282) || !(t_1 <= 0.0)) {
		tmp = t_1;
	} else {
		tmp = (x / (t - z)) / (y - z);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	t_1 = x / ((y - z) * (t - z))
	tmp = 0
	if (t_1 <= -5e-282) or not (t_1 <= 0.0):
		tmp = t_1
	else:
		tmp = (x / (t - z)) / (y - z)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	t_1 = Float64(x / Float64(Float64(y - z) * Float64(t - z)))
	tmp = 0.0
	if ((t_1 <= -5e-282) || !(t_1 <= 0.0))
		tmp = t_1;
	else
		tmp = Float64(Float64(x / Float64(t - z)) / Float64(y - z));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = x / ((y - z) * (t - z));
	tmp = 0.0;
	if ((t_1 <= -5e-282) || ~((t_1 <= 0.0)))
		tmp = t_1;
	else
		tmp = (x / (t - z)) / (y - z);
	end
	tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-282], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], t$95$1, N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{-282} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) < -5.0000000000000001e-282 or -0.0 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z)))

    1. Initial program 99.7%

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

    if -5.0000000000000001e-282 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) < -0.0

    1. Initial program 76.8%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. div-inv99.8%

        \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    3. Applied egg-rr99.8%

      \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    4. Step-by-step derivation
      1. associate-*l/99.9%

        \[\leadsto \color{blue}{\frac{x \cdot \frac{1}{t - z}}{y - z}} \]
      2. div-inv99.9%

        \[\leadsto \frac{\color{blue}{\frac{x}{t - z}}}{y - z} \]
    5. Applied egg-rr99.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \leq -5 \cdot 10^{-282} \lor \neg \left(\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \leq 0\right):\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y - z}\\ \end{array} \]

Alternative 2: 78.8% accurate, 0.5× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{+178}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-80}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq -2.05 \cdot 10^{-94} \lor \neg \left(y \leq -5 \cdot 10^{-121}\right) \land y \leq 10^{-160}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (<= y -4.8e+178)
   (/ (/ x y) (- t z))
   (if (<= y -3.1e-80)
     (/ x (* y (- t z)))
     (if (or (<= y -2.05e-94) (and (not (<= y -5e-121)) (<= y 1e-160)))
       (/ x (* z (- z t)))
       (/ x (* (- y z) t))))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -4.8e+178) {
		tmp = (x / y) / (t - z);
	} else if (y <= -3.1e-80) {
		tmp = x / (y * (t - z));
	} else if ((y <= -2.05e-94) || (!(y <= -5e-121) && (y <= 1e-160))) {
		tmp = x / (z * (z - t));
	} else {
		tmp = x / ((y - z) * t);
	}
	return tmp;
}
NOTE: y 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 <= (-4.8d+178)) then
        tmp = (x / y) / (t - z)
    else if (y <= (-3.1d-80)) then
        tmp = x / (y * (t - z))
    else if ((y <= (-2.05d-94)) .or. (.not. (y <= (-5d-121))) .and. (y <= 1d-160)) then
        tmp = x / (z * (z - t))
    else
        tmp = x / ((y - z) * t)
    end if
    code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -4.8e+178) {
		tmp = (x / y) / (t - z);
	} else if (y <= -3.1e-80) {
		tmp = x / (y * (t - z));
	} else if ((y <= -2.05e-94) || (!(y <= -5e-121) && (y <= 1e-160))) {
		tmp = x / (z * (z - t));
	} else {
		tmp = x / ((y - z) * t);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if y <= -4.8e+178:
		tmp = (x / y) / (t - z)
	elif y <= -3.1e-80:
		tmp = x / (y * (t - z))
	elif (y <= -2.05e-94) or (not (y <= -5e-121) and (y <= 1e-160)):
		tmp = x / (z * (z - t))
	else:
		tmp = x / ((y - z) * t)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -4.8e+178)
		tmp = Float64(Float64(x / y) / Float64(t - z));
	elseif (y <= -3.1e-80)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif ((y <= -2.05e-94) || (!(y <= -5e-121) && (y <= 1e-160)))
		tmp = Float64(x / Float64(z * Float64(z - t)));
	else
		tmp = Float64(x / Float64(Float64(y - z) * t));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -4.8e+178)
		tmp = (x / y) / (t - z);
	elseif (y <= -3.1e-80)
		tmp = x / (y * (t - z));
	elseif ((y <= -2.05e-94) || (~((y <= -5e-121)) && (y <= 1e-160)))
		tmp = x / (z * (z - t));
	else
		tmp = x / ((y - z) * t);
	end
	tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := If[LessEqual[y, -4.8e+178], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.1e-80], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -2.05e-94], And[N[Not[LessEqual[y, -5e-121]], $MachinePrecision], LessEqual[y, 1e-160]]], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+178}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\

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

\mathbf{elif}\;y \leq -2.05 \cdot 10^{-94} \lor \neg \left(y \leq -5 \cdot 10^{-121}\right) \land y \leq 10^{-160}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.8e178

    1. Initial program 89.4%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. div-inv94.6%

        \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    3. Applied egg-rr94.6%

      \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    4. Step-by-step derivation
      1. un-div-inv94.6%

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
    5. Applied egg-rr94.6%

      \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
    6. Taylor expanded in y around inf 94.6%

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

    if -4.8e178 < y < -3.10000000000000016e-80

    1. Initial program 82.8%

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

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(t - z\right)}} \]
    3. Step-by-step derivation
      1. *-commutative69.6%

        \[\leadsto \frac{x}{\color{blue}{\left(t - z\right) \cdot y}} \]
    4. Simplified69.6%

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

    if -3.10000000000000016e-80 < y < -2.05e-94 or -4.99999999999999989e-121 < y < 9.9999999999999999e-161

    1. Initial program 94.3%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. div-inv97.6%

        \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    3. Applied egg-rr97.6%

      \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    4. Step-by-step derivation
      1. clear-num97.5%

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

        \[\leadsto \frac{1}{\frac{y - z}{x}} \cdot \color{blue}{\frac{-1}{-\left(t - z\right)}} \]
      3. metadata-eval97.5%

        \[\leadsto \frac{1}{\frac{y - z}{x}} \cdot \frac{\color{blue}{-1}}{-\left(t - z\right)} \]
      4. frac-times96.7%

        \[\leadsto \color{blue}{\frac{1 \cdot -1}{\frac{y - z}{x} \cdot \left(-\left(t - z\right)\right)}} \]
      5. metadata-eval96.7%

        \[\leadsto \frac{\color{blue}{-1}}{\frac{y - z}{x} \cdot \left(-\left(t - z\right)\right)} \]
    5. Applied egg-rr96.7%

      \[\leadsto \color{blue}{\frac{-1}{\frac{y - z}{x} \cdot \left(-\left(t - z\right)\right)}} \]
    6. Taylor expanded in y around 0 86.4%

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

    if -2.05e-94 < y < -4.99999999999999989e-121 or 9.9999999999999999e-161 < y

    1. Initial program 87.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{+178}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-80}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq -2.05 \cdot 10^{-94} \lor \neg \left(y \leq -5 \cdot 10^{-121}\right) \land y \leq 10^{-160}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \]

Alternative 3: 80.9% accurate, 0.5× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -4 \cdot 10^{+178}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -2.6 \cdot 10^{-78}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq -2.9 \cdot 10^{-94} \lor \neg \left(y \leq -6.5 \cdot 10^{-121}\right) \land y \leq 7 \cdot 10^{-109}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (<= y -4e+178)
   (/ (/ x y) (- t z))
   (if (<= y -2.6e-78)
     (/ x (* y (- t z)))
     (if (or (<= y -2.9e-94) (and (not (<= y -6.5e-121)) (<= y 7e-109)))
       (/ (/ x z) (- z t))
       (/ x (* (- y z) t))))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -4e+178) {
		tmp = (x / y) / (t - z);
	} else if (y <= -2.6e-78) {
		tmp = x / (y * (t - z));
	} else if ((y <= -2.9e-94) || (!(y <= -6.5e-121) && (y <= 7e-109))) {
		tmp = (x / z) / (z - t);
	} else {
		tmp = x / ((y - z) * t);
	}
	return tmp;
}
NOTE: y 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 <= (-4d+178)) then
        tmp = (x / y) / (t - z)
    else if (y <= (-2.6d-78)) then
        tmp = x / (y * (t - z))
    else if ((y <= (-2.9d-94)) .or. (.not. (y <= (-6.5d-121))) .and. (y <= 7d-109)) then
        tmp = (x / z) / (z - t)
    else
        tmp = x / ((y - z) * t)
    end if
    code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -4e+178) {
		tmp = (x / y) / (t - z);
	} else if (y <= -2.6e-78) {
		tmp = x / (y * (t - z));
	} else if ((y <= -2.9e-94) || (!(y <= -6.5e-121) && (y <= 7e-109))) {
		tmp = (x / z) / (z - t);
	} else {
		tmp = x / ((y - z) * t);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if y <= -4e+178:
		tmp = (x / y) / (t - z)
	elif y <= -2.6e-78:
		tmp = x / (y * (t - z))
	elif (y <= -2.9e-94) or (not (y <= -6.5e-121) and (y <= 7e-109)):
		tmp = (x / z) / (z - t)
	else:
		tmp = x / ((y - z) * t)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -4e+178)
		tmp = Float64(Float64(x / y) / Float64(t - z));
	elseif (y <= -2.6e-78)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif ((y <= -2.9e-94) || (!(y <= -6.5e-121) && (y <= 7e-109)))
		tmp = Float64(Float64(x / z) / Float64(z - t));
	else
		tmp = Float64(x / Float64(Float64(y - z) * t));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -4e+178)
		tmp = (x / y) / (t - z);
	elseif (y <= -2.6e-78)
		tmp = x / (y * (t - z));
	elseif ((y <= -2.9e-94) || (~((y <= -6.5e-121)) && (y <= 7e-109)))
		tmp = (x / z) / (z - t);
	else
		tmp = x / ((y - z) * t);
	end
	tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := If[LessEqual[y, -4e+178], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.6e-78], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -2.9e-94], And[N[Not[LessEqual[y, -6.5e-121]], $MachinePrecision], LessEqual[y, 7e-109]]], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{+178}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\

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

\mathbf{elif}\;y \leq -2.9 \cdot 10^{-94} \lor \neg \left(y \leq -6.5 \cdot 10^{-121}\right) \land y \leq 7 \cdot 10^{-109}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.0000000000000002e178

    1. Initial program 89.4%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. div-inv94.6%

        \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    3. Applied egg-rr94.6%

      \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    4. Step-by-step derivation
      1. un-div-inv94.6%

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
    5. Applied egg-rr94.6%

      \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
    6. Taylor expanded in y around inf 94.6%

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

    if -4.0000000000000002e178 < y < -2.6000000000000001e-78

    1. Initial program 82.8%

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

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(t - z\right)}} \]
    3. Step-by-step derivation
      1. *-commutative69.6%

        \[\leadsto \frac{x}{\color{blue}{\left(t - z\right) \cdot y}} \]
    4. Simplified69.6%

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

    if -2.6000000000000001e-78 < y < -2.89999999999999995e-94 or -6.5000000000000003e-121 < y < 7e-109

    1. Initial program 93.6%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. div-inv97.8%

        \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    3. Applied egg-rr97.8%

      \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    4. Step-by-step derivation
      1. clear-num97.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{y - z}{x}}} \cdot \frac{1}{t - z} \]
      2. frac-2neg97.7%

        \[\leadsto \frac{1}{\frac{y - z}{x}} \cdot \color{blue}{\frac{-1}{-\left(t - z\right)}} \]
      3. metadata-eval97.7%

        \[\leadsto \frac{1}{\frac{y - z}{x}} \cdot \frac{\color{blue}{-1}}{-\left(t - z\right)} \]
      4. frac-times96.9%

        \[\leadsto \color{blue}{\frac{1 \cdot -1}{\frac{y - z}{x} \cdot \left(-\left(t - z\right)\right)}} \]
      5. metadata-eval96.9%

        \[\leadsto \frac{\color{blue}{-1}}{\frac{y - z}{x} \cdot \left(-\left(t - z\right)\right)} \]
    5. Applied egg-rr96.9%

      \[\leadsto \color{blue}{\frac{-1}{\frac{y - z}{x} \cdot \left(-\left(t - z\right)\right)}} \]
    6. Taylor expanded in y around 0 83.2%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z - t}} \]
    8. Simplified87.2%

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

    if -2.89999999999999995e-94 < y < -6.5000000000000003e-121 or 7e-109 < y

    1. Initial program 88.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4 \cdot 10^{+178}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -2.6 \cdot 10^{-78}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq -2.9 \cdot 10^{-94} \lor \neg \left(y \leq -6.5 \cdot 10^{-121}\right) \land y \leq 7 \cdot 10^{-109}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \]

Alternative 4: 81.2% accurate, 0.5× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} t_1 := \frac{\frac{x}{z}}{z - t}\\ \mathbf{if}\;y \leq -4.5 \cdot 10^{+180}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-78}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-94}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{-121}:\\ \;\;\;\;\frac{x}{y - z} \cdot \frac{1}{t}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-132}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \end{array} \]
NOTE: y 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))))
   (if (<= y -4.5e+180)
     (/ (/ x y) (- t z))
     (if (<= y -9e-78)
       (/ x (* y (- t z)))
       (if (<= y -3.2e-94)
         t_1
         (if (<= y -4.5e-121)
           (* (/ x (- y z)) (/ 1.0 t))
           (if (<= y 4.8e-132) t_1 (/ x (* (- y z) t)))))))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double t_1 = (x / z) / (z - t);
	double tmp;
	if (y <= -4.5e+180) {
		tmp = (x / y) / (t - z);
	} else if (y <= -9e-78) {
		tmp = x / (y * (t - z));
	} else if (y <= -3.2e-94) {
		tmp = t_1;
	} else if (y <= -4.5e-121) {
		tmp = (x / (y - z)) * (1.0 / t);
	} else if (y <= 4.8e-132) {
		tmp = t_1;
	} else {
		tmp = x / ((y - z) * t);
	}
	return tmp;
}
NOTE: y 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 - t)
    if (y <= (-4.5d+180)) then
        tmp = (x / y) / (t - z)
    else if (y <= (-9d-78)) then
        tmp = x / (y * (t - z))
    else if (y <= (-3.2d-94)) then
        tmp = t_1
    else if (y <= (-4.5d-121)) then
        tmp = (x / (y - z)) * (1.0d0 / t)
    else if (y <= 4.8d-132) then
        tmp = t_1
    else
        tmp = x / ((y - z) * t)
    end if
    code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = (x / z) / (z - t);
	double tmp;
	if (y <= -4.5e+180) {
		tmp = (x / y) / (t - z);
	} else if (y <= -9e-78) {
		tmp = x / (y * (t - z));
	} else if (y <= -3.2e-94) {
		tmp = t_1;
	} else if (y <= -4.5e-121) {
		tmp = (x / (y - z)) * (1.0 / t);
	} else if (y <= 4.8e-132) {
		tmp = t_1;
	} else {
		tmp = x / ((y - z) * t);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	t_1 = (x / z) / (z - t)
	tmp = 0
	if y <= -4.5e+180:
		tmp = (x / y) / (t - z)
	elif y <= -9e-78:
		tmp = x / (y * (t - z))
	elif y <= -3.2e-94:
		tmp = t_1
	elif y <= -4.5e-121:
		tmp = (x / (y - z)) * (1.0 / t)
	elif y <= 4.8e-132:
		tmp = t_1
	else:
		tmp = x / ((y - z) * t)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(x / z) / Float64(z - t))
	tmp = 0.0
	if (y <= -4.5e+180)
		tmp = Float64(Float64(x / y) / Float64(t - z));
	elseif (y <= -9e-78)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif (y <= -3.2e-94)
		tmp = t_1;
	elseif (y <= -4.5e-121)
		tmp = Float64(Float64(x / Float64(y - z)) * Float64(1.0 / t));
	elseif (y <= 4.8e-132)
		tmp = t_1;
	else
		tmp = Float64(x / Float64(Float64(y - z) * t));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = (x / z) / (z - t);
	tmp = 0.0;
	if (y <= -4.5e+180)
		tmp = (x / y) / (t - z);
	elseif (y <= -9e-78)
		tmp = x / (y * (t - z));
	elseif (y <= -3.2e-94)
		tmp = t_1;
	elseif (y <= -4.5e-121)
		tmp = (x / (y - z)) * (1.0 / t);
	elseif (y <= 4.8e-132)
		tmp = t_1;
	else
		tmp = x / ((y - z) * t);
	end
	tmp_2 = tmp;
end
NOTE: y 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] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.5e+180], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9e-78], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.2e-94], t$95$1, If[LessEqual[y, -4.5e-121], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e-132], t$95$1, N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z - t}\\
\mathbf{if}\;y \leq -4.5 \cdot 10^{+180}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\

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

\mathbf{elif}\;y \leq -3.2 \cdot 10^{-94}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -4.5 \cdot 10^{-121}:\\
\;\;\;\;\frac{x}{y - z} \cdot \frac{1}{t}\\

\mathbf{elif}\;y \leq 4.8 \cdot 10^{-132}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -4.49999999999999981e180

    1. Initial program 89.4%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. div-inv94.6%

        \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    3. Applied egg-rr94.6%

      \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    4. Step-by-step derivation
      1. un-div-inv94.6%

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
    5. Applied egg-rr94.6%

      \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
    6. Taylor expanded in y around inf 94.6%

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

    if -4.49999999999999981e180 < y < -9e-78

    1. Initial program 82.8%

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

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(t - z\right)}} \]
    3. Step-by-step derivation
      1. *-commutative69.6%

        \[\leadsto \frac{x}{\color{blue}{\left(t - z\right) \cdot y}} \]
    4. Simplified69.6%

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

    if -9e-78 < y < -3.19999999999999997e-94 or -4.5000000000000003e-121 < y < 4.80000000000000031e-132

    1. Initial program 93.5%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. div-inv97.7%

        \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    3. Applied egg-rr97.7%

      \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    4. Step-by-step derivation
      1. clear-num97.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{y - z}{x}}} \cdot \frac{1}{t - z} \]
      2. frac-2neg97.6%

        \[\leadsto \frac{1}{\frac{y - z}{x}} \cdot \color{blue}{\frac{-1}{-\left(t - z\right)}} \]
      3. metadata-eval97.6%

        \[\leadsto \frac{1}{\frac{y - z}{x}} \cdot \frac{\color{blue}{-1}}{-\left(t - z\right)} \]
      4. frac-times96.8%

        \[\leadsto \color{blue}{\frac{1 \cdot -1}{\frac{y - z}{x} \cdot \left(-\left(t - z\right)\right)}} \]
      5. metadata-eval96.8%

        \[\leadsto \frac{\color{blue}{-1}}{\frac{y - z}{x} \cdot \left(-\left(t - z\right)\right)} \]
    5. Applied egg-rr96.8%

      \[\leadsto \color{blue}{\frac{-1}{\frac{y - z}{x} \cdot \left(-\left(t - z\right)\right)}} \]
    6. Taylor expanded in y around 0 84.0%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z - t}} \]
    8. Simplified88.1%

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

    if -3.19999999999999997e-94 < y < -4.5000000000000003e-121

    1. Initial program 52.5%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. div-inv100.0%

        \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    3. Applied egg-rr100.0%

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

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

    if 4.80000000000000031e-132 < y

    1. Initial program 89.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.5 \cdot 10^{+180}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-78}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-94}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{-121}:\\ \;\;\;\;\frac{x}{y - z} \cdot \frac{1}{t}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-132}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \]

Alternative 5: 77.1% accurate, 0.6× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{-79}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq -4.4 \cdot 10^{-94} \lor \neg \left(y \leq -5.2 \cdot 10^{-121}\right) \land y \leq 2.7 \cdot 10^{-163}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (<= y -6.2e-79)
   (/ x (* y (- t z)))
   (if (or (<= y -4.4e-94) (and (not (<= y -5.2e-121)) (<= y 2.7e-163)))
     (/ x (* z (- z t)))
     (/ x (* (- y z) t)))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -6.2e-79) {
		tmp = x / (y * (t - z));
	} else if ((y <= -4.4e-94) || (!(y <= -5.2e-121) && (y <= 2.7e-163))) {
		tmp = x / (z * (z - t));
	} else {
		tmp = x / ((y - z) * t);
	}
	return tmp;
}
NOTE: y 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 <= (-6.2d-79)) then
        tmp = x / (y * (t - z))
    else if ((y <= (-4.4d-94)) .or. (.not. (y <= (-5.2d-121))) .and. (y <= 2.7d-163)) then
        tmp = x / (z * (z - t))
    else
        tmp = x / ((y - z) * t)
    end if
    code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -6.2e-79) {
		tmp = x / (y * (t - z));
	} else if ((y <= -4.4e-94) || (!(y <= -5.2e-121) && (y <= 2.7e-163))) {
		tmp = x / (z * (z - t));
	} else {
		tmp = x / ((y - z) * t);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if y <= -6.2e-79:
		tmp = x / (y * (t - z))
	elif (y <= -4.4e-94) or (not (y <= -5.2e-121) and (y <= 2.7e-163)):
		tmp = x / (z * (z - t))
	else:
		tmp = x / ((y - z) * t)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -6.2e-79)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif ((y <= -4.4e-94) || (!(y <= -5.2e-121) && (y <= 2.7e-163)))
		tmp = Float64(x / Float64(z * Float64(z - t)));
	else
		tmp = Float64(x / Float64(Float64(y - z) * t));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -6.2e-79)
		tmp = x / (y * (t - z));
	elseif ((y <= -4.4e-94) || (~((y <= -5.2e-121)) && (y <= 2.7e-163)))
		tmp = x / (z * (z - t));
	else
		tmp = x / ((y - z) * t);
	end
	tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := If[LessEqual[y, -6.2e-79], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -4.4e-94], And[N[Not[LessEqual[y, -5.2e-121]], $MachinePrecision], LessEqual[y, 2.7e-163]]], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{-79}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\

\mathbf{elif}\;y \leq -4.4 \cdot 10^{-94} \lor \neg \left(y \leq -5.2 \cdot 10^{-121}\right) \land y \leq 2.7 \cdot 10^{-163}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\

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


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

    1. Initial program 84.6%

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

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(t - z\right)}} \]
    3. Step-by-step derivation
      1. *-commutative74.9%

        \[\leadsto \frac{x}{\color{blue}{\left(t - z\right) \cdot y}} \]
    4. Simplified74.9%

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

    if -6.1999999999999999e-79 < y < -4.40000000000000002e-94 or -5.19999999999999972e-121 < y < 2.70000000000000015e-163

    1. Initial program 94.3%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. div-inv97.6%

        \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    3. Applied egg-rr97.6%

      \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    4. Step-by-step derivation
      1. clear-num97.5%

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

        \[\leadsto \frac{1}{\frac{y - z}{x}} \cdot \color{blue}{\frac{-1}{-\left(t - z\right)}} \]
      3. metadata-eval97.5%

        \[\leadsto \frac{1}{\frac{y - z}{x}} \cdot \frac{\color{blue}{-1}}{-\left(t - z\right)} \]
      4. frac-times96.7%

        \[\leadsto \color{blue}{\frac{1 \cdot -1}{\frac{y - z}{x} \cdot \left(-\left(t - z\right)\right)}} \]
      5. metadata-eval96.7%

        \[\leadsto \frac{\color{blue}{-1}}{\frac{y - z}{x} \cdot \left(-\left(t - z\right)\right)} \]
    5. Applied egg-rr96.7%

      \[\leadsto \color{blue}{\frac{-1}{\frac{y - z}{x} \cdot \left(-\left(t - z\right)\right)}} \]
    6. Taylor expanded in y around 0 86.4%

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

    if -4.40000000000000002e-94 < y < -5.19999999999999972e-121 or 2.70000000000000015e-163 < y

    1. Initial program 87.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{-79}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq -4.4 \cdot 10^{-94} \lor \neg \left(y \leq -5.2 \cdot 10^{-121}\right) \land y \leq 2.7 \cdot 10^{-163}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \]

Alternative 6: 52.6% accurate, 0.6× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} t_1 := \frac{\frac{x}{t}}{y}\\ \mathbf{if}\;t \leq -4.8 \cdot 10^{-89}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-116}:\\ \;\;\;\;\frac{-x}{y \cdot z}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-19}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{+38}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (/ x t) y)))
   (if (<= t -4.8e-89)
     t_1
     (if (<= t 1.9e-116)
       (/ (- x) (* y z))
       (if (<= t 5.2e-19)
         (/ x (* y t))
         (if (<= t 1.65e+38) (/ (- x) (* z t)) t_1))))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double t_1 = (x / t) / y;
	double tmp;
	if (t <= -4.8e-89) {
		tmp = t_1;
	} else if (t <= 1.9e-116) {
		tmp = -x / (y * z);
	} else if (t <= 5.2e-19) {
		tmp = x / (y * t);
	} else if (t <= 1.65e+38) {
		tmp = -x / (z * t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: y 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 / t) / y
    if (t <= (-4.8d-89)) then
        tmp = t_1
    else if (t <= 1.9d-116) then
        tmp = -x / (y * z)
    else if (t <= 5.2d-19) then
        tmp = x / (y * t)
    else if (t <= 1.65d+38) then
        tmp = -x / (z * t)
    else
        tmp = t_1
    end if
    code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = (x / t) / y;
	double tmp;
	if (t <= -4.8e-89) {
		tmp = t_1;
	} else if (t <= 1.9e-116) {
		tmp = -x / (y * z);
	} else if (t <= 5.2e-19) {
		tmp = x / (y * t);
	} else if (t <= 1.65e+38) {
		tmp = -x / (z * t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	t_1 = (x / t) / y
	tmp = 0
	if t <= -4.8e-89:
		tmp = t_1
	elif t <= 1.9e-116:
		tmp = -x / (y * z)
	elif t <= 5.2e-19:
		tmp = x / (y * t)
	elif t <= 1.65e+38:
		tmp = -x / (z * t)
	else:
		tmp = t_1
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(x / t) / y)
	tmp = 0.0
	if (t <= -4.8e-89)
		tmp = t_1;
	elseif (t <= 1.9e-116)
		tmp = Float64(Float64(-x) / Float64(y * z));
	elseif (t <= 5.2e-19)
		tmp = Float64(x / Float64(y * t));
	elseif (t <= 1.65e+38)
		tmp = Float64(Float64(-x) / Float64(z * t));
	else
		tmp = t_1;
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = (x / t) / y;
	tmp = 0.0;
	if (t <= -4.8e-89)
		tmp = t_1;
	elseif (t <= 1.9e-116)
		tmp = -x / (y * z);
	elseif (t <= 5.2e-19)
		tmp = x / (y * t);
	elseif (t <= 1.65e+38)
		tmp = -x / (z * t);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -4.8e-89], t$95$1, If[LessEqual[t, 1.9e-116], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e-19], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e+38], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{t}}{y}\\
\mathbf{if}\;t \leq -4.8 \cdot 10^{-89}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 5.2 \cdot 10^{-19}:\\
\;\;\;\;\frac{x}{y \cdot t}\\

\mathbf{elif}\;t \leq 1.65 \cdot 10^{+38}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.80000000000000032e-89 or 1.65e38 < t

    1. Initial program 86.4%

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

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(t - z\right)}} \]
    3. Step-by-step derivation
      1. *-commutative54.6%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y}} \]
    4. Simplified64.1%

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

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

    if -4.80000000000000032e-89 < t < 1.9000000000000001e-116

    1. Initial program 93.5%

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

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(t - z\right)}} \]
    3. Step-by-step derivation
      1. *-commutative56.1%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y}} \]
    4. Simplified58.2%

      \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y}} \]
    5. Taylor expanded in t around 0 46.6%

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

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{y \cdot z}} \]
      2. neg-mul-146.6%

        \[\leadsto \frac{\color{blue}{-x}}{y \cdot z} \]
      3. *-commutative46.6%

        \[\leadsto \frac{-x}{\color{blue}{z \cdot y}} \]
    7. Simplified46.6%

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

    if 1.9000000000000001e-116 < t < 5.20000000000000026e-19

    1. Initial program 86.5%

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

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

    if 5.20000000000000026e-19 < t < 1.65e38

    1. Initial program 92.0%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. div-inv98.6%

        \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    3. Applied egg-rr98.6%

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y - z}} \]
    6. Simplified76.3%

      \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y - z}} \]
    7. Taylor expanded in y around 0 51.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{t \cdot z}} \]
    8. Step-by-step derivation
      1. mul-1-neg51.4%

        \[\leadsto \color{blue}{-\frac{x}{t \cdot z}} \]
      2. *-commutative51.4%

        \[\leadsto -\frac{x}{\color{blue}{z \cdot t}} \]
    9. Simplified51.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.8 \cdot 10^{-89}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-116}:\\ \;\;\;\;\frac{-x}{y \cdot z}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-19}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{+38}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]

Alternative 7: 53.4% accurate, 0.6× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} t_1 := \frac{\frac{x}{t}}{y}\\ \mathbf{if}\;t \leq -1.95 \cdot 10^{-132}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{-113}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-19}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{+34}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (/ x t) y)))
   (if (<= t -1.95e-132)
     t_1
     (if (<= t 1.05e-113)
       (/ (/ (- x) z) y)
       (if (<= t 5e-19)
         (/ x (* y t))
         (if (<= t 2.4e+34) (/ (- x) (* z t)) t_1))))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double t_1 = (x / t) / y;
	double tmp;
	if (t <= -1.95e-132) {
		tmp = t_1;
	} else if (t <= 1.05e-113) {
		tmp = (-x / z) / y;
	} else if (t <= 5e-19) {
		tmp = x / (y * t);
	} else if (t <= 2.4e+34) {
		tmp = -x / (z * t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: y 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 / t) / y
    if (t <= (-1.95d-132)) then
        tmp = t_1
    else if (t <= 1.05d-113) then
        tmp = (-x / z) / y
    else if (t <= 5d-19) then
        tmp = x / (y * t)
    else if (t <= 2.4d+34) then
        tmp = -x / (z * t)
    else
        tmp = t_1
    end if
    code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = (x / t) / y;
	double tmp;
	if (t <= -1.95e-132) {
		tmp = t_1;
	} else if (t <= 1.05e-113) {
		tmp = (-x / z) / y;
	} else if (t <= 5e-19) {
		tmp = x / (y * t);
	} else if (t <= 2.4e+34) {
		tmp = -x / (z * t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	t_1 = (x / t) / y
	tmp = 0
	if t <= -1.95e-132:
		tmp = t_1
	elif t <= 1.05e-113:
		tmp = (-x / z) / y
	elif t <= 5e-19:
		tmp = x / (y * t)
	elif t <= 2.4e+34:
		tmp = -x / (z * t)
	else:
		tmp = t_1
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(x / t) / y)
	tmp = 0.0
	if (t <= -1.95e-132)
		tmp = t_1;
	elseif (t <= 1.05e-113)
		tmp = Float64(Float64(Float64(-x) / z) / y);
	elseif (t <= 5e-19)
		tmp = Float64(x / Float64(y * t));
	elseif (t <= 2.4e+34)
		tmp = Float64(Float64(-x) / Float64(z * t));
	else
		tmp = t_1;
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = (x / t) / y;
	tmp = 0.0;
	if (t <= -1.95e-132)
		tmp = t_1;
	elseif (t <= 1.05e-113)
		tmp = (-x / z) / y;
	elseif (t <= 5e-19)
		tmp = x / (y * t);
	elseif (t <= 2.4e+34)
		tmp = -x / (z * t);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -1.95e-132], t$95$1, If[LessEqual[t, 1.05e-113], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 5e-19], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e+34], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{t}}{y}\\
\mathbf{if}\;t \leq -1.95 \cdot 10^{-132}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 5 \cdot 10^{-19}:\\
\;\;\;\;\frac{x}{y \cdot t}\\

\mathbf{elif}\;t \leq 2.4 \cdot 10^{+34}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.94999999999999991e-132 or 2.39999999999999987e34 < t

    1. Initial program 86.9%

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

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(t - z\right)}} \]
    3. Step-by-step derivation
      1. *-commutative56.0%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y}} \]
    4. Simplified64.7%

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

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

    if -1.94999999999999991e-132 < t < 1.05e-113

    1. Initial program 93.7%

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

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(t - z\right)}} \]
    3. Step-by-step derivation
      1. *-commutative53.6%

        \[\leadsto \frac{x}{\color{blue}{\left(t - z\right) \cdot y}} \]
    4. Simplified53.6%

      \[\leadsto \color{blue}{\frac{x}{\left(t - z\right) \cdot y}} \]
    5. Taylor expanded in t around 0 48.8%

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

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{y \cdot z}} \]
      2. *-commutative48.8%

        \[\leadsto \frac{-1 \cdot x}{\color{blue}{z \cdot y}} \]
      3. associate-/r*51.2%

        \[\leadsto \color{blue}{\frac{\frac{-1 \cdot x}{z}}{y}} \]
      4. neg-mul-151.2%

        \[\leadsto \frac{\frac{\color{blue}{-x}}{z}}{y} \]
      5. distribute-neg-frac51.2%

        \[\leadsto \frac{\color{blue}{-\frac{x}{z}}}{y} \]
    7. Simplified51.2%

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

    if 1.05e-113 < t < 5.0000000000000004e-19

    1. Initial program 86.5%

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

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

    if 5.0000000000000004e-19 < t < 2.39999999999999987e34

    1. Initial program 92.0%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. div-inv98.6%

        \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    3. Applied egg-rr98.6%

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y - z}} \]
    6. Simplified76.3%

      \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y - z}} \]
    7. Taylor expanded in y around 0 51.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{t \cdot z}} \]
    8. Step-by-step derivation
      1. mul-1-neg51.4%

        \[\leadsto \color{blue}{-\frac{x}{t \cdot z}} \]
      2. *-commutative51.4%

        \[\leadsto -\frac{x}{\color{blue}{z \cdot t}} \]
    9. Simplified51.4%

      \[\leadsto \color{blue}{-\frac{x}{z \cdot t}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification55.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.95 \cdot 10^{-132}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{-113}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-19}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{+34}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]

Alternative 8: 92.8% accurate, 0.7× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{+144} \lor \neg \left(z \leq 2.8 \cdot 10^{+61}\right):\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\ \end{array} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -9.5e+144) (not (<= z 2.8e+61)))
   (/ (/ x z) (- z t))
   (/ x (* (- y z) (- t z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -9.5e+144) || !(z <= 2.8e+61)) {
		tmp = (x / z) / (z - t);
	} else {
		tmp = x / ((y - z) * (t - z));
	}
	return tmp;
}
NOTE: y 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 <= (-9.5d+144)) .or. (.not. (z <= 2.8d+61))) then
        tmp = (x / z) / (z - t)
    else
        tmp = x / ((y - z) * (t - z))
    end if
    code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -9.5e+144) || !(z <= 2.8e+61)) {
		tmp = (x / z) / (z - t);
	} else {
		tmp = x / ((y - z) * (t - z));
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if (z <= -9.5e+144) or not (z <= 2.8e+61):
		tmp = (x / z) / (z - t)
	else:
		tmp = x / ((y - z) * (t - z))
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -9.5e+144) || !(z <= 2.8e+61))
		tmp = Float64(Float64(x / z) / Float64(z - t));
	else
		tmp = Float64(x / Float64(Float64(y - z) * Float64(t - z)));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -9.5e+144) || ~((z <= 2.8e+61)))
		tmp = (x / z) / (z - t);
	else
		tmp = x / ((y - z) * (t - z));
	end
	tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -9.5e+144], N[Not[LessEqual[z, 2.8e+61]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+144} \lor \neg \left(z \leq 2.8 \cdot 10^{+61}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.50000000000000031e144 or 2.8000000000000001e61 < z

    1. Initial program 74.5%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. div-inv99.8%

        \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    3. Applied egg-rr99.8%

      \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    4. Step-by-step derivation
      1. clear-num99.8%

        \[\leadsto \color{blue}{\frac{1}{\frac{y - z}{x}}} \cdot \frac{1}{t - z} \]
      2. frac-2neg99.8%

        \[\leadsto \frac{1}{\frac{y - z}{x}} \cdot \color{blue}{\frac{-1}{-\left(t - z\right)}} \]
      3. metadata-eval99.8%

        \[\leadsto \frac{1}{\frac{y - z}{x}} \cdot \frac{\color{blue}{-1}}{-\left(t - z\right)} \]
      4. frac-times98.9%

        \[\leadsto \color{blue}{\frac{1 \cdot -1}{\frac{y - z}{x} \cdot \left(-\left(t - z\right)\right)}} \]
      5. metadata-eval98.9%

        \[\leadsto \frac{\color{blue}{-1}}{\frac{y - z}{x} \cdot \left(-\left(t - z\right)\right)} \]
    5. Applied egg-rr98.9%

      \[\leadsto \color{blue}{\frac{-1}{\frac{y - z}{x} \cdot \left(-\left(t - z\right)\right)}} \]
    6. Taylor expanded in y around 0 72.2%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z - t}} \]
    8. Simplified95.1%

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

    if -9.50000000000000031e144 < z < 2.8000000000000001e61

    1. Initial program 95.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{+144} \lor \neg \left(z \leq 2.8 \cdot 10^{+61}\right):\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\ \end{array} \]

Alternative 9: 52.4% accurate, 0.7× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} t_1 := \frac{\frac{-x}{z}}{y}\\ \mathbf{if}\;z \leq -4 \cdot 10^{+179}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-53}:\\ \;\;\;\;\frac{\frac{-x}{t}}{z}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+32}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (/ (- x) z) y)))
   (if (<= z -4e+179)
     t_1
     (if (<= z -1.7e-53)
       (/ (/ (- x) t) z)
       (if (<= z 1.8e+32) (/ (/ x t) y) t_1)))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double t_1 = (-x / z) / y;
	double tmp;
	if (z <= -4e+179) {
		tmp = t_1;
	} else if (z <= -1.7e-53) {
		tmp = (-x / t) / z;
	} else if (z <= 1.8e+32) {
		tmp = (x / t) / y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: y 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) / y
    if (z <= (-4d+179)) then
        tmp = t_1
    else if (z <= (-1.7d-53)) then
        tmp = (-x / t) / z
    else if (z <= 1.8d+32) then
        tmp = (x / t) / y
    else
        tmp = t_1
    end if
    code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = (-x / z) / y;
	double tmp;
	if (z <= -4e+179) {
		tmp = t_1;
	} else if (z <= -1.7e-53) {
		tmp = (-x / t) / z;
	} else if (z <= 1.8e+32) {
		tmp = (x / t) / y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	t_1 = (-x / z) / y
	tmp = 0
	if z <= -4e+179:
		tmp = t_1
	elif z <= -1.7e-53:
		tmp = (-x / t) / z
	elif z <= 1.8e+32:
		tmp = (x / t) / y
	else:
		tmp = t_1
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(Float64(-x) / z) / y)
	tmp = 0.0
	if (z <= -4e+179)
		tmp = t_1;
	elseif (z <= -1.7e-53)
		tmp = Float64(Float64(Float64(-x) / t) / z);
	elseif (z <= 1.8e+32)
		tmp = Float64(Float64(x / t) / y);
	else
		tmp = t_1;
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = (-x / z) / y;
	tmp = 0.0;
	if (z <= -4e+179)
		tmp = t_1;
	elseif (z <= -1.7e-53)
		tmp = (-x / t) / z;
	elseif (z <= 1.8e+32)
		tmp = (x / t) / y;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: y 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] / y), $MachinePrecision]}, If[LessEqual[z, -4e+179], t$95$1, If[LessEqual[z, -1.7e-53], N[(N[((-x) / t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.8e+32], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{-x}{z}}{y}\\
\mathbf{if}\;z \leq -4 \cdot 10^{+179}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.7 \cdot 10^{-53}:\\
\;\;\;\;\frac{\frac{-x}{t}}{z}\\

\mathbf{elif}\;z \leq 1.8 \cdot 10^{+32}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.99999999999999992e179 or 1.7999999999999998e32 < z

    1. Initial program 81.1%

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

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(t - z\right)}} \]
    3. Step-by-step derivation
      1. *-commutative37.0%

        \[\leadsto \frac{x}{\color{blue}{\left(t - z\right) \cdot y}} \]
    4. Simplified37.0%

      \[\leadsto \color{blue}{\frac{x}{\left(t - z\right) \cdot y}} \]
    5. Taylor expanded in t around 0 36.9%

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

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{y \cdot z}} \]
      2. *-commutative36.9%

        \[\leadsto \frac{-1 \cdot x}{\color{blue}{z \cdot y}} \]
      3. associate-/r*56.6%

        \[\leadsto \color{blue}{\frac{\frac{-1 \cdot x}{z}}{y}} \]
      4. neg-mul-156.6%

        \[\leadsto \frac{\frac{\color{blue}{-x}}{z}}{y} \]
      5. distribute-neg-frac56.6%

        \[\leadsto \frac{\color{blue}{-\frac{x}{z}}}{y} \]
    7. Simplified56.6%

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

    if -3.99999999999999992e179 < z < -1.7e-53

    1. Initial program 77.6%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. div-inv99.5%

        \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    3. Applied egg-rr99.5%

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y - z}} \]
    6. Simplified30.2%

      \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y - z}} \]
    7. Taylor expanded in y around 0 19.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{t \cdot z}} \]
    8. Step-by-step derivation
      1. mul-1-neg19.9%

        \[\leadsto \color{blue}{-\frac{x}{t \cdot z}} \]
      2. associate-/r*20.1%

        \[\leadsto -\color{blue}{\frac{\frac{x}{t}}{z}} \]
      3. distribute-neg-frac20.1%

        \[\leadsto \color{blue}{\frac{-\frac{x}{t}}{z}} \]
      4. distribute-neg-frac20.1%

        \[\leadsto \frac{\color{blue}{\frac{-x}{t}}}{z} \]
    9. Simplified20.1%

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

    if -1.7e-53 < z < 1.7999999999999998e32

    1. Initial program 96.4%

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

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(t - z\right)}} \]
    3. Step-by-step derivation
      1. *-commutative71.2%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y}} \]
    4. Simplified71.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+179}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y}\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-53}:\\ \;\;\;\;\frac{\frac{-x}{t}}{z}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+32}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y}\\ \end{array} \]

Alternative 10: 72.2% accurate, 0.8× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{-71} \lor \neg \left(z \leq 4.6 \cdot 10^{-103}\right):\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -3.4e-71) (not (<= z 4.6e-103)))
   (/ x (* z (- z t)))
   (/ x (* (- y z) t))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -3.4e-71) || !(z <= 4.6e-103)) {
		tmp = x / (z * (z - t));
	} else {
		tmp = x / ((y - z) * t);
	}
	return tmp;
}
NOTE: y 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 <= (-3.4d-71)) .or. (.not. (z <= 4.6d-103))) then
        tmp = x / (z * (z - t))
    else
        tmp = x / ((y - z) * t)
    end if
    code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -3.4e-71) || !(z <= 4.6e-103)) {
		tmp = x / (z * (z - t));
	} else {
		tmp = x / ((y - z) * t);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if (z <= -3.4e-71) or not (z <= 4.6e-103):
		tmp = x / (z * (z - t))
	else:
		tmp = x / ((y - z) * t)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -3.4e-71) || !(z <= 4.6e-103))
		tmp = Float64(x / Float64(z * Float64(z - t)));
	else
		tmp = Float64(x / Float64(Float64(y - z) * t));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -3.4e-71) || ~((z <= 4.6e-103)))
		tmp = x / (z * (z - t));
	else
		tmp = x / ((y - z) * t);
	end
	tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.4e-71], N[Not[LessEqual[z, 4.6e-103]], $MachinePrecision]], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{-71} \lor \neg \left(z \leq 4.6 \cdot 10^{-103}\right):\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.40000000000000003e-71 or 4.6000000000000001e-103 < z

    1. Initial program 82.7%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. div-inv99.7%

        \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    3. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    4. Step-by-step derivation
      1. clear-num99.7%

        \[\leadsto \color{blue}{\frac{1}{\frac{y - z}{x}}} \cdot \frac{1}{t - z} \]
      2. frac-2neg99.7%

        \[\leadsto \frac{1}{\frac{y - z}{x}} \cdot \color{blue}{\frac{-1}{-\left(t - z\right)}} \]
      3. metadata-eval99.7%

        \[\leadsto \frac{1}{\frac{y - z}{x}} \cdot \frac{\color{blue}{-1}}{-\left(t - z\right)} \]
      4. frac-times99.3%

        \[\leadsto \color{blue}{\frac{1 \cdot -1}{\frac{y - z}{x} \cdot \left(-\left(t - z\right)\right)}} \]
      5. metadata-eval99.3%

        \[\leadsto \frac{\color{blue}{-1}}{\frac{y - z}{x} \cdot \left(-\left(t - z\right)\right)} \]
    5. Applied egg-rr99.3%

      \[\leadsto \color{blue}{\frac{-1}{\frac{y - z}{x} \cdot \left(-\left(t - z\right)\right)}} \]
    6. Taylor expanded in y around 0 64.2%

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

    if -3.40000000000000003e-71 < z < 4.6000000000000001e-103

    1. Initial program 98.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{-71} \lor \neg \left(z \leq 4.6 \cdot 10^{-103}\right):\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \]

Alternative 11: 66.6% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.95000000000000014e-133

    1. Initial program 85.5%

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

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(t - z\right)}} \]
    3. Step-by-step derivation
      1. *-commutative52.3%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y}} \]
    4. Simplified63.5%

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

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

    if -1.95000000000000014e-133 < t < 1.22e-116

    1. Initial program 93.7%

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

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(t - z\right)}} \]
    3. Step-by-step derivation
      1. *-commutative53.6%

        \[\leadsto \frac{x}{\color{blue}{\left(t - z\right) \cdot y}} \]
    4. Simplified53.6%

      \[\leadsto \color{blue}{\frac{x}{\left(t - z\right) \cdot y}} \]
    5. Taylor expanded in t around 0 48.8%

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

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{y \cdot z}} \]
      2. *-commutative48.8%

        \[\leadsto \frac{-1 \cdot x}{\color{blue}{z \cdot y}} \]
      3. associate-/r*51.2%

        \[\leadsto \color{blue}{\frac{\frac{-1 \cdot x}{z}}{y}} \]
      4. neg-mul-151.2%

        \[\leadsto \frac{\frac{\color{blue}{-x}}{z}}{y} \]
      5. distribute-neg-frac51.2%

        \[\leadsto \frac{\color{blue}{-\frac{x}{z}}}{y} \]
    7. Simplified51.2%

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

    if 1.22e-116 < t

    1. Initial program 89.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.95 \cdot 10^{-133}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;t \leq 1.22 \cdot 10^{-116}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \]

Alternative 12: 49.2% accurate, 0.9× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{-47} \lor \neg \left(z \leq 2.9 \cdot 10^{-7}\right):\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -1.7e-47) (not (<= z 2.9e-7))) (/ (- x) (* z t)) (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -1.7e-47) || !(z <= 2.9e-7)) {
		tmp = -x / (z * t);
	} else {
		tmp = (x / t) / y;
	}
	return tmp;
}
NOTE: y 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 <= (-1.7d-47)) .or. (.not. (z <= 2.9d-7))) then
        tmp = -x / (z * t)
    else
        tmp = (x / t) / y
    end if
    code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -1.7e-47) || !(z <= 2.9e-7)) {
		tmp = -x / (z * t);
	} else {
		tmp = (x / t) / y;
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if (z <= -1.7e-47) or not (z <= 2.9e-7):
		tmp = -x / (z * t)
	else:
		tmp = (x / t) / y
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -1.7e-47) || !(z <= 2.9e-7))
		tmp = Float64(Float64(-x) / Float64(z * t));
	else
		tmp = Float64(Float64(x / t) / y);
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -1.7e-47) || ~((z <= 2.9e-7)))
		tmp = -x / (z * t);
	else
		tmp = (x / t) / y;
	end
	tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.7e-47], N[Not[LessEqual[z, 2.9e-7]], $MachinePrecision]], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{-47} \lor \neg \left(z \leq 2.9 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{-x}{z \cdot t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.7000000000000001e-47 or 2.8999999999999998e-7 < z

    1. Initial program 81.4%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. div-inv99.7%

        \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
    3. Applied egg-rr99.7%

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y - z}} \]
    6. Simplified36.9%

      \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y - z}} \]
    7. Taylor expanded in y around 0 33.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{t \cdot z}} \]
    8. Step-by-step derivation
      1. mul-1-neg33.0%

        \[\leadsto \color{blue}{-\frac{x}{t \cdot z}} \]
      2. *-commutative33.0%

        \[\leadsto -\frac{x}{\color{blue}{z \cdot t}} \]
    9. Simplified33.0%

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

    if -1.7000000000000001e-47 < z < 2.8999999999999998e-7

    1. Initial program 96.2%

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

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(t - z\right)}} \]
    3. Step-by-step derivation
      1. *-commutative72.1%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y}} \]
    4. Simplified72.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{-47} \lor \neg \left(z \leq 2.9 \cdot 10^{-7}\right):\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]

Alternative 13: 46.6% accurate, 1.0× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.22 \cdot 10^{+54} \lor \neg \left(z \leq 4 \cdot 10^{+35}\right):\\ \;\;\;\;\frac{x}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \end{array} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -1.22e+54) (not (<= z 4e+35))) (/ x (* y z)) (/ x (* y t))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -1.22e+54) || !(z <= 4e+35)) {
		tmp = x / (y * z);
	} else {
		tmp = x / (y * t);
	}
	return tmp;
}
NOTE: y 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 <= (-1.22d+54)) .or. (.not. (z <= 4d+35))) then
        tmp = x / (y * z)
    else
        tmp = x / (y * t)
    end if
    code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -1.22e+54) || !(z <= 4e+35)) {
		tmp = x / (y * z);
	} else {
		tmp = x / (y * t);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if (z <= -1.22e+54) or not (z <= 4e+35):
		tmp = x / (y * z)
	else:
		tmp = x / (y * t)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -1.22e+54) || !(z <= 4e+35))
		tmp = Float64(x / Float64(y * z));
	else
		tmp = Float64(x / Float64(y * t));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -1.22e+54) || ~((z <= 4e+35)))
		tmp = x / (y * z);
	else
		tmp = x / (y * t);
	end
	tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.22e+54], N[Not[LessEqual[z, 4e+35]], $MachinePrecision]], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.22 \cdot 10^{+54} \lor \neg \left(z \leq 4 \cdot 10^{+35}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.22e54 or 3.9999999999999999e35 < z

    1. Initial program 78.1%

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

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(t - z\right)}} \]
    3. Step-by-step derivation
      1. *-commutative34.2%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y}} \]
    4. Simplified52.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y}} \]
    5. Taylor expanded in t around 0 33.2%

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

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{y \cdot z}} \]
      2. neg-mul-133.2%

        \[\leadsto \frac{\color{blue}{-x}}{y \cdot z} \]
      3. *-commutative33.2%

        \[\leadsto \frac{-x}{\color{blue}{z \cdot y}} \]
    7. Simplified33.2%

      \[\leadsto \color{blue}{\frac{-x}{z \cdot y}} \]
    8. Step-by-step derivation
      1. expm1-log1p-u32.8%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{-x}{z \cdot y}\right)\right)} \]
      2. expm1-udef54.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{-x}{z \cdot y}\right)} - 1} \]
      3. add-sqr-sqrt24.1%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{z \cdot y}\right)} - 1 \]
      4. sqrt-unprod51.1%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{z \cdot y}\right)} - 1 \]
      5. sqr-neg51.1%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\sqrt{\color{blue}{x \cdot x}}}{z \cdot y}\right)} - 1 \]
      6. sqrt-unprod30.4%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{z \cdot y}\right)} - 1 \]
      7. add-sqr-sqrt54.5%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{x}}{z \cdot y}\right)} - 1 \]
      8. associate-/r*54.5%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{\frac{x}{z}}{y}}\right)} - 1 \]
    9. Applied egg-rr54.5%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\frac{x}{z}}{y}\right)} - 1} \]
    10. Step-by-step derivation
      1. expm1-def46.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\frac{x}{z}}{y}\right)\right)} \]
      2. expm1-log1p46.7%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{y}} \]
      3. associate-/l/32.7%

        \[\leadsto \color{blue}{\frac{x}{y \cdot z}} \]
      4. *-commutative32.7%

        \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
    11. Simplified32.7%

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

    if -1.22e54 < z < 3.9999999999999999e35

    1. Initial program 96.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.22 \cdot 10^{+54} \lor \neg \left(z \leq 4 \cdot 10^{+35}\right):\\ \;\;\;\;\frac{x}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \end{array} \]

Alternative 14: 48.9% accurate, 1.0× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -7.8 \cdot 10^{+147} \lor \neg \left(z \leq 1.15 \cdot 10^{+49}\right):\\ \;\;\;\;\frac{x}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -7.8e+147) (not (<= z 1.15e+49))) (/ x (* y z)) (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -7.8e+147) || !(z <= 1.15e+49)) {
		tmp = x / (y * z);
	} else {
		tmp = (x / t) / y;
	}
	return tmp;
}
NOTE: y 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 <= (-7.8d+147)) .or. (.not. (z <= 1.15d+49))) then
        tmp = x / (y * z)
    else
        tmp = (x / t) / y
    end if
    code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -7.8e+147) || !(z <= 1.15e+49)) {
		tmp = x / (y * z);
	} else {
		tmp = (x / t) / y;
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if (z <= -7.8e+147) or not (z <= 1.15e+49):
		tmp = x / (y * z)
	else:
		tmp = (x / t) / y
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -7.8e+147) || !(z <= 1.15e+49))
		tmp = Float64(x / Float64(y * z));
	else
		tmp = Float64(Float64(x / t) / y);
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -7.8e+147) || ~((z <= 1.15e+49)))
		tmp = x / (y * z);
	else
		tmp = (x / t) / y;
	end
	tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -7.8e+147], N[Not[LessEqual[z, 1.15e+49]], $MachinePrecision]], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.8 \cdot 10^{+147} \lor \neg \left(z \leq 1.15 \cdot 10^{+49}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.80000000000000033e147 or 1.15000000000000001e49 < z

    1. Initial program 75.5%

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

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(t - z\right)}} \]
    3. Step-by-step derivation
      1. *-commutative34.8%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y}} \]
    4. Simplified52.7%

      \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y}} \]
    5. Taylor expanded in t around 0 34.7%

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

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{y \cdot z}} \]
      2. neg-mul-134.7%

        \[\leadsto \frac{\color{blue}{-x}}{y \cdot z} \]
      3. *-commutative34.7%

        \[\leadsto \frac{-x}{\color{blue}{z \cdot y}} \]
    7. Simplified34.7%

      \[\leadsto \color{blue}{\frac{-x}{z \cdot y}} \]
    8. Step-by-step derivation
      1. expm1-log1p-u34.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{-x}{z \cdot y}\right)\right)} \]
      2. expm1-udef57.8%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{-x}{z \cdot y}\right)} - 1} \]
      3. add-sqr-sqrt28.1%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{z \cdot y}\right)} - 1 \]
      4. sqrt-unprod53.4%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{z \cdot y}\right)} - 1 \]
      5. sqr-neg53.4%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\sqrt{\color{blue}{x \cdot x}}}{z \cdot y}\right)} - 1 \]
      6. sqrt-unprod29.7%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{z \cdot y}\right)} - 1 \]
      7. add-sqr-sqrt57.7%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{x}}{z \cdot y}\right)} - 1 \]
      8. associate-/r*57.7%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{\frac{x}{z}}{y}}\right)} - 1 \]
    9. Applied egg-rr57.7%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\frac{x}{z}}{y}\right)} - 1} \]
    10. Step-by-step derivation
      1. expm1-def50.8%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\frac{x}{z}}{y}\right)\right)} \]
      2. expm1-log1p51.1%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{y}} \]
      3. associate-/l/34.5%

        \[\leadsto \color{blue}{\frac{x}{y \cdot z}} \]
      4. *-commutative34.5%

        \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
    11. Simplified34.5%

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

    if -7.80000000000000033e147 < z < 1.15000000000000001e49

    1. Initial program 95.0%

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

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(t - z\right)}} \]
    3. Step-by-step derivation
      1. *-commutative66.0%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y}} \]
    4. Simplified68.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.8 \cdot 10^{+147} \lor \neg \left(z \leq 1.15 \cdot 10^{+49}\right):\\ \;\;\;\;\frac{x}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]

Alternative 15: 97.0% accurate, 1.0× speedup?

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

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

      \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
    2. div-inv96.9%

      \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
  3. Applied egg-rr96.9%

    \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
  4. Step-by-step derivation
    1. un-div-inv96.9%

      \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
  5. Applied egg-rr96.9%

    \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
  6. Final simplification96.9%

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

Alternative 16: 39.4% accurate, 1.8× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \frac{x}{y \cdot t} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t) :precision binary64 (/ x (* y t)))
assert(y < t);
double code(double x, double y, double z, double t) {
	return x / (y * t);
}
NOTE: y 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 y < t;
public static double code(double x, double y, double z, double t) {
	return x / (y * t);
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	return x / (y * t)
y, t = sort([y, t])
function code(x, y, z, t)
	return Float64(x / Float64(y * t))
end
y, t = num2cell(sort([y, t])){:}
function tmp = code(x, y, z, t)
	tmp = x / (y * t);
end
NOTE: y 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}
[y, t] = \mathsf{sort}([y, t])\\
\\
\frac{x}{y \cdot t}
\end{array}
Derivation
  1. Initial program 89.1%

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

    \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
  3. Final simplification39.7%

    \[\leadsto \frac{x}{y \cdot t} \]

Developer target: 87.3% 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 2023333 
(FPCore (x y z t)
  :name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
  :precision binary64

  :herbie-target
  (if (< (/ x (* (- y z) (- t z))) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 (* (- y z) (- t z)))))

  (/ x (* (- y z) (- t z))))