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

Percentage Accurate: 88.9% → 98.8%
Time: 12.0s
Alternatives: 18
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 18 alternatives:

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

Initial Program: 88.9% accurate, 1.0× speedup?

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

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

Alternative 1: 98.8% accurate, 0.4× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 y z) (-.f64 t z)) < -9.9999999999999994e161 or 9.99999999999999952e246 < (*.f64 (-.f64 y z) (-.f64 t z))

    1. Initial program 79.4%

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

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

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

    if -9.9999999999999994e161 < (*.f64 (-.f64 y z) (-.f64 t z)) < 9.99999999999999952e246

    1. Initial program 98.9%

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

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

Alternative 2: 81.5% accurate, 0.5× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -8.6 \cdot 10^{+162}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -1.45 \cdot 10^{-23}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq -1.5 \cdot 10^{-59}:\\ \;\;\;\;\frac{-x}{z \cdot \left(y - z\right)}\\ \mathbf{elif}\;y \leq -5.7 \cdot 10^{-145}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq 1.92 \cdot 10^{-47}:\\ \;\;\;\;\frac{\frac{-x}{z}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (<= y -8.6e+162)
   (/ (/ x y) (- t z))
   (if (<= y -1.45e-23)
     (/ x (* y (- t z)))
     (if (<= y -1.5e-59)
       (/ (- x) (* z (- y z)))
       (if (<= y -5.7e-145)
         (/ (/ x (- t z)) y)
         (if (<= y 1.92e-47) (/ (/ (- 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 <= -8.6e+162) {
		tmp = (x / y) / (t - z);
	} else if (y <= -1.45e-23) {
		tmp = x / (y * (t - z));
	} else if (y <= -1.5e-59) {
		tmp = -x / (z * (y - z));
	} else if (y <= -5.7e-145) {
		tmp = (x / (t - z)) / y;
	} else if (y <= 1.92e-47) {
		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 <= (-8.6d+162)) then
        tmp = (x / y) / (t - z)
    else if (y <= (-1.45d-23)) then
        tmp = x / (y * (t - z))
    else if (y <= (-1.5d-59)) then
        tmp = -x / (z * (y - z))
    else if (y <= (-5.7d-145)) then
        tmp = (x / (t - z)) / y
    else if (y <= 1.92d-47) 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 <= -8.6e+162) {
		tmp = (x / y) / (t - z);
	} else if (y <= -1.45e-23) {
		tmp = x / (y * (t - z));
	} else if (y <= -1.5e-59) {
		tmp = -x / (z * (y - z));
	} else if (y <= -5.7e-145) {
		tmp = (x / (t - z)) / y;
	} else if (y <= 1.92e-47) {
		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 <= -8.6e+162:
		tmp = (x / y) / (t - z)
	elif y <= -1.45e-23:
		tmp = x / (y * (t - z))
	elif y <= -1.5e-59:
		tmp = -x / (z * (y - z))
	elif y <= -5.7e-145:
		tmp = (x / (t - z)) / y
	elif y <= 1.92e-47:
		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 <= -8.6e+162)
		tmp = Float64(Float64(x / y) / Float64(t - z));
	elseif (y <= -1.45e-23)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif (y <= -1.5e-59)
		tmp = Float64(Float64(-x) / Float64(z * Float64(y - z)));
	elseif (y <= -5.7e-145)
		tmp = Float64(Float64(x / Float64(t - z)) / y);
	elseif (y <= 1.92e-47)
		tmp = Float64(Float64(Float64(-x) / z) / Float64(t - z));
	else
		tmp = Float64(Float64(x / t) / Float64(y - z));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -8.6e+162)
		tmp = (x / y) / (t - z);
	elseif (y <= -1.45e-23)
		tmp = x / (y * (t - z));
	elseif (y <= -1.5e-59)
		tmp = -x / (z * (y - z));
	elseif (y <= -5.7e-145)
		tmp = (x / (t - z)) / y;
	elseif (y <= 1.92e-47)
		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, -8.6e+162], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.45e-23], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.5e-59], N[((-x) / N[(z * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.7e-145], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 1.92e-47], N[(N[((-x) / z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.6 \cdot 10^{+162}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -8.6000000000000004e162

    1. Initial program 77.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 92.1%

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

    if -8.6000000000000004e162 < y < -1.4500000000000001e-23

    1. Initial program 83.5%

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

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

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

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

    if -1.4500000000000001e-23 < y < -1.5e-59

    1. Initial program 100.0%

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

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

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

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

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

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

    if -1.5e-59 < y < -5.70000000000000032e-145

    1. Initial program 99.8%

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

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

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

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

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

    if -5.70000000000000032e-145 < y < 1.92e-47

    1. Initial program 92.2%

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

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

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

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

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

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

    if 1.92e-47 < y

    1. Initial program 88.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.6 \cdot 10^{+162}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -1.45 \cdot 10^{-23}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq -1.5 \cdot 10^{-59}:\\ \;\;\;\;\frac{-x}{z \cdot \left(y - z\right)}\\ \mathbf{elif}\;y \leq -5.7 \cdot 10^{-145}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq 1.92 \cdot 10^{-47}:\\ \;\;\;\;\frac{\frac{-x}{z}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]

Alternative 3: 64.0% accurate, 0.7× speedup?

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

\mathbf{elif}\;z \leq -2.7 \cdot 10^{-201}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq 6 \cdot 10^{+62}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -11 or 6e62 < z

    1. Initial program 86.2%

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

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

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

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

    if -11 < z < -2.70000000000000005e-201 or 8.8000000000000001e-197 < z < 6e62

    1. Initial program 90.7%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{t}}}{y} \]
    6. Simplified51.1%

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

    if -2.70000000000000005e-201 < z < 8.8000000000000001e-197

    1. Initial program 93.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -11:\\ \;\;\;\;\frac{x}{z \cdot z}\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-201}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{-197}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+62}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot z}\\ \end{array} \]

Alternative 4: 74.2% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 87.5%

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

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

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

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

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

    if -5.8e20 < z < -8.4000000000000002e-160

    1. Initial program 91.1%

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

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

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

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

    if -8.4000000000000002e-160 < z < 2.6000000000000001e74

    1. Initial program 92.3%

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

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

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

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

    if 2.6000000000000001e74 < z

    1. Initial program 82.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. clear-num99.8%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\color{blue}{\frac{z \cdot z}{x}}} \]
    9. Taylor expanded in z around 0 77.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+20}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq -8.4 \cdot 10^{-160}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+74}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{z \cdot \frac{z}{x}}\\ \end{array} \]

