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

Percentage Accurate: 88.5% → 97.0%
Time: 10.1s
Alternatives: 17
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 17 alternatives:

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

Initial Program: 88.5% accurate, 1.0× speedup?

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

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

Alternative 1: 97.0% accurate, 0.8× speedup?

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

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

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

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

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

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

Alternative 2: 72.8% accurate, 0.5× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} t_1 := \frac{x}{y \cdot \left(t - z\right)}\\ t_2 := \frac{1}{\frac{z}{\frac{x}{z}}}\\ t_3 := \frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{if}\;z \leq -6.5 \cdot 10^{+87}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -6.6 \cdot 10^{-33}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-176}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-97}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+58}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ x (* y (- t z))))
        (t_2 (/ 1.0 (/ z (/ x z))))
        (t_3 (/ x (* (- y z) t))))
   (if (<= z -6.5e+87)
     t_2
     (if (<= z -6.6e-33)
       t_1
       (if (<= z 2.7e-176)
         t_3
         (if (<= z 1.4e-97) t_1 (if (<= z 1.5e+58) t_3 t_2)))))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double t_1 = x / (y * (t - z));
	double t_2 = 1.0 / (z / (x / z));
	double t_3 = x / ((y - z) * t);
	double tmp;
	if (z <= -6.5e+87) {
		tmp = t_2;
	} else if (z <= -6.6e-33) {
		tmp = t_1;
	} else if (z <= 2.7e-176) {
		tmp = t_3;
	} else if (z <= 1.4e-97) {
		tmp = t_1;
	} else if (z <= 1.5e+58) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	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) :: t_3
    real(8) :: tmp
    t_1 = x / (y * (t - z))
    t_2 = 1.0d0 / (z / (x / z))
    t_3 = x / ((y - z) * t)
    if (z <= (-6.5d+87)) then
        tmp = t_2
    else if (z <= (-6.6d-33)) then
        tmp = t_1
    else if (z <= 2.7d-176) then
        tmp = t_3
    else if (z <= 1.4d-97) then
        tmp = t_1
    else if (z <= 1.5d+58) then
        tmp = t_3
    else
        tmp = t_2
    end if
    code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = x / (y * (t - z));
	double t_2 = 1.0 / (z / (x / z));
	double t_3 = x / ((y - z) * t);
	double tmp;
	if (z <= -6.5e+87) {
		tmp = t_2;
	} else if (z <= -6.6e-33) {
		tmp = t_1;
	} else if (z <= 2.7e-176) {
		tmp = t_3;
	} else if (z <= 1.4e-97) {
		tmp = t_1;
	} else if (z <= 1.5e+58) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	t_1 = x / (y * (t - z))
	t_2 = 1.0 / (z / (x / z))
	t_3 = x / ((y - z) * t)
	tmp = 0
	if z <= -6.5e+87:
		tmp = t_2
	elif z <= -6.6e-33:
		tmp = t_1
	elif z <= 2.7e-176:
		tmp = t_3
	elif z <= 1.4e-97:
		tmp = t_1
	elif z <= 1.5e+58:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	t_1 = Float64(x / Float64(y * Float64(t - z)))
	t_2 = Float64(1.0 / Float64(z / Float64(x / z)))
	t_3 = Float64(x / Float64(Float64(y - z) * t))
	tmp = 0.0
	if (z <= -6.5e+87)
		tmp = t_2;
	elseif (z <= -6.6e-33)
		tmp = t_1;
	elseif (z <= 2.7e-176)
		tmp = t_3;
	elseif (z <= 1.4e-97)
		tmp = t_1;
	elseif (z <= 1.5e+58)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = x / (y * (t - z));
	t_2 = 1.0 / (z / (x / z));
	t_3 = x / ((y - z) * t);
	tmp = 0.0;
	if (z <= -6.5e+87)
		tmp = t_2;
	elseif (z <= -6.6e-33)
		tmp = t_1;
	elseif (z <= 2.7e-176)
		tmp = t_3;
	elseif (z <= 1.4e-97)
		tmp = t_1;
	elseif (z <= 1.5e+58)
		tmp = t_3;
	else
		tmp = t_2;
	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[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.5e+87], t$95$2, If[LessEqual[z, -6.6e-33], t$95$1, If[LessEqual[z, 2.7e-176], t$95$3, If[LessEqual[z, 1.4e-97], t$95$1, If[LessEqual[z, 1.5e+58], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot \left(t - z\right)}\\
t_2 := \frac{1}{\frac{z}{\frac{x}{z}}}\\
t_3 := \frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{+87}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -6.6 \cdot 10^{-33}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2.7 \cdot 10^{-176}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;z \leq 1.4 \cdot 10^{-97}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.5 \cdot 10^{+58}:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.5000000000000002e87 or 1.5000000000000001e58 < z

    1. Initial program 85.3%

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

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

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

      \[\leadsto \color{blue}{\frac{x}{z \cdot z}} \]
    5. Step-by-step derivation
      1. clear-num82.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot z}{x}}} \]
      2. inv-pow82.2%

        \[\leadsto \color{blue}{{\left(\frac{z \cdot z}{x}\right)}^{-1}} \]
    6. Applied egg-rr82.2%

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

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

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

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

    if -6.5000000000000002e87 < z < -6.6000000000000005e-33 or 2.6999999999999998e-176 < z < 1.4000000000000001e-97

    1. Initial program 88.1%

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

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

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

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

    if -6.6000000000000005e-33 < z < 2.6999999999999998e-176 or 1.4000000000000001e-97 < z < 1.5000000000000001e58

    1. Initial program 92.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{+87}:\\ \;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\ \mathbf{elif}\;z \leq -6.6 \cdot 10^{-33}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-176}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-97}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+58}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\ \end{array} \]

