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

Percentage Accurate: 88.7% → 97.7%
Time: 12.9s
Alternatives: 18
Speedup: 0.5×

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 18 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.7% accurate, 1.0× speedup?

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

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

Alternative 1: 97.7% accurate, 0.5× 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 -1 \cdot 10^{-299}:\\ \;\;\;\;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 (<= t_1 -1e-299) 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 <= -1e-299) {
		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 <= (-1d-299)) 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 <= -1e-299) {
		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 <= -1e-299:
		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 <= -1e-299)
		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 <= -1e-299)
		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[LessEqual[t$95$1, -1e-299], 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 -1 \cdot 10^{-299}:\\
\;\;\;\;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))) < -9.99999999999999992e-300

    1. Initial program 99.5%

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

    if -9.99999999999999992e-300 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z)))

    1. Initial program 84.7%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity84.7%

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

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

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

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

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

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

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

Alternative 2: 79.8% accurate, 0.5× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1.3 \cdot 10^{-163}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-152}:\\ \;\;\;\;\frac{-x}{z \cdot \left(y - z\right)}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-78}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+21}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{elif}\;t \leq 6.6 \cdot 10^{+184}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{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
 (if (<= t -1.3e-163)
   (/ (/ x y) (- t z))
   (if (<= t 7e-152)
     (/ (- x) (* z (- y z)))
     (if (<= t 2.7e-78)
       (/ (/ x (- t z)) y)
       (if (<= t 1.4e+21)
         (/ x (* z (- z t)))
         (if (<= t 6.6e+184) (/ x (* (- y z) t)) (/ (/ x t) (- y z))))))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -1.3e-163) {
		tmp = (x / y) / (t - z);
	} else if (t <= 7e-152) {
		tmp = -x / (z * (y - z));
	} else if (t <= 2.7e-78) {
		tmp = (x / (t - z)) / y;
	} else if (t <= 1.4e+21) {
		tmp = x / (z * (z - t));
	} else if (t <= 6.6e+184) {
		tmp = x / ((y - z) * t);
	} else {
		tmp = (x / t) / (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) :: tmp
    if (t <= (-1.3d-163)) then
        tmp = (x / y) / (t - z)
    else if (t <= 7d-152) then
        tmp = -x / (z * (y - z))
    else if (t <= 2.7d-78) then
        tmp = (x / (t - z)) / y
    else if (t <= 1.4d+21) then
        tmp = x / (z * (z - t))
    else if (t <= 6.6d+184) then
        tmp = x / ((y - z) * t)
    else
        tmp = (x / t) / (y - 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 (t <= -1.3e-163) {
		tmp = (x / y) / (t - z);
	} else if (t <= 7e-152) {
		tmp = -x / (z * (y - z));
	} else if (t <= 2.7e-78) {
		tmp = (x / (t - z)) / y;
	} else if (t <= 1.4e+21) {
		tmp = x / (z * (z - t));
	} else if (t <= 6.6e+184) {
		tmp = x / ((y - z) * t);
	} else {
		tmp = (x / t) / (y - z);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if t <= -1.3e-163:
		tmp = (x / y) / (t - z)
	elif t <= 7e-152:
		tmp = -x / (z * (y - z))
	elif t <= 2.7e-78:
		tmp = (x / (t - z)) / y
	elif t <= 1.4e+21:
		tmp = x / (z * (z - t))
	elif t <= 6.6e+184:
		tmp = x / ((y - z) * t)
	else:
		tmp = (x / t) / (y - z)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if (t <= -1.3e-163)
		tmp = Float64(Float64(x / y) / Float64(t - z));
	elseif (t <= 7e-152)
		tmp = Float64(Float64(-x) / Float64(z * Float64(y - z)));
	elseif (t <= 2.7e-78)
		tmp = Float64(Float64(x / Float64(t - z)) / y);
	elseif (t <= 1.4e+21)
		tmp = Float64(x / Float64(z * Float64(z - t)));
	elseif (t <= 6.6e+184)
		tmp = Float64(x / Float64(Float64(y - z) * t));
	else
		tmp = Float64(Float64(x / t) / Float64(y - z));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (t <= -1.3e-163)
		tmp = (x / y) / (t - z);
	elseif (t <= 7e-152)
		tmp = -x / (z * (y - z));
	elseif (t <= 2.7e-78)
		tmp = (x / (t - z)) / y;
	elseif (t <= 1.4e+21)
		tmp = x / (z * (z - t));
	elseif (t <= 6.6e+184)
		tmp = x / ((y - z) * t);
	else
		tmp = (x / t) / (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_] := If[LessEqual[t, -1.3e-163], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e-152], N[((-x) / N[(z * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e-78], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.4e+21], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.6e+184], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{-163}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -1.30000000000000001e-163

    1. Initial program 91.6%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity91.6%

        \[\leadsto \frac{\color{blue}{1 \cdot x}}{\left(y - z\right) \cdot \left(t - z\right)} \]
      2. times-frac96.0%

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

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

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

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

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

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

    if -1.30000000000000001e-163 < t < 7.0000000000000002e-152

    1. Initial program 86.0%

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{z \cdot \left(y - z\right)}} \]
      2. neg-mul-186.0%

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

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

    if 7.0000000000000002e-152 < t < 2.69999999999999994e-78

    1. Initial program 98.2%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity98.2%

        \[\leadsto \frac{\color{blue}{1 \cdot x}}{\left(y - z\right) \cdot \left(t - z\right)} \]
      2. times-frac99.6%

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

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

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

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

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

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

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

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

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

    if 2.69999999999999994e-78 < t < 1.4e21

    1. Initial program 91.4%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. frac-2neg91.4%

        \[\leadsto \color{blue}{\frac{-x}{-\left(y - z\right) \cdot \left(t - z\right)}} \]
      2. div-inv91.1%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{-\left(y - z\right) \cdot \left(t - z\right)}} \]
      3. distribute-rgt-neg-in91.1%

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

      \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\left(y - z\right) \cdot \left(-\left(t - z\right)\right)}} \]
    4. Step-by-step derivation
      1. distribute-lft-neg-out91.1%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{-x}{y - z}}{-\left(t - z\right)}} \]
      6. neg-sub095.7%

        \[\leadsto \frac{\frac{-x}{y - z}}{\color{blue}{0 - \left(t - z\right)}} \]
      7. associate--r-95.7%

        \[\leadsto \frac{\frac{-x}{y - z}}{\color{blue}{\left(0 - t\right) + z}} \]
      8. neg-sub095.7%

        \[\leadsto \frac{\frac{-x}{y - z}}{\color{blue}{\left(-t\right)} + z} \]
    5. Simplified95.7%

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

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

    if 1.4e21 < t < 6.5999999999999996e184

    1. Initial program 84.4%

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

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

    if 6.5999999999999996e184 < t

    1. Initial program 76.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.3 \cdot 10^{-163}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-152}:\\ \;\;\;\;\frac{-x}{z \cdot \left(y - z\right)}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{-78}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+21}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{elif}\;t \leq 6.6 \cdot 10^{+184}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]

