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

Percentage Accurate: 89.0% → 97.0%
Time: 12.0s
Alternatives: 19
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 89.0% accurate, 1.0× speedup?

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

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

Alternative 1: 97.0% accurate, 1.0× speedup?

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

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

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

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

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

Alternative 2: 73.6% accurate, 0.5× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} t_1 := \frac{\frac{x}{t - z}}{y}\\ \mathbf{if}\;y \leq -3.9 \cdot 10^{+208}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -7.2 \cdot 10^{-7}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{elif}\;y \leq -6.5 \cdot 10^{-81}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-221}:\\ \;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{-259}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-259}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \end{array} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (/ x (- t z)) y)))
   (if (<= y -3.9e+208)
     t_1
     (if (<= y -7.2e-7)
       (/ x (* (- t z) y))
       (if (<= y -6.5e-81)
         t_1
         (if (<= y -1.2e-221)
           (/ 1.0 (/ z (/ x z)))
           (if (<= y -7.5e-259)
             (/ (/ x t) (- y z))
             (if (<= y 1.25e-259)
               (* (/ x z) (/ 1.0 z))
               (/ x (* t (- y z)))))))))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double t_1 = (x / (t - z)) / y;
	double tmp;
	if (y <= -3.9e+208) {
		tmp = t_1;
	} else if (y <= -7.2e-7) {
		tmp = x / ((t - z) * y);
	} else if (y <= -6.5e-81) {
		tmp = t_1;
	} else if (y <= -1.2e-221) {
		tmp = 1.0 / (z / (x / z));
	} else if (y <= -7.5e-259) {
		tmp = (x / t) / (y - z);
	} else if (y <= 1.25e-259) {
		tmp = (x / 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) :: t_1
    real(8) :: tmp
    t_1 = (x / (t - z)) / y
    if (y <= (-3.9d+208)) then
        tmp = t_1
    else if (y <= (-7.2d-7)) then
        tmp = x / ((t - z) * y)
    else if (y <= (-6.5d-81)) then
        tmp = t_1
    else if (y <= (-1.2d-221)) then
        tmp = 1.0d0 / (z / (x / z))
    else if (y <= (-7.5d-259)) then
        tmp = (x / t) / (y - z)
    else if (y <= 1.25d-259) then
        tmp = (x / 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 t_1 = (x / (t - z)) / y;
	double tmp;
	if (y <= -3.9e+208) {
		tmp = t_1;
	} else if (y <= -7.2e-7) {
		tmp = x / ((t - z) * y);
	} else if (y <= -6.5e-81) {
		tmp = t_1;
	} else if (y <= -1.2e-221) {
		tmp = 1.0 / (z / (x / z));
	} else if (y <= -7.5e-259) {
		tmp = (x / t) / (y - z);
	} else if (y <= 1.25e-259) {
		tmp = (x / z) * (1.0 / z);
	} else {
		tmp = x / (t * (y - z));
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	t_1 = (x / (t - z)) / y
	tmp = 0
	if y <= -3.9e+208:
		tmp = t_1
	elif y <= -7.2e-7:
		tmp = x / ((t - z) * y)
	elif y <= -6.5e-81:
		tmp = t_1
	elif y <= -1.2e-221:
		tmp = 1.0 / (z / (x / z))
	elif y <= -7.5e-259:
		tmp = (x / t) / (y - z)
	elif y <= 1.25e-259:
		tmp = (x / z) * (1.0 / z)
	else:
		tmp = x / (t * (y - z))
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(x / Float64(t - z)) / y)
	tmp = 0.0
	if (y <= -3.9e+208)
		tmp = t_1;
	elseif (y <= -7.2e-7)
		tmp = Float64(x / Float64(Float64(t - z) * y));
	elseif (y <= -6.5e-81)
		tmp = t_1;
	elseif (y <= -1.2e-221)
		tmp = Float64(1.0 / Float64(z / Float64(x / z)));
	elseif (y <= -7.5e-259)
		tmp = Float64(Float64(x / t) / Float64(y - z));
	elseif (y <= 1.25e-259)
		tmp = Float64(Float64(x / z) * Float64(1.0 / z));
	else
		tmp = Float64(x / Float64(t * Float64(y - z)));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = (x / (t - z)) / y;
	tmp = 0.0;
	if (y <= -3.9e+208)
		tmp = t_1;
	elseif (y <= -7.2e-7)
		tmp = x / ((t - z) * y);
	elseif (y <= -6.5e-81)
		tmp = t_1;
	elseif (y <= -1.2e-221)
		tmp = 1.0 / (z / (x / z));
	elseif (y <= -7.5e-259)
		tmp = (x / t) / (y - z);
	elseif (y <= 1.25e-259)
		tmp = (x / 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_] := Block[{t$95$1 = N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -3.9e+208], t$95$1, If[LessEqual[y, -7.2e-7], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6.5e-81], t$95$1, If[LessEqual[y, -1.2e-221], N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.5e-259], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.25e-259], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{t - z}}{y}\\
\mathbf{if}\;y \leq -3.9 \cdot 10^{+208}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq -6.5 \cdot 10^{-81}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -1.2 \cdot 10^{-221}:\\
\;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\

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

\mathbf{elif}\;y \leq 1.25 \cdot 10^{-259}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -3.9000000000000001e208 or -7.19999999999999989e-7 < y < -6.5000000000000002e-81

    1. Initial program 86.2%

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

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

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

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

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

    if -3.9000000000000001e208 < y < -7.19999999999999989e-7

    1. Initial program 95.0%

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

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

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

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

    if -6.5000000000000002e-81 < y < -1.20000000000000012e-221

    1. Initial program 85.8%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\color{blue}{\frac{{z}^{2}}{x}}} \]
    7. Step-by-step derivation
      1. unpow256.9%

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

        \[\leadsto \frac{1}{\color{blue}{\frac{z}{\frac{x}{z}}}} \]
    8. Simplified70.9%

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

    if -1.20000000000000012e-221 < y < -7.50000000000000052e-259

    1. Initial program 99.5%

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

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

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

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

    if -7.50000000000000052e-259 < y < 1.24999999999999994e-259

    1. Initial program 78.2%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow255.6%

        \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
    4. Simplified55.6%

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{1}{z}} \]
    6. Applied egg-rr66.5%

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

    if 1.24999999999999994e-259 < y

    1. Initial program 89.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.9 \cdot 10^{+208}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq -7.2 \cdot 10^{-7}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{elif}\;y \leq -6.5 \cdot 10^{-81}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-221}:\\ \;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{-259}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-259}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \end{array} \]