Alternative 3: 66.1% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 85.3%

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot z}{x}}} \]
      2. inv-pow78.6%

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\frac{z}{\frac{x}{z}}}} \]
    9. Step-by-step derivation
      1. associate-/r/89.4%

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

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

    if -9.5000000000000003e33 < z < 1.7999999999999999e-43

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.7999999999999999e-43 < z < 7.2000000000000005e57

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 66.1% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.29999999999999976e33 or 1.3500000000000001e59 < z

    1. Initial program 85.3%

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot z}{x}}} \]
      2. inv-pow78.6%

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

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

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

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

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

    if -3.29999999999999976e33 < z < 1.1499999999999999e-43

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.1499999999999999e-43 < z < 1.3500000000000001e59

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 73.8% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.75e82 or 4.99999999999999976e67 < z

    1. Initial program 85.3%

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

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

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

      \[\leadsto \color{blue}{\frac{x}{z \cdot z}} \]
    5. Step-by-step derivation
      1. clear-num82.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot z}{x}}} \]
      2. inv-pow82.2%

        \[\leadsto \color{blue}{{\left(\frac{z \cdot z}{x}\right)}^{-1}} \]
    6. Applied egg-rr82.2%

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

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

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

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

    if -1.75e82 < z < -6.49999999999999988e-32

    1. Initial program 87.5%

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

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

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

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

    if -6.49999999999999988e-32 < z < 4.99999999999999976e67

    1. Initial program 91.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+82}:\\ \;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-32}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+67}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\ \end{array} \]

Alternative 6: 74.3% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq 4.9 \cdot 10^{+61}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.2999999999999999e81 or 4.90000000000000025e61 < z

    1. Initial program 85.3%

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

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

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

      \[\leadsto \color{blue}{\frac{x}{z \cdot z}} \]
    5. Step-by-step derivation
      1. clear-num82.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot z}{x}}} \]
      2. inv-pow82.2%

        \[\leadsto \color{blue}{{\left(\frac{z \cdot z}{x}\right)}^{-1}} \]
    6. Applied egg-rr82.2%

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

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

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

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

    if -2.2999999999999999e81 < z < -8.0000000000000004e-33

    1. Initial program 87.5%

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

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

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

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

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

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

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

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

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

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

    if -8.0000000000000004e-33 < z < 4.90000000000000025e61

    1. Initial program 91.6%

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

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

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

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

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