Alternative 3: 91.0% accurate, 0.5× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \left(t - z\right)\\ \mathbf{if}\;t_1 \leq 5 \cdot 10^{+299}:\\ \;\;\;\;\frac{x}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - 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 (* (- y z) (- t z))))
   (if (<= t_1 5e+299) (/ x t_1) (/ (/ x z) (- z t)))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (t - z);
	double tmp;
	if (t_1 <= 5e+299) {
		tmp = x / t_1;
	} else {
		tmp = (x / z) / (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 = (y - z) * (t - z)
    if (t_1 <= 5d+299) then
        tmp = x / t_1
    else
        tmp = (x / z) / (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 = (y - z) * (t - z);
	double tmp;
	if (t_1 <= 5e+299) {
		tmp = x / t_1;
	} else {
		tmp = (x / z) / (z - t);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	t_1 = (y - z) * (t - z)
	tmp = 0
	if t_1 <= 5e+299:
		tmp = x / t_1
	else:
		tmp = (x / z) / (z - t)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(y - z) * Float64(t - z))
	tmp = 0.0
	if (t_1 <= 5e+299)
		tmp = Float64(x / t_1);
	else
		tmp = Float64(Float64(x / z) / Float64(z - t));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = (y - z) * (t - z);
	tmp = 0.0;
	if (t_1 <= 5e+299)
		tmp = x / t_1;
	else
		tmp = (x / z) / (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[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+299], N[(x / t$95$1), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;t_1 \leq 5 \cdot 10^{+299}:\\
\;\;\;\;\frac{x}{t_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 y z) (-.f64 t z)) < 5.0000000000000003e299

    1. Initial program 96.3%

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

    if 5.0000000000000003e299 < (*.f64 (-.f64 y z) (-.f64 t z))

    1. Initial program 71.3%

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

        \[\leadsto \color{blue}{\frac{-x}{-\left(y - z\right) \cdot \left(t - z\right)}} \]
      2. div-inv71.3%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{-\left(y - z\right) \cdot \left(t - z\right)}} \]
      3. distribute-rgt-neg-in71.3%

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

      \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\left(y - z\right) \cdot \left(-\left(t - z\right)\right)}} \]
    4. Step-by-step derivation
      1. distribute-lft-neg-out71.3%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{-x}{y - z}}{-\left(t - z\right)}} \]
      6. neg-sub099.9%

        \[\leadsto \frac{\frac{-x}{y - z}}{\color{blue}{0 - \left(t - z\right)}} \]
      7. associate--r-99.9%

        \[\leadsto \frac{\frac{-x}{y - z}}{\color{blue}{\left(0 - t\right) + z}} \]
      8. neg-sub099.9%

        \[\leadsto \frac{\frac{-x}{y - z}}{\color{blue}{\left(-t\right)} + z} \]
    5. Simplified99.9%

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

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

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

Alternative 4: 48.9% accurate, 0.6× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+83}:\\ \;\;\;\;-\frac{x}{y \cdot z}\\ \mathbf{elif}\;y \leq -8 \cdot 10^{-100} \lor \neg \left(y \leq 8500000000000\right) \land y \leq 1.85 \cdot 10^{+151}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{z} \cdot \frac{x}{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 -3.8e+83)
   (- (/ x (* y z)))
   (if (or (<= y -8e-100) (and (not (<= y 8500000000000.0)) (<= y 1.85e+151)))
     (/ (/ x t) y)
     (* (/ -1.0 z) (/ x t)))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -3.8e+83) {
		tmp = -(x / (y * z));
	} else if ((y <= -8e-100) || (!(y <= 8500000000000.0) && (y <= 1.85e+151))) {
		tmp = (x / t) / y;
	} else {
		tmp = (-1.0 / z) * (x / 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 <= (-3.8d+83)) then
        tmp = -(x / (y * z))
    else if ((y <= (-8d-100)) .or. (.not. (y <= 8500000000000.0d0)) .and. (y <= 1.85d+151)) then
        tmp = (x / t) / y
    else
        tmp = ((-1.0d0) / z) * (x / 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 <= -3.8e+83) {
		tmp = -(x / (y * z));
	} else if ((y <= -8e-100) || (!(y <= 8500000000000.0) && (y <= 1.85e+151))) {
		tmp = (x / t) / y;
	} else {
		tmp = (-1.0 / z) * (x / t);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if y <= -3.8e+83:
		tmp = -(x / (y * z))
	elif (y <= -8e-100) or (not (y <= 8500000000000.0) and (y <= 1.85e+151)):
		tmp = (x / t) / y
	else:
		tmp = (-1.0 / z) * (x / t)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -3.8e+83)
		tmp = Float64(-Float64(x / Float64(y * z)));
	elseif ((y <= -8e-100) || (!(y <= 8500000000000.0) && (y <= 1.85e+151)))
		tmp = Float64(Float64(x / t) / y);
	else
		tmp = Float64(Float64(-1.0 / z) * Float64(x / t));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -3.8e+83)
		tmp = -(x / (y * z));
	elseif ((y <= -8e-100) || (~((y <= 8500000000000.0)) && (y <= 1.85e+151)))
		tmp = (x / t) / y;
	else
		tmp = (-1.0 / z) * (x / 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, -3.8e+83], (-N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]), If[Or[LessEqual[y, -8e-100], And[N[Not[LessEqual[y, 8500000000000.0]], $MachinePrecision], LessEqual[y, 1.85e+151]]], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(N[(-1.0 / z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+83}:\\
\;\;\;\;-\frac{x}{y \cdot z}\\

\mathbf{elif}\;y \leq -8 \cdot 10^{-100} \lor \neg \left(y \leq 8500000000000\right) \land y \leq 1.85 \cdot 10^{+151}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.8000000000000002e83

    1. Initial program 81.2%

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{z \cdot \left(y - z\right)}} \]
      2. neg-mul-165.5%

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

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

      \[\leadsto \frac{-x}{\color{blue}{y \cdot z}} \]
    6. Step-by-step derivation
      1. *-commutative65.5%

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

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

    if -3.8000000000000002e83 < y < -8.0000000000000002e-100 or 8.5e12 < y < 1.8499999999999999e151

    1. Initial program 94.5%

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    4. Simplified45.6%

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

    if -8.0000000000000002e-100 < y < 8.5e12 or 1.8499999999999999e151 < y

    1. Initial program 87.3%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity87.3%

        \[\leadsto \frac{\color{blue}{1 \cdot x}}{\left(y - z\right) \cdot \left(t - z\right)} \]
      2. times-frac94.1%

        \[\leadsto \color{blue}{\frac{1}{y - z} \cdot \frac{x}{t - z}} \]
      3. *-commutative94.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+83}:\\ \;\;\;\;-\frac{x}{y \cdot z}\\ \mathbf{elif}\;y \leq -8 \cdot 10^{-100} \lor \neg \left(y \leq 8500000000000\right) \land y \leq 1.85 \cdot 10^{+151}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{z} \cdot \frac{x}{t}\\ \end{array} \]