Alternative 5: 78.3% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 81.7%

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

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

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

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

    if -3.69999999999999998e-175 < t < 2.3000000000000001e-32

    1. Initial program 91.5%

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

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

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

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

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

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

    if 2.3000000000000001e-32 < t

    1. Initial program 97.0%

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

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

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

Alternative 6: 80.6% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 81.7%

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

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

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

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

    if -1.7000000000000001e-174 < t < 6.9999999999999997e-32

    1. Initial program 91.5%

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

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

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

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

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

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

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

    if 6.9999999999999997e-32 < t

    1. Initial program 97.0%

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

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

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

Alternative 7: 67.3% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 88.2%

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

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

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

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

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

    if -36 < z < 5.4999999999999997e62

    1. Initial program 91.7%

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

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

      \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y - z}} \]
    4. Step-by-step derivation
      1. flip--68.6%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x \cdot \left(z + t\right)}{t \cdot t - z \cdot z}}}{y - z} \]
      2. difference-of-squares61.4%

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{x}{z + t} \cdot \frac{z + t}{t - z}}}{y - z} \]
    8. Taylor expanded in z around 0 56.2%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y}}{t}} \]
    10. Simplified63.1%

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

    if 5.4999999999999997e62 < z

    1. Initial program 83.3%

      \[\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. clear-num99.8%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{\color{blue}{z \cdot z}}{x}} \]
    8. Simplified74.8%

      \[\leadsto \frac{1}{\color{blue}{\frac{z \cdot z}{x}}} \]
    9. Taylor expanded in z around 0 74.8%

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

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

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

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

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

Alternative 8: 73.9% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 87.5%

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

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

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

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

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

    if -5.1e20 < z < 1.38e14

    1. Initial program 92.7%

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

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

    if 1.38e14 < z

    1. Initial program 83.5%

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{t - z}{\frac{x}{y - z}}}} \]
      3. inv-pow99.7%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\color{blue}{\frac{z \cdot z}{x}}} \]
    9. Taylor expanded in z around 0 68.9%

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

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

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

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

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

Alternative 9: 71.8% accurate, 0.8× speedup?

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

