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

Percentage Accurate: 89.0% → 97.9%
Time: 12.0s
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.0% accurate, 1.0× speedup?

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

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

Alternative 1: 97.9% accurate, 0.4× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ [x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{x\_m}{\left(y - z\right) \cdot \left(t - z\right)}\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq 0:\\ \;\;\;\;\frac{\frac{x\_m}{t - z}}{y - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z t)
 :precision binary64
 (let* ((t_1 (/ x_m (* (- y z) (- t z)))))
   (* x_s (if (<= t_1 0.0) (/ (/ x_m (- t z)) (- y z)) t_1))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = x_m / ((y - z) * (t - z));
	double tmp;
	if (t_1 <= 0.0) {
		tmp = (x_m / (t - z)) / (y - z);
	} else {
		tmp = t_1;
	}
	return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    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_m / ((y - z) * (t - z))
    if (t_1 <= 0.0d0) then
        tmp = (x_m / (t - z)) / (y - z)
    else
        tmp = t_1
    end if
    code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = x_m / ((y - z) * (t - z));
	double tmp;
	if (t_1 <= 0.0) {
		tmp = (x_m / (t - z)) / (y - z);
	} else {
		tmp = t_1;
	}
	return x_s * tmp;
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
[x_m, y, z, t] = sort([x_m, y, z, t])
def code(x_s, x_m, y, z, t):
	t_1 = x_m / ((y - z) * (t - z))
	tmp = 0
	if t_1 <= 0.0:
		tmp = (x_m / (t - z)) / (y - z)
	else:
		tmp = t_1
	return x_s * tmp
x\_m = abs(x)
x\_s = copysign(1.0, x)
x_m, y, z, t = sort([x_m, y, z, t])
function code(x_s, x_m, y, z, t)
	t_1 = Float64(x_m / Float64(Float64(y - z) * Float64(t - z)))
	tmp = 0.0
	if (t_1 <= 0.0)
		tmp = Float64(Float64(x_m / Float64(t - z)) / Float64(y - z));
	else
		tmp = t_1;
	end
	return Float64(x_s * tmp)
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp_2 = code(x_s, x_m, y, z, t)
	t_1 = x_m / ((y - z) * (t - z));
	tmp = 0.0;
	if (t_1 <= 0.0)
		tmp = (x_m / (t - z)) / (y - z);
	else
		tmp = t_1;
	end
	tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(x$95$m / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$1, 0.0], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], t$95$1]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x\_m}{\left(y - z\right) \cdot \left(t - z\right)}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq 0:\\
\;\;\;\;\frac{\frac{x\_m}{t - z}}{y - z}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


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

    1. Initial program 82.4%

      \[\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--.f6498.3%

        \[\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-rr98.3%

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

    if -0.0 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z)))

    1. Initial program 99.7%

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

Alternative 2: 91.5% accurate, 0.5× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ [x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\ \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -6 \cdot 10^{-28}:\\ \;\;\;\;\frac{\frac{x\_m}{t - z}}{y}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+156}:\\ \;\;\;\;\frac{x\_m}{\left(y - z\right) \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x\_m}{y - z}}{t}\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= t -6e-28)
    (/ (/ x_m (- t z)) y)
    (if (<= t 5.5e+156) (/ x_m (* (- y z) (- t z))) (/ (/ x_m (- y z)) t)))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (t <= -6e-28) {
		tmp = (x_m / (t - z)) / y;
	} else if (t <= 5.5e+156) {
		tmp = x_m / ((y - z) * (t - z));
	} else {
		tmp = (x_m / (y - z)) / t;
	}
	return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-6d-28)) then
        tmp = (x_m / (t - z)) / y
    else if (t <= 5.5d+156) then
        tmp = x_m / ((y - z) * (t - z))
    else
        tmp = (x_m / (y - z)) / t
    end if
    code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (t <= -6e-28) {
		tmp = (x_m / (t - z)) / y;
	} else if (t <= 5.5e+156) {
		tmp = x_m / ((y - z) * (t - z));
	} else {
		tmp = (x_m / (y - z)) / t;
	}
	return x_s * tmp;
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
[x_m, y, z, t] = sort([x_m, y, z, t])
def code(x_s, x_m, y, z, t):
	tmp = 0
	if t <= -6e-28:
		tmp = (x_m / (t - z)) / y
	elif t <= 5.5e+156:
		tmp = x_m / ((y - z) * (t - z))
	else:
		tmp = (x_m / (y - z)) / t
	return x_s * tmp
x\_m = abs(x)
x\_s = copysign(1.0, x)
x_m, y, z, t = sort([x_m, y, z, t])
function code(x_s, x_m, y, z, t)
	tmp = 0.0
	if (t <= -6e-28)
		tmp = Float64(Float64(x_m / Float64(t - z)) / y);
	elseif (t <= 5.5e+156)
		tmp = Float64(x_m / Float64(Float64(y - z) * Float64(t - z)));
	else
		tmp = Float64(Float64(x_m / Float64(y - z)) / t);
	end
	return Float64(x_s * tmp)
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp_2 = code(x_s, x_m, y, z, t)
	tmp = 0.0;
	if (t <= -6e-28)
		tmp = (x_m / (t - z)) / y;
	elseif (t <= 5.5e+156)
		tmp = x_m / ((y - z) * (t - z));
	else
		tmp = (x_m / (y - z)) / t;
	end
	tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[t, -6e-28], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 5.5e+156], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{-28}:\\
\;\;\;\;\frac{\frac{x\_m}{t - z}}{y}\\

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

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


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

    1. Initial program 80.2%

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{x}{y}\right)}, \mathsf{\_.f64}\left(t, z\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f6448.5%

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

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

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

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

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

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

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

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

    if -6.00000000000000005e-28 < t < 5.5000000000000003e156

    1. Initial program 92.4%

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

    if 5.5000000000000003e156 < t

    1. Initial program 75.4%

      \[\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--.f6499.6%

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

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

Alternative 3: 82.0% accurate, 0.5× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ [x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\ \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -1.8 \cdot 10^{-115}:\\ \;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\ \mathbf{elif}\;t \leq 165000000:\\ \;\;\;\;\frac{\frac{x\_m}{z}}{z - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x\_m}{y - z}}{t}\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= t -1.8e-115)
    (/ (/ x_m y) (- t z))
    (if (<= t 165000000.0) (/ (/ x_m z) (- z y)) (/ (/ x_m (- y z)) t)))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (t <= -1.8e-115) {
		tmp = (x_m / y) / (t - z);
	} else if (t <= 165000000.0) {
		tmp = (x_m / z) / (z - y);
	} else {
		tmp = (x_m / (y - z)) / t;
	}
	return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-1.8d-115)) then
        tmp = (x_m / y) / (t - z)
    else if (t <= 165000000.0d0) then
        tmp = (x_m / z) / (z - y)
    else
        tmp = (x_m / (y - z)) / t
    end if
    code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (t <= -1.8e-115) {
		tmp = (x_m / y) / (t - z);
	} else if (t <= 165000000.0) {
		tmp = (x_m / z) / (z - y);
	} else {
		tmp = (x_m / (y - z)) / t;
	}
	return x_s * tmp;
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
[x_m, y, z, t] = sort([x_m, y, z, t])
def code(x_s, x_m, y, z, t):
	tmp = 0
	if t <= -1.8e-115:
		tmp = (x_m / y) / (t - z)
	elif t <= 165000000.0:
		tmp = (x_m / z) / (z - y)
	else:
		tmp = (x_m / (y - z)) / t
	return x_s * tmp