Alternative 5: 80.3% accurate, 0.6× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -1.32 \cdot 10^{+284}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -2.2 \cdot 10^{-16}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+14}:\\ \;\;\;\;\frac{x}{t - z} \cdot \frac{-1}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{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
 (if (<= y -1.32e+284)
   (/ (/ x y) (- t z))
   (if (<= y -2.2e-16)
     (/ x (* y (- t z)))
     (if (<= y 1.7e+14) (* (/ x (- t z)) (/ -1.0 z)) (/ (/ x t) (- y z))))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1.32e+284) {
		tmp = (x / y) / (t - z);
	} else if (y <= -2.2e-16) {
		tmp = x / (y * (t - z));
	} else if (y <= 1.7e+14) {
		tmp = (x / (t - z)) * (-1.0 / z);
	} else {
		tmp = (x / t) / (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) :: tmp
    if (y <= (-1.32d+284)) then
        tmp = (x / y) / (t - z)
    else if (y <= (-2.2d-16)) then
        tmp = x / (y * (t - z))
    else if (y <= 1.7d+14) then
        tmp = (x / (t - z)) * ((-1.0d0) / z)
    else
        tmp = (x / t) / (y - 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 (y <= -1.32e+284) {
		tmp = (x / y) / (t - z);
	} else if (y <= -2.2e-16) {
		tmp = x / (y * (t - z));
	} else if (y <= 1.7e+14) {
		tmp = (x / (t - z)) * (-1.0 / z);
	} else {
		tmp = (x / t) / (y - z);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if y <= -1.32e+284:
		tmp = (x / y) / (t - z)
	elif y <= -2.2e-16:
		tmp = x / (y * (t - z))
	elif y <= 1.7e+14:
		tmp = (x / (t - z)) * (-1.0 / z)
	else:
		tmp = (x / t) / (y - z)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -1.32e+284)
		tmp = Float64(Float64(x / y) / Float64(t - z));
	elseif (y <= -2.2e-16)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif (y <= 1.7e+14)
		tmp = Float64(Float64(x / Float64(t - z)) * Float64(-1.0 / z));
	else
		tmp = Float64(Float64(x / t) / Float64(y - z));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -1.32e+284)
		tmp = (x / y) / (t - z);
	elseif (y <= -2.2e-16)
		tmp = x / (y * (t - z));
	elseif (y <= 1.7e+14)
		tmp = (x / (t - z)) * (-1.0 / z);
	else
		tmp = (x / t) / (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_] := If[LessEqual[y, -1.32e+284], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.2e-16], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e+14], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.32 \cdot 10^{+284}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\

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

\mathbf{elif}\;y \leq 1.7 \cdot 10^{+14}:\\
\;\;\;\;\frac{x}{t - z} \cdot \frac{-1}{z}\\

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


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

    1. Initial program 57.6%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity57.6%

        \[\leadsto \frac{\color{blue}{1 \cdot x}}{\left(y - z\right) \cdot \left(t - z\right)} \]
      2. times-frac99.6%

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

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

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

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

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

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

    if -1.32e284 < y < -2.2e-16

    1. Initial program 91.8%

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

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

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

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

    if -2.2e-16 < y < 1.7e14

    1. Initial program 90.8%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity90.8%

        \[\leadsto \frac{\color{blue}{1 \cdot x}}{\left(y - z\right) \cdot \left(t - z\right)} \]
      2. times-frac96.2%

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

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

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

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

    if 1.7e14 < y

    1. Initial program 84.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.32 \cdot 10^{+284}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -2.2 \cdot 10^{-16}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+14}:\\ \;\;\;\;\frac{x}{t - z} \cdot \frac{-1}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]

Alternative 6: 49.4% accurate, 0.7× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -8.7 \cdot 10^{+83}:\\ \;\;\;\;-\frac{x}{y \cdot z}\\ \mathbf{elif}\;y \leq -4.8 \cdot 10^{-106} \lor \neg \left(y \leq 2150000000000\right):\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\frac{-1}{t}}{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
 (if (<= y -8.7e+83)
   (- (/ x (* y z)))
   (if (or (<= y -4.8e-106) (not (<= y 2150000000000.0)))
     (/ (/ x t) y)
     (* x (/ (/ -1.0 t) z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -8.7e+83) {
		tmp = -(x / (y * z));
	} else if ((y <= -4.8e-106) || !(y <= 2150000000000.0)) {
		tmp = (x / t) / y;
	} else {
		tmp = x * ((-1.0 / 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 (y <= (-8.7d+83)) then
        tmp = -(x / (y * z))
    else if ((y <= (-4.8d-106)) .or. (.not. (y <= 2150000000000.0d0))) then
        tmp = (x / t) / y
    else
        tmp = x * (((-1.0d0) / 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 (y <= -8.7e+83) {
		tmp = -(x / (y * z));
	} else if ((y <= -4.8e-106) || !(y <= 2150000000000.0)) {
		tmp = (x / t) / y;
	} else {
		tmp = x * ((-1.0 / t) / z);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if y <= -8.7e+83:
		tmp = -(x / (y * z))
	elif (y <= -4.8e-106) or not (y <= 2150000000000.0):
		tmp = (x / t) / y
	else:
		tmp = x * ((-1.0 / t) / z)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -8.7e+83)
		tmp = Float64(-Float64(x / Float64(y * z)));
	elseif ((y <= -4.8e-106) || !(y <= 2150000000000.0))
		tmp = Float64(Float64(x / t) / y);
	else
		tmp = Float64(x * Float64(Float64(-1.0 / t) / z));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -8.7e+83)
		tmp = -(x / (y * z));
	elseif ((y <= -4.8e-106) || ~((y <= 2150000000000.0)))
		tmp = (x / t) / y;
	else
		tmp = x * ((-1.0 / 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[LessEqual[y, -8.7e+83], (-N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]), If[Or[LessEqual[y, -4.8e-106], N[Not[LessEqual[y, 2150000000000.0]], $MachinePrecision]], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(x * N[(N[(-1.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.7 \cdot 10^{+83}:\\
\;\;\;\;-\frac{x}{y \cdot z}\\

\mathbf{elif}\;y \leq -4.8 \cdot 10^{-106} \lor \neg \left(y \leq 2150000000000\right):\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.7000000000000005e83

    1. Initial program 81.2%

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{z \cdot \left(y - z\right)}} \]
      2. neg-mul-165.5%

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

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

      \[\leadsto \frac{-x}{\color{blue}{y \cdot z}} \]
    6. Step-by-step derivation
      1. *-commutative65.5%

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

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

    if -8.7000000000000005e83 < y < -4.7999999999999995e-106 or 2.15e12 < y

    1. Initial program 88.7%

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

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

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

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

    if -4.7999999999999995e-106 < y < 2.15e12

    1. Initial program 91.1%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\left(y - z\right) \cdot t}} \]
      2. div-inv60.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.7 \cdot 10^{+83}:\\ \;\;\;\;-\frac{x}{y \cdot z}\\ \mathbf{elif}\;y \leq -4.8 \cdot 10^{-106} \lor \neg \left(y \leq 2150000000000\right):\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\frac{-1}{t}}{z}\\ \end{array} \]

Alternative 7: 78.3% accurate, 0.7× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{+284}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -1.05 \cdot 10^{-106}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-188}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{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
 (if (<= y -1e+284)
   (/ (/ x y) (- t z))
   (if (<= y -1.05e-106)
     (/ x (* y (- t z)))
     (if (<= y 1.7e-188) (/ x (* z (- z t))) (/ (/ x t) (- y z))))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1e+284) {
		tmp = (x / y) / (t - z);
	} else if (y <= -1.05e-106) {
		tmp = x / (y * (t - z));
	} else if (y <= 1.7e-188) {
		tmp = x / (z * (z - t));
	} else {
		tmp = (x / t) / (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) :: tmp
    if (y <= (-1d+284)) then
        tmp = (x / y) / (t - z)
    else if (y <= (-1.05d-106)) then
        tmp = x / (y * (t - z))
    else if (y <= 1.7d-188) then
        tmp = x / (z * (z - t))
    else
        tmp = (x / t) / (y - 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 (y <= -1e+284) {
		tmp = (x / y) / (t - z);
	} else if (y <= -1.05e-106) {
		tmp = x / (y * (t - z));
	} else if (y <= 1.7e-188) {
		tmp = x / (z * (z - t));
	} else {
		tmp = (x / t) / (y - z);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if y <= -1e+284:
		tmp = (x / y) / (t - z)
	elif y <= -1.05e-106:
		tmp = x / (y * (t - z))
	elif y <= 1.7e-188:
		tmp = x / (z * (z - t))
	else:
		tmp = (x / t) / (y - z)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -1e+284)
		tmp = Float64(Float64(x / y) / Float64(t - z));
	elseif (y <= -1.05e-106)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif (y <= 1.7e-188)
		tmp = Float64(x / Float64(z * Float64(z - t)));
	else
		tmp = Float64(Float64(x / t) / Float64(y - z));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -1e+284)
		tmp = (x / y) / (t - z);
	elseif (y <= -1.05e-106)
		tmp = x / (y * (t - z));
	elseif (y <= 1.7e-188)
		tmp = x / (z * (z - t));
	else
		tmp = (x / t) / (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_] := If[LessEqual[y, -1e+284], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.05e-106], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e-188], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+284}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\

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

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

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


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

    1. Initial program 57.6%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity57.6%

        \[\leadsto \frac{\color{blue}{1 \cdot x}}{\left(y - z\right) \cdot \left(t - z\right)} \]
      2. times-frac99.6%

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

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

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

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

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

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

    if -1.00000000000000008e284 < y < -1.05000000000000002e-106

    1. Initial program 91.1%

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

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

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

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

    if -1.05000000000000002e-106 < y < 1.70000000000000014e-188

    1. Initial program 93.1%

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

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

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{-\left(y - z\right) \cdot \left(t - z\right)}} \]
      3. distribute-rgt-neg-in92.9%

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

      \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\left(y - z\right) \cdot \left(-\left(t - z\right)\right)}} \]
    4. Step-by-step derivation
      1. distribute-lft-neg-out92.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{-x}{y - z}}{-\left(t - z\right)}} \]
      6. neg-sub092.3%

        \[\leadsto \frac{\frac{-x}{y - z}}{\color{blue}{0 - \left(t - z\right)}} \]
      7. associate--r-92.3%

        \[\leadsto \frac{\frac{-x}{y - z}}{\color{blue}{\left(0 - t\right) + z}} \]
      8. neg-sub092.3%

        \[\leadsto \frac{\frac{-x}{y - z}}{\color{blue}{\left(-t\right)} + z} \]
    5. Simplified92.3%

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

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

    if 1.70000000000000014e-188 < y

    1. Initial program 85.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{+284}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -1.05 \cdot 10^{-106}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-188}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]