Alternative 3: 73.7% accurate, 0.5× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} t_1 := \frac{x}{z} \cdot \frac{1}{z}\\ \mathbf{if}\;y \leq -4.2 \cdot 10^{+208}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -1.85 \cdot 10^{-66}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{-221}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{-258}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{-262}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \end{array} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (/ x z) (/ 1.0 z))))
   (if (<= y -4.2e+208)
     (/ (/ x y) (- t z))
     (if (<= y -1.85e-66)
       (/ x (* (- t z) y))
       (if (<= y -1.1e-221)
         t_1
         (if (<= y -2.8e-258)
           (/ (/ x t) (- y z))
           (if (<= y 3.2e-262) t_1 (/ x (* t (- y z))))))))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double t_1 = (x / z) * (1.0 / z);
	double tmp;
	if (y <= -4.2e+208) {
		tmp = (x / y) / (t - z);
	} else if (y <= -1.85e-66) {
		tmp = x / ((t - z) * y);
	} else if (y <= -1.1e-221) {
		tmp = t_1;
	} else if (y <= -2.8e-258) {
		tmp = (x / t) / (y - z);
	} else if (y <= 3.2e-262) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = (x / z) * (1.0d0 / z)
    if (y <= (-4.2d+208)) then
        tmp = (x / y) / (t - z)
    else if (y <= (-1.85d-66)) then
        tmp = x / ((t - z) * y)
    else if (y <= (-1.1d-221)) then
        tmp = t_1
    else if (y <= (-2.8d-258)) then
        tmp = (x / t) / (y - z)
    else if (y <= 3.2d-262) then
        tmp = t_1
    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 t_1 = (x / z) * (1.0 / z);
	double tmp;
	if (y <= -4.2e+208) {
		tmp = (x / y) / (t - z);
	} else if (y <= -1.85e-66) {
		tmp = x / ((t - z) * y);
	} else if (y <= -1.1e-221) {
		tmp = t_1;
	} else if (y <= -2.8e-258) {
		tmp = (x / t) / (y - z);
	} else if (y <= 3.2e-262) {
		tmp = t_1;
	} else {
		tmp = x / (t * (y - z));
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	t_1 = (x / z) * (1.0 / z)
	tmp = 0
	if y <= -4.2e+208:
		tmp = (x / y) / (t - z)
	elif y <= -1.85e-66:
		tmp = x / ((t - z) * y)
	elif y <= -1.1e-221:
		tmp = t_1
	elif y <= -2.8e-258:
		tmp = (x / t) / (y - z)
	elif y <= 3.2e-262:
		tmp = t_1
	else:
		tmp = x / (t * (y - z))
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(x / z) * Float64(1.0 / z))
	tmp = 0.0
	if (y <= -4.2e+208)
		tmp = Float64(Float64(x / y) / Float64(t - z));
	elseif (y <= -1.85e-66)
		tmp = Float64(x / Float64(Float64(t - z) * y));
	elseif (y <= -1.1e-221)
		tmp = t_1;
	elseif (y <= -2.8e-258)
		tmp = Float64(Float64(x / t) / Float64(y - z));
	elseif (y <= 3.2e-262)
		tmp = t_1;
	else
		tmp = Float64(x / Float64(t * Float64(y - z)));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = (x / z) * (1.0 / z);
	tmp = 0.0;
	if (y <= -4.2e+208)
		tmp = (x / y) / (t - z);
	elseif (y <= -1.85e-66)
		tmp = x / ((t - z) * y);
	elseif (y <= -1.1e-221)
		tmp = t_1;
	elseif (y <= -2.8e-258)
		tmp = (x / t) / (y - z);
	elseif (y <= 3.2e-262)
		tmp = t_1;
	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_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.2e+208], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.85e-66], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.1e-221], t$95$1, If[LessEqual[y, -2.8e-258], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e-262], t$95$1, N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{z} \cdot \frac{1}{z}\\
\mathbf{if}\;y \leq -4.2 \cdot 10^{+208}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\

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