x\_m = abs(x)
x\_s = copysign(1.0, x)
x_m, y, z, t = sort([x_m, y, z, t])
function code(x_s, x_m, y, z, t)
	tmp = 0.0
	if (t <= -1.8e-115)
		tmp = Float64(Float64(x_m / y) / Float64(t - z));
	elseif (t <= 165000000.0)
		tmp = Float64(Float64(x_m / z) / Float64(z - y));
	else
		tmp = Float64(Float64(x_m / Float64(y - z)) / t);
	end
	return Float64(x_s * tmp)
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp_2 = code(x_s, x_m, y, z, t)
	tmp = 0.0;
	if (t <= -1.8e-115)
		tmp = (x_m / y) / (t - z);
	elseif (t <= 165000000.0)
		tmp = (x_m / z) / (z - y);
	else
		tmp = (x_m / (y - z)) / t;
	end
	tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[t, -1.8e-115], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 165000000.0], N[(N[(x$95$m / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -1.8 \cdot 10^{-115}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\

\mathbf{elif}\;t \leq 165000000:\\
\;\;\;\;\frac{\frac{x\_m}{z}}{z - y}\\

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


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

    1. Initial program 82.8%

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{x}{y}\right)}, \mathsf{\_.f64}\left(t, z\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f6452.4%

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

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

    if -1.80000000000000005e-115 < t < 1.65e8

    1. Initial program 92.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{\_.f64}\left(\color{blue}{z}, y\right)\right) \]
    9. Simplified85.2%

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

    if 1.65e8 < t

    1. Initial program 82.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--.f6494.1%

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

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

Alternative 4: 82.4% accurate, 0.5× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ [x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\ \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{-115}:\\ \;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-7}:\\ \;\;\;\;\frac{\frac{x\_m}{z}}{z - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= t -2.8e-115)
    (/ (/ x_m y) (- t z))
    (if (<= t 3.5e-7) (/ (/ x_m z) (- z y)) (/ (/ x_m t) (- y z))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
assert(x_m < y && y < z && z < t);
double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (t <= -2.8e-115) {
		tmp = (x_m / y) / (t - z);
	} else if (t <= 3.5e-7) {
		tmp = (x_m / z) / (z - y);
	} else {
		tmp = (x_m / t) / (y - z);
	}
	return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x_s, x_m, y, z, t)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-2.8d-115)) then
        tmp = (x_m / y) / (t - z)
    else if (t <= 3.5d-7) then
        tmp = (x_m / z) / (z - y)
    else
        tmp = (x_m / t) / (y - z)
    end if
    code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
assert x_m < y && y < z && z < t;
public static double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (t <= -2.8e-115) {
		tmp = (x_m / y) / (t - z);
	} else if (t <= 3.5e-7) {
		tmp = (x_m / z) / (z - y);
	} else {
		tmp = (x_m / t) / (y - z);
	}
	return x_s * tmp;
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
[x_m, y, z, t] = sort([x_m, y, z, t])
def code(x_s, x_m, y, z, t):
	tmp = 0
	if t <= -2.8e-115:
		tmp = (x_m / y) / (t - z)
	elif t <= 3.5e-7:
		tmp = (x_m / z) / (z - y)
	else:
		tmp = (x_m / t) / (y - z)
	return x_s * tmp