Alternative 8: 79.9% accurate, 0.7× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -1.45 \cdot 10^{+284}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -3.3 \cdot 10^{-16}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 68000000000000:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{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
 (if (<= y -1.45e+284)
   (/ (/ x y) (- t z))
   (if (<= y -3.3e-16)
     (/ x (* y (- t z)))
     (if (<= y 68000000000000.0) (/ (/ x z) (- z t)) (/ (/ x t) (- y z))))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1.45e+284) {
		tmp = (x / y) / (t - z);
	} else if (y <= -3.3e-16) {
		tmp = x / (y * (t - z));
	} else if (y <= 68000000000000.0) {
		tmp = (x / z) / (z - t);
	} else {
		tmp = (x / t) / (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) :: tmp
    if (y <= (-1.45d+284)) then
        tmp = (x / y) / (t - z)
    else if (y <= (-3.3d-16)) then
        tmp = x / (y * (t - z))
    else if (y <= 68000000000000.0d0) then
        tmp = (x / z) / (z - t)
    else
        tmp = (x / t) / (y - 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 (y <= -1.45e+284) {
		tmp = (x / y) / (t - z);
	} else if (y <= -3.3e-16) {
		tmp = x / (y * (t - z));
	} else if (y <= 68000000000000.0) {
		tmp = (x / z) / (z - t);
	} else {
		tmp = (x / t) / (y - z);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if y <= -1.45e+284:
		tmp = (x / y) / (t - z)
	elif y <= -3.3e-16:
		tmp = x / (y * (t - z))
	elif y <= 68000000000000.0:
		tmp = (x / z) / (z - t)
	else:
		tmp = (x / t) / (y - z)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -1.45e+284)
		tmp = Float64(Float64(x / y) / Float64(t - z));
	elseif (y <= -3.3e-16)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif (y <= 68000000000000.0)
		tmp = Float64(Float64(x / z) / Float64(z - t));
	else
		tmp = Float64(Float64(x / t) / Float64(y - z));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -1.45e+284)
		tmp = (x / y) / (t - z);
	elseif (y <= -3.3e-16)
		tmp = x / (y * (t - z));
	elseif (y <= 68000000000000.0)
		tmp = (x / z) / (z - t);
	else
		tmp = (x / t) / (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_] := If[LessEqual[y, -1.45e+284], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.3e-16], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 68000000000000.0], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+284}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\

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

\mathbf{elif}\;y \leq 68000000000000:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\

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


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

    1. Initial program 57.6%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity57.6%

        \[\leadsto \frac{\color{blue}{1 \cdot x}}{\left(y - z\right) \cdot \left(t - z\right)} \]
      2. times-frac99.6%

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

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

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

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

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

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

    if -1.44999999999999993e284 < y < -3.29999999999999988e-16

    1. Initial program 91.8%

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

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

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

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

    if -3.29999999999999988e-16 < y < 6.8e13

    1. Initial program 90.8%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. frac-2neg90.8%

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

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

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

      \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\left(y - z\right) \cdot \left(-\left(t - z\right)\right)}} \]
    4. Step-by-step derivation
      1. distribute-lft-neg-out90.6%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{-x}{y - z}}{-\left(t - z\right)}} \]
      6. neg-sub094.1%

        \[\leadsto \frac{\frac{-x}{y - z}}{\color{blue}{0 - \left(t - z\right)}} \]
      7. associate--r-94.1%

        \[\leadsto \frac{\frac{-x}{y - z}}{\color{blue}{\left(0 - t\right) + z}} \]
      8. neg-sub094.1%

        \[\leadsto \frac{\frac{-x}{y - z}}{\color{blue}{\left(-t\right)} + z} \]
    5. Simplified94.1%

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

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

    if 6.8e13 < y

    1. Initial program 85.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.45 \cdot 10^{+284}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -3.3 \cdot 10^{-16}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 68000000000000:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]