\mathbf{elif}\;t \leq 5.9 \cdot 10^{-33}:\\
\;\;\;\;\frac{1}{z \cdot \frac{z}{x}}\\

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


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

    1. Initial program 83.2%

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

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

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

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

    if 1.02e-302 < t < 5.89999999999999985e-33

    1. Initial program 93.5%

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{t - z}{\frac{x}{y - z}}}} \]
      3. inv-pow96.0%

        \[\leadsto \color{blue}{{\left(\frac{t - z}{\frac{x}{y - z}}\right)}^{-1}} \]
      4. div-inv96.0%

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{\color{blue}{z \cdot z}}{x}} \]
    8. Simplified56.8%

      \[\leadsto \frac{1}{\color{blue}{\frac{z \cdot z}{x}}} \]
    9. Taylor expanded in z around 0 56.8%

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

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

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

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

    if 5.89999999999999985e-33 < t

    1. Initial program 97.0%

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

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

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

Alternative 10: 72.5% accurate, 0.8× speedup?

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

\mathbf{elif}\;t \leq 9 \cdot 10^{-33}:\\
\;\;\;\;\frac{1}{z \cdot \frac{z}{x}}\\

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


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

    1. Initial program 83.2%

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

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

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

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

    if 5.69999999999999981e-303 < t < 8.99999999999999982e-33

    1. Initial program 93.5%

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{t - z}{\frac{x}{y - z}}}} \]
      3. inv-pow96.0%

        \[\leadsto \color{blue}{{\left(\frac{t - z}{\frac{x}{y - z}}\right)}^{-1}} \]
      4. div-inv96.0%

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{\color{blue}{z \cdot z}}{x}} \]
    8. Simplified56.8%

      \[\leadsto \frac{1}{\color{blue}{\frac{z \cdot z}{x}}} \]
    9. Taylor expanded in z around 0 56.8%

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

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

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

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

    if 8.99999999999999982e-33 < t

    1. Initial program 97.0%

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

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

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

Alternative 11: 91.3% accurate, 0.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.80000000000000032e161

    1. Initial program 77.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 92.1%

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

    if -5.80000000000000032e161 < y

    1. Initial program 90.4%

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

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

Alternative 12: 46.4% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.35000000000000005e80 or 2.39999999999999992e166 < z

    1. Initial program 79.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.35000000000000005e80 < z < 2.39999999999999992e166

    1. Initial program 93.6%

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

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

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

Alternative 13: 46.8% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.3e11 or 9.0000000000000007e75 < z

    1. Initial program 85.7%

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{y \cdot t - z \cdot \left(y + t\right)}} \]
      7. *-commutative49.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{t}} \]
      3. associate-/r*34.4%

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

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

    if -5.3e11 < z < 9.0000000000000007e75

    1. Initial program 91.9%

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

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

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

Alternative 14: 62.7% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.59999999999999983e-16 or 1950 < z

    1. Initial program 85.7%

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

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

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

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

    if -3.59999999999999983e-16 < z < 1950

    1. Initial program 93.0%

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

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

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

Alternative 15: 63.7% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7 or 7.59999999999999967e62 < z

    1. Initial program 86.2%

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

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

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

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

    if -7 < z < 7.59999999999999967e62

    1. Initial program 91.7%

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

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

      \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y - z}} \]
    4. Step-by-step derivation
      1. flip--68.6%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x \cdot \left(z + t\right)}{t \cdot t - z \cdot z}}}{y - z} \]
      2. difference-of-squares61.4%

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{x}{z + t} \cdot \frac{z + t}{t - z}}}{y - z} \]
    8. Taylor expanded in z around 0 56.2%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y}}{t}} \]
    10. Simplified63.1%

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

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

Alternative 16: 67.3% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.4000000000000004 or 9.19999999999999936e62 < z

    1. Initial program 86.2%

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

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

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

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

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

    if -4.4000000000000004 < z < 9.19999999999999936e62

    1. Initial program 91.7%

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

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

      \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y - z}} \]
    4. Step-by-step derivation
      1. flip--68.6%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x \cdot \left(z + t\right)}{t \cdot t - z \cdot z}}}{y - z} \]
      2. difference-of-squares61.4%

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{x}{z + t} \cdot \frac{z + t}{t - z}}}{y - z} \]
    8. Taylor expanded in z around 0 56.2%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y}}{t}} \]
    10. Simplified63.1%

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

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

Alternative 17: 97.0% accurate, 1.0× speedup?

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

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

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

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

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

Alternative 18: 40.1% accurate, 1.8× speedup?

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

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

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

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

Developer target: 87.6% 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 2023196 
(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))))