x\_m = abs(x)
x\_s = copysign(1.0, x)
x_m, y, z, t = sort([x_m, y, z, t])
function code(x_s, x_m, y, z, t)
	tmp = 0.0
	if (t <= -2.8e-115)
		tmp = Float64(Float64(x_m / y) / Float64(t - z));
	elseif (t <= 3.5e-7)
		tmp = Float64(Float64(x_m / z) / Float64(z - y));
	else
		tmp = Float64(Float64(x_m / t) / Float64(y - z));
	end
	return Float64(x_s * tmp)
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
function tmp_2 = code(x_s, x_m, y, z, t)
	tmp = 0.0;
	if (t <= -2.8e-115)
		tmp = (x_m / y) / (t - z);
	elseif (t <= 3.5e-7)
		tmp = (x_m / z) / (z - y);
	else
		tmp = (x_m / t) / (y - z);
	end
	tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[t, -2.8e-115], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.5e-7], N[(N[(x$95$m / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{-115}:\\
\;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\

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

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


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

    1. Initial program 82.8%

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{x}{y}\right)}, \mathsf{\_.f64}\left(t, z\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f6452.4%

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

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

    if -2.79999999999999987e-115 < t < 3.49999999999999984e-7

    1. Initial program 93.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.49999999999999984e-7 < t

    1. Initial program 82.6%

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

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

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

          \[\leadsto \frac{x}{t \cdot \color{blue}{\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--.f6487.2%

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

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

    Alternative 5: 73.5% accurate, 0.5× speedup?

    \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ [x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\ \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{-285}:\\ \;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-7}:\\ \;\;\;\;\frac{\frac{x\_m}{z}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\ \end{array} \end{array} \]
    x\_m = (fabs.f64 x)
    x\_s = (copysign.f64 #s(literal 1 binary64) x)
    NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
    (FPCore (x_s x_m y z t)
     :precision binary64
     (*
      x_s
      (if (<= t -1.6e-285)
        (/ (/ x_m y) (- t z))
        (if (<= t 4e-7) (/ (/ x_m z) z) (/ (/ x_m t) (- y z))))))
    x\_m = fabs(x);
    x\_s = copysign(1.0, x);
    assert(x_m < y && y < z && z < t);
    double code(double x_s, double x_m, double y, double z, double t) {
    	double tmp;
    	if (t <= -1.6e-285) {
    		tmp = (x_m / y) / (t - z);
    	} else if (t <= 4e-7) {
    		tmp = (x_m / z) / z;
    	} else {
    		tmp = (x_m / t) / (y - z);
    	}
    	return x_s * tmp;
    }
    
    x\_m = abs(x)
    x\_s = copysign(1.0d0, x)
    NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
    real(8) function code(x_s, x_m, y, z, t)
        real(8), intent (in) :: x_s
        real(8), intent (in) :: x_m
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8) :: tmp
        if (t <= (-1.6d-285)) then
            tmp = (x_m / y) / (t - z)
        else if (t <= 4d-7) then
            tmp = (x_m / z) / z
        else
            tmp = (x_m / t) / (y - z)
        end if
        code = x_s * tmp
    end function
    
    x\_m = Math.abs(x);
    x\_s = Math.copySign(1.0, x);
    assert x_m < y && y < z && z < t;
    public static double code(double x_s, double x_m, double y, double z, double t) {
    	double tmp;
    	if (t <= -1.6e-285) {
    		tmp = (x_m / y) / (t - z);
    	} else if (t <= 4e-7) {
    		tmp = (x_m / z) / z;
    	} else {
    		tmp = (x_m / t) / (y - z);
    	}
    	return x_s * tmp;
    }
    
    x\_m = math.fabs(x)
    x\_s = math.copysign(1.0, x)
    [x_m, y, z, t] = sort([x_m, y, z, t])
    def code(x_s, x_m, y, z, t):
    	tmp = 0
    	if t <= -1.6e-285:
    		tmp = (x_m / y) / (t - z)
    	elif t <= 4e-7:
    		tmp = (x_m / z) / z
    	else:
    		tmp = (x_m / t) / (y - z)
    	return x_s * tmp
    
    x\_m = abs(x)
    x\_s = copysign(1.0, x)
    x_m, y, z, t = sort([x_m, y, z, t])
    function code(x_s, x_m, y, z, t)
    	tmp = 0.0
    	if (t <= -1.6e-285)
    		tmp = Float64(Float64(x_m / y) / Float64(t - z));
    	elseif (t <= 4e-7)
    		tmp = Float64(Float64(x_m / z) / z);
    	else
    		tmp = Float64(Float64(x_m / t) / Float64(y - z));
    	end
    	return Float64(x_s * tmp)
    end
    
    x\_m = abs(x);
    x\_s = sign(x) * abs(1.0);
    x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
    function tmp_2 = code(x_s, x_m, y, z, t)
    	tmp = 0.0;
    	if (t <= -1.6e-285)
    		tmp = (x_m / y) / (t - z);
    	elseif (t <= 4e-7)
    		tmp = (x_m / z) / z;
    	else
    		tmp = (x_m / t) / (y - z);
    	end
    	tmp_2 = x_s * tmp;
    end
    
    x\_m = N[Abs[x], $MachinePrecision]
    x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
    code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[t, -1.6e-285], N[(N[(x$95$m / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e-7], N[(N[(x$95$m / z), $MachinePrecision] / z), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
    
    \begin{array}{l}
    x\_m = \left|x\right|
    \\
    x\_s = \mathsf{copysign}\left(1, x\right)
    \\
    [x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
    \\
    x\_s \cdot \begin{array}{l}
    \mathbf{if}\;t \leq -1.6 \cdot 10^{-285}:\\
    \;\;\;\;\frac{\frac{x\_m}{y}}{t - z}\\
    
    \mathbf{elif}\;t \leq 4 \cdot 10^{-7}:\\
    \;\;\;\;\frac{\frac{x\_m}{z}}{z}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if t < -1.60000000000000008e-285

      1. Initial program 86.6%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{x}{y}\right)}, \mathsf{\_.f64}\left(t, z\right)\right) \]
      6. Step-by-step derivation
        1. /-lowering-/.f6456.4%

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

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

      if -1.60000000000000008e-285 < t < 3.9999999999999998e-7

      1. Initial program 90.9%

        \[\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-*.f6462.2%

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

        \[\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-/.f6465.5%

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

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

      if 3.9999999999999998e-7 < t

      1. Initial program 82.6%

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

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

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

            \[\leadsto \frac{x}{t \cdot \color{blue}{\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--.f6487.2%

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

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

      Alternative 6: 72.6% accurate, 0.5× speedup?

      \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ [x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\ \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -1.4 \cdot 10^{-290}:\\ \;\;\;\;\frac{x\_m}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-7}:\\ \;\;\;\;\frac{\frac{x\_m}{z}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\ \end{array} \end{array} \]
      x\_m = (fabs.f64 x)
      x\_s = (copysign.f64 #s(literal 1 binary64) x)
      NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
      (FPCore (x_s x_m y z t)
       :precision binary64
       (*
        x_s
        (if (<= t -1.4e-290)
          (/ x_m (* y (- t z)))
          (if (<= t 9.5e-7) (/ (/ x_m z) z) (/ (/ x_m t) (- y z))))))
      x\_m = fabs(x);
      x\_s = copysign(1.0, x);
      assert(x_m < y && y < z && z < t);
      double code(double x_s, double x_m, double y, double z, double t) {
      	double tmp;
      	if (t <= -1.4e-290) {
      		tmp = x_m / (y * (t - z));
      	} else if (t <= 9.5e-7) {
      		tmp = (x_m / z) / z;
      	} else {
      		tmp = (x_m / t) / (y - z);
      	}
      	return x_s * tmp;
      }
      
      x\_m = abs(x)
      x\_s = copysign(1.0d0, x)
      NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
      real(8) function code(x_s, x_m, y, z, t)
          real(8), intent (in) :: x_s
          real(8), intent (in) :: x_m
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8) :: tmp
          if (t <= (-1.4d-290)) then
              tmp = x_m / (y * (t - z))
          else if (t <= 9.5d-7) then
              tmp = (x_m / z) / z
          else
              tmp = (x_m / t) / (y - z)
          end if
          code = x_s * tmp
      end function
      
      x\_m = Math.abs(x);
      x\_s = Math.copySign(1.0, x);
      assert x_m < y && y < z && z < t;
      public static double code(double x_s, double x_m, double y, double z, double t) {
      	double tmp;
      	if (t <= -1.4e-290) {
      		tmp = x_m / (y * (t - z));
      	} else if (t <= 9.5e-7) {
      		tmp = (x_m / z) / z;
      	} else {
      		tmp = (x_m / t) / (y - z);
      	}
      	return x_s * tmp;
      }
      
      x\_m = math.fabs(x)
      x\_s = math.copysign(1.0, x)
      [x_m, y, z, t] = sort([x_m, y, z, t])
      def code(x_s, x_m, y, z, t):
      	tmp = 0
      	if t <= -1.4e-290:
      		tmp = x_m / (y * (t - z))
      	elif t <= 9.5e-7:
      		tmp = (x_m / z) / z
      	else:
      		tmp = (x_m / t) / (y - z)
      	return x_s * tmp
      
      x\_m = abs(x)
      x\_s = copysign(1.0, x)
      x_m, y, z, t = sort([x_m, y, z, t])
      function code(x_s, x_m, y, z, t)
      	tmp = 0.0
      	if (t <= -1.4e-290)
      		tmp = Float64(x_m / Float64(y * Float64(t - z)));
      	elseif (t <= 9.5e-7)
      		tmp = Float64(Float64(x_m / z) / z);
      	else
      		tmp = Float64(Float64(x_m / t) / Float64(y - z));
      	end
      	return Float64(x_s * tmp)
      end
      
      x\_m = abs(x);
      x\_s = sign(x) * abs(1.0);
      x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
      function tmp_2 = code(x_s, x_m, y, z, t)
      	tmp = 0.0;
      	if (t <= -1.4e-290)
      		tmp = x_m / (y * (t - z));
      	elseif (t <= 9.5e-7)
      		tmp = (x_m / z) / z;
      	else
      		tmp = (x_m / t) / (y - z);
      	end
      	tmp_2 = x_s * tmp;
      end
      
      x\_m = N[Abs[x], $MachinePrecision]
      x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
      code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[t, -1.4e-290], N[(x$95$m / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e-7], N[(N[(x$95$m / z), $MachinePrecision] / z), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
      
      \begin{array}{l}
      x\_m = \left|x\right|
      \\
      x\_s = \mathsf{copysign}\left(1, x\right)
      \\
      [x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
      \\
      x\_s \cdot \begin{array}{l}
      \mathbf{if}\;t \leq -1.4 \cdot 10^{-290}:\\
      \;\;\;\;\frac{x\_m}{y \cdot \left(t - z\right)}\\
      
      \mathbf{elif}\;t \leq 9.5 \cdot 10^{-7}:\\
      \;\;\;\;\frac{\frac{x\_m}{z}}{z}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\frac{x\_m}{t}}{y - z}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if t < -1.39999999999999998e-290

        1. Initial program 86.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--.f6454.8%

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

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

        if -1.39999999999999998e-290 < t < 9.5000000000000001e-7

        1. Initial program 90.7%

          \[\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-*.f6463.2%

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

          \[\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-/.f6466.6%

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

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

        if 9.5000000000000001e-7 < t

        1. Initial program 82.6%

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

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

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

              \[\leadsto \frac{x}{t \cdot \color{blue}{\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--.f6487.2%

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.4 \cdot 10^{-290}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-7}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]
        7. Add Preprocessing

        Alternative 7: 71.4% accurate, 0.5× speedup?

        \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ [x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\ \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{-289}:\\ \;\;\;\;\frac{x\_m}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{-6}:\\ \;\;\;\;\frac{\frac{x\_m}{z}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m}{\left(y - z\right) \cdot t}\\ \end{array} \end{array} \]
        x\_m = (fabs.f64 x)
        x\_s = (copysign.f64 #s(literal 1 binary64) x)
        NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
        (FPCore (x_s x_m y z t)
         :precision binary64
         (*
          x_s
          (if (<= t -2.5e-289)
            (/ x_m (* y (- t z)))
            (if (<= t 1.1e-6) (/ (/ x_m z) z) (/ x_m (* (- y z) t))))))
        x\_m = fabs(x);
        x\_s = copysign(1.0, x);
        assert(x_m < y && y < z && z < t);
        double code(double x_s, double x_m, double y, double z, double t) {
        	double tmp;
        	if (t <= -2.5e-289) {
        		tmp = x_m / (y * (t - z));
        	} else if (t <= 1.1e-6) {
        		tmp = (x_m / z) / z;
        	} else {
        		tmp = x_m / ((y - z) * t);
        	}
        	return x_s * tmp;
        }
        
        x\_m = abs(x)
        x\_s = copysign(1.0d0, x)
        NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
        real(8) function code(x_s, x_m, y, z, t)
            real(8), intent (in) :: x_s
            real(8), intent (in) :: x_m
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8), intent (in) :: t
            real(8) :: tmp
            if (t <= (-2.5d-289)) then
                tmp = x_m / (y * (t - z))
            else if (t <= 1.1d-6) then
                tmp = (x_m / z) / z
            else
                tmp = x_m / ((y - z) * t)
            end if
            code = x_s * tmp
        end function
        
        x\_m = Math.abs(x);
        x\_s = Math.copySign(1.0, x);
        assert x_m < y && y < z && z < t;
        public static double code(double x_s, double x_m, double y, double z, double t) {
        	double tmp;
        	if (t <= -2.5e-289) {
        		tmp = x_m / (y * (t - z));
        	} else if (t <= 1.1e-6) {
        		tmp = (x_m / z) / z;
        	} else {
        		tmp = x_m / ((y - z) * t);
        	}
        	return x_s * tmp;
        }
        
        x\_m = math.fabs(x)
        x\_s = math.copysign(1.0, x)
        [x_m, y, z, t] = sort([x_m, y, z, t])
        def code(x_s, x_m, y, z, t):
        	tmp = 0
        	if t <= -2.5e-289:
        		tmp = x_m / (y * (t - z))
        	elif t <= 1.1e-6:
        		tmp = (x_m / z) / z
        	else:
        		tmp = x_m / ((y - z) * t)
        	return x_s * tmp
        
        x\_m = abs(x)
        x\_s = copysign(1.0, x)
        x_m, y, z, t = sort([x_m, y, z, t])
        function code(x_s, x_m, y, z, t)
        	tmp = 0.0
        	if (t <= -2.5e-289)
        		tmp = Float64(x_m / Float64(y * Float64(t - z)));
        	elseif (t <= 1.1e-6)
        		tmp = Float64(Float64(x_m / z) / z);
        	else
        		tmp = Float64(x_m / Float64(Float64(y - z) * t));
        	end
        	return Float64(x_s * tmp)
        end
        
        x\_m = abs(x);
        x\_s = sign(x) * abs(1.0);
        x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
        function tmp_2 = code(x_s, x_m, y, z, t)
        	tmp = 0.0;
        	if (t <= -2.5e-289)
        		tmp = x_m / (y * (t - z));
        	elseif (t <= 1.1e-6)
        		tmp = (x_m / z) / z;
        	else
        		tmp = x_m / ((y - z) * t);
        	end
        	tmp_2 = x_s * tmp;
        end
        
        x\_m = N[Abs[x], $MachinePrecision]
        x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
        NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
        code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[t, -2.5e-289], N[(x$95$m / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e-6], N[(N[(x$95$m / z), $MachinePrecision] / z), $MachinePrecision], N[(x$95$m / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
        
        \begin{array}{l}
        x\_m = \left|x\right|
        \\
        x\_s = \mathsf{copysign}\left(1, x\right)
        \\
        [x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
        \\
        x\_s \cdot \begin{array}{l}
        \mathbf{if}\;t \leq -2.5 \cdot 10^{-289}:\\
        \;\;\;\;\frac{x\_m}{y \cdot \left(t - z\right)}\\
        
        \mathbf{elif}\;t \leq 1.1 \cdot 10^{-6}:\\
        \;\;\;\;\frac{\frac{x\_m}{z}}{z}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{x\_m}{\left(y - z\right) \cdot t}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if t < -2.50000000000000014e-289

          1. Initial program 86.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--.f6454.8%

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

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

          if -2.50000000000000014e-289 < t < 1.1000000000000001e-6

          1. Initial program 90.7%

            \[\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-*.f6463.2%

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

            \[\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-/.f6466.6%

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

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

          if 1.1000000000000001e-6 < t

          1. Initial program 82.6%

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{-289}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{-6}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \]
          7. Add Preprocessing

          Alternative 8: 73.1% accurate, 0.5× speedup?

          \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ [x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{\frac{x\_m}{z}}{z}\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{+114}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+57}:\\ \;\;\;\;\frac{x\_m}{y \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
          x\_m = (fabs.f64 x)
          x\_s = (copysign.f64 #s(literal 1 binary64) x)
          NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
          (FPCore (x_s x_m y z t)
           :precision binary64
           (let* ((t_1 (/ (/ x_m z) z)))
             (*
              x_s
              (if (<= z -4.4e+114) t_1 (if (<= z 6.5e+57) (/ x_m (* y (- t z))) t_1)))))
          x\_m = fabs(x);
          x\_s = copysign(1.0, x);
          assert(x_m < y && y < z && z < t);
          double code(double x_s, double x_m, double y, double z, double t) {
          	double t_1 = (x_m / z) / z;
          	double tmp;
          	if (z <= -4.4e+114) {
          		tmp = t_1;
          	} else if (z <= 6.5e+57) {
          		tmp = x_m / (y * (t - z));
          	} else {
          		tmp = t_1;
          	}
          	return x_s * tmp;
          }
          
          x\_m = abs(x)
          x\_s = copysign(1.0d0, x)
          NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
          real(8) function code(x_s, x_m, y, z, t)
              real(8), intent (in) :: x_s
              real(8), intent (in) :: x_m
              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_m / z) / z
              if (z <= (-4.4d+114)) then
                  tmp = t_1
              else if (z <= 6.5d+57) then
                  tmp = x_m / (y * (t - z))
              else
                  tmp = t_1
              end if
              code = x_s * tmp
          end function
          
          x\_m = Math.abs(x);
          x\_s = Math.copySign(1.0, x);
          assert x_m < y && y < z && z < t;
          public static double code(double x_s, double x_m, double y, double z, double t) {
          	double t_1 = (x_m / z) / z;
          	double tmp;
          	if (z <= -4.4e+114) {
          		tmp = t_1;
          	} else if (z <= 6.5e+57) {
          		tmp = x_m / (y * (t - z));
          	} else {
          		tmp = t_1;
          	}
          	return x_s * tmp;
          }
          
          x\_m = math.fabs(x)
          x\_s = math.copysign(1.0, x)
          [x_m, y, z, t] = sort([x_m, y, z, t])
          def code(x_s, x_m, y, z, t):
          	t_1 = (x_m / z) / z
          	tmp = 0
          	if z <= -4.4e+114:
          		tmp = t_1
          	elif z <= 6.5e+57:
          		tmp = x_m / (y * (t - z))
          	else:
          		tmp = t_1
          	return x_s * tmp
          
          x\_m = abs(x)
          x\_s = copysign(1.0, x)
          x_m, y, z, t = sort([x_m, y, z, t])
          function code(x_s, x_m, y, z, t)
          	t_1 = Float64(Float64(x_m / z) / z)
          	tmp = 0.0
          	if (z <= -4.4e+114)
          		tmp = t_1;
          	elseif (z <= 6.5e+57)
          		tmp = Float64(x_m / Float64(y * Float64(t - z)));
          	else
          		tmp = t_1;
          	end
          	return Float64(x_s * tmp)
          end
          
          x\_m = abs(x);
          x\_s = sign(x) * abs(1.0);
          x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
          function tmp_2 = code(x_s, x_m, y, z, t)
          	t_1 = (x_m / z) / z;
          	tmp = 0.0;
          	if (z <= -4.4e+114)
          		tmp = t_1;
          	elseif (z <= 6.5e+57)
          		tmp = x_m / (y * (t - z));
          	else
          		tmp = t_1;
          	end
          	tmp_2 = x_s * tmp;
          end
          
          x\_m = N[Abs[x], $MachinePrecision]
          x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
          code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x$95$m / z), $MachinePrecision] / z), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -4.4e+114], t$95$1, If[LessEqual[z, 6.5e+57], N[(x$95$m / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]), $MachinePrecision]]
          
          \begin{array}{l}
          x\_m = \left|x\right|
          \\
          x\_s = \mathsf{copysign}\left(1, x\right)
          \\
          [x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
          \\
          \begin{array}{l}
          t_1 := \frac{\frac{x\_m}{z}}{z}\\
          x\_s \cdot \begin{array}{l}
          \mathbf{if}\;z \leq -4.4 \cdot 10^{+114}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;z \leq 6.5 \cdot 10^{+57}:\\
          \;\;\;\;\frac{x\_m}{y \cdot \left(t - z\right)}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -4.4000000000000001e114 or 6.4999999999999997e57 < z

            1. Initial program 77.9%

              \[\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-*.f6467.3%

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

              \[\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-/.f6474.6%

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

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

            if -4.4000000000000001e114 < z < 6.4999999999999997e57

            1. Initial program 92.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--.f6465.1%

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{+114}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+57}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 9: 68.1% accurate, 0.6× speedup?

          \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ [x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{\frac{x\_m}{z}}{z}\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -2.45 \cdot 10^{+39}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3800000000000:\\ \;\;\;\;\frac{\frac{x\_m}{y}}{t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
          x\_m = (fabs.f64 x)
          x\_s = (copysign.f64 #s(literal 1 binary64) x)
          NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
          (FPCore (x_s x_m y z t)
           :precision binary64
           (let* ((t_1 (/ (/ x_m z) z)))
             (*
              x_s
              (if (<= z -2.45e+39)
                t_1
                (if (<= z 3800000000000.0) (/ (/ x_m y) t) t_1)))))
          x\_m = fabs(x);
          x\_s = copysign(1.0, x);
          assert(x_m < y && y < z && z < t);
          double code(double x_s, double x_m, double y, double z, double t) {
          	double t_1 = (x_m / z) / z;
          	double tmp;
          	if (z <= -2.45e+39) {
          		tmp = t_1;
          	} else if (z <= 3800000000000.0) {
          		tmp = (x_m / y) / t;
          	} else {
          		tmp = t_1;
          	}
          	return x_s * tmp;
          }
          
          x\_m = abs(x)
          x\_s = copysign(1.0d0, x)
          NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
          real(8) function code(x_s, x_m, y, z, t)
              real(8), intent (in) :: x_s
              real(8), intent (in) :: x_m
              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_m / z) / z
              if (z <= (-2.45d+39)) then
                  tmp = t_1
              else if (z <= 3800000000000.0d0) then
                  tmp = (x_m / y) / t
              else
                  tmp = t_1
              end if
              code = x_s * tmp
          end function
          
          x\_m = Math.abs(x);
          x\_s = Math.copySign(1.0, x);
          assert x_m < y && y < z && z < t;
          public static double code(double x_s, double x_m, double y, double z, double t) {
          	double t_1 = (x_m / z) / z;
          	double tmp;
          	if (z <= -2.45e+39) {
          		tmp = t_1;
          	} else if (z <= 3800000000000.0) {
          		tmp = (x_m / y) / t;
          	} else {
          		tmp = t_1;
          	}
          	return x_s * tmp;
          }
          
          x\_m = math.fabs(x)
          x\_s = math.copysign(1.0, x)
          [x_m, y, z, t] = sort([x_m, y, z, t])
          def code(x_s, x_m, y, z, t):
          	t_1 = (x_m / z) / z
          	tmp = 0
          	if z <= -2.45e+39:
          		tmp = t_1
          	elif z <= 3800000000000.0:
          		tmp = (x_m / y) / t
          	else:
          		tmp = t_1
          	return x_s * tmp
          
          x\_m = abs(x)
          x\_s = copysign(1.0, x)
          x_m, y, z, t = sort([x_m, y, z, t])
          function code(x_s, x_m, y, z, t)
          	t_1 = Float64(Float64(x_m / z) / z)
          	tmp = 0.0
          	if (z <= -2.45e+39)
          		tmp = t_1;
          	elseif (z <= 3800000000000.0)
          		tmp = Float64(Float64(x_m / y) / t);
          	else
          		tmp = t_1;
          	end
          	return Float64(x_s * tmp)
          end
          
          x\_m = abs(x);
          x\_s = sign(x) * abs(1.0);
          x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
          function tmp_2 = code(x_s, x_m, y, z, t)
          	t_1 = (x_m / z) / z;
          	tmp = 0.0;
          	if (z <= -2.45e+39)
          		tmp = t_1;
          	elseif (z <= 3800000000000.0)
          		tmp = (x_m / y) / t;
          	else
          		tmp = t_1;
          	end
          	tmp_2 = x_s * tmp;
          end
          
          x\_m = N[Abs[x], $MachinePrecision]
          x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
          code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x$95$m / z), $MachinePrecision] / z), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -2.45e+39], t$95$1, If[LessEqual[z, 3800000000000.0], N[(N[(x$95$m / y), $MachinePrecision] / t), $MachinePrecision], t$95$1]]), $MachinePrecision]]
          
          \begin{array}{l}
          x\_m = \left|x\right|
          \\
          x\_s = \mathsf{copysign}\left(1, x\right)
          \\
          [x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
          \\
          \begin{array}{l}
          t_1 := \frac{\frac{x\_m}{z}}{z}\\
          x\_s \cdot \begin{array}{l}
          \mathbf{if}\;z \leq -2.45 \cdot 10^{+39}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;z \leq 3800000000000:\\
          \;\;\;\;\frac{\frac{x\_m}{y}}{t}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -2.44999999999999994e39 or 3.8e12 < z

            1. Initial program 78.3%

              \[\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-*.f6459.1%

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

              \[\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-/.f6464.7%

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

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

            if -2.44999999999999994e39 < z < 3.8e12

            1. Initial program 95.2%

              \[\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-*.f6458.0%

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

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

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

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

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

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

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

          Alternative 10: 64.2% accurate, 0.6× speedup?

          \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ [x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{x\_m}{z \cdot z}\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{+39}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4000000000000:\\ \;\;\;\;\frac{\frac{x\_m}{y}}{t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
          x\_m = (fabs.f64 x)
          x\_s = (copysign.f64 #s(literal 1 binary64) x)
          NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
          (FPCore (x_s x_m y z t)
           :precision binary64
           (let* ((t_1 (/ x_m (* z z))))
             (*
              x_s
              (if (<= z -1.25e+39)
                t_1
                (if (<= z 4000000000000.0) (/ (/ x_m y) t) t_1)))))
          x\_m = fabs(x);
          x\_s = copysign(1.0, x);
          assert(x_m < y && y < z && z < t);
          double code(double x_s, double x_m, double y, double z, double t) {
          	double t_1 = x_m / (z * z);
          	double tmp;
          	if (z <= -1.25e+39) {
          		tmp = t_1;
          	} else if (z <= 4000000000000.0) {
          		tmp = (x_m / y) / t;
          	} else {
          		tmp = t_1;
          	}
          	return x_s * tmp;
          }
          
          x\_m = abs(x)
          x\_s = copysign(1.0d0, x)
          NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
          real(8) function code(x_s, x_m, y, z, t)
              real(8), intent (in) :: x_s
              real(8), intent (in) :: x_m
              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_m / (z * z)
              if (z <= (-1.25d+39)) then
                  tmp = t_1
              else if (z <= 4000000000000.0d0) then
                  tmp = (x_m / y) / t
              else
                  tmp = t_1
              end if
              code = x_s * tmp
          end function
          
          x\_m = Math.abs(x);
          x\_s = Math.copySign(1.0, x);
          assert x_m < y && y < z && z < t;
          public static double code(double x_s, double x_m, double y, double z, double t) {
          	double t_1 = x_m / (z * z);
          	double tmp;
          	if (z <= -1.25e+39) {
          		tmp = t_1;
          	} else if (z <= 4000000000000.0) {
          		tmp = (x_m / y) / t;
          	} else {
          		tmp = t_1;
          	}
          	return x_s * tmp;
          }
          
          x\_m = math.fabs(x)
          x\_s = math.copysign(1.0, x)
          [x_m, y, z, t] = sort([x_m, y, z, t])
          def code(x_s, x_m, y, z, t):
          	t_1 = x_m / (z * z)
          	tmp = 0
          	if z <= -1.25e+39:
          		tmp = t_1
          	elif z <= 4000000000000.0:
          		tmp = (x_m / y) / t
          	else:
          		tmp = t_1
          	return x_s * tmp
          
          x\_m = abs(x)
          x\_s = copysign(1.0, x)
          x_m, y, z, t = sort([x_m, y, z, t])
          function code(x_s, x_m, y, z, t)
          	t_1 = Float64(x_m / Float64(z * z))
          	tmp = 0.0
          	if (z <= -1.25e+39)
          		tmp = t_1;
          	elseif (z <= 4000000000000.0)
          		tmp = Float64(Float64(x_m / y) / t);
          	else
          		tmp = t_1;
          	end
          	return Float64(x_s * tmp)
          end
          
          x\_m = abs(x);
          x\_s = sign(x) * abs(1.0);
          x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
          function tmp_2 = code(x_s, x_m, y, z, t)
          	t_1 = x_m / (z * z);
          	tmp = 0.0;
          	if (z <= -1.25e+39)
          		tmp = t_1;
          	elseif (z <= 4000000000000.0)
          		tmp = (x_m / y) / t;
          	else
          		tmp = t_1;
          	end
          	tmp_2 = x_s * tmp;
          end
          
          x\_m = N[Abs[x], $MachinePrecision]
          x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
          code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(x$95$m / N[(z * z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -1.25e+39], t$95$1, If[LessEqual[z, 4000000000000.0], N[(N[(x$95$m / y), $MachinePrecision] / t), $MachinePrecision], t$95$1]]), $MachinePrecision]]
          
          \begin{array}{l}
          x\_m = \left|x\right|
          \\
          x\_s = \mathsf{copysign}\left(1, x\right)
          \\
          [x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
          \\
          \begin{array}{l}
          t_1 := \frac{x\_m}{z \cdot z}\\
          x\_s \cdot \begin{array}{l}
          \mathbf{if}\;z \leq -1.25 \cdot 10^{+39}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;z \leq 4000000000000:\\
          \;\;\;\;\frac{\frac{x\_m}{y}}{t}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -1.25000000000000004e39 or 4e12 < z

            1. Initial program 78.3%

              \[\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-*.f6459.1%

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

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

            if -1.25000000000000004e39 < z < 4e12

            1. Initial program 95.2%

              \[\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-*.f6458.0%

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

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

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

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

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

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

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

          Alternative 11: 64.1% accurate, 0.6× speedup?

          \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ [x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{x\_m}{z \cdot z}\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -5.3 \cdot 10^{+32}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1460000000000:\\ \;\;\;\;\frac{\frac{x\_m}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
          x\_m = (fabs.f64 x)
          x\_s = (copysign.f64 #s(literal 1 binary64) x)
          NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
          (FPCore (x_s x_m y z t)
           :precision binary64
           (let* ((t_1 (/ x_m (* z z))))
             (*
              x_s
              (if (<= z -5.3e+32) t_1 (if (<= z 1460000000000.0) (/ (/ x_m t) y) t_1)))))
          x\_m = fabs(x);
          x\_s = copysign(1.0, x);
          assert(x_m < y && y < z && z < t);
          double code(double x_s, double x_m, double y, double z, double t) {
          	double t_1 = x_m / (z * z);
          	double tmp;
          	if (z <= -5.3e+32) {
          		tmp = t_1;
          	} else if (z <= 1460000000000.0) {
          		tmp = (x_m / t) / y;
          	} else {
          		tmp = t_1;
          	}
          	return x_s * tmp;
          }
          
          x\_m = abs(x)
          x\_s = copysign(1.0d0, x)
          NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
          real(8) function code(x_s, x_m, y, z, t)
              real(8), intent (in) :: x_s
              real(8), intent (in) :: x_m
              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_m / (z * z)
              if (z <= (-5.3d+32)) then
                  tmp = t_1
              else if (z <= 1460000000000.0d0) then
                  tmp = (x_m / t) / y
              else
                  tmp = t_1
              end if
              code = x_s * tmp
          end function
          
          x\_m = Math.abs(x);
          x\_s = Math.copySign(1.0, x);
          assert x_m < y && y < z && z < t;
          public static double code(double x_s, double x_m, double y, double z, double t) {
          	double t_1 = x_m / (z * z);
          	double tmp;
          	if (z <= -5.3e+32) {
          		tmp = t_1;
          	} else if (z <= 1460000000000.0) {
          		tmp = (x_m / t) / y;
          	} else {
          		tmp = t_1;
          	}
          	return x_s * tmp;
          }
          
          x\_m = math.fabs(x)
          x\_s = math.copysign(1.0, x)
          [x_m, y, z, t] = sort([x_m, y, z, t])
          def code(x_s, x_m, y, z, t):
          	t_1 = x_m / (z * z)
          	tmp = 0
          	if z <= -5.3e+32:
          		tmp = t_1
          	elif z <= 1460000000000.0:
          		tmp = (x_m / t) / y
          	else:
          		tmp = t_1
          	return x_s * tmp
          
          x\_m = abs(x)
          x\_s = copysign(1.0, x)
          x_m, y, z, t = sort([x_m, y, z, t])
          function code(x_s, x_m, y, z, t)
          	t_1 = Float64(x_m / Float64(z * z))
          	tmp = 0.0
          	if (z <= -5.3e+32)
          		tmp = t_1;
          	elseif (z <= 1460000000000.0)
          		tmp = Float64(Float64(x_m / t) / y);
          	else
          		tmp = t_1;
          	end
          	return Float64(x_s * tmp)
          end
          
          x\_m = abs(x);
          x\_s = sign(x) * abs(1.0);
          x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
          function tmp_2 = code(x_s, x_m, y, z, t)
          	t_1 = x_m / (z * z);
          	tmp = 0.0;
          	if (z <= -5.3e+32)
          		tmp = t_1;
          	elseif (z <= 1460000000000.0)
          		tmp = (x_m / t) / y;
          	else
          		tmp = t_1;
          	end
          	tmp_2 = x_s * tmp;
          end
          
          x\_m = N[Abs[x], $MachinePrecision]
          x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
          code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(x$95$m / N[(z * z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -5.3e+32], t$95$1, If[LessEqual[z, 1460000000000.0], N[(N[(x$95$m / t), $MachinePrecision] / y), $MachinePrecision], t$95$1]]), $MachinePrecision]]
          
          \begin{array}{l}
          x\_m = \left|x\right|
          \\
          x\_s = \mathsf{copysign}\left(1, x\right)
          \\
          [x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
          \\
          \begin{array}{l}
          t_1 := \frac{x\_m}{z \cdot z}\\
          x\_s \cdot \begin{array}{l}
          \mathbf{if}\;z \leq -5.3 \cdot 10^{+32}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;z \leq 1460000000000:\\
          \;\;\;\;\frac{\frac{x\_m}{t}}{y}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -5.2999999999999999e32 or 1.46e12 < z

            1. Initial program 78.5%

              \[\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-*.f6459.4%

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

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

            if -5.2999999999999999e32 < z < 1.46e12

            1. Initial program 95.2%

              \[\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-*.f6458.4%

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

              \[\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-/.f6459.9%

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

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

          Alternative 12: 62.6% accurate, 0.6× speedup?

          \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ [x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{x\_m}{z \cdot z}\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -6.2 \cdot 10^{+30}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1500000000000:\\ \;\;\;\;\frac{x\_m}{y \cdot t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
          x\_m = (fabs.f64 x)
          x\_s = (copysign.f64 #s(literal 1 binary64) x)
          NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
          (FPCore (x_s x_m y z t)
           :precision binary64
           (let* ((t_1 (/ x_m (* z z))))
             (*
              x_s
              (if (<= z -6.2e+30) t_1 (if (<= z 1500000000000.0) (/ x_m (* y t)) t_1)))))
          x\_m = fabs(x);
          x\_s = copysign(1.0, x);
          assert(x_m < y && y < z && z < t);
          double code(double x_s, double x_m, double y, double z, double t) {
          	double t_1 = x_m / (z * z);
          	double tmp;
          	if (z <= -6.2e+30) {
          		tmp = t_1;
          	} else if (z <= 1500000000000.0) {
          		tmp = x_m / (y * t);
          	} else {
          		tmp = t_1;
          	}
          	return x_s * tmp;
          }
          
          x\_m = abs(x)
          x\_s = copysign(1.0d0, x)
          NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
          real(8) function code(x_s, x_m, y, z, t)
              real(8), intent (in) :: x_s
              real(8), intent (in) :: x_m
              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_m / (z * z)
              if (z <= (-6.2d+30)) then
                  tmp = t_1
              else if (z <= 1500000000000.0d0) then
                  tmp = x_m / (y * t)
              else
                  tmp = t_1
              end if
              code = x_s * tmp
          end function
          
          x\_m = Math.abs(x);
          x\_s = Math.copySign(1.0, x);
          assert x_m < y && y < z && z < t;
          public static double code(double x_s, double x_m, double y, double z, double t) {
          	double t_1 = x_m / (z * z);
          	double tmp;
          	if (z <= -6.2e+30) {
          		tmp = t_1;
          	} else if (z <= 1500000000000.0) {
          		tmp = x_m / (y * t);
          	} else {
          		tmp = t_1;
          	}
          	return x_s * tmp;
          }
          
          x\_m = math.fabs(x)
          x\_s = math.copysign(1.0, x)
          [x_m, y, z, t] = sort([x_m, y, z, t])
          def code(x_s, x_m, y, z, t):
          	t_1 = x_m / (z * z)
          	tmp = 0
          	if z <= -6.2e+30:
          		tmp = t_1
          	elif z <= 1500000000000.0:
          		tmp = x_m / (y * t)
          	else:
          		tmp = t_1
          	return x_s * tmp
          
          x\_m = abs(x)
          x\_s = copysign(1.0, x)
          x_m, y, z, t = sort([x_m, y, z, t])
          function code(x_s, x_m, y, z, t)
          	t_1 = Float64(x_m / Float64(z * z))
          	tmp = 0.0
          	if (z <= -6.2e+30)
          		tmp = t_1;
          	elseif (z <= 1500000000000.0)
          		tmp = Float64(x_m / Float64(y * t));
          	else
          		tmp = t_1;
          	end
          	return Float64(x_s * tmp)
          end
          
          x\_m = abs(x);
          x\_s = sign(x) * abs(1.0);
          x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
          function tmp_2 = code(x_s, x_m, y, z, t)
          	t_1 = x_m / (z * z);
          	tmp = 0.0;
          	if (z <= -6.2e+30)
          		tmp = t_1;
          	elseif (z <= 1500000000000.0)
          		tmp = x_m / (y * t);
          	else
          		tmp = t_1;
          	end
          	tmp_2 = x_s * tmp;
          end
          
          x\_m = N[Abs[x], $MachinePrecision]
          x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
          code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(x$95$m / N[(z * z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -6.2e+30], t$95$1, If[LessEqual[z, 1500000000000.0], N[(x$95$m / N[(y * t), $MachinePrecision]), $MachinePrecision], t$95$1]]), $MachinePrecision]]
          
          \begin{array}{l}
          x\_m = \left|x\right|
          \\
          x\_s = \mathsf{copysign}\left(1, x\right)
          \\
          [x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
          \\
          \begin{array}{l}
          t_1 := \frac{x\_m}{z \cdot z}\\
          x\_s \cdot \begin{array}{l}
          \mathbf{if}\;z \leq -6.2 \cdot 10^{+30}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;z \leq 1500000000000:\\
          \;\;\;\;\frac{x\_m}{y \cdot t}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -6.1999999999999995e30 or 1.5e12 < z

            1. Initial program 78.5%

              \[\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-*.f6459.4%

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

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

            if -6.1999999999999995e30 < z < 1.5e12

            1. Initial program 95.2%

              \[\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-*.f6458.4%

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

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

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

          Alternative 13: 97.0% accurate, 1.0× speedup?

          \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ [x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\ \\ x\_s \cdot \frac{\frac{x\_m}{y - z}}{t - z} \end{array} \]
          x\_m = (fabs.f64 x)
          x\_s = (copysign.f64 #s(literal 1 binary64) x)
          NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
          (FPCore (x_s x_m y z t)
           :precision binary64
           (* x_s (/ (/ x_m (- y z)) (- t z))))
          x\_m = fabs(x);
          x\_s = copysign(1.0, x);
          assert(x_m < y && y < z && z < t);
          double code(double x_s, double x_m, double y, double z, double t) {
          	return x_s * ((x_m / (y - z)) / (t - z));
          }
          
          x\_m = abs(x)
          x\_s = copysign(1.0d0, x)
          NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
          real(8) function code(x_s, x_m, y, z, t)
              real(8), intent (in) :: x_s
              real(8), intent (in) :: x_m
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              code = x_s * ((x_m / (y - z)) / (t - z))
          end function
          
          x\_m = Math.abs(x);
          x\_s = Math.copySign(1.0, x);
          assert x_m < y && y < z && z < t;
          public static double code(double x_s, double x_m, double y, double z, double t) {
          	return x_s * ((x_m / (y - z)) / (t - z));
          }
          
          x\_m = math.fabs(x)
          x\_s = math.copysign(1.0, x)
          [x_m, y, z, t] = sort([x_m, y, z, t])
          def code(x_s, x_m, y, z, t):
          	return x_s * ((x_m / (y - z)) / (t - z))
          
          x\_m = abs(x)
          x\_s = copysign(1.0, x)
          x_m, y, z, t = sort([x_m, y, z, t])
          function code(x_s, x_m, y, z, t)
          	return Float64(x_s * Float64(Float64(x_m / Float64(y - z)) / Float64(t - z)))
          end
          
          x\_m = abs(x);
          x\_s = sign(x) * abs(1.0);
          x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
          function tmp = code(x_s, x_m, y, z, t)
          	tmp = x_s * ((x_m / (y - z)) / (t - z));
          end
          
          x\_m = N[Abs[x], $MachinePrecision]
          x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
          code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * N[(N[(x$95$m / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
          
          \begin{array}{l}
          x\_m = \left|x\right|
          \\
          x\_s = \mathsf{copysign}\left(1, x\right)
          \\
          [x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
          \\
          x\_s \cdot \frac{\frac{x\_m}{y - z}}{t - z}
          \end{array}
          
          Derivation
          1. Initial program 86.8%

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

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

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

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

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

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

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

          Alternative 14: 39.5% accurate, 1.8× speedup?

          \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ [x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\ \\ x\_s \cdot \frac{x\_m}{y \cdot t} \end{array} \]
          x\_m = (fabs.f64 x)
          x\_s = (copysign.f64 #s(literal 1 binary64) x)
          NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
          (FPCore (x_s x_m y z t) :precision binary64 (* x_s (/ x_m (* y t))))
          x\_m = fabs(x);
          x\_s = copysign(1.0, x);
          assert(x_m < y && y < z && z < t);
          double code(double x_s, double x_m, double y, double z, double t) {
          	return x_s * (x_m / (y * t));
          }
          
          x\_m = abs(x)
          x\_s = copysign(1.0d0, x)
          NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
          real(8) function code(x_s, x_m, y, z, t)
              real(8), intent (in) :: x_s
              real(8), intent (in) :: x_m
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              code = x_s * (x_m / (y * t))
          end function
          
          x\_m = Math.abs(x);
          x\_s = Math.copySign(1.0, x);
          assert x_m < y && y < z && z < t;
          public static double code(double x_s, double x_m, double y, double z, double t) {
          	return x_s * (x_m / (y * t));
          }
          
          x\_m = math.fabs(x)
          x\_s = math.copysign(1.0, x)
          [x_m, y, z, t] = sort([x_m, y, z, t])
          def code(x_s, x_m, y, z, t):
          	return x_s * (x_m / (y * t))
          
          x\_m = abs(x)
          x\_s = copysign(1.0, x)
          x_m, y, z, t = sort([x_m, y, z, t])
          function code(x_s, x_m, y, z, t)
          	return Float64(x_s * Float64(x_m / Float64(y * t)))
          end
          
          x\_m = abs(x);
          x\_s = sign(x) * abs(1.0);
          x_m, y, z, t = num2cell(sort([x_m, y, z, t])){:}
          function tmp = code(x_s, x_m, y, z, t)
          	tmp = x_s * (x_m / (y * t));
          end
          
          x\_m = N[Abs[x], $MachinePrecision]
          x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          NOTE: x_m, y, z, and t should be sorted in increasing order before calling this function.
          code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * N[(x$95$m / N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
          
          \begin{array}{l}
          x\_m = \left|x\right|
          \\
          x\_s = \mathsf{copysign}\left(1, x\right)
          \\
          [x_m, y, z, t] = \mathsf{sort}([x_m, y, z, t])\\
          \\
          x\_s \cdot \frac{x\_m}{y \cdot t}
          \end{array}
          
          Derivation
          1. Initial program 86.8%

            \[\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-*.f6434.3%

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

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

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

          Developer Target 1: 87.7% 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 2024161 
          (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))))