Alternative 9: 49.4% accurate, 0.7× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{+82}:\\ \;\;\;\;-\frac{x}{y \cdot z}\\ \mathbf{elif}\;y \leq -1.15 \cdot 10^{-101} \lor \neg \left(y \leq 2200000000000\right):\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{z \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 -7.5e+82)
   (- (/ x (* y z)))
   (if (or (<= y -1.15e-101) (not (<= y 2200000000000.0)))
     (/ (/ x t) y)
     (/ (- x) (* z t)))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -7.5e+82) {
		tmp = -(x / (y * z));
	} else if ((y <= -1.15e-101) || !(y <= 2200000000000.0)) {
		tmp = (x / t) / y;
	} else {
		tmp = -x / (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 <= (-7.5d+82)) then
        tmp = -(x / (y * z))
    else if ((y <= (-1.15d-101)) .or. (.not. (y <= 2200000000000.0d0))) then
        tmp = (x / t) / y
    else
        tmp = -x / (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 <= -7.5e+82) {
		tmp = -(x / (y * z));
	} else if ((y <= -1.15e-101) || !(y <= 2200000000000.0)) {
		tmp = (x / t) / y;
	} else {
		tmp = -x / (z * t);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if y <= -7.5e+82:
		tmp = -(x / (y * z))
	elif (y <= -1.15e-101) or not (y <= 2200000000000.0):
		tmp = (x / t) / y
	else:
		tmp = -x / (z * t)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -7.5e+82)
		tmp = Float64(-Float64(x / Float64(y * z)));
	elseif ((y <= -1.15e-101) || !(y <= 2200000000000.0))
		tmp = Float64(Float64(x / t) / y);
	else
		tmp = Float64(Float64(-x) / Float64(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 <= -7.5e+82)
		tmp = -(x / (y * z));
	elseif ((y <= -1.15e-101) || ~((y <= 2200000000000.0)))
		tmp = (x / t) / y;
	else
		tmp = -x / (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, -7.5e+82], (-N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]), If[Or[LessEqual[y, -1.15e-101], N[Not[LessEqual[y, 2200000000000.0]], $MachinePrecision]], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+82}:\\
\;\;\;\;-\frac{x}{y \cdot z}\\

\mathbf{elif}\;y \leq -1.15 \cdot 10^{-101} \lor \neg \left(y \leq 2200000000000\right):\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.4999999999999999e82

    1. Initial program 81.2%

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{z \cdot \left(y - z\right)}} \]
      2. neg-mul-165.5%

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

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

      \[\leadsto \frac{-x}{\color{blue}{y \cdot z}} \]
    6. Step-by-step derivation
      1. *-commutative65.5%

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

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

    if -7.4999999999999999e82 < y < -1.15e-101 or 2.2e12 < y

    1. Initial program 88.7%

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

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

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

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

    if -1.15e-101 < y < 2.2e12

    1. Initial program 91.1%

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

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

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

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

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

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

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

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

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

Alternative 10: 73.0% accurate, 0.8× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -0.0245 \lor \neg \left(z \leq 1.05 \cdot 10^{-71}\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 -0.0245) (not (<= z 1.05e-71)))
   (/ 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 <= -0.0245) || !(z <= 1.05e-71)) {
		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 <= (-0.0245d0)) .or. (.not. (z <= 1.05d-71))) 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 <= -0.0245) || !(z <= 1.05e-71)) {
		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 <= -0.0245) or not (z <= 1.05e-71):
		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 <= -0.0245) || !(z <= 1.05e-71))
		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 <= -0.0245) || ~((z <= 1.05e-71)))
		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, -0.0245], N[Not[LessEqual[z, 1.05e-71]], $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 -0.0245 \lor \neg \left(z \leq 1.05 \cdot 10^{-71}\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 < -0.024500000000000001 or 1.0500000000000001e-71 < z

    1. Initial program 81.8%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. frac-2neg81.8%

        \[\leadsto \color{blue}{\frac{-x}{-\left(y - z\right) \cdot \left(t - z\right)}} \]
      2. div-inv81.7%

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

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

      \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\left(y - z\right) \cdot \left(-\left(t - z\right)\right)}} \]
    4. Step-by-step derivation
      1. distribute-lft-neg-out81.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{-x}{y - z}}{-\left(t - z\right)}} \]
      6. neg-sub099.8%

        \[\leadsto \frac{\frac{-x}{y - z}}{\color{blue}{0 - \left(t - z\right)}} \]
      7. associate--r-99.8%

        \[\leadsto \frac{\frac{-x}{y - z}}{\color{blue}{\left(0 - t\right) + z}} \]
      8. neg-sub099.8%

        \[\leadsto \frac{\frac{-x}{y - z}}{\color{blue}{\left(-t\right)} + z} \]
    5. Simplified99.8%

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

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

    if -0.024500000000000001 < z < 1.0500000000000001e-71

    1. Initial program 97.1%

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

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

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

Alternative 11: 64.8% accurate, 0.8× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{-90}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-187}:\\ \;\;\;\;-\frac{x}{y \cdot z}\\ \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 -2.1e-90)
   (/ (/ x y) t)
   (if (<= t 6.2e-187) (- (/ x (* y z))) (/ x (* (- y z) t)))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -2.1e-90) {
		tmp = (x / y) / t;
	} else if (t <= 6.2e-187) {
		tmp = -(x / (y * z));
	} 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 <= (-2.1d-90)) then
        tmp = (x / y) / t
    else if (t <= 6.2d-187) then
        tmp = -(x / (y * z))
    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 <= -2.1e-90) {
		tmp = (x / y) / t;
	} else if (t <= 6.2e-187) {
		tmp = -(x / (y * z));
	} else {
		tmp = x / ((y - z) * t);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if t <= -2.1e-90:
		tmp = (x / y) / t
	elif t <= 6.2e-187:
		tmp = -(x / (y * z))
	else:
		tmp = x / ((y - z) * t)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if (t <= -2.1e-90)
		tmp = Float64(Float64(x / y) / t);
	elseif (t <= 6.2e-187)
		tmp = Float64(-Float64(x / Float64(y * z)));
	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 <= -2.1e-90)
		tmp = (x / y) / t;
	elseif (t <= 6.2e-187)
		tmp = -(x / (y * z));
	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, -2.1e-90], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 6.2e-187], (-N[(x / N[(y * z), $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}\;t \leq -2.1 \cdot 10^{-90}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\

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

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


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

    1. Initial program 90.1%

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

      \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
    3. Step-by-step derivation
      1. *-un-lft-identity51.5%

        \[\leadsto \frac{\color{blue}{1 \cdot x}}{t \cdot y} \]
      2. times-frac52.1%

        \[\leadsto \color{blue}{\frac{1}{t} \cdot \frac{x}{y}} \]
    4. Applied egg-rr52.1%

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

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{y}}{t}} \]
      2. *-un-lft-identity52.1%

        \[\leadsto \frac{\color{blue}{\frac{x}{y}}}{t} \]
    6. Applied egg-rr52.1%

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

    if -2.0999999999999999e-90 < t < 6.20000000000000039e-187

    1. Initial program 89.1%

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{z \cdot \left(y - z\right)}} \]
      2. neg-mul-184.1%

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

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

      \[\leadsto \frac{-x}{\color{blue}{y \cdot z}} \]
    6. Step-by-step derivation
      1. *-commutative54.2%

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

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

    if 6.20000000000000039e-187 < t

    1. Initial program 86.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{-90}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-187}:\\ \;\;\;\;-\frac{x}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \]

Alternative 12: 76.0% accurate, 0.8× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -1.06 \cdot 10^{-106}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-34}:\\ \;\;\;\;\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 -1.06e-106)
   (/ x (* y (- t z)))
   (if (<= y 2.5e-34) (/ 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 <= -1.06e-106) {
		tmp = x / (y * (t - z));
	} else if (y <= 2.5e-34) {
		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 <= (-1.06d-106)) then
        tmp = x / (y * (t - z))
    else if (y <= 2.5d-34) 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 <= -1.06e-106) {
		tmp = x / (y * (t - z));
	} else if (y <= 2.5e-34) {
		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 <= -1.06e-106:
		tmp = x / (y * (t - z))
	elif y <= 2.5e-34:
		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 <= -1.06e-106)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif (y <= 2.5e-34)
		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 <= -1.06e-106)
		tmp = x / (y * (t - z));
	elseif (y <= 2.5e-34)
		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, -1.06e-106], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e-34], 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 -1.06 \cdot 10^{-106}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\

