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

Percentage Accurate: 88.3% → 97.7%
Time: 12.0s
Alternatives: 20
Speedup: 0.7×

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

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

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

Alternative 1: 97.7% accurate, 0.5× speedup?

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

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


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

    1. Initial program 98.4%

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

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

    1. Initial program 84.5%

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

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

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

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

Alternative 2: 63.7% accurate, 0.5× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} t_1 := \frac{\frac{x}{z}}{z}\\ \mathbf{if}\;z \leq -3.8 \cdot 10^{-73}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-197}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-159}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{-1}{z}\\ \mathbf{elif}\;z \leq 5.7 \cdot 10^{-95}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-29}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-10}:\\ \;\;\;\;\frac{x}{t} \cdot \frac{1}{y}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (/ x z) z)))
   (if (<= z -3.8e-73)
     t_1
     (if (<= z 5.6e-197)
       (/ (/ x y) t)
       (if (<= z 1.1e-159)
         (* (/ x y) (/ -1.0 z))
         (if (<= z 5.7e-95)
           (/ (/ x t) y)
           (if (<= z 1.45e-29)
             (/ (- x) (* z t))
             (if (<= z 1.55e-10) (* (/ x t) (/ 1.0 y)) 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 <= -3.8e-73) {
		tmp = t_1;
	} else if (z <= 5.6e-197) {
		tmp = (x / y) / t;
	} else if (z <= 1.1e-159) {
		tmp = (x / y) * (-1.0 / z);
	} else if (z <= 5.7e-95) {
		tmp = (x / t) / y;
	} else if (z <= 1.45e-29) {
		tmp = -x / (z * t);
	} else if (z <= 1.55e-10) {
		tmp = (x / t) * (1.0 / y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x / z) / z
    if (z <= (-3.8d-73)) then
        tmp = t_1
    else if (z <= 5.6d-197) then
        tmp = (x / y) / t
    else if (z <= 1.1d-159) then
        tmp = (x / y) * ((-1.0d0) / z)
    else if (z <= 5.7d-95) then
        tmp = (x / t) / y
    else if (z <= 1.45d-29) then
        tmp = -x / (z * t)
    else if (z <= 1.55d-10) then
        tmp = (x / t) * (1.0d0 / y)
    else
        tmp = t_1
    end if
    code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = (x / z) / z;
	double tmp;
	if (z <= -3.8e-73) {
		tmp = t_1;
	} else if (z <= 5.6e-197) {
		tmp = (x / y) / t;
	} else if (z <= 1.1e-159) {
		tmp = (x / y) * (-1.0 / z);
	} else if (z <= 5.7e-95) {
		tmp = (x / t) / y;
	} else if (z <= 1.45e-29) {
		tmp = -x / (z * t);
	} else if (z <= 1.55e-10) {
		tmp = (x / t) * (1.0 / y);
	} 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 <= -3.8e-73:
		tmp = t_1
	elif z <= 5.6e-197:
		tmp = (x / y) / t
	elif z <= 1.1e-159:
		tmp = (x / y) * (-1.0 / z)
	elif z <= 5.7e-95:
		tmp = (x / t) / y
	elif z <= 1.45e-29:
		tmp = -x / (z * t)
	elif z <= 1.55e-10:
		tmp = (x / t) * (1.0 / y)
	else:
		tmp = t_1
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(x / z) / z)
	tmp = 0.0
	if (z <= -3.8e-73)
		tmp = t_1;
	elseif (z <= 5.6e-197)
		tmp = Float64(Float64(x / y) / t);
	elseif (z <= 1.1e-159)
		tmp = Float64(Float64(x / y) * Float64(-1.0 / z));
	elseif (z <= 5.7e-95)
		tmp = Float64(Float64(x / t) / y);
	elseif (z <= 1.45e-29)
		tmp = Float64(Float64(-x) / Float64(z * t));
	elseif (z <= 1.55e-10)
		tmp = Float64(Float64(x / t) * Float64(1.0 / y));
	else
		tmp = t_1;
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = (x / z) / z;
	tmp = 0.0;
	if (z <= -3.8e-73)
		tmp = t_1;
	elseif (z <= 5.6e-197)
		tmp = (x / y) / t;
	elseif (z <= 1.1e-159)
		tmp = (x / y) * (-1.0 / z);
	elseif (z <= 5.7e-95)
		tmp = (x / t) / y;
	elseif (z <= 1.45e-29)
		tmp = -x / (z * t);
	elseif (z <= 1.55e-10)
		tmp = (x / t) * (1.0 / y);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -3.8e-73], t$95$1, If[LessEqual[z, 5.6e-197], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 1.1e-159], N[(N[(x / y), $MachinePrecision] * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.7e-95], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.45e-29], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e-10], N[(N[(x / t), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{-73}:\\
\;\;\;\;t_1\\

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -3.8000000000000003e-73 or 1.55000000000000008e-10 < z

    1. Initial program 83.2%

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

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

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

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

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

    if -3.8000000000000003e-73 < z < 5.6000000000000004e-197

    1. Initial program 93.9%

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

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

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

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

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

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

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

    if 5.6000000000000004e-197 < z < 1.1e-159

    1. Initial program 91.3%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{y \cdot z}} \]
    8. Step-by-step derivation
      1. neg-mul-128.6%

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

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

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

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

    if 1.1e-159 < z < 5.7e-95

    1. Initial program 90.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    7. Applied egg-rr76.9%

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

    if 5.7e-95 < z < 1.45000000000000012e-29

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if 1.45000000000000012e-29 < z < 1.55000000000000008e-10

    1. Initial program 99.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{-73}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-197}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-159}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{-1}{z}\\ \mathbf{elif}\;z \leq 5.7 \cdot 10^{-95}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-29}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-10}:\\ \;\;\;\;\frac{x}{t} \cdot \frac{1}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 3: 63.6% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq 1.1 \cdot 10^{-159}:\\
