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

Percentage Accurate: 89.3% → 96.9%
Time: 12.6s
Alternatives: 14
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 89.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: 96.9% accurate, 0.8× speedup?

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

    \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. clear-numN/A

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

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

      \[\leadsto \frac{\frac{1}{y - z}}{\color{blue}{\frac{t - z}{x}}} \]
    4. flip--N/A

      \[\leadsto \frac{\frac{1}{\frac{y \cdot y - z \cdot z}{y + z}}}{\frac{t - \color{blue}{z}}{x}} \]
    5. clear-numN/A

      \[\leadsto \frac{\frac{y + z}{y \cdot y - z \cdot z}}{\frac{\color{blue}{t - z}}{x}} \]
    6. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{y + z}{y \cdot y - z \cdot z}\right), \color{blue}{\left(\frac{t - z}{x}\right)}\right) \]
    7. clear-numN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{\frac{y \cdot y - z \cdot z}{y + z}}\right), \left(\frac{\color{blue}{t - z}}{x}\right)\right) \]
    8. flip--N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{y - z}\right), \left(\frac{t - \color{blue}{z}}{x}\right)\right) \]
    9. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \left(y - z\right)\right), \left(\frac{\color{blue}{t - z}}{x}\right)\right) \]
    10. --lowering--.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, z\right)\right), \left(\frac{t - \color{blue}{z}}{x}\right)\right) \]
    11. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, z\right)\right), \mathsf{/.f64}\left(\left(t - z\right), \color{blue}{x}\right)\right) \]
    12. --lowering--.f6497.6%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, z\right)\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, z\right), x\right)\right) \]
  4. Applied egg-rr97.6%

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

    \[\leadsto \frac{\frac{-1}{z - y}}{\frac{t - z}{x}} \]
  6. Add Preprocessing