\mathbf{elif}\;y \leq 2.5 \cdot 10^{-34}:\\
\;\;\;\;\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 < -1.06e-106

    1. Initial program 88.3%

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

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

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

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

    if -1.06e-106 < y < 2.5000000000000001e-34

    1. Initial program 91.5%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. frac-2neg91.5%

        \[\leadsto \color{blue}{\frac{-x}{-\left(y - z\right) \cdot \left(t - z\right)}} \]
      2. div-inv91.3%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{-\left(y - z\right) \cdot \left(t - z\right)}} \]
      3. distribute-rgt-neg-in91.3%

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

      \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\left(y - z\right) \cdot \left(-\left(t - z\right)\right)}} \]
    4. Step-by-step derivation
      1. distribute-lft-neg-out91.3%

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

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

        \[\leadsto -\frac{\color{blue}{x}}{\left(y - z\right) \cdot \left(-\left(t - z\right)\right)} \]
      4. distribute-neg-frac91.5%

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

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

        \[\leadsto \frac{\frac{-x}{y - z}}{\color{blue}{0 - \left(t - z\right)}} \]
      7. associate--r-93.6%

        \[\leadsto \frac{\frac{-x}{y - z}}{\color{blue}{\left(0 - t\right) + z}} \]
      8. neg-sub093.6%

        \[\leadsto \frac{\frac{-x}{y - z}}{\color{blue}{\left(-t\right)} + z} \]
    5. Simplified93.6%

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

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

    if 2.5000000000000001e-34 < y

    1. Initial program 85.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.06 \cdot 10^{-106}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-34}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \]

Alternative 13: 77.7% accurate, 0.8× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -1.06 \cdot 10^{-106}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-188}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{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
 (if (<= y -1.06e-106)
   (/ x (* y (- t z)))
   (if (<= y 1.7e-188) (/ x (* z (- z t))) (/ (/ x t) (- y z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1.06e-106) {
		tmp = x / (y * (t - z));
	} else if (y <= 1.7e-188) {
		tmp = x / (z * (z - t));
	} else {
		tmp = (x / t) / (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) :: tmp
    if (y <= (-1.06d-106)) then
        tmp = x / (y * (t - z))
    else if (y <= 1.7d-188) then
        tmp = x / (z * (z - t))
    else
        tmp = (x / t) / (y - 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 (y <= -1.06e-106) {
		tmp = x / (y * (t - z));
	} else if (y <= 1.7e-188) {
		tmp = x / (z * (z - t));
	} else {
		tmp = (x / t) / (y - z);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if y <= -1.06e-106:
		tmp = x / (y * (t - z))
	elif y <= 1.7e-188:
		tmp = x / (z * (z - t))
	else:
		tmp = (x / t) / (y - z)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -1.06e-106)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif (y <= 1.7e-188)
		tmp = Float64(x / Float64(z * Float64(z - t)));
	else
		tmp = Float64(Float64(x / t) / Float64(y - z));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -1.06e-106)
		tmp = x / (y * (t - z));
	elseif (y <= 1.7e-188)
		tmp = x / (z * (z - t));
	else
		tmp = (x / t) / (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_] := If[LessEqual[y, -1.06e-106], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e-188], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.06 \cdot 10^{-106}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\

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

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


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

    1. Initial program 88.3%

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

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

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

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

    if -1.06e-106 < y < 1.70000000000000014e-188

    1. Initial program 93.1%

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

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

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{-\left(y - z\right) \cdot \left(t - z\right)}} \]
      3. distribute-rgt-neg-in92.9%

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

      \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\left(y - z\right) \cdot \left(-\left(t - z\right)\right)}} \]
    4. Step-by-step derivation
      1. distribute-lft-neg-out92.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{-x}{y - z}}{-\left(t - z\right)}} \]
      6. neg-sub092.3%

        \[\leadsto \frac{\frac{-x}{y - z}}{\color{blue}{0 - \left(t - z\right)}} \]
      7. associate--r-92.3%

        \[\leadsto \frac{\frac{-x}{y - z}}{\color{blue}{\left(0 - t\right) + z}} \]
      8. neg-sub092.3%

        \[\leadsto \frac{\frac{-x}{y - z}}{\color{blue}{\left(-t\right)} + z} \]
    5. Simplified92.3%

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

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

    if 1.70000000000000014e-188 < y

    1. Initial program 85.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.06 \cdot 10^{-106}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-188}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]

Alternative 14: 50.6% accurate, 0.9× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{-83}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;y \leq 3000000000000:\\ \;\;\;\;\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 (<= y -3e-83)
   (/ (/ x y) t)
   (if (<= y 3000000000000.0) (/ (- x) (* z t)) (/ (/ x t) y))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -3e-83) {
		tmp = (x / y) / t;
	} else if (y <= 3000000000000.0) {
		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 (y <= (-3d-83)) then
        tmp = (x / y) / t
    else if (y <= 3000000000000.0d0) 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 (y <= -3e-83) {
		tmp = (x / y) / t;
	} else if (y <= 3000000000000.0) {
		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 y <= -3e-83:
		tmp = (x / y) / t
	elif y <= 3000000000000.0:
		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 (y <= -3e-83)
		tmp = Float64(Float64(x / y) / t);
	elseif (y <= 3000000000000.0)
		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 (y <= -3e-83)
		tmp = (x / y) / t;
	elseif (y <= 3000000000000.0)
		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[LessEqual[y, -3e-83], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, 3000000000000.0], 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}\;y \leq -3 \cdot 10^{-83}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\

\mathbf{elif}\;y \leq 3000000000000:\\
\;\;\;\;\frac{-x}{z \cdot t}\\

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


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

    1. Initial program 88.0%

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

      \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
    3. Step-by-step derivation
      1. *-un-lft-identity40.4%

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{y}}{t}} \]
      2. *-un-lft-identity44.6%

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

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

    if -3.0000000000000001e-83 < y < 3e12

    1. Initial program 91.3%

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

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

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

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

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

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

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

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

    if 3e12 < y

    1. Initial program 85.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{-83}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;y \leq 3000000000000:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]