\;\;\;\;\frac{-x}{y \cdot z}\\

\mathbf{elif}\;z \leq 5.7 \cdot 10^{-95}:\\
\;\;\;\;t_2\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.8000000000000003e-73 or 1.8e-10 < z

    1. Initial program 83.2%

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

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

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

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

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

    if -3.8000000000000003e-73 < z < 5.6000000000000004e-197

    1. Initial program 93.9%

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

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

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

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

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

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

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

    if 5.6000000000000004e-197 < z < 1.1e-159

    1. Initial program 91.3%

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

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

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

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

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

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

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

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

    if 1.1e-159 < z < 5.7e-95 or 8.49999999999999981e-25 < z < 1.8e-10

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

    if 5.7e-95 < z < 8.49999999999999981e-25

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{-73}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-197}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-159}:\\ \;\;\;\;\frac{-x}{y \cdot z}\\ \mathbf{elif}\;z \leq 5.7 \cdot 10^{-95}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-25}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-10}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 4: 63.7% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq 1.1 \cdot 10^{-159}:\\
\;\;\;\;\frac{\frac{-x}{y}}{z}\\

\mathbf{elif}\;z \leq 6.9 \cdot 10^{-97}:\\
\;\;\;\;t_2\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.8000000000000003e-73 or 1.7499999999999999e-10 < z

    1. Initial program 83.2%

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

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

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

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

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

    if -3.8000000000000003e-73 < z < 5.6000000000000004e-197

    1. Initial program 93.9%

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

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

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

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

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

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

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

    if 5.6000000000000004e-197 < z < 1.1e-159

    1. Initial program 91.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.1e-159 < z < 6.8999999999999996e-97 or 6.00000000000000005e-28 < z < 1.7499999999999999e-10

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

    if 6.8999999999999996e-97 < z < 6.00000000000000005e-28

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{-73}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-197}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-159}:\\ \;\;\;\;\frac{\frac{-x}{y}}{z}\\ \mathbf{elif}\;z \leq 6.9 \cdot 10^{-97}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-28}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-10}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 5: 63.6% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;z \leq 5.7 \cdot 10^{-95}:\\
\;\;\;\;t_2\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -6.00000000000000014e-74 or 1.72000000000000001e-10 < z

    1. Initial program 83.2%

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

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

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

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

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

    if -6.00000000000000014e-74 < z < 5.6000000000000004e-197

    1. Initial program 93.9%

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

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

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

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

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

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

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

    if 5.6000000000000004e-197 < z < 1.1e-159

    1. Initial program 91.3%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{y \cdot z}} \]
    8. Step-by-step derivation
      1. neg-mul-128.6%

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

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

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

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

    if 1.1e-159 < z < 5.7e-95 or 1.34999999999999991e-26 < z < 1.72000000000000001e-10

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

    if 5.7e-95 < z < 1.34999999999999991e-26

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{-74}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-197}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-159}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{-1}{z}\\ \mathbf{elif}\;z \leq 5.7 \cdot 10^{-95}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-26}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{elif}\;z \leq 1.72 \cdot 10^{-10}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 6: 75.4% accurate, 0.6× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} t_1 := \frac{\frac{x}{z}}{z}\\ \mathbf{if}\;z \leq -1.9 \cdot 10^{+19}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-91}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-10}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+151}:\\ \;\;\;\;\frac{-x}{z \cdot \left(y - z\right)}\\ \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.9e+19)
     t_1
     (if (<= z 1.4e-91)
       (/ (/ x (- t z)) y)
       (if (<= z 1.35e-10)
         (/ x (* (- y z) t))
         (if (<= z 9e+151) (/ (- x) (* z (- y z))) 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.9e+19) {
		tmp = t_1;
	} else if (z <= 1.4e-91) {
		tmp = (x / (t - z)) / y;
	} else if (z <= 1.35e-10) {
		tmp = x / ((y - z) * t);
	} else if (z <= 9e+151) {
		tmp = -x / (z * (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 = (x / z) / z
    if (z <= (-1.9d+19)) then
        tmp = t_1
    else if (z <= 1.4d-91) then
        tmp = (x / (t - z)) / y
    else if (z <= 1.35d-10) then
        tmp = x / ((y - z) * t)
    else if (z <= 9d+151) then
        tmp = -x / (z * (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 = (x / z) / z;
	double tmp;
	if (z <= -1.9e+19) {
		tmp = t_1;
	} else if (z <= 1.4e-91) {
		tmp = (x / (t - z)) / y;
	} else if (z <= 1.35e-10) {
		tmp = x / ((y - z) * t);
	} else if (z <= 9e+151) {
		tmp = -x / (z * (y - z));
	} 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.9e+19:
		tmp = t_1
	elif z <= 1.4e-91:
		tmp = (x / (t - z)) / y
	elif z <= 1.35e-10:
		tmp = x / ((y - z) * t)
	elif z <= 9e+151:
		tmp = -x / (z * (y - z))
	else:
		tmp = t_1
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(x / z) / z)
	tmp = 0.0
	if (z <= -1.9e+19)
		tmp = t_1;
	elseif (z <= 1.4e-91)
		tmp = Float64(Float64(x / Float64(t - z)) / y);
	elseif (z <= 1.35e-10)
		tmp = Float64(x / Float64(Float64(y - z) * t));
	elseif (z <= 9e+151)
		tmp = Float64(Float64(-x) / Float64(z * 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 = (x / z) / z;
	tmp = 0.0;
	if (z <= -1.9e+19)
		tmp = t_1;
	elseif (z <= 1.4e-91)
		tmp = (x / (t - z)) / y;
	elseif (z <= 1.35e-10)
		tmp = x / ((y - z) * t);
	elseif (z <= 9e+151)
		tmp = -x / (z * (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[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -1.9e+19], t$95$1, If[LessEqual[z, 1.4e-91], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.35e-10], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e+151], N[((-x) / N[(z * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{+19}:\\
\;\;\;\;t_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.9e19 or 8.9999999999999997e151 < z

    1. Initial program 78.6%

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

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

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

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

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

    if -1.9e19 < z < 1.4e-91

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{1}{t - z}}{\frac{y - z}{x}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity92.1%

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

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

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

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

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

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

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

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

    if 1.4e-91 < z < 1.35e-10

    1. Initial program 99.7%

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

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

    if 1.35e-10 < z < 8.9999999999999997e151

    1. Initial program 90.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{+19}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-91}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-10}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+151}:\\ \;\;\;\;\frac{-x}{z \cdot \left(y - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 7: 77.8% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.1e-93 or 1.25000000000000008e-10 < z

    1. Initial program 83.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{-x}{z}}{y - z}} \]
      5. distribute-frac-neg86.8%

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

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

    if -3.1e-93 < z < 1.50000000000000007e-92

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{1}{t - z}}{\frac{y - z}{x}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity91.1%

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

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

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

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

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

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

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

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

    if 1.50000000000000007e-92 < z < 1.25000000000000008e-10

    1. Initial program 99.7%

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{t}} \cdot \frac{1}{y - z} \]
    5. Step-by-step derivation
      1. div-inv72.2%

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y - z}} \]
      2. associate-/l/78.8%

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

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

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

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

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

Alternative 8: 77.9% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.1e-93 or 1.35e-10 < z

    1. Initial program 83.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{-x}{z}}{y - z}} \]
      5. distribute-frac-neg86.8%

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

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

    if -3.1e-93 < z < 1.89999999999999989e-91

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{1}{t - z}}{\frac{y - z}{x}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity91.1%

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

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

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

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

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

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

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

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

    if 1.89999999999999989e-91 < z < 1.35e-10

    1. Initial program 99.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{-93}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y - z}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-91}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-10}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y - z}\\ \end{array} \]