Alternative 2: 93.3% accurate, 0.3× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \left(t - z\right)\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;t\_1 \leq 8 \cdot 10^{+297}:\\ \;\;\;\;\frac{x}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{z \cdot \frac{y - z}{x}}\\ \end{array} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (- y z) (- t z))))
   (if (<= t_1 (- INFINITY))
     (/ (/ x (- t z)) y)
     (if (<= t_1 8e+297) (/ x t_1) (/ -1.0 (* z (/ (- y z) x)))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (t - z);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = (x / (t - z)) / y;
	} else if (t_1 <= 8e+297) {
		tmp = x / t_1;
	} else {
		tmp = -1.0 / (z * ((y - z) / x));
	}
	return tmp;
}
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (t - z);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = (x / (t - z)) / y;
	} else if (t_1 <= 8e+297) {
		tmp = x / t_1;
	} else {
		tmp = -1.0 / (z * ((y - z) / x));
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	t_1 = (y - z) * (t - z)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = (x / (t - z)) / y
	elif t_1 <= 8e+297:
		tmp = x / t_1
	else:
		tmp = -1.0 / (z * ((y - z) / x))
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(y - z) * Float64(t - z))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(Float64(x / Float64(t - z)) / y);
	elseif (t_1 <= 8e+297)
		tmp = Float64(x / t_1);
	else
		tmp = Float64(-1.0 / Float64(z * Float64(Float64(y - z) / x)));
	end
	return tmp
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = (y - z) * (t - z);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = (x / (t - z)) / y;
	elseif (t_1 <= 8e+297)
		tmp = x / t_1;
	else
		tmp = -1.0 / (z * ((y - z) / x));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, 8e+297], N[(x / t$95$1), $MachinePrecision], N[(-1.0 / N[(z * N[(N[(y - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\

\mathbf{elif}\;t\_1 \leq 8 \cdot 10^{+297}:\\
\;\;\;\;\frac{x}{t\_1}\\

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


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

    1. Initial program 64.5%

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

      \[\leadsto \color{blue}{\frac{x}{y \cdot \left(t - z\right)}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(y \cdot \left(t - z\right)\right)}\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(\left(t - z\right) \cdot \color{blue}{y}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\left(t - z\right), \color{blue}{y}\right)\right) \]
      4. --lowering--.f6457.5%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), y\right)\right) \]
    5. Simplified57.5%

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

        \[\leadsto \frac{\frac{x}{t - z}}{\color{blue}{y}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{t - z}\right), \color{blue}{y}\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(t - z\right)\right), y\right) \]
      4. --lowering--.f6484.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(t, z\right)\right), y\right) \]
    7. Applied egg-rr84.4%

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

    if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 8.0000000000000001e297

    1. Initial program 97.5%

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

    if 8.0000000000000001e297 < (*.f64 (-.f64 y z) (-.f64 t z))

    1. Initial program 75.7%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

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

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

        \[\leadsto \frac{\frac{1}{y - z}}{\color{blue}{\frac{t - z}{x}}} \]
      4. flip--N/A

        \[\leadsto \frac{\frac{1}{\frac{y \cdot y - z \cdot z}{y + z}}}{\frac{t - \color{blue}{z}}{x}} \]
      5. clear-numN/A

        \[\leadsto \frac{\frac{y + z}{y \cdot y - z \cdot z}}{\frac{\color{blue}{t - z}}{x}} \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{y + z}{y \cdot y - z \cdot z}\right), \color{blue}{\left(\frac{t - z}{x}\right)}\right) \]
      7. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{\frac{y \cdot y - z \cdot z}{y + z}}\right), \left(\frac{\color{blue}{t - z}}{x}\right)\right) \]
      8. flip--N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{y - z}\right), \left(\frac{t - \color{blue}{z}}{x}\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \left(y - z\right)\right), \left(\frac{\color{blue}{t - z}}{x}\right)\right) \]
      10. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, z\right)\right), \left(\frac{t - \color{blue}{z}}{x}\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, z\right)\right), \mathsf{/.f64}\left(\left(t - z\right), \color{blue}{x}\right)\right) \]
      12. --lowering--.f6499.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, z\right)\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, z\right), x\right)\right) \]
    4. Applied egg-rr99.9%

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

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

        \[\leadsto \frac{1}{\frac{t - z}{\color{blue}{\frac{x}{y - z}}}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{t - z}{\frac{x}{y - z}}\right)}\right) \]
      4. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{t - z}{x} \cdot \color{blue}{\left(y - z\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(1, \left(\left(y - z\right) \cdot \color{blue}{\frac{t - z}{x}}\right)\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(1, \left(\left(y - z\right) \cdot \frac{1}{\color{blue}{\frac{x}{t - z}}}\right)\right) \]
      7. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{y - z}{\color{blue}{\frac{x}{t - z}}}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(y - z\right), \color{blue}{\left(\frac{x}{t - z}\right)}\right)\right) \]
      9. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \left(\frac{\color{blue}{x}}{t - z}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{/.f64}\left(x, \color{blue}{\left(t - z\right)}\right)\right)\right) \]
      11. --lowering--.f6499.9%

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(t, \color{blue}{z}\right)\right)\right)\right) \]
    6. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{1}{\frac{y - z}{\frac{x}{t - z}}}} \]
    7. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{y - z}{\frac{\mathsf{neg}\left(x\right)}{\color{blue}{\mathsf{neg}\left(\left(t - z\right)\right)}}}\right)\right) \]
      2. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{y - z}{\mathsf{neg}\left(x\right)} \cdot \color{blue}{\left(\mathsf{neg}\left(\left(t - z\right)\right)\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{y - z}{\mathsf{neg}\left(x\right)}\right), \color{blue}{\left(\mathsf{neg}\left(\left(t - z\right)\right)\right)}\right)\right) \]
      4. distribute-frac-neg2N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\left(\mathsf{neg}\left(\frac{y - z}{x}\right)\right), \left(\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)\right)\right)\right) \]
      5. distribute-neg-fracN/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{x}\right), \left(\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(y - z\right)\right)\right), x\right), \left(\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)\right)\right)\right) \]
      7. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(y - z\right)\right), x\right), \left(\mathsf{neg}\left(\left(\color{blue}{t} - z\right)\right)\right)\right)\right) \]
      8. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(y + \left(\mathsf{neg}\left(z\right)\right)\right)\right), x\right), \left(\mathsf{neg}\left(\left(t - z\right)\right)\right)\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(\left(\mathsf{neg}\left(z\right)\right) + y\right)\right), x\right), \left(\mathsf{neg}\left(\left(t - z\right)\right)\right)\right)\right) \]
      10. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\left(0 - \left(\mathsf{neg}\left(z\right)\right)\right) - y\right), x\right), \left(\mathsf{neg}\left(\left(\color{blue}{t} - z\right)\right)\right)\right)\right) \]
      11. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) - y\right), x\right), \left(\mathsf{neg}\left(\left(t - z\right)\right)\right)\right)\right) \]
      12. remove-double-negN/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(z - y\right), x\right), \left(\mathsf{neg}\left(\left(t - z\right)\right)\right)\right)\right) \]
      13. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, y\right), x\right), \left(\mathsf{neg}\left(\left(\color{blue}{t} - z\right)\right)\right)\right)\right) \]
      14. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, y\right), x\right), \left(0 - \color{blue}{\left(t - z\right)}\right)\right)\right) \]
      15. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, y\right), x\right), \left(0 - \left(t + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right)\right) \]
      16. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, y\right), x\right), \left(0 - \left(\left(\mathsf{neg}\left(z\right)\right) + \color{blue}{t}\right)\right)\right)\right) \]
      17. associate--r+N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, y\right), x\right), \left(\left(0 - \left(\mathsf{neg}\left(z\right)\right)\right) - \color{blue}{t}\right)\right)\right) \]
      18. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, y\right), x\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) - t\right)\right)\right) \]
      19. remove-double-negN/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, y\right), x\right), \left(z - t\right)\right)\right) \]
      20. --lowering--.f6499.9%

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, y\right), x\right), \mathsf{\_.f64}\left(z, \color{blue}{t}\right)\right)\right) \]
    8. Applied egg-rr99.9%

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

      \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, y\right), x\right), \color{blue}{z}\right)\right) \]
    10. Step-by-step derivation
      1. Simplified88.8%

        \[\leadsto \frac{1}{\frac{z - y}{x} \cdot \color{blue}{z}} \]
    11. Recombined 3 regimes into one program.
    12. Final simplification93.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\left(y - z\right) \cdot \left(t - z\right) \leq -\infty:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;\left(y - z\right) \cdot \left(t - z\right) \leq 8 \cdot 10^{+297}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{z \cdot \frac{y - z}{x}}\\ \end{array} \]
    13. Add Preprocessing

    Alternative 3: 80.2% accurate, 0.5× speedup?

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

      1. Initial program 85.7%

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

        \[\leadsto \color{blue}{\frac{x}{y \cdot \left(t - z\right)}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(y \cdot \left(t - z\right)\right)}\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(x, \left(\left(t - z\right) \cdot \color{blue}{y}\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\left(t - z\right), \color{blue}{y}\right)\right) \]
        4. --lowering--.f6458.8%

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), y\right)\right) \]
      5. Simplified58.8%

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

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

          \[\leadsto \frac{\frac{x}{y}}{\color{blue}{t - z}} \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{y}\right), \color{blue}{\left(t - z\right)}\right) \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\color{blue}{t} - z\right)\right) \]
        5. --lowering--.f6465.0%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{\_.f64}\left(t, \color{blue}{z}\right)\right) \]
      7. Applied egg-rr65.0%

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

      if -4.49999999999999973e-57 < t < 1.1e43

      1. Initial program 90.0%

        \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. clear-numN/A

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

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

          \[\leadsto \frac{\frac{1}{y - z}}{\color{blue}{\frac{t - z}{x}}} \]
        4. flip--N/A

          \[\leadsto \frac{\frac{1}{\frac{y \cdot y - z \cdot z}{y + z}}}{\frac{t - \color{blue}{z}}{x}} \]
        5. clear-numN/A

          \[\leadsto \frac{\frac{y + z}{y \cdot y - z \cdot z}}{\frac{\color{blue}{t - z}}{x}} \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{y + z}{y \cdot y - z \cdot z}\right), \color{blue}{\left(\frac{t - z}{x}\right)}\right) \]
        7. clear-numN/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{\frac{y \cdot y - z \cdot z}{y + z}}\right), \left(\frac{\color{blue}{t - z}}{x}\right)\right) \]
        8. flip--N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{y - z}\right), \left(\frac{t - \color{blue}{z}}{x}\right)\right) \]
        9. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \left(y - z\right)\right), \left(\frac{\color{blue}{t - z}}{x}\right)\right) \]
        10. --lowering--.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, z\right)\right), \left(\frac{t - \color{blue}{z}}{x}\right)\right) \]
        11. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, z\right)\right), \mathsf{/.f64}\left(\left(t - z\right), \color{blue}{x}\right)\right) \]
        12. --lowering--.f6498.3%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, z\right)\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, z\right), x\right)\right) \]
      4. Applied egg-rr98.3%

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

        \[\leadsto \color{blue}{-1 \cdot \frac{x}{z \cdot \left(y - z\right)}} \]
      6. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{neg}\left(\frac{x}{z \cdot \left(y - z\right)}\right) \]
        2. associate-/r*N/A

          \[\leadsto \mathsf{neg}\left(\frac{\frac{x}{z}}{y - z}\right) \]
        3. distribute-neg-frac2N/A

          \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\mathsf{neg}\left(\left(y - z\right)\right)}} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{z}\right), \color{blue}{\left(\mathsf{neg}\left(\left(y - z\right)\right)\right)}\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \left(\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)\right)\right) \]
        6. neg-lowering-neg.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{neg.f64}\left(\left(y - z\right)\right)\right) \]
        7. --lowering--.f6485.7%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{neg.f64}\left(\mathsf{\_.f64}\left(y, z\right)\right)\right) \]
      7. Simplified85.7%

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

      if 1.1e43 < t

      1. Initial program 84.6%

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

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

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

          \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{t}} \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{y - z}\right), \color{blue}{t}\right) \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(y - z\right)\right), t\right) \]
        5. --lowering--.f6482.2%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(y, z\right)\right), t\right) \]
      5. Simplified82.2%

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t}} \]
      6. Step-by-step derivation
        1. associate-/l/N/A

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

          \[\leadsto \frac{\frac{x}{t}}{\color{blue}{y - z}} \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{t}\right), \color{blue}{\left(y - z\right)}\right) \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, t\right), \left(\color{blue}{y} - z\right)\right) \]
        5. --lowering--.f6486.5%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, t\right), \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
      7. Applied egg-rr86.5%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{-57}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+43}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 4: 80.2% accurate, 0.5× speedup?

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

      1. Initial program 85.7%

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

        \[\leadsto \color{blue}{\frac{x}{y \cdot \left(t - z\right)}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(y \cdot \left(t - z\right)\right)}\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(x, \left(\left(t - z\right) \cdot \color{blue}{y}\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\left(t - z\right), \color{blue}{y}\right)\right) \]
        4. --lowering--.f6458.8%

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), y\right)\right) \]
      5. Simplified58.8%

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

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

          \[\leadsto \frac{\frac{x}{y}}{\color{blue}{t - z}} \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{y}\right), \color{blue}{\left(t - z\right)}\right) \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\color{blue}{t} - z\right)\right) \]
        5. --lowering--.f6465.0%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{\_.f64}\left(t, \color{blue}{z}\right)\right) \]
      7. Applied egg-rr65.0%

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

      if -2.02000000000000009e-57 < t < 3.6e52

      1. Initial program 90.3%

        \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. clear-numN/A

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

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

          \[\leadsto \frac{\frac{1}{y - z}}{\color{blue}{\frac{t - z}{x}}} \]
        4. flip--N/A

          \[\leadsto \frac{\frac{1}{\frac{y \cdot y - z \cdot z}{y + z}}}{\frac{t - \color{blue}{z}}{x}} \]
        5. clear-numN/A

          \[\leadsto \frac{\frac{y + z}{y \cdot y - z \cdot z}}{\frac{\color{blue}{t - z}}{x}} \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{y + z}{y \cdot y - z \cdot z}\right), \color{blue}{\left(\frac{t - z}{x}\right)}\right) \]
        7. clear-numN/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{\frac{y \cdot y - z \cdot z}{y + z}}\right), \left(\frac{\color{blue}{t - z}}{x}\right)\right) \]
        8. flip--N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{y - z}\right), \left(\frac{t - \color{blue}{z}}{x}\right)\right) \]
        9. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \left(y - z\right)\right), \left(\frac{\color{blue}{t - z}}{x}\right)\right) \]
        10. --lowering--.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, z\right)\right), \left(\frac{t - \color{blue}{z}}{x}\right)\right) \]
        11. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, z\right)\right), \mathsf{/.f64}\left(\left(t - z\right), \color{blue}{x}\right)\right) \]
        12. --lowering--.f6498.4%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, z\right)\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, z\right), x\right)\right) \]
      4. Applied egg-rr98.4%

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

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

          \[\leadsto \frac{1}{\frac{t - z}{\color{blue}{\frac{x}{y - z}}}} \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{t - z}{\frac{x}{y - z}}\right)}\right) \]
        4. associate-/r/N/A

          \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{t - z}{x} \cdot \color{blue}{\left(y - z\right)}\right)\right) \]
        5. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(1, \left(\left(y - z\right) \cdot \color{blue}{\frac{t - z}{x}}\right)\right) \]
        6. clear-numN/A

          \[\leadsto \mathsf{/.f64}\left(1, \left(\left(y - z\right) \cdot \frac{1}{\color{blue}{\frac{x}{t - z}}}\right)\right) \]
        7. div-invN/A

          \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{y - z}{\color{blue}{\frac{x}{t - z}}}\right)\right) \]
        8. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(y - z\right), \color{blue}{\left(\frac{x}{t - z}\right)}\right)\right) \]
        9. --lowering--.f64N/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \left(\frac{\color{blue}{x}}{t - z}\right)\right)\right) \]
        10. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{/.f64}\left(x, \color{blue}{\left(t - z\right)}\right)\right)\right) \]
        11. --lowering--.f6498.3%

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(t, \color{blue}{z}\right)\right)\right)\right) \]
      6. Applied egg-rr98.3%

        \[\leadsto \color{blue}{\frac{1}{\frac{y - z}{\frac{x}{t - z}}}} \]
      7. Step-by-step derivation
        1. frac-2negN/A

          \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{y - z}{\frac{\mathsf{neg}\left(x\right)}{\color{blue}{\mathsf{neg}\left(\left(t - z\right)\right)}}}\right)\right) \]
        2. associate-/r/N/A

          \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{y - z}{\mathsf{neg}\left(x\right)} \cdot \color{blue}{\left(\mathsf{neg}\left(\left(t - z\right)\right)\right)}\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{y - z}{\mathsf{neg}\left(x\right)}\right), \color{blue}{\left(\mathsf{neg}\left(\left(t - z\right)\right)\right)}\right)\right) \]
        4. distribute-frac-neg2N/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\left(\mathsf{neg}\left(\frac{y - z}{x}\right)\right), \left(\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)\right)\right)\right) \]
        5. distribute-neg-fracN/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{x}\right), \left(\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)\right)\right)\right) \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(y - z\right)\right)\right), x\right), \left(\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)\right)\right)\right) \]
        7. neg-sub0N/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(y - z\right)\right), x\right), \left(\mathsf{neg}\left(\left(\color{blue}{t} - z\right)\right)\right)\right)\right) \]
        8. sub-negN/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(y + \left(\mathsf{neg}\left(z\right)\right)\right)\right), x\right), \left(\mathsf{neg}\left(\left(t - z\right)\right)\right)\right)\right) \]
        9. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(0 - \left(\left(\mathsf{neg}\left(z\right)\right) + y\right)\right), x\right), \left(\mathsf{neg}\left(\left(t - z\right)\right)\right)\right)\right) \]
        10. associate--r+N/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\left(0 - \left(\mathsf{neg}\left(z\right)\right)\right) - y\right), x\right), \left(\mathsf{neg}\left(\left(\color{blue}{t} - z\right)\right)\right)\right)\right) \]
        11. neg-sub0N/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) - y\right), x\right), \left(\mathsf{neg}\left(\left(t - z\right)\right)\right)\right)\right) \]
        12. remove-double-negN/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(z - y\right), x\right), \left(\mathsf{neg}\left(\left(t - z\right)\right)\right)\right)\right) \]
        13. --lowering--.f64N/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, y\right), x\right), \left(\mathsf{neg}\left(\left(\color{blue}{t} - z\right)\right)\right)\right)\right) \]
        14. neg-sub0N/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, y\right), x\right), \left(0 - \color{blue}{\left(t - z\right)}\right)\right)\right) \]
        15. sub-negN/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, y\right), x\right), \left(0 - \left(t + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right)\right)\right) \]
        16. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, y\right), x\right), \left(0 - \left(\left(\mathsf{neg}\left(z\right)\right) + \color{blue}{t}\right)\right)\right)\right) \]
        17. associate--r+N/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, y\right), x\right), \left(\left(0 - \left(\mathsf{neg}\left(z\right)\right)\right) - \color{blue}{t}\right)\right)\right) \]
        18. neg-sub0N/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, y\right), x\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) - t\right)\right)\right) \]
        19. remove-double-negN/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, y\right), x\right), \left(z - t\right)\right)\right) \]
        20. --lowering--.f6499.0%

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, y\right), x\right), \mathsf{\_.f64}\left(z, \color{blue}{t}\right)\right)\right) \]
      8. Applied egg-rr99.0%

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

        \[\leadsto \color{blue}{\frac{x}{z \cdot \left(z - y\right)}} \]
      10. Step-by-step derivation
        1. *-commutativeN/A

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

          \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z}} \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{z - y}\right), \color{blue}{z}\right) \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(z - y\right)\right), z\right) \]
        5. --lowering--.f6484.9%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), z\right) \]
      11. Simplified84.9%

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

      if 3.6e52 < t

      1. Initial program 83.2%

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

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

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

          \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{t}} \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{y - z}\right), \color{blue}{t}\right) \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(y - z\right)\right), t\right) \]
        5. --lowering--.f6486.9%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(y, z\right)\right), t\right) \]
      5. Simplified86.9%

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t}} \]
      6. Step-by-step derivation
        1. associate-/l/N/A

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

          \[\leadsto \frac{\frac{x}{t}}{\color{blue}{y - z}} \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{t}\right), \color{blue}{\left(y - z\right)}\right) \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, t\right), \left(\color{blue}{y} - z\right)\right) \]
        5. --lowering--.f6491.6%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, t\right), \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
      7. Applied egg-rr91.6%

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

    Alternative 5: 79.1% accurate, 0.5× speedup?

    \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{\frac{x}{z}}{z - t}\\ \mathbf{if}\;z \leq -3.35:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{-59}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    NOTE: x, y, z, 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))))
       (if (<= z -3.35) t_1 (if (<= z 1.95e-59) (/ (/ x (- t z)) y) t_1))))
    assert(x < y && y < z && z < t);
    double code(double x, double y, double z, double t) {
    	double t_1 = (x / z) / (z - t);
    	double tmp;
    	if (z <= -3.35) {
    		tmp = t_1;
    	} else if (z <= 1.95e-59) {
    		tmp = (x / (t - z)) / y;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    NOTE: x, y, z, 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 - t)
        if (z <= (-3.35d0)) then
            tmp = t_1
        else if (z <= 1.95d-59) then
            tmp = (x / (t - z)) / y
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    assert x < y && y < z && z < t;
    public static double code(double x, double y, double z, double t) {
    	double t_1 = (x / z) / (z - t);
    	double tmp;
    	if (z <= -3.35) {
    		tmp = t_1;
    	} else if (z <= 1.95e-59) {
    		tmp = (x / (t - z)) / y;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    [x, y, z, t] = sort([x, y, z, t])
    def code(x, y, z, t):
    	t_1 = (x / z) / (z - t)
    	tmp = 0
    	if z <= -3.35:
    		tmp = t_1
    	elif z <= 1.95e-59:
    		tmp = (x / (t - z)) / y
    	else:
    		tmp = t_1
    	return tmp
    
    x, y, z, t = sort([x, y, z, t])
    function code(x, y, z, t)
    	t_1 = Float64(Float64(x / z) / Float64(z - t))
    	tmp = 0.0
    	if (z <= -3.35)
    		tmp = t_1;
    	elseif (z <= 1.95e-59)
    		tmp = Float64(Float64(x / Float64(t - z)) / y);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    x, y, z, t = num2cell(sort([x, y, z, t])){:}
    function tmp_2 = code(x, y, z, t)
    	t_1 = (x / z) / (z - t);
    	tmp = 0.0;
    	if (z <= -3.35)
    		tmp = t_1;
    	elseif (z <= 1.95e-59)
    		tmp = (x / (t - z)) / y;
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    NOTE: x, y, z, 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[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.35], t$95$1, If[LessEqual[z, 1.95e-59], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
    \\
    \begin{array}{l}
    t_1 := \frac{\frac{x}{z}}{z - t}\\
    \mathbf{if}\;z \leq -3.35:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;z \leq 1.95 \cdot 10^{-59}:\\
    \;\;\;\;\frac{\frac{x}{t - z}}{y}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -3.35000000000000009 or 1.95000000000000009e-59 < z

      1. Initial program 86.2%

        \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. clear-numN/A

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

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

          \[\leadsto \frac{\frac{1}{y - z}}{\color{blue}{\frac{t - z}{x}}} \]
        4. flip--N/A

          \[\leadsto \frac{\frac{1}{\frac{y \cdot y - z \cdot z}{y + z}}}{\frac{t - \color{blue}{z}}{x}} \]
        5. clear-numN/A

          \[\leadsto \frac{\frac{y + z}{y \cdot y - z \cdot z}}{\frac{\color{blue}{t - z}}{x}} \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{y + z}{y \cdot y - z \cdot z}\right), \color{blue}{\left(\frac{t - z}{x}\right)}\right) \]
        7. clear-numN/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{\frac{y \cdot y - z \cdot z}{y + z}}\right), \left(\frac{\color{blue}{t - z}}{x}\right)\right) \]
        8. flip--N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{y - z}\right), \left(\frac{t - \color{blue}{z}}{x}\right)\right) \]
        9. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \left(y - z\right)\right), \left(\frac{\color{blue}{t - z}}{x}\right)\right) \]
        10. --lowering--.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, z\right)\right), \left(\frac{t - \color{blue}{z}}{x}\right)\right) \]
        11. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, z\right)\right), \mathsf{/.f64}\left(\left(t - z\right), \color{blue}{x}\right)\right) \]
        12. --lowering--.f6499.7%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, z\right)\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, z\right), x\right)\right) \]
      4. Applied egg-rr99.7%

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

        \[\leadsto \color{blue}{-1 \cdot \frac{x}{z \cdot \left(t - z\right)}} \]
      6. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{neg}\left(\frac{x}{z \cdot \left(t - z\right)}\right) \]
        2. associate-/r*N/A

          \[\leadsto \mathsf{neg}\left(\frac{\frac{x}{z}}{t - z}\right) \]
        3. distribute-neg-frac2N/A

          \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{z}\right), \color{blue}{\left(\mathsf{neg}\left(\left(t - z\right)\right)\right)}\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \left(\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)\right)\right) \]
        6. neg-lowering-neg.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{neg.f64}\left(\left(t - z\right)\right)\right) \]
        7. --lowering--.f6484.5%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{neg.f64}\left(\mathsf{\_.f64}\left(t, z\right)\right)\right) \]
      7. Simplified84.5%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{-\left(t - z\right)}} \]
      8. Step-by-step derivation
        1. neg-sub0N/A

          \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(t - z\right)}} \]
        2. associate--r-N/A

          \[\leadsto \frac{\frac{x}{z}}{\left(0 - t\right) + \color{blue}{z}} \]
        3. neg-sub0N/A

          \[\leadsto \frac{\frac{x}{z}}{\left(\mathsf{neg}\left(t\right)\right) + z} \]
        4. +-commutativeN/A

          \[\leadsto \frac{\frac{x}{z}}{z + \color{blue}{\left(\mathsf{neg}\left(t\right)\right)}} \]
        5. sub-negN/A

          \[\leadsto \frac{\frac{x}{z}}{z - \color{blue}{t}} \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{z}\right), \color{blue}{\left(z - t\right)}\right) \]
        7. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \left(\color{blue}{z} - t\right)\right) \]
        8. --lowering--.f6484.5%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{\_.f64}\left(z, \color{blue}{t}\right)\right) \]
      9. Applied egg-rr84.5%

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

      if -3.35000000000000009 < z < 1.95000000000000009e-59

      1. Initial program 90.3%

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

        \[\leadsto \color{blue}{\frac{x}{y \cdot \left(t - z\right)}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(y \cdot \left(t - z\right)\right)}\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(x, \left(\left(t - z\right) \cdot \color{blue}{y}\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\left(t - z\right), \color{blue}{y}\right)\right) \]
        4. --lowering--.f6478.7%

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), y\right)\right) \]
      5. Simplified78.7%

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

          \[\leadsto \frac{\frac{x}{t - z}}{\color{blue}{y}} \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{t - z}\right), \color{blue}{y}\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(t - z\right)\right), y\right) \]
        4. --lowering--.f6483.0%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(t, z\right)\right), y\right) \]
      7. Applied egg-rr83.0%

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

    Alternative 6: 78.7% accurate, 0.5× speedup?

    \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{\frac{x}{z}}{z - t}\\ \mathbf{if}\;z \leq -2.1:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-60}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    NOTE: x, y, z, 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))))
       (if (<= z -2.1) t_1 (if (<= z 8.2e-60) (/ (/ x y) (- t z)) t_1))))
    assert(x < y && y < z && z < t);
    double code(double x, double y, double z, double t) {
    	double t_1 = (x / z) / (z - t);
    	double tmp;
    	if (z <= -2.1) {
    		tmp = t_1;
    	} else if (z <= 8.2e-60) {
    		tmp = (x / y) / (t - z);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    NOTE: x, y, z, 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 - t)
        if (z <= (-2.1d0)) then
            tmp = t_1
        else if (z <= 8.2d-60) then
            tmp = (x / y) / (t - z)
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    assert x < y && y < z && z < t;
    public static double code(double x, double y, double z, double t) {
    	double t_1 = (x / z) / (z - t);
    	double tmp;
    	if (z <= -2.1) {
    		tmp = t_1;
    	} else if (z <= 8.2e-60) {
    		tmp = (x / y) / (t - z);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    [x, y, z, t] = sort([x, y, z, t])
    def code(x, y, z, t):
    	t_1 = (x / z) / (z - t)
    	tmp = 0
    	if z <= -2.1:
    		tmp = t_1
    	elif z <= 8.2e-60:
    		tmp = (x / y) / (t - z)
    	else:
    		tmp = t_1
    	return tmp
    
    x, y, z, t = sort([x, y, z, t])
    function code(x, y, z, t)
    	t_1 = Float64(Float64(x / z) / Float64(z - t))
    	tmp = 0.0
    	if (z <= -2.1)
    		tmp = t_1;
    	elseif (z <= 8.2e-60)
    		tmp = Float64(Float64(x / y) / Float64(t - z));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    x, y, z, t = num2cell(sort([x, y, z, t])){:}
    function tmp_2 = code(x, y, z, t)
    	t_1 = (x / z) / (z - t);
    	tmp = 0.0;
    	if (z <= -2.1)
    		tmp = t_1;
    	elseif (z <= 8.2e-60)
    		tmp = (x / y) / (t - z);
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    NOTE: x, y, z, 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[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.1], t$95$1, If[LessEqual[z, 8.2e-60], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
    \\
    \begin{array}{l}
    t_1 := \frac{\frac{x}{z}}{z - t}\\
    \mathbf{if}\;z \leq -2.1:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;z \leq 8.2 \cdot 10^{-60}:\\
    \;\;\;\;\frac{\frac{x}{y}}{t - z}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -2.10000000000000009 or 8.20000000000000025e-60 < z

      1. Initial program 86.2%

        \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. clear-numN/A

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

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

          \[\leadsto \frac{\frac{1}{y - z}}{\color{blue}{\frac{t - z}{x}}} \]
        4. flip--N/A

          \[\leadsto \frac{\frac{1}{\frac{y \cdot y - z \cdot z}{y + z}}}{\frac{t - \color{blue}{z}}{x}} \]
        5. clear-numN/A

          \[\leadsto \frac{\frac{y + z}{y \cdot y - z \cdot z}}{\frac{\color{blue}{t - z}}{x}} \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{y + z}{y \cdot y - z \cdot z}\right), \color{blue}{\left(\frac{t - z}{x}\right)}\right) \]
        7. clear-numN/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{\frac{y \cdot y - z \cdot z}{y + z}}\right), \left(\frac{\color{blue}{t - z}}{x}\right)\right) \]
        8. flip--N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{y - z}\right), \left(\frac{t - \color{blue}{z}}{x}\right)\right) \]
        9. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \left(y - z\right)\right), \left(\frac{\color{blue}{t - z}}{x}\right)\right) \]
        10. --lowering--.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, z\right)\right), \left(\frac{t - \color{blue}{z}}{x}\right)\right) \]
        11. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, z\right)\right), \mathsf{/.f64}\left(\left(t - z\right), \color{blue}{x}\right)\right) \]
        12. --lowering--.f6499.7%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(y, z\right)\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, z\right), x\right)\right) \]
      4. Applied egg-rr99.7%

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

        \[\leadsto \color{blue}{-1 \cdot \frac{x}{z \cdot \left(t - z\right)}} \]
      6. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{neg}\left(\frac{x}{z \cdot \left(t - z\right)}\right) \]
        2. associate-/r*N/A

          \[\leadsto \mathsf{neg}\left(\frac{\frac{x}{z}}{t - z}\right) \]
        3. distribute-neg-frac2N/A

          \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{z}\right), \color{blue}{\left(\mathsf{neg}\left(\left(t - z\right)\right)\right)}\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \left(\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)\right)\right) \]
        6. neg-lowering-neg.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{neg.f64}\left(\left(t - z\right)\right)\right) \]
        7. --lowering--.f6484.5%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{neg.f64}\left(\mathsf{\_.f64}\left(t, z\right)\right)\right) \]
      7. Simplified84.5%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{-\left(t - z\right)}} \]
      8. Step-by-step derivation
        1. neg-sub0N/A

          \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(t - z\right)}} \]
        2. associate--r-N/A

          \[\leadsto \frac{\frac{x}{z}}{\left(0 - t\right) + \color{blue}{z}} \]
        3. neg-sub0N/A

          \[\leadsto \frac{\frac{x}{z}}{\left(\mathsf{neg}\left(t\right)\right) + z} \]
        4. +-commutativeN/A

          \[\leadsto \frac{\frac{x}{z}}{z + \color{blue}{\left(\mathsf{neg}\left(t\right)\right)}} \]
        5. sub-negN/A

          \[\leadsto \frac{\frac{x}{z}}{z - \color{blue}{t}} \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{z}\right), \color{blue}{\left(z - t\right)}\right) \]
        7. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \left(\color{blue}{z} - t\right)\right) \]
        8. --lowering--.f6484.5%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{\_.f64}\left(z, \color{blue}{t}\right)\right) \]
      9. Applied egg-rr84.5%

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

      if -2.10000000000000009 < z < 8.20000000000000025e-60

      1. Initial program 90.3%

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

        \[\leadsto \color{blue}{\frac{x}{y \cdot \left(t - z\right)}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(y \cdot \left(t - z\right)\right)}\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(x, \left(\left(t - z\right) \cdot \color{blue}{y}\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\left(t - z\right), \color{blue}{y}\right)\right) \]
        4. --lowering--.f6478.7%

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), y\right)\right) \]
      5. Simplified78.7%

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

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

          \[\leadsto \frac{\frac{x}{y}}{\color{blue}{t - z}} \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{y}\right), \color{blue}{\left(t - z\right)}\right) \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, y\right), \left(\color{blue}{t} - z\right)\right) \]
        5. --lowering--.f6484.0%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, y\right), \mathsf{\_.f64}\left(t, \color{blue}{z}\right)\right) \]
      7. Applied egg-rr84.0%

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

    Alternative 7: 71.4% accurate, 0.5× speedup?

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

      1. Initial program 86.0%

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

        \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left({z}^{2}\right)}\right) \]
        2. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(x, \left(z \cdot \color{blue}{z}\right)\right) \]
        3. *-lowering-*.f6469.6%

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right) \]
      5. Simplified69.6%

        \[\leadsto \color{blue}{\frac{x}{z \cdot z}} \]
      6. Step-by-step derivation
        1. clear-numN/A

          \[\leadsto \frac{1}{\color{blue}{\frac{z \cdot z}{x}}} \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{z \cdot z}{x}\right)}\right) \]
        3. clear-numN/A

          \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{\color{blue}{\frac{x}{z \cdot z}}}\right)\right) \]
        4. associate-/r*N/A

          \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{\frac{\frac{x}{z}}{\color{blue}{z}}}\right)\right) \]
        5. clear-numN/A

          \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{z}{\color{blue}{\frac{x}{z}}}\right)\right) \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{\left(\frac{x}{z}\right)}\right)\right) \]
        7. /-lowering-/.f6476.8%

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(z, \mathsf{/.f64}\left(x, \color{blue}{z}\right)\right)\right) \]
      7. Applied egg-rr76.8%

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

      if -8.5e7 < z < 1.25e-53

      1. Initial program 90.5%

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

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

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

          \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{t}} \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{y - z}\right), \color{blue}{t}\right) \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(y - z\right)\right), t\right) \]
        5. --lowering--.f6474.1%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(y, z\right)\right), t\right) \]
      5. Simplified74.1%

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t}} \]
      6. Step-by-step derivation
        1. associate-/l/N/A

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

          \[\leadsto \frac{\frac{x}{t}}{\color{blue}{y - z}} \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{t}\right), \color{blue}{\left(y - z\right)}\right) \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, t\right), \left(\color{blue}{y} - z\right)\right) \]
        5. --lowering--.f6470.5%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, t\right), \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
      7. Applied egg-rr70.5%

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

    Alternative 8: 71.2% accurate, 0.5× speedup?

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

      1. Initial program 86.0%

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

        \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left({z}^{2}\right)}\right) \]
        2. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(x, \left(z \cdot \color{blue}{z}\right)\right) \]
        3. *-lowering-*.f6469.6%

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right) \]
      5. Simplified69.6%

        \[\leadsto \color{blue}{\frac{x}{z \cdot z}} \]
      6. Step-by-step derivation
        1. clear-numN/A

          \[\leadsto \frac{1}{\color{blue}{\frac{z \cdot z}{x}}} \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{z \cdot z}{x}\right)}\right) \]
        3. clear-numN/A

          \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{\color{blue}{\frac{x}{z \cdot z}}}\right)\right) \]
        4. associate-/r*N/A

          \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{\frac{\frac{x}{z}}{\color{blue}{z}}}\right)\right) \]
        5. clear-numN/A

          \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{z}{\color{blue}{\frac{x}{z}}}\right)\right) \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{\left(\frac{x}{z}\right)}\right)\right) \]
        7. /-lowering-/.f6476.8%

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(z, \mathsf{/.f64}\left(x, \color{blue}{z}\right)\right)\right) \]
      7. Applied egg-rr76.8%

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

      if -4e7 < z < 1.5000000000000001e-53

      1. Initial program 90.5%

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

        \[\leadsto \color{blue}{\frac{x}{y \cdot \left(t - z\right)}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(y \cdot \left(t - z\right)\right)}\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(x, \left(\left(t - z\right) \cdot \color{blue}{y}\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\left(t - z\right), \color{blue}{y}\right)\right) \]
        4. --lowering--.f6479.3%

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(t, z\right), y\right)\right) \]
      5. Simplified79.3%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -40000000:\\ \;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-53}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 9: 65.5% accurate, 0.5× speedup?

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

      1. Initial program 86.0%

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

        \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left({z}^{2}\right)}\right) \]
        2. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(x, \left(z \cdot \color{blue}{z}\right)\right) \]
        3. *-lowering-*.f6469.6%

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right) \]
      5. Simplified69.6%

        \[\leadsto \color{blue}{\frac{x}{z \cdot z}} \]
      6. Step-by-step derivation
        1. clear-numN/A

          \[\leadsto \frac{1}{\color{blue}{\frac{z \cdot z}{x}}} \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{z \cdot z}{x}\right)}\right) \]
        3. clear-numN/A

          \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{\color{blue}{\frac{x}{z \cdot z}}}\right)\right) \]
        4. associate-/r*N/A

          \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{\frac{\frac{x}{z}}{\color{blue}{z}}}\right)\right) \]
        5. clear-numN/A

          \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{z}{\color{blue}{\frac{x}{z}}}\right)\right) \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(z, \color{blue}{\left(\frac{x}{z}\right)}\right)\right) \]
        7. /-lowering-/.f6476.8%

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(z, \mathsf{/.f64}\left(x, \color{blue}{z}\right)\right)\right) \]
      7. Applied egg-rr76.8%

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

      if -3150 < z < 7.5000000000000005e-54

      1. Initial program 90.5%

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

        \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(t \cdot y\right)}\right) \]
        2. *-lowering-*.f6459.3%

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(t, \color{blue}{y}\right)\right) \]
      5. Simplified59.3%

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

          \[\leadsto \frac{\frac{x}{t}}{\color{blue}{y}} \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{t}\right), \color{blue}{y}\right) \]
        3. /-lowering-/.f6462.6%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, t\right), y\right) \]
      7. Applied egg-rr62.6%

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

    Alternative 10: 65.6% accurate, 0.6× speedup?

    \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{\frac{x}{z}}{z}\\ \mathbf{if}\;z \leq -95000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-53}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    NOTE: x, y, z, 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 -95000.0) t_1 (if (<= z 1.5e-53) (/ (/ x t) y) t_1))))
    assert(x < y && y < z && z < t);
    double code(double x, double y, double z, double t) {
    	double t_1 = (x / z) / z;
    	double tmp;
    	if (z <= -95000.0) {
    		tmp = t_1;
    	} else if (z <= 1.5e-53) {
    		tmp = (x / t) / y;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    NOTE: x, y, z, 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 <= (-95000.0d0)) then
            tmp = t_1
        else if (z <= 1.5d-53) then
            tmp = (x / t) / y
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    assert x < y && y < z && z < t;
    public static double code(double x, double y, double z, double t) {
    	double t_1 = (x / z) / z;
    	double tmp;
    	if (z <= -95000.0) {
    		tmp = t_1;
    	} else if (z <= 1.5e-53) {
    		tmp = (x / t) / y;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    [x, y, z, t] = sort([x, y, z, t])
    def code(x, y, z, t):
    	t_1 = (x / z) / z
    	tmp = 0
    	if z <= -95000.0:
    		tmp = t_1
    	elif z <= 1.5e-53:
    		tmp = (x / t) / y
    	else:
    		tmp = t_1
    	return tmp
    
    x, y, z, t = sort([x, y, z, t])
    function code(x, y, z, t)
    	t_1 = Float64(Float64(x / z) / z)
    	tmp = 0.0
    	if (z <= -95000.0)
    		tmp = t_1;
    	elseif (z <= 1.5e-53)
    		tmp = Float64(Float64(x / t) / y);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    x, y, z, t = num2cell(sort([x, y, z, t])){:}
    function tmp_2 = code(x, y, z, t)
    	t_1 = (x / z) / z;
    	tmp = 0.0;
    	if (z <= -95000.0)
    		tmp = t_1;
    	elseif (z <= 1.5e-53)
    		tmp = (x / t) / y;
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    NOTE: x, y, z, 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, -95000.0], t$95$1, If[LessEqual[z, 1.5e-53], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
    \\
    \begin{array}{l}
    t_1 := \frac{\frac{x}{z}}{z}\\
    \mathbf{if}\;z \leq -95000:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;z \leq 1.5 \cdot 10^{-53}:\\
    \;\;\;\;\frac{\frac{x}{t}}{y}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -95000 or 1.5000000000000001e-53 < z

      1. Initial program 86.0%

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

        \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left({z}^{2}\right)}\right) \]
        2. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(x, \left(z \cdot \color{blue}{z}\right)\right) \]
        3. *-lowering-*.f6469.6%

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right) \]
      5. Simplified69.6%

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

          \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z}} \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{z}\right), \color{blue}{z}\right) \]
        3. /-lowering-/.f6475.9%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), z\right) \]
      7. Applied egg-rr75.9%

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

      if -95000 < z < 1.5000000000000001e-53

      1. Initial program 90.5%

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

        \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(t \cdot y\right)}\right) \]
        2. *-lowering-*.f6459.3%

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(t, \color{blue}{y}\right)\right) \]
      5. Simplified59.3%

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

          \[\leadsto \frac{\frac{x}{t}}{\color{blue}{y}} \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{t}\right), \color{blue}{y}\right) \]
        3. /-lowering-/.f6462.6%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, t\right), y\right) \]
      7. Applied egg-rr62.6%

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

    Alternative 11: 62.2% accurate, 0.6× speedup?

    \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{x}{z \cdot z}\\ \mathbf{if}\;z \leq -500:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-53}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    NOTE: x, y, z, 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 -500.0) t_1 (if (<= z 1.5e-53) (/ (/ x t) y) t_1))))
    assert(x < y && y < z && z < t);
    double code(double x, double y, double z, double t) {
    	double t_1 = x / (z * z);
    	double tmp;
    	if (z <= -500.0) {
    		tmp = t_1;
    	} else if (z <= 1.5e-53) {
    		tmp = (x / t) / y;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    NOTE: x, y, z, 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 <= (-500.0d0)) then
            tmp = t_1
        else if (z <= 1.5d-53) then
            tmp = (x / t) / y
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    assert x < y && y < z && z < t;
    public static double code(double x, double y, double z, double t) {
    	double t_1 = x / (z * z);
    	double tmp;
    	if (z <= -500.0) {
    		tmp = t_1;
    	} else if (z <= 1.5e-53) {
    		tmp = (x / t) / y;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    [x, y, z, t] = sort([x, y, z, t])
    def code(x, y, z, t):
    	t_1 = x / (z * z)
    	tmp = 0
    	if z <= -500.0:
    		tmp = t_1
    	elif z <= 1.5e-53:
    		tmp = (x / t) / y
    	else:
    		tmp = t_1
    	return tmp
    
    x, y, z, t = sort([x, y, z, t])
    function code(x, y, z, t)
    	t_1 = Float64(x / Float64(z * z))
    	tmp = 0.0
    	if (z <= -500.0)
    		tmp = t_1;
    	elseif (z <= 1.5e-53)
    		tmp = Float64(Float64(x / t) / y);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    x, y, z, t = num2cell(sort([x, y, z, t])){:}
    function tmp_2 = code(x, y, z, t)
    	t_1 = x / (z * z);
    	tmp = 0.0;
    	if (z <= -500.0)
    		tmp = t_1;
    	elseif (z <= 1.5e-53)
    		tmp = (x / t) / y;
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -500.0], t$95$1, If[LessEqual[z, 1.5e-53], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
    \\
    \begin{array}{l}
    t_1 := \frac{x}{z \cdot z}\\
    \mathbf{if}\;z \leq -500:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;z \leq 1.5 \cdot 10^{-53}:\\
    \;\;\;\;\frac{\frac{x}{t}}{y}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -500 or 1.5000000000000001e-53 < z

      1. Initial program 86.0%

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

        \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left({z}^{2}\right)}\right) \]
        2. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(x, \left(z \cdot \color{blue}{z}\right)\right) \]
        3. *-lowering-*.f6469.6%

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right) \]
      5. Simplified69.6%

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

      if -500 < z < 1.5000000000000001e-53

      1. Initial program 90.5%

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

        \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(t \cdot y\right)}\right) \]
        2. *-lowering-*.f6459.3%

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(t, \color{blue}{y}\right)\right) \]
      5. Simplified59.3%

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

          \[\leadsto \frac{\frac{x}{t}}{\color{blue}{y}} \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{t}\right), \color{blue}{y}\right) \]
        3. /-lowering-/.f6462.6%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, t\right), y\right) \]
      7. Applied egg-rr62.6%

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

    Alternative 12: 61.3% accurate, 0.6× speedup?

    \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{x}{z \cdot z}\\ \mathbf{if}\;z \leq -1.16 \cdot 10^{-26}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.32 \cdot 10^{-53}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    NOTE: x, y, z, 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.16e-26) t_1 (if (<= z 1.32e-53) (/ x (* y t)) t_1))))
    assert(x < y && y < z && z < t);
    double code(double x, double y, double z, double t) {
    	double t_1 = x / (z * z);
    	double tmp;
    	if (z <= -1.16e-26) {
    		tmp = t_1;
    	} else if (z <= 1.32e-53) {
    		tmp = x / (y * t);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    NOTE: x, y, z, 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.16d-26)) then
            tmp = t_1
        else if (z <= 1.32d-53) then
            tmp = x / (y * t)
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    assert x < y && y < z && z < t;
    public static double code(double x, double y, double z, double t) {
    	double t_1 = x / (z * z);
    	double tmp;
    	if (z <= -1.16e-26) {
    		tmp = t_1;
    	} else if (z <= 1.32e-53) {
    		tmp = x / (y * t);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    [x, y, z, t] = sort([x, y, z, t])
    def code(x, y, z, t):
    	t_1 = x / (z * z)
    	tmp = 0
    	if z <= -1.16e-26:
    		tmp = t_1
    	elif z <= 1.32e-53:
    		tmp = x / (y * t)
    	else:
    		tmp = t_1
    	return tmp
    
    x, y, z, t = sort([x, y, z, t])
    function code(x, y, z, t)
    	t_1 = Float64(x / Float64(z * z))
    	tmp = 0.0
    	if (z <= -1.16e-26)
    		tmp = t_1;
    	elseif (z <= 1.32e-53)
    		tmp = Float64(x / Float64(y * t));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    x, y, z, t = num2cell(sort([x, y, z, t])){:}
    function tmp_2 = code(x, y, z, t)
    	t_1 = x / (z * z);
    	tmp = 0.0;
    	if (z <= -1.16e-26)
    		tmp = t_1;
    	elseif (z <= 1.32e-53)
    		tmp = x / (y * t);
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.16e-26], t$95$1, If[LessEqual[z, 1.32e-53], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
    \\
    \begin{array}{l}
    t_1 := \frac{x}{z \cdot z}\\
    \mathbf{if}\;z \leq -1.16 \cdot 10^{-26}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;z \leq 1.32 \cdot 10^{-53}:\\
    \;\;\;\;\frac{x}{y \cdot t}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -1.16000000000000002e-26 or 1.31999999999999997e-53 < z

      1. Initial program 85.8%

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

        \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left({z}^{2}\right)}\right) \]
        2. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(x, \left(z \cdot \color{blue}{z}\right)\right) \]
        3. *-lowering-*.f6468.1%

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right) \]
      5. Simplified68.1%

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

      if -1.16000000000000002e-26 < z < 1.31999999999999997e-53

      1. Initial program 91.0%

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

        \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(t \cdot y\right)}\right) \]
        2. *-lowering-*.f6461.9%

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(t, \color{blue}{y}\right)\right) \]
      5. Simplified61.9%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.16 \cdot 10^{-26}:\\ \;\;\;\;\frac{x}{z \cdot z}\\ \mathbf{elif}\;z \leq 1.32 \cdot 10^{-53}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot z}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 13: 96.9% accurate, 1.0× speedup?

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

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \frac{\frac{x}{t - z}}{\color{blue}{y - z}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{x}{t - z}\right), \color{blue}{\left(y - z\right)}\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(t - z\right)\right), \left(\color{blue}{y} - z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(t, z\right)\right), \left(y - z\right)\right) \]
      5. --lowering--.f6497.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(t, z\right)\right), \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
    4. Applied egg-rr97.5%

      \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y - z}} \]
    5. Add Preprocessing

    Alternative 14: 39.5% accurate, 1.8× speedup?

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

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

      \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(t \cdot y\right)}\right) \]
      2. *-lowering-*.f6435.5%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(t, \color{blue}{y}\right)\right) \]
    5. Simplified35.5%

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

      \[\leadsto \frac{x}{y \cdot t} \]
    7. Add Preprocessing

    Developer Target 1: 88.1% 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 2024160 
    (FPCore (x y z t)
      :name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
      :precision binary64
    
      :alt
      (! :herbie-platform default (if (< (/ x (* (- y z) (- t z))) 0) (/ (/ x (- y z)) (- t z)) (* x (/ 1 (* (- y z) (- t z))))))
    
      (/ x (* (- y z) (- t z))))