Alternative 7: 92.8% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 71.4%

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

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

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

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

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

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

    if -6.79999999999999986e161 < z < 4.20000000000000003e102

    1. Initial program 92.3%

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

    if 4.20000000000000003e102 < z

    1. Initial program 83.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 62.4% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.64999999999999994e34 or 7.5000000000000006e57 < z

    1. Initial program 85.3%

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

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

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

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

    if -1.64999999999999994e34 < z < 3.5000000000000002e-42

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.5000000000000002e-42 < z < 7.5000000000000006e57

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.65 \cdot 10^{+34}:\\ \;\;\;\;\frac{x}{z \cdot z}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-42}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+57}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot z}\\ \end{array} \]

Alternative 9: 73.0% accurate, 0.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.5000000000000006e33 or 3.8000000000000001e63 < z

    1. Initial program 85.3%

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{z \cdot z}{x}}} \]
      2. inv-pow78.6%

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

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

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

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

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

    if -5.5000000000000006e33 < z < 3.8000000000000001e63

    1. Initial program 91.3%

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

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

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

Alternative 10: 81.9% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 89.1%

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

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

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

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

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

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

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

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

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

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

    if -9.1999999999999998e32 < y < 2.6000000000000001e-107

    1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

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

    if 2.6000000000000001e-107 < y

    1. Initial program 91.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.2 \cdot 10^{+32}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{-107}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]

Alternative 11: 82.0% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 89.1%

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

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

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

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

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

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

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

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

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

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

    if -4.2000000000000001e33 < y < 6.79999999999999989e-107

    1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

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

    if 6.79999999999999989e-107 < y

    1. Initial program 91.0%

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

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

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

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

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

Alternative 12: 81.9% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 89.1%

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

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

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

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

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

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

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

    if -2.05999999999999993e33 < y < 9.79999999999999959e-107

    1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

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

    if 9.79999999999999959e-107 < y

    1. Initial program 91.0%

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

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

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

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

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

Alternative 13: 45.4% accurate, 1.0× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -5.1 \cdot 10^{+33} \lor \neg \left(z \leq 1.26 \cdot 10^{+36}\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 -5.1e+33) (not (<= z 1.26e+36))) (/ x (* y z)) (/ x (* y t))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -5.1e+33) || !(z <= 1.26e+36)) {
		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 <= (-5.1d+33)) .or. (.not. (z <= 1.26d+36))) 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 <= -5.1e+33) || !(z <= 1.26e+36)) {
		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 <= -5.1e+33) or not (z <= 1.26e+36):
		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 <= -5.1e+33) || !(z <= 1.26e+36))
		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 <= -5.1e+33) || ~((z <= 1.26e+36)))
		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, -5.1e+33], N[Not[LessEqual[z, 1.26e+36]], $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 -5.1 \cdot 10^{+33} \lor \neg \left(z \leq 1.26 \cdot 10^{+36}\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 < -5.0999999999999999e33 or 1.25999999999999994e36 < z

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.0999999999999999e33 < z < 1.25999999999999994e36

    1. Initial program 91.0%

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

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

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

Alternative 14: 60.4% accurate, 1.0× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+33} \lor \neg \left(z \leq 6.8 \cdot 10^{+55}\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.1e+33) (not (<= z 6.8e+55))) (/ x (* z z)) (/ x (* y t))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -3.1e+33) || !(z <= 6.8e+55)) {
		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.1d+33)) .or. (.not. (z <= 6.8d+55))) 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.1e+33) || !(z <= 6.8e+55)) {
		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.1e+33) or not (z <= 6.8e+55):
		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.1e+33) || !(z <= 6.8e+55))
		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.1e+33) || ~((z <= 6.8e+55)))
		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.1e+33], N[Not[LessEqual[z, 6.8e+55]], $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.1 \cdot 10^{+33} \lor \neg \left(z \leq 6.8 \cdot 10^{+55}\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.1e33 or 6.7999999999999996e55 < z

    1. Initial program 85.4%

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

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

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

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

    if -3.1e33 < z < 6.7999999999999996e55

    1. Initial program 91.3%

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

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

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

Alternative 15: 62.6% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.60000000000000057e33 or 7.00000000000000021e55 < z

    1. Initial program 85.4%

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

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

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

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

    if -8.60000000000000057e33 < z < 7.00000000000000021e55

    1. Initial program 91.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    11. Simplified60.1%

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

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

Alternative 16: 97.1% 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 88.9%

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

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

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

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

Alternative 17: 38.7% accurate, 1.8× speedup?

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

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

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

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

Developer target: 87.2% 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 2023297 
(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))))