Alternative 15: 46.2% accurate, 1.0× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -2.85 \cdot 10^{+48} \lor \neg \left(z \leq 3.9 \cdot 10^{-14}\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 -2.85e+48) (not (<= z 3.9e-14))) (/ x (* y z)) (/ x (* y t))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -2.85e+48) || !(z <= 3.9e-14)) {
		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 <= (-2.85d+48)) .or. (.not. (z <= 3.9d-14))) 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 <= -2.85e+48) || !(z <= 3.9e-14)) {
		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 <= -2.85e+48) or not (z <= 3.9e-14):
		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 <= -2.85e+48) || !(z <= 3.9e-14))
		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 <= -2.85e+48) || ~((z <= 3.9e-14)))
		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, -2.85e+48], N[Not[LessEqual[z, 3.9e-14]], $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 -2.85 \cdot 10^{+48} \lor \neg \left(z \leq 3.9 \cdot 10^{-14}\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 < -2.84999999999999984e48 or 3.8999999999999998e-14 < z

    1. Initial program 79.3%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot \frac{x}{y}}{z}} \]
      3. mul-1-neg43.9%

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

      \[\leadsto \color{blue}{\frac{-\frac{x}{y}}{z}} \]
    8. Step-by-step derivation
      1. distribute-frac-neg43.9%

        \[\leadsto \color{blue}{-\frac{\frac{x}{y}}{z}} \]
      2. neg-sub043.9%

        \[\leadsto \color{blue}{0 - \frac{\frac{x}{y}}{z}} \]
      3. add-sqr-sqrt29.7%

        \[\leadsto 0 - \frac{\color{blue}{\sqrt{\frac{x}{y}} \cdot \sqrt{\frac{x}{y}}}}{z} \]
      4. sqrt-unprod39.4%

        \[\leadsto 0 - \frac{\color{blue}{\sqrt{\frac{x}{y} \cdot \frac{x}{y}}}}{z} \]
      5. sqr-neg39.4%

        \[\leadsto 0 - \frac{\sqrt{\color{blue}{\left(-\frac{x}{y}\right) \cdot \left(-\frac{x}{y}\right)}}}{z} \]
      6. sqrt-unprod18.3%

        \[\leadsto 0 - \frac{\color{blue}{\sqrt{-\frac{x}{y}} \cdot \sqrt{-\frac{x}{y}}}}{z} \]
      7. add-sqr-sqrt33.9%

        \[\leadsto 0 - \frac{\color{blue}{-\frac{x}{y}}}{z} \]
      8. distribute-frac-neg33.9%

        \[\leadsto 0 - \color{blue}{\left(-\frac{\frac{x}{y}}{z}\right)} \]
      9. neg-sub033.9%

        \[\leadsto 0 - \color{blue}{\left(0 - \frac{\frac{x}{y}}{z}\right)} \]
      10. add-sqr-sqrt23.2%

        \[\leadsto 0 - \left(0 - \frac{\color{blue}{\sqrt{\frac{x}{y}} \cdot \sqrt{\frac{x}{y}}}}{z}\right) \]
      11. sqrt-unprod37.8%

        \[\leadsto 0 - \left(0 - \frac{\color{blue}{\sqrt{\frac{x}{y} \cdot \frac{x}{y}}}}{z}\right) \]
      12. sqr-neg37.8%

        \[\leadsto 0 - \left(0 - \frac{\sqrt{\color{blue}{\left(-\frac{x}{y}\right) \cdot \left(-\frac{x}{y}\right)}}}{z}\right) \]
      13. sqrt-unprod21.7%

        \[\leadsto 0 - \left(0 - \frac{\color{blue}{\sqrt{-\frac{x}{y}} \cdot \sqrt{-\frac{x}{y}}}}{z}\right) \]
      14. add-sqr-sqrt43.9%

        \[\leadsto 0 - \left(0 - \frac{\color{blue}{-\frac{x}{y}}}{z}\right) \]
      15. associate--r-43.9%

        \[\leadsto \color{blue}{\left(0 - 0\right) + \frac{-\frac{x}{y}}{z}} \]
      16. metadata-eval43.9%

        \[\leadsto \color{blue}{0} + \frac{-\frac{x}{y}}{z} \]
    9. Applied egg-rr37.4%

      \[\leadsto \color{blue}{0 + \frac{x}{z \cdot y}} \]
    10. Step-by-step derivation
      1. +-lft-identity37.4%

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

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

    if -2.84999999999999984e48 < z < 3.8999999999999998e-14

    1. Initial program 96.2%

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

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

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

Alternative 16: 48.2% accurate, 1.0× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+76} \lor \neg \left(z \leq 2.45 \cdot 10^{+165}\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 -2.8e+76) (not (<= z 2.45e+165))) (/ x (* y z)) (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -2.8e+76) || !(z <= 2.45e+165)) {
		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 <= (-2.8d+76)) .or. (.not. (z <= 2.45d+165))) 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 <= -2.8e+76) || !(z <= 2.45e+165)) {
		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 <= -2.8e+76) or not (z <= 2.45e+165):
		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 <= -2.8e+76) || !(z <= 2.45e+165))
		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 <= -2.8e+76) || ~((z <= 2.45e+165)))
		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, -2.8e+76], N[Not[LessEqual[z, 2.45e+165]], $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 -2.8 \cdot 10^{+76} \lor \neg \left(z \leq 2.45 \cdot 10^{+165}\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 < -2.7999999999999999e76 or 2.44999999999999993e165 < z

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-\frac{x}{y}}{z}} \]
    8. Step-by-step derivation
      1. distribute-frac-neg42.2%

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

        \[\leadsto \color{blue}{0 - \frac{\frac{x}{y}}{z}} \]
      3. add-sqr-sqrt29.8%

        \[\leadsto 0 - \frac{\color{blue}{\sqrt{\frac{x}{y}} \cdot \sqrt{\frac{x}{y}}}}{z} \]
      4. sqrt-unprod40.7%

        \[\leadsto 0 - \frac{\color{blue}{\sqrt{\frac{x}{y} \cdot \frac{x}{y}}}}{z} \]
      5. sqr-neg40.7%

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

        \[\leadsto 0 - \frac{\color{blue}{\sqrt{-\frac{x}{y}} \cdot \sqrt{-\frac{x}{y}}}}{z} \]
      7. add-sqr-sqrt36.3%

        \[\leadsto 0 - \frac{\color{blue}{-\frac{x}{y}}}{z} \]
      8. distribute-frac-neg36.3%

        \[\leadsto 0 - \color{blue}{\left(-\frac{\frac{x}{y}}{z}\right)} \]
      9. neg-sub036.3%

        \[\leadsto 0 - \color{blue}{\left(0 - \frac{\frac{x}{y}}{z}\right)} \]
      10. add-sqr-sqrt23.9%

        \[\leadsto 0 - \left(0 - \frac{\color{blue}{\sqrt{\frac{x}{y}} \cdot \sqrt{\frac{x}{y}}}}{z}\right) \]
      11. sqrt-unprod36.0%

        \[\leadsto 0 - \left(0 - \frac{\color{blue}{\sqrt{\frac{x}{y} \cdot \frac{x}{y}}}}{z}\right) \]
      12. sqr-neg36.0%

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

        \[\leadsto 0 - \left(0 - \frac{\color{blue}{\sqrt{-\frac{x}{y}} \cdot \sqrt{-\frac{x}{y}}}}{z}\right) \]
      14. add-sqr-sqrt42.2%

        \[\leadsto 0 - \left(0 - \frac{\color{blue}{-\frac{x}{y}}}{z}\right) \]
      15. associate--r-42.2%

        \[\leadsto \color{blue}{\left(0 - 0\right) + \frac{-\frac{x}{y}}{z}} \]
      16. metadata-eval42.2%

        \[\leadsto \color{blue}{0} + \frac{-\frac{x}{y}}{z} \]
    9. Applied egg-rr41.7%

      \[\leadsto \color{blue}{0 + \frac{x}{z \cdot y}} \]
    10. Step-by-step derivation
      1. +-lft-identity41.7%

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

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

    if -2.7999999999999999e76 < z < 2.44999999999999993e165

    1. Initial program 94.7%

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    4. Simplified46.4%

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

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

Alternative 17: 49.5% accurate, 1.0× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+80}:\\ \;\;\;\;\frac{x}{y \cdot z}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+48}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{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 (<= z -2.9e+80)
   (/ x (* y z))
   (if (<= z 3.6e+48) (/ (/ x t) y) (/ (/ x z) y))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.9e+80) {
		tmp = x / (y * z);
	} else if (z <= 3.6e+48) {
		tmp = (x / t) / y;
	} else {
		tmp = (x / z) / 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 <= (-2.9d+80)) then
        tmp = x / (y * z)
    else if (z <= 3.6d+48) then
        tmp = (x / t) / y
    else
        tmp = (x / z) / 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 <= -2.9e+80) {
		tmp = x / (y * z);
	} else if (z <= 3.6e+48) {
		tmp = (x / t) / y;
	} else {
		tmp = (x / z) / y;
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if z <= -2.9e+80:
		tmp = x / (y * z)
	elif z <= 3.6e+48:
		tmp = (x / t) / y
	else:
		tmp = (x / z) / y
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -2.9e+80)
		tmp = Float64(x / Float64(y * z));
	elseif (z <= 3.6e+48)
		tmp = Float64(Float64(x / t) / y);
	else
		tmp = Float64(Float64(x / z) / y);
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -2.9e+80)
		tmp = x / (y * z);
	elseif (z <= 3.6e+48)
		tmp = (x / t) / y;
	else
		tmp = (x / z) / 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[LessEqual[z, -2.9e+80], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e+48], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+80}:\\