\mathbf{elif}\;y \leq -1.1 \cdot 10^{-221}:\\
\;\;\;\;t_1\\

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

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

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


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

    1. Initial program 79.8%

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

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

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

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

    if -4.1999999999999997e208 < y < -1.8500000000000001e-66

    1. Initial program 94.7%

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

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

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

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

    if -1.8500000000000001e-66 < y < -1.10000000000000001e-221 or -2.8000000000000002e-258 < y < 3.2e-262

    1. Initial program 84.3%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow257.7%

        \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
    4. Simplified57.7%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
      2. div-inv69.4%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{1}{z}} \]
    6. Applied egg-rr69.4%

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

    if -1.10000000000000001e-221 < y < -2.8000000000000002e-258

    1. Initial program 99.5%

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

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

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

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

    if 3.2e-262 < y

    1. Initial program 89.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{+208}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -1.85 \cdot 10^{-66}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{-221}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{-258}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{-262}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \end{array} \]

Alternative 4: 72.8% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq 3.6 \cdot 10^{+124} \lor \neg \left(z \leq 5.2 \cdot 10^{+167}\right):\\
\;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.90000000000000014e33

    1. Initial program 80.7%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow271.9%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
    4. Simplified79.4%

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

    if -4.90000000000000014e33 < z < 5.20000000000000013e35

    1. Initial program 93.8%

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

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

    if 5.20000000000000013e35 < z < 3.59999999999999986e124 or 5.2000000000000004e167 < z

    1. Initial program 85.6%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\color{blue}{\frac{{z}^{2}}{x}}} \]
    7. Step-by-step derivation
      1. unpow281.5%

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

        \[\leadsto \frac{1}{\color{blue}{\frac{z}{\frac{x}{z}}}} \]
    8. Simplified87.5%

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

    if 3.59999999999999986e124 < z < 5.2000000000000004e167

    1. Initial program 87.8%

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{z \cdot \left(t - z\right)}} \]
    5. Step-by-step derivation
      1. neg-mul-164.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.9 \cdot 10^{+33}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+35}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+124} \lor \neg \left(z \leq 5.2 \cdot 10^{+167}\right):\\ \;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{-1}{t}\\ \end{array} \]

Alternative 5: 71.8% accurate, 0.6× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -7.4 \cdot 10^{-67}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{-221} \lor \neg \left(y \leq -8 \cdot 10^{-259}\right) \land y \leq 3.2 \cdot 10^{-258}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \end{array} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (<= y -7.4e-67)
   (/ x (* (- t z) y))
   (if (or (<= y -1.1e-221) (and (not (<= y -8e-259)) (<= y 3.2e-258)))
     (* (/ x 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 <= -7.4e-67) {
		tmp = x / ((t - z) * y);
	} else if ((y <= -1.1e-221) || (!(y <= -8e-259) && (y <= 3.2e-258))) {
		tmp = (x / 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 <= (-7.4d-67)) then
        tmp = x / ((t - z) * y)
    else if ((y <= (-1.1d-221)) .or. (.not. (y <= (-8d-259))) .and. (y <= 3.2d-258)) then
        tmp = (x / 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 <= -7.4e-67) {
		tmp = x / ((t - z) * y);
	} else if ((y <= -1.1e-221) || (!(y <= -8e-259) && (y <= 3.2e-258))) {
		tmp = (x / 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 <= -7.4e-67:
		tmp = x / ((t - z) * y)
	elif (y <= -1.1e-221) or (not (y <= -8e-259) and (y <= 3.2e-258)):
		tmp = (x / 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 <= -7.4e-67)
		tmp = Float64(x / Float64(Float64(t - z) * y));
	elseif ((y <= -1.1e-221) || (!(y <= -8e-259) && (y <= 3.2e-258)))
		tmp = Float64(Float64(x / z) * Float64(1.0 / z));
	else
		tmp = Float64(x / Float64(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 <= -7.4e-67)
		tmp = x / ((t - z) * y);
	elseif ((y <= -1.1e-221) || (~((y <= -8e-259)) && (y <= 3.2e-258)))
		tmp = (x / 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, -7.4e-67], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.1e-221], And[N[Not[LessEqual[y, -8e-259]], $MachinePrecision], LessEqual[y, 3.2e-258]]], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.4 \cdot 10^{-67}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\

\mathbf{elif}\;y \leq -1.1 \cdot 10^{-221} \lor \neg \left(y \leq -8 \cdot 10^{-259}\right) \land y \leq 3.2 \cdot 10^{-258}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\

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


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

    1. Initial program 89.6%

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

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

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

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

    if -7.3999999999999999e-67 < y < -1.10000000000000001e-221 or -8.0000000000000006e-259 < y < 3.2000000000000002e-258

    1. Initial program 84.3%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow257.7%

        \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
    4. Simplified57.7%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
      2. div-inv69.4%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{1}{z}} \]
    6. Applied egg-rr69.4%

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

    if -1.10000000000000001e-221 < y < -8.0000000000000006e-259 or 3.2000000000000002e-258 < y

    1. Initial program 90.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.4 \cdot 10^{-67}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{-221} \lor \neg \left(y \leq -8 \cdot 10^{-259}\right) \land y \leq 3.2 \cdot 10^{-258}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \end{array} \]

Alternative 6: 73.0% accurate, 0.6× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{+34}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+37} \lor \neg \left(z \leq 3.6 \cdot 10^{+124}\right) \land z \leq 5.2 \cdot 10^{+167}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{z}{\frac{x}{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 (<= z -1.1e+34)
   (/ (/ x z) z)
   (if (or (<= z 3.6e+37) (and (not (<= z 3.6e+124)) (<= z 5.2e+167)))
     (/ (/ x t) (- y z))
     (/ 1.0 (/ z (/ x z))))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.1e+34) {
		tmp = (x / z) / z;
	} else if ((z <= 3.6e+37) || (!(z <= 3.6e+124) && (z <= 5.2e+167))) {
		tmp = (x / t) / (y - z);
	} else {
		tmp = 1.0 / (z / (x / z));
	}
	return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-1.1d+34)) then
        tmp = (x / z) / z
    else if ((z <= 3.6d+37) .or. (.not. (z <= 3.6d+124)) .and. (z <= 5.2d+167)) then
        tmp = (x / t) / (y - z)
    else
        tmp = 1.0d0 / (z / (x / z))
    end if
    code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.1e+34) {
		tmp = (x / z) / z;
	} else if ((z <= 3.6e+37) || (!(z <= 3.6e+124) && (z <= 5.2e+167))) {
		tmp = (x / t) / (y - z);
	} else {
		tmp = 1.0 / (z / (x / z));
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if z <= -1.1e+34:
		tmp = (x / z) / z
	elif (z <= 3.6e+37) or (not (z <= 3.6e+124) and (z <= 5.2e+167)):
		tmp = (x / t) / (y - z)
	else:
		tmp = 1.0 / (z / (x / z))
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -1.1e+34)
		tmp = Float64(Float64(x / z) / z);
	elseif ((z <= 3.6e+37) || (!(z <= 3.6e+124) && (z <= 5.2e+167)))
		tmp = Float64(Float64(x / t) / Float64(y - z));
	else
		tmp = Float64(1.0 / Float64(z / Float64(x / z)));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -1.1e+34)
		tmp = (x / z) / z;
	elseif ((z <= 3.6e+37) || (~((z <= 3.6e+124)) && (z <= 5.2e+167)))
		tmp = (x / t) / (y - z);
	else
		tmp = 1.0 / (z / (x / 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[z, -1.1e+34], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[Or[LessEqual[z, 3.6e+37], And[N[Not[LessEqual[z, 3.6e+124]], $MachinePrecision], LessEqual[z, 5.2e+167]]], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+34}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\

\mathbf{elif}\;z \leq 3.6 \cdot 10^{+37} \lor \neg \left(z \leq 3.6 \cdot 10^{+124}\right) \land z \leq 5.2 \cdot 10^{+167}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\

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


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

    1. Initial program 80.7%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow271.9%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
    4. Simplified79.4%

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

    if -1.1000000000000001e34 < z < 3.59999999999999998e37 or 3.59999999999999986e124 < z < 5.2000000000000004e167

    1. Initial program 93.5%

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

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

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

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

    if 3.59999999999999998e37 < z < 3.59999999999999986e124 or 5.2000000000000004e167 < z

    1. Initial program 85.6%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\color{blue}{\frac{{z}^{2}}{x}}} \]
    7. Step-by-step derivation
      1. unpow281.5%

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

        \[\leadsto \frac{1}{\color{blue}{\frac{z}{\frac{x}{z}}}} \]
    8. Simplified87.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{+34}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+37} \lor \neg \left(z \leq 3.6 \cdot 10^{+124}\right) \land z \leq 5.2 \cdot 10^{+167}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\ \end{array} \]