Alternative 9: 64.5% accurate, 0.7× speedup?

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

\mathbf{elif}\;z \leq 5.7 \cdot 10^{-95}:\\
\;\;\;\;t_2\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.45e-73 or 1.4600000000000001e-10 < z

    1. Initial program 83.2%

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

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

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

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

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

    if -1.45e-73 < z < 5.7e-95 or 5.2e-22 < z < 1.4600000000000001e-10

    1. Initial program 93.2%

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

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

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

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

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

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

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

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

    if 5.7e-95 < z < 5.2e-22

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{-73}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 5.7 \cdot 10^{-95}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-22}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{elif}\;z \leq 1.46 \cdot 10^{-10}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 10: 73.6% accurate, 0.7× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} t_1 := \frac{\frac{x}{z}}{z}\\ \mathbf{if}\;z \leq -1.05 \cdot 10^{+19}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.95 \cdot 10^{-93}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+16}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \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.05e+19)
     t_1
     (if (<= z 2.95e-93)
       (/ x (* y (- t z)))
       (if (<= z 1.5e+16) (/ x (* (- y 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.05e+19) {
		tmp = t_1;
	} else if (z <= 2.95e-93) {
		tmp = x / (y * (t - z));
	} else if (z <= 1.5e+16) {
		tmp = x / ((y - 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.05d+19)) then
        tmp = t_1
    else if (z <= 2.95d-93) then
        tmp = x / (y * (t - z))
    else if (z <= 1.5d+16) then
        tmp = x / ((y - 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.05e+19) {
		tmp = t_1;
	} else if (z <= 2.95e-93) {
		tmp = x / (y * (t - z));
	} else if (z <= 1.5e+16) {
		tmp = x / ((y - 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.05e+19:
		tmp = t_1
	elif z <= 2.95e-93:
		tmp = x / (y * (t - z))
	elif z <= 1.5e+16:
		tmp = x / ((y - z) * t)
	else:
		tmp = t_1
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(x / z) / z)
	tmp = 0.0
	if (z <= -1.05e+19)
		tmp = t_1;
	elseif (z <= 2.95e-93)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif (z <= 1.5e+16)
		tmp = Float64(x / Float64(Float64(y - 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.05e+19)
		tmp = t_1;
	elseif (z <= 2.95e-93)
		tmp = x / (y * (t - z));
	elseif (z <= 1.5e+16)
		tmp = x / ((y - z) * t);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -1.05e+19], t$95$1, If[LessEqual[z, 2.95e-93], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e+16], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+19}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.05e19 or 1.5e16 < z

    1. Initial program 80.6%

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

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

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

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

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

    if -1.05e19 < z < 2.95e-93

    1. Initial program 93.8%

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

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

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

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

    if 2.95e-93 < z < 1.5e16

    1. Initial program 99.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+19}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 2.95 \cdot 10^{-93}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+16}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 11: 73.6% accurate, 0.7× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} t_1 := \frac{\frac{x}{z}}{z}\\ \mathbf{if}\;z \leq -6.6 \cdot 10^{+24}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-93}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;z \leq 1.46 \cdot 10^{+16}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \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 -6.6e+24)
     t_1
     (if (<= z 3.7e-93)
       (/ (/ x (- t z)) y)
       (if (<= z 1.46e+16) (/ x (* (- y 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 <= -6.6e+24) {
		tmp = t_1;
	} else if (z <= 3.7e-93) {
		tmp = (x / (t - z)) / y;
	} else if (z <= 1.46e+16) {
		tmp = x / ((y - 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 <= (-6.6d+24)) then
        tmp = t_1
    else if (z <= 3.7d-93) then
        tmp = (x / (t - z)) / y
    else if (z <= 1.46d+16) then
        tmp = x / ((y - 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 <= -6.6e+24) {
		tmp = t_1;
	} else if (z <= 3.7e-93) {
		tmp = (x / (t - z)) / y;
	} else if (z <= 1.46e+16) {
		tmp = x / ((y - 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 <= -6.6e+24:
		tmp = t_1
	elif z <= 3.7e-93:
		tmp = (x / (t - z)) / y
	elif z <= 1.46e+16:
		tmp = x / ((y - z) * t)
	else:
		tmp = t_1
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(x / z) / z)
	tmp = 0.0
	if (z <= -6.6e+24)
		tmp = t_1;
	elseif (z <= 3.7e-93)
		tmp = Float64(Float64(x / Float64(t - z)) / y);
	elseif (z <= 1.46e+16)
		tmp = Float64(x / Float64(Float64(y - 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 <= -6.6e+24)
		tmp = t_1;
	elseif (z <= 3.7e-93)
		tmp = (x / (t - z)) / y;
	elseif (z <= 1.46e+16)
		tmp = x / ((y - z) * t);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -6.6e+24], t$95$1, If[LessEqual[z, 3.7e-93], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.46e+16], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -6.6 \cdot 10^{+24}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.5999999999999998e24 or 1.46e16 < z

    1. Initial program 80.6%

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

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

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

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

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

    if -6.5999999999999998e24 < z < 3.70000000000000002e-93

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{1}{t - z}}{\frac{y - z}{x}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity92.1%

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

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

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

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

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

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

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

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

    if 3.70000000000000002e-93 < z < 1.46e16

    1. Initial program 99.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{+24}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-93}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;z \leq 1.46 \cdot 10^{+16}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 12: 92.1% accurate, 0.7× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.99999999999999989e82 or 2.30000000000000012e39 < z

    1. Initial program 77.1%

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

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

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

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

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

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

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

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

    if -2.99999999999999989e82 < z < 2.30000000000000012e39

    1. Initial program 94.6%

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

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

Alternative 13: 81.4% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 86.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{1}{t - z}}{\frac{y - z}{x}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity94.1%

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

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

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

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

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

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

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

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

    if -4.8e-67 < y < 2.00000000000000013e-63

    1. Initial program 92.4%

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

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

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

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

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

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

    if 2.00000000000000013e-63 < y

    1. Initial program 85.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{-67}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-63}:\\ \;\;\;\;\frac{\frac{-x}{z}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]

Alternative 14: 72.8% accurate, 0.8× speedup?

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

    1. Initial program 80.6%

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

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

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

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

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

    if -3.8000000000000004e22 < z < 1.46e16

    1. Initial program 94.6%

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

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

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

Alternative 15: 46.5% accurate, 1.0× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -30000000000 \lor \neg \left(z \leq 1.42 \cdot 10^{+31}\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 -30000000000.0) (not (<= z 1.42e+31)))
   (/ x (* y z))
   (/ x (* y t))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -30000000000.0) || !(z <= 1.42e+31)) {
		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 <= (-30000000000.0d0)) .or. (.not. (z <= 1.42d+31))) 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 <= -30000000000.0) || !(z <= 1.42e+31)) {
		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 <= -30000000000.0) or not (z <= 1.42e+31):
		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 <= -30000000000.0) || !(z <= 1.42e+31))
		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 <= -30000000000.0) || ~((z <= 1.42e+31)))
		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, -30000000000.0], N[Not[LessEqual[z, 1.42e+31]], $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 -30000000000 \lor \neg \left(z \leq 1.42 \cdot 10^{+31}\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 < -3e10 or 1.41999999999999997e31 < z

    1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3e10 < z < 1.41999999999999997e31

    1. Initial program 94.0%

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

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

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

Alternative 16: 60.5% accurate, 1.0× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{-73} \lor \neg \left(z \leq 1.3 \cdot 10^{-10}\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.8e-73) (not (<= z 1.3e-10))) (/ x (* z z)) (/ x (* y t))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -3.8e-73) || !(z <= 1.3e-10)) {
		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.8d-73)) .or. (.not. (z <= 1.3d-10))) 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.8e-73) || !(z <= 1.3e-10)) {
		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.8e-73) or not (z <= 1.3e-10):
		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.8e-73) || !(z <= 1.3e-10))
		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.8e-73) || ~((z <= 1.3e-10)))
		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.8e-73], N[Not[LessEqual[z, 1.3e-10]], $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.8 \cdot 10^{-73} \lor \neg \left(z \leq 1.3 \cdot 10^{-10}\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.8000000000000003e-73 or 1.29999999999999991e-10 < z

    1. Initial program 83.2%

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

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

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

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

    if -3.8000000000000003e-73 < z < 1.29999999999999991e-10

    1. Initial program 93.9%

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

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

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

Alternative 17: 61.3% accurate, 1.0× speedup?

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

    1. Initial program 83.2%

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

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

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

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

    if -7.8000000000000003e-75 < z < 1.8e-10

    1. Initial program 93.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    7. Applied egg-rr65.9%

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

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

Alternative 18: 65.4% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.8000000000000003e-73 or 1.7499999999999999e-10 < z

    1. Initial program 83.2%

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

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

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

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

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

    if -3.8000000000000003e-73 < z < 1.7499999999999999e-10

    1. Initial program 93.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    7. Applied egg-rr65.9%

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

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

Alternative 19: 46.4% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 81.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7e12 < z < 2.79999999999999981e101

    1. Initial program 93.8%

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

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

    if 2.79999999999999981e101 < z

    1. Initial program 76.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\frac{-x}{t}}{z}\right)} - 1} \]
      3. div-inv59.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7000000000000:\\ \;\;\;\;\frac{x}{y \cdot z}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+101}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot t}\\ \end{array} \]

Alternative 20: 39.5% 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.6%

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

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

    \[\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 2023240 
(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))))