\;\;\;\;\frac{x}{y \cdot z}\\

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

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


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

    1. Initial program 75.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot \frac{x}{y}}{z}} \]
      3. mul-1-neg42.9%

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

      \[\leadsto \color{blue}{\frac{-\frac{x}{y}}{z}} \]
    8. Step-by-step derivation
      1. distribute-frac-neg42.9%

        \[\leadsto \color{blue}{-\frac{\frac{x}{y}}{z}} \]
      2. neg-sub042.9%

        \[\leadsto \color{blue}{0 - \frac{\frac{x}{y}}{z}} \]
      3. add-sqr-sqrt31.9%

        \[\leadsto 0 - \frac{\color{blue}{\sqrt{\frac{x}{y}} \cdot \sqrt{\frac{x}{y}}}}{z} \]
      4. sqrt-unprod40.8%

        \[\leadsto 0 - \frac{\color{blue}{\sqrt{\frac{x}{y} \cdot \frac{x}{y}}}}{z} \]
      5. sqr-neg40.8%

        \[\leadsto 0 - \frac{\sqrt{\color{blue}{\left(-\frac{x}{y}\right) \cdot \left(-\frac{x}{y}\right)}}}{z} \]
      6. sqrt-unprod15.6%

        \[\leadsto 0 - \frac{\color{blue}{\sqrt{-\frac{x}{y}} \cdot \sqrt{-\frac{x}{y}}}}{z} \]
      7. add-sqr-sqrt34.9%

        \[\leadsto 0 - \frac{\color{blue}{-\frac{x}{y}}}{z} \]
      8. distribute-frac-neg34.9%

        \[\leadsto 0 - \color{blue}{\left(-\frac{\frac{x}{y}}{z}\right)} \]
      9. neg-sub034.9%

        \[\leadsto 0 - \color{blue}{\left(0 - \frac{\frac{x}{y}}{z}\right)} \]
      10. add-sqr-sqrt23.9%

        \[\leadsto 0 - \left(0 - \frac{\color{blue}{\sqrt{\frac{x}{y}} \cdot \sqrt{\frac{x}{y}}}}{z}\right) \]
      11. sqrt-unprod34.6%

        \[\leadsto 0 - \left(0 - \frac{\color{blue}{\sqrt{\frac{x}{y} \cdot \frac{x}{y}}}}{z}\right) \]
      12. sqr-neg34.6%

        \[\leadsto 0 - \left(0 - \frac{\sqrt{\color{blue}{\left(-\frac{x}{y}\right) \cdot \left(-\frac{x}{y}\right)}}}{z}\right) \]
      13. sqrt-unprod15.5%

        \[\leadsto 0 - \left(0 - \frac{\color{blue}{\sqrt{-\frac{x}{y}} \cdot \sqrt{-\frac{x}{y}}}}{z}\right) \]
      14. add-sqr-sqrt42.9%

        \[\leadsto 0 - \left(0 - \frac{\color{blue}{-\frac{x}{y}}}{z}\right) \]
      15. associate--r-42.9%

        \[\leadsto \color{blue}{\left(0 - 0\right) + \frac{-\frac{x}{y}}{z}} \]
      16. metadata-eval42.9%

        \[\leadsto \color{blue}{0} + \frac{-\frac{x}{y}}{z} \]
    9. Applied egg-rr44.1%

      \[\leadsto \color{blue}{0 + \frac{x}{z \cdot y}} \]
    10. Step-by-step derivation
      1. +-lft-identity44.1%

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

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

    if -2.89999999999999986e80 < z < 3.59999999999999983e48

    1. Initial program 95.4%

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

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

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

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

    if 3.59999999999999983e48 < z

    1. Initial program 78.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-\frac{x}{y}}{z}} \]
    8. Step-by-step derivation
      1. distribute-frac-neg42.2%

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

        \[\leadsto \color{blue}{0 - \frac{\frac{x}{y}}{z}} \]
      3. add-sqr-sqrt27.2%

        \[\leadsto 0 - \frac{\color{blue}{\sqrt{\frac{x}{y}} \cdot \sqrt{\frac{x}{y}}}}{z} \]
      4. sqrt-unprod39.4%

        \[\leadsto 0 - \frac{\color{blue}{\sqrt{\frac{x}{y} \cdot \frac{x}{y}}}}{z} \]
      5. sqr-neg39.4%

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

        \[\leadsto 0 - \frac{\color{blue}{\sqrt{-\frac{x}{y}} \cdot \sqrt{-\frac{x}{y}}}}{z} \]
      7. add-sqr-sqrt36.6%

        \[\leadsto 0 - \frac{\color{blue}{-\frac{x}{y}}}{z} \]
      8. distribute-frac-neg36.6%

        \[\leadsto 0 - \color{blue}{\left(-\frac{\frac{x}{y}}{z}\right)} \]
      9. neg-sub036.6%

        \[\leadsto 0 - \color{blue}{\left(0 - \frac{\frac{x}{y}}{z}\right)} \]
      10. add-sqr-sqrt25.7%

        \[\leadsto 0 - \left(0 - \frac{\color{blue}{\sqrt{\frac{x}{y}} \cdot \sqrt{\frac{x}{y}}}}{z}\right) \]
      11. sqrt-unprod41.5%

        \[\leadsto 0 - \left(0 - \frac{\color{blue}{\sqrt{\frac{x}{y} \cdot \frac{x}{y}}}}{z}\right) \]
      12. sqr-neg41.5%

        \[\leadsto 0 - \left(0 - \frac{\sqrt{\color{blue}{\left(-\frac{x}{y}\right) \cdot \left(-\frac{x}{y}\right)}}}{z}\right) \]
      13. sqrt-unprod22.5%

        \[\leadsto 0 - \left(0 - \frac{\color{blue}{\sqrt{-\frac{x}{y}} \cdot \sqrt{-\frac{x}{y}}}}{z}\right) \]
      14. add-sqr-sqrt42.2%

        \[\leadsto 0 - \left(0 - \frac{\color{blue}{-\frac{x}{y}}}{z}\right) \]
      15. associate--r-42.2%

        \[\leadsto \color{blue}{\left(0 - 0\right) + \frac{-\frac{x}{y}}{z}} \]
      16. metadata-eval42.2%

        \[\leadsto \color{blue}{0} + \frac{-\frac{x}{y}}{z} \]
    9. Applied egg-rr36.8%

      \[\leadsto \color{blue}{0 + \frac{x}{z \cdot y}} \]
    10. Step-by-step derivation
      1. +-lft-identity36.8%

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

      \[\leadsto \color{blue}{\frac{x}{z \cdot y}} \]
    12. Taylor expanded in x around 0 36.8%

      \[\leadsto \color{blue}{\frac{x}{y \cdot z}} \]
    13. Step-by-step derivation
      1. *-commutative36.8%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{y}} \]
    14. Simplified43.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+80}:\\ \;\;\;\;\frac{x}{y \cdot z}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+48}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{y}\\ \end{array} \]

Alternative 18: 39.1% 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 88.4%

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

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

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

Developer target: 87.7% 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 2023301 
(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))))