Alternative 7: 82.4% accurate, 0.6× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -4.4 \cdot 10^{+208}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq -3.6 \cdot 10^{-35}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-174}:\\ \;\;\;\;\frac{-1}{t - z} \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \end{array} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (<= y -4.4e+208)
   (/ (/ x (- t z)) y)
   (if (<= y -3.6e-35)
     (/ x (* (- t z) y))
     (if (<= y 1.8e-174) (* (/ -1.0 (- t z)) (/ x z)) (/ x (* t (- y z)))))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -4.4e+208) {
		tmp = (x / (t - z)) / y;
	} else if (y <= -3.6e-35) {
		tmp = x / ((t - z) * y);
	} else if (y <= 1.8e-174) {
		tmp = (-1.0 / (t - z)) * (x / 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 <= (-4.4d+208)) then
        tmp = (x / (t - z)) / y
    else if (y <= (-3.6d-35)) then
        tmp = x / ((t - z) * y)
    else if (y <= 1.8d-174) then
        tmp = ((-1.0d0) / (t - z)) * (x / 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 <= -4.4e+208) {
		tmp = (x / (t - z)) / y;
	} else if (y <= -3.6e-35) {
		tmp = x / ((t - z) * y);
	} else if (y <= 1.8e-174) {
		tmp = (-1.0 / (t - z)) * (x / z);
	} else {
		tmp = x / (t * (y - z));
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if y <= -4.4e+208:
		tmp = (x / (t - z)) / y
	elif y <= -3.6e-35:
		tmp = x / ((t - z) * y)
	elif y <= 1.8e-174:
		tmp = (-1.0 / (t - z)) * (x / 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 <= -4.4e+208)
		tmp = Float64(Float64(x / Float64(t - z)) / y);
	elseif (y <= -3.6e-35)
		tmp = Float64(x / Float64(Float64(t - z) * y));
	elseif (y <= 1.8e-174)
		tmp = Float64(Float64(-1.0 / Float64(t - z)) * Float64(x / z));
	else
		tmp = Float64(x / Float64(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 <= -4.4e+208)
		tmp = (x / (t - z)) / y;
	elseif (y <= -3.6e-35)
		tmp = x / ((t - z) * y);
	elseif (y <= 1.8e-174)
		tmp = (-1.0 / (t - z)) * (x / 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, -4.4e+208], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -3.6e-35], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e-174], N[(N[(-1.0 / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{+208}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\

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

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

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


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

    1. Initial program 79.8%

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

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

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

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

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

    if -4.40000000000000029e208 < y < -3.60000000000000019e-35

    1. Initial program 95.6%

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

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

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

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

    if -3.60000000000000019e-35 < y < 1.79999999999999999e-174

    1. Initial program 85.8%

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{z \cdot \left(t - z\right)}} \]
    5. Step-by-step derivation
      1. neg-mul-170.4%

        \[\leadsto \frac{\color{blue}{-1 \cdot x}}{z \cdot \left(t - z\right)} \]
      2. *-commutative70.4%

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

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

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

    if 1.79999999999999999e-174 < y

    1. Initial program 90.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.4 \cdot 10^{+208}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq -3.6 \cdot 10^{-35}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-174}:\\ \;\;\;\;\frac{-1}{t - z} \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \end{array} \]

Alternative 8: 80.0% accurate, 0.6× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -4 \cdot 10^{+208}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{-36}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-170}:\\ \;\;\;\;\frac{-x}{z \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \end{array} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (<= y -4e+208)
   (/ (/ x (- t z)) y)
   (if (<= y -7.5e-36)
     (/ x (* (- t z) y))
     (if (<= y 4.8e-170) (/ (- x) (* z (- t z))) (/ x (* t (- y z)))))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -4e+208) {
		tmp = (x / (t - z)) / y;
	} else if (y <= -7.5e-36) {
		tmp = x / ((t - z) * y);
	} else if (y <= 4.8e-170) {
		tmp = -x / (z * (t - 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 <= (-4d+208)) then
        tmp = (x / (t - z)) / y
    else if (y <= (-7.5d-36)) then
        tmp = x / ((t - z) * y)
    else if (y <= 4.8d-170) then
        tmp = -x / (z * (t - 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 <= -4e+208) {
		tmp = (x / (t - z)) / y;
	} else if (y <= -7.5e-36) {
		tmp = x / ((t - z) * y);
	} else if (y <= 4.8e-170) {
		tmp = -x / (z * (t - z));
	} else {
		tmp = x / (t * (y - z));
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if y <= -4e+208:
		tmp = (x / (t - z)) / y
	elif y <= -7.5e-36:
		tmp = x / ((t - z) * y)
	elif y <= 4.8e-170:
		tmp = -x / (z * (t - 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 <= -4e+208)
		tmp = Float64(Float64(x / Float64(t - z)) / y);
	elseif (y <= -7.5e-36)
		tmp = Float64(x / Float64(Float64(t - z) * y));
	elseif (y <= 4.8e-170)
		tmp = Float64(Float64(-x) / Float64(z * Float64(t - z)));
	else
		tmp = Float64(x / Float64(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 <= -4e+208)
		tmp = (x / (t - z)) / y;
	elseif (y <= -7.5e-36)
		tmp = x / ((t - z) * y);
	elseif (y <= 4.8e-170)
		tmp = -x / (z * (t - 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, -4e+208], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -7.5e-36], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e-170], N[((-x) / N[(z * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{+208}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\

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

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

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


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

    1. Initial program 79.8%

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

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

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

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

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

    if -3.9999999999999999e208 < y < -7.49999999999999972e-36

    1. Initial program 95.6%

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

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

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

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

    if -7.49999999999999972e-36 < y < 4.7999999999999999e-170

    1. Initial program 85.8%

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

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

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

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

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

    if 4.7999999999999999e-170 < y

    1. Initial program 90.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4 \cdot 10^{+208}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{-36}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-170}:\\ \;\;\;\;\frac{-x}{z \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \end{array} \]

Alternative 9: 82.4% accurate, 0.6× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -6.8 \cdot 10^{+208}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq -2.6 \cdot 10^{-35}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{-169}:\\ \;\;\;\;\frac{\frac{-x}{z}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \end{array} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (<= y -6.8e+208)
   (/ (/ x (- t z)) y)
   (if (<= y -2.6e-35)
     (/ x (* (- t z) y))
     (if (<= y 1.15e-169) (/ (/ (- x) z) (- t z)) (/ x (* t (- y z)))))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -6.8e+208) {
		tmp = (x / (t - z)) / y;
	} else if (y <= -2.6e-35) {
		tmp = x / ((t - z) * y);
	} else if (y <= 1.15e-169) {
		tmp = (-x / z) / (t - 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 <= (-6.8d+208)) then
        tmp = (x / (t - z)) / y
    else if (y <= (-2.6d-35)) then
        tmp = x / ((t - z) * y)
    else if (y <= 1.15d-169) then
        tmp = (-x / z) / (t - 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 <= -6.8e+208) {
		tmp = (x / (t - z)) / y;
	} else if (y <= -2.6e-35) {
		tmp = x / ((t - z) * y);
	} else if (y <= 1.15e-169) {
		tmp = (-x / z) / (t - z);
	} else {
		tmp = x / (t * (y - z));
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if y <= -6.8e+208:
		tmp = (x / (t - z)) / y
	elif y <= -2.6e-35:
		tmp = x / ((t - z) * y)
	elif y <= 1.15e-169:
		tmp = (-x / z) / (t - 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 <= -6.8e+208)
		tmp = Float64(Float64(x / Float64(t - z)) / y);
	elseif (y <= -2.6e-35)
		tmp = Float64(x / Float64(Float64(t - z) * y));
	elseif (y <= 1.15e-169)
		tmp = Float64(Float64(Float64(-x) / z) / Float64(t - z));
	else
		tmp = Float64(x / Float64(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 <= -6.8e+208)
		tmp = (x / (t - z)) / y;
	elseif (y <= -2.6e-35)
		tmp = x / ((t - z) * y);
	elseif (y <= 1.15e-169)
		tmp = (-x / z) / (t - 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, -6.8e+208], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -2.6e-35], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e-169], N[(N[((-x) / z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{+208}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\

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

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

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


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

    1. Initial program 79.8%

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

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

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

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

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

    if -6.7999999999999997e208 < y < -2.60000000000000005e-35

    1. Initial program 95.6%

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

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

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

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

    if -2.60000000000000005e-35 < y < 1.15e-169

    1. Initial program 86.0%

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

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

        \[\leadsto \color{blue}{-\frac{x}{z \cdot \left(t - z\right)}} \]
      2. distribute-frac-neg70.8%

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

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

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

    if 1.15e-169 < y

    1. Initial program 90.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.8 \cdot 10^{+208}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq -2.6 \cdot 10^{-35}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{-169}:\\ \;\;\;\;\frac{\frac{-x}{z}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \end{array} \]

Alternative 10: 93.8% accurate, 0.7× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{+124}:\\ \;\;\;\;\frac{\frac{-x}{y - z}}{z}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+150}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot \left(y - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{t - z} \cdot \frac{x}{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 (<= z -9.5e+124)
   (/ (/ (- x) (- y z)) z)
   (if (<= z 2.5e+150)
     (/ x (* (- t z) (- y z)))
     (* (/ -1.0 (- t z)) (/ x z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -9.5e+124) {
		tmp = (-x / (y - z)) / z;
	} else if (z <= 2.5e+150) {
		tmp = x / ((t - z) * (y - z));
	} else {
		tmp = (-1.0 / (t - z)) * (x / z);
	}
	return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-9.5d+124)) then
        tmp = (-x / (y - z)) / z
    else if (z <= 2.5d+150) then
        tmp = x / ((t - z) * (y - z))
    else
        tmp = ((-1.0d0) / (t - z)) * (x / z)
    end if
    code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -9.5e+124) {
		tmp = (-x / (y - z)) / z;
	} else if (z <= 2.5e+150) {
		tmp = x / ((t - z) * (y - z));
	} else {
		tmp = (-1.0 / (t - z)) * (x / z);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if z <= -9.5e+124:
		tmp = (-x / (y - z)) / z
	elif z <= 2.5e+150:
		tmp = x / ((t - z) * (y - z))
	else:
		tmp = (-1.0 / (t - z)) * (x / z)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -9.5e+124)
		tmp = Float64(Float64(Float64(-x) / Float64(y - z)) / z);
	elseif (z <= 2.5e+150)
		tmp = Float64(x / Float64(Float64(t - z) * Float64(y - z)));
	else
		tmp = Float64(Float64(-1.0 / Float64(t - z)) * Float64(x / z));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -9.5e+124)
		tmp = (-x / (y - z)) / z;
	elseif (z <= 2.5e+150)
		tmp = x / ((t - z) * (y - z));
	else
		tmp = (-1.0 / (t - z)) * (x / 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[z, -9.5e+124], N[(N[((-x) / N[(y - z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 2.5e+150], N[(x / N[(N[(t - z), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+124}:\\
\;\;\;\;\frac{\frac{-x}{y - z}}{z}\\

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

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


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

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

    if -9.50000000000000004e124 < z < 2.50000000000000004e150

    1. Initial program 92.7%

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

    if 2.50000000000000004e150 < z

    1. Initial program 82.0%

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{z \cdot \left(t - z\right)}} \]
    5. Step-by-step derivation
      1. neg-mul-182.0%

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

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

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

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

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

Alternative 11: 67.1% accurate, 0.8× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+33}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+39}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{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 (<= z -1.6e+33)
   (/ (/ x z) z)
   (if (<= z 7.8e+39) (/ (/ x t) y) (* (/ x z) (/ 1.0 z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.6e+33) {
		tmp = (x / z) / z;
	} else if (z <= 7.8e+39) {
		tmp = (x / t) / y;
	} else {
		tmp = (x / z) * (1.0 / z);
	}
	return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-1.6d+33)) then
        tmp = (x / z) / z
    else if (z <= 7.8d+39) then
        tmp = (x / t) / y
    else
        tmp = (x / z) * (1.0d0 / z)
    end if
    code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.6e+33) {
		tmp = (x / z) / z;
	} else if (z <= 7.8e+39) {
		tmp = (x / t) / y;
	} else {
		tmp = (x / z) * (1.0 / z);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if z <= -1.6e+33:
		tmp = (x / z) / z
	elif z <= 7.8e+39:
		tmp = (x / t) / y
	else:
		tmp = (x / z) * (1.0 / z)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -1.6e+33)
		tmp = Float64(Float64(x / z) / z);
	elseif (z <= 7.8e+39)
		tmp = Float64(Float64(x / t) / y);
	else
		tmp = Float64(Float64(x / z) * Float64(1.0 / z));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -1.6e+33)
		tmp = (x / z) / z;
	elseif (z <= 7.8e+39)
		tmp = (x / t) / y;
	else
		tmp = (x / z) * (1.0 / 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[z, -1.6e+33], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 7.8e+39], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+33}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\

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

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


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

    1. Initial program 80.7%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow271.9%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
    4. Simplified79.4%

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

    if -1.60000000000000009e33 < z < 7.8000000000000002e39

    1. Initial program 93.8%

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

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

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

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

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

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

    if 7.8000000000000002e39 < z

    1. Initial program 85.9%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow271.1%

        \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
    4. Simplified71.1%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
      2. div-inv75.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+33}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+39}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \end{array} \]

Alternative 12: 67.1% accurate, 0.8× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{+33}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+35}:\\ \;\;\;\;\frac{1}{y \cdot \frac{t}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{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 (<= z -9.5e+33)
   (/ (/ x z) z)
   (if (<= z 7e+35) (/ 1.0 (* y (/ t x))) (* (/ x z) (/ 1.0 z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -9.5e+33) {
		tmp = (x / z) / z;
	} else if (z <= 7e+35) {
		tmp = 1.0 / (y * (t / x));
	} else {
		tmp = (x / z) * (1.0 / z);
	}
	return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-9.5d+33)) then
        tmp = (x / z) / z
    else if (z <= 7d+35) then
        tmp = 1.0d0 / (y * (t / x))
    else
        tmp = (x / z) * (1.0d0 / z)
    end if
    code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -9.5e+33) {
		tmp = (x / z) / z;
	} else if (z <= 7e+35) {
		tmp = 1.0 / (y * (t / x));
	} else {
		tmp = (x / z) * (1.0 / z);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if z <= -9.5e+33:
		tmp = (x / z) / z
	elif z <= 7e+35:
		tmp = 1.0 / (y * (t / x))
	else:
		tmp = (x / z) * (1.0 / z)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -9.5e+33)
		tmp = Float64(Float64(x / z) / z);
	elseif (z <= 7e+35)
		tmp = Float64(1.0 / Float64(y * Float64(t / x)));
	else
		tmp = Float64(Float64(x / z) * Float64(1.0 / z));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -9.5e+33)
		tmp = (x / z) / z;
	elseif (z <= 7e+35)
		tmp = 1.0 / (y * (t / x));
	else
		tmp = (x / z) * (1.0 / 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[z, -9.5e+33], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 7e+35], N[(1.0 / N[(y * N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+33}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\

\mathbf{elif}\;z \leq 7 \cdot 10^{+35}:\\
\;\;\;\;\frac{1}{y \cdot \frac{t}{x}}\\

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


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

    1. Initial program 80.7%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow271.9%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
    4. Simplified79.4%

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

    if -9.5000000000000003e33 < z < 7.0000000000000001e35

    1. Initial program 93.8%

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{x}{t}}}{y} \]
    6. Step-by-step derivation
      1. clear-num62.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{\frac{x}{t}}}} \]
      2. inv-pow62.1%

        \[\leadsto \color{blue}{{\left(\frac{y}{\frac{x}{t}}\right)}^{-1}} \]
      3. div-inv61.6%

        \[\leadsto {\color{blue}{\left(y \cdot \frac{1}{\frac{x}{t}}\right)}}^{-1} \]
      4. clear-num62.1%

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

      \[\leadsto \color{blue}{{\left(y \cdot \frac{t}{x}\right)}^{-1}} \]
    8. Step-by-step derivation
      1. unpow-162.1%

        \[\leadsto \color{blue}{\frac{1}{y \cdot \frac{t}{x}}} \]
    9. Simplified62.1%

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

    if 7.0000000000000001e35 < z

    1. Initial program 85.9%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow271.1%

        \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
    4. Simplified71.1%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
      2. div-inv75.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.5 \cdot 10^{+33}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+35}:\\ \;\;\;\;\frac{1}{y \cdot \frac{t}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \end{array} \]

Alternative 13: 67.0% accurate, 0.8× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{+33}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{+35}:\\ \;\;\;\;\frac{1}{\frac{y}{\frac{x}{t}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{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 (<= z -8e+33)
   (/ (/ x z) z)
   (if (<= z 3.3e+35) (/ 1.0 (/ y (/ x t))) (* (/ x z) (/ 1.0 z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -8e+33) {
		tmp = (x / z) / z;
	} else if (z <= 3.3e+35) {
		tmp = 1.0 / (y / (x / t));
	} else {
		tmp = (x / z) * (1.0 / z);
	}
	return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-8d+33)) then
        tmp = (x / z) / z
    else if (z <= 3.3d+35) then
        tmp = 1.0d0 / (y / (x / t))
    else
        tmp = (x / z) * (1.0d0 / z)
    end if
    code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -8e+33) {
		tmp = (x / z) / z;
	} else if (z <= 3.3e+35) {
		tmp = 1.0 / (y / (x / t));
	} else {
		tmp = (x / z) * (1.0 / z);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if z <= -8e+33:
		tmp = (x / z) / z
	elif z <= 3.3e+35:
		tmp = 1.0 / (y / (x / t))
	else:
		tmp = (x / z) * (1.0 / z)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -8e+33)
		tmp = Float64(Float64(x / z) / z);
	elseif (z <= 3.3e+35)
		tmp = Float64(1.0 / Float64(y / Float64(x / t)));
	else
		tmp = Float64(Float64(x / z) * Float64(1.0 / z));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -8e+33)
		tmp = (x / z) / z;
	elseif (z <= 3.3e+35)
		tmp = 1.0 / (y / (x / t));
	else
		tmp = (x / z) * (1.0 / 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[z, -8e+33], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 3.3e+35], N[(1.0 / N[(y / N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+33}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\

\mathbf{elif}\;z \leq 3.3 \cdot 10^{+35}:\\
\;\;\;\;\frac{1}{\frac{y}{\frac{x}{t}}}\\

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


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

    1. Initial program 80.7%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow271.9%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
    4. Simplified79.4%

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

    if -7.9999999999999996e33 < z < 3.3000000000000002e35

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\color{blue}{\frac{y}{\frac{x}{t}}}} \]
    8. Simplified62.0%

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

    if 3.3000000000000002e35 < z

    1. Initial program 85.9%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow271.1%

        \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
    4. Simplified71.1%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
      2. div-inv75.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{+33}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{+35}:\\ \;\;\;\;\frac{1}{\frac{y}{\frac{x}{t}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \end{array} \]

Alternative 14: 66.8% accurate, 0.8× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{+33}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 5.1 \cdot 10^{+38}:\\ \;\;\;\;\frac{1}{\frac{y}{\frac{x}{t}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{z}{\frac{x}{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 (<= z -1.5e+33)
   (/ (/ x z) z)
   (if (<= z 5.1e+38) (/ 1.0 (/ y (/ x t))) (/ 1.0 (/ z (/ x z))))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.5e+33) {
		tmp = (x / z) / z;
	} else if (z <= 5.1e+38) {
		tmp = 1.0 / (y / (x / t));
	} else {
		tmp = 1.0 / (z / (x / z));
	}
	return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-1.5d+33)) then
        tmp = (x / z) / z
    else if (z <= 5.1d+38) then
        tmp = 1.0d0 / (y / (x / t))
    else
        tmp = 1.0d0 / (z / (x / z))
    end if
    code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.5e+33) {
		tmp = (x / z) / z;
	} else if (z <= 5.1e+38) {
		tmp = 1.0 / (y / (x / t));
	} else {
		tmp = 1.0 / (z / (x / z));
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if z <= -1.5e+33:
		tmp = (x / z) / z
	elif z <= 5.1e+38:
		tmp = 1.0 / (y / (x / t))
	else:
		tmp = 1.0 / (z / (x / z))
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -1.5e+33)
		tmp = Float64(Float64(x / z) / z);
	elseif (z <= 5.1e+38)
		tmp = Float64(1.0 / Float64(y / Float64(x / t)));
	else
		tmp = Float64(1.0 / Float64(z / Float64(x / z)));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -1.5e+33)
		tmp = (x / z) / z;
	elseif (z <= 5.1e+38)
		tmp = 1.0 / (y / (x / t));
	else
		tmp = 1.0 / (z / (x / 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[z, -1.5e+33], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 5.1e+38], N[(1.0 / N[(y / N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+33}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\

\mathbf{elif}\;z \leq 5.1 \cdot 10^{+38}:\\
\;\;\;\;\frac{1}{\frac{y}{\frac{x}{t}}}\\

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


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

    1. Initial program 80.7%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow271.9%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
    4. Simplified79.4%

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

    if -1.49999999999999992e33 < z < 5.1000000000000001e38

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\color{blue}{\frac{y}{\frac{x}{t}}}} \]
    8. Simplified62.0%

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

    if 5.1000000000000001e38 < z

    1. Initial program 85.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot \frac{1}{t - z}}{y - z}} \]
      2. clear-num98.4%

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

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

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

      \[\leadsto \frac{1}{\color{blue}{\frac{{z}^{2}}{x}}} \]
    7. Step-by-step derivation
      1. unpow271.6%

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

        \[\leadsto \frac{1}{\color{blue}{\frac{z}{\frac{x}{z}}}} \]
    8. Simplified76.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{+33}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 5.1 \cdot 10^{+38}:\\ \;\;\;\;\frac{1}{\frac{y}{\frac{x}{t}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\ \end{array} \]

Alternative 15: 45.9% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.80000000000000027e33 or 4.90000000000000021e113 < z

    1. Initial program 82.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\frac{-x}{z}}{y}\right)} - 1} \]
      3. associate-/l/59.0%

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

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

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

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

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

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

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

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

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

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

    if -9.80000000000000027e33 < z < 4.90000000000000021e113

    1. Initial program 93.5%

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

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

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

Alternative 16: 61.9% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.8e-21 or 2.84999999999999997e35 < z

    1. Initial program 83.1%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow267.5%

        \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
    4. Simplified67.5%

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

    if -6.8e-21 < z < 2.84999999999999997e35

    1. Initial program 94.7%

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

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

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

Alternative 17: 63.3% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.49999999999999992e33 or 7.19999999999999993e40 < z

    1. Initial program 83.0%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow271.5%

        \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
    4. Simplified71.5%

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

    if -1.49999999999999992e33 < z < 7.19999999999999993e40

    1. Initial program 93.8%

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

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

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

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

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

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

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

Alternative 18: 67.1% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.20000000000000017e33 or 4.1999999999999998e35 < z

    1. Initial program 83.0%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow271.5%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
    4. Simplified77.6%

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

    if -3.20000000000000017e33 < z < 4.1999999999999998e35

    1. Initial program 93.8%

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

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

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

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

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

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

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

Alternative 19: 38.8% accurate, 1.8× speedup?

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

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

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

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

Developer target: 87.9% 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 2023200 
(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))))