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

Percentage Accurate: 99.1% → 98.5%
Time: 9.9s
Alternatives: 10
Speedup: 1.0×

Specification

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

\\
1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\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 10 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: 99.1% accurate, 1.0× speedup?

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

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

Alternative 1: 98.5% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 82.5% accurate, 0.4× speedup?

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

\mathbf{elif}\;t \leq 1.45 \cdot 10^{-272}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 2.5 \cdot 10^{-102}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.19999999999999959e-222 or 2.50000000000000013e-102 < t

    1. Initial program 98.9%

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

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

        \[\leadsto 1 + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\frac{x}{t \cdot \left(y - z\right)}\right)\right)\right)\right) \]
      2. mul-1-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(-1 \cdot \frac{x}{t \cdot \left(y - z\right)}\right)\right)}\right) \]
      4. mul-1-negN/A

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

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

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

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

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

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

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

    if -6.19999999999999959e-222 < t < 1.44999999999999997e-272 or 2e-197 < t < 2.50000000000000013e-102

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{1 + -1 \cdot \frac{x}{{y}^{2}}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto 1 + \left(\mathsf{neg}\left(\frac{x}{{y}^{2}}\right)\right) \]
      2. unsub-negN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(x, \left(y \cdot \color{blue}{y}\right)\right)\right) \]
      6. *-lowering-*.f6487.2%

        \[\leadsto \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \color{blue}{y}\right)\right)\right) \]
    5. Simplified87.2%

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

    if 1.44999999999999997e-272 < t < 2e-197

    1. Initial program 91.9%

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

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

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

        \[\leadsto \color{blue}{1 + \frac{x}{y \cdot z}} \]
      3. Step-by-step derivation
        1. remove-double-negN/A

          \[\leadsto 1 + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\frac{x}{y \cdot z}\right)\right)\right)\right) \]
        2. mul-1-negN/A

          \[\leadsto 1 + \left(\mathsf{neg}\left(-1 \cdot \frac{x}{y \cdot z}\right)\right) \]
        3. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(-1 \cdot \frac{x}{y \cdot z}\right)\right)}\right) \]
        4. mul-1-negN/A

          \[\leadsto \mathsf{+.f64}\left(1, \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\frac{x}{y \cdot z}\right)\right)\right)\right)\right) \]
        5. remove-double-negN/A

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

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

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

          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, y\right), z\right)\right) \]
      4. Simplified75.1%

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

    Alternative 3: 90.5% accurate, 0.5× speedup?

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

      1. Initial program 99.9%

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

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

          \[\leadsto 1 + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\frac{x}{t \cdot \left(y - z\right)}\right)\right)\right)\right) \]
        2. mul-1-negN/A

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

          \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(-1 \cdot \frac{x}{t \cdot \left(y - z\right)}\right)\right)}\right) \]
        4. mul-1-negN/A

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

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

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

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

          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(y - z\right)\right), t\right)\right) \]
        9. --lowering--.f6495.6%

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

        \[\leadsto \color{blue}{1 + \frac{\frac{x}{y - z}}{t}} \]
      6. Step-by-step derivation
        1. div-invN/A

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

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

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

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

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

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

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

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

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

      if -4.3999999999999998e-78 < t < 6.99999999999999989e-101

      1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.4 \cdot 10^{-78}:\\ \;\;\;\;1 + \frac{\frac{1}{t}}{\frac{y - z}{x}}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-101}:\\ \;\;\;\;1 + \frac{\frac{x}{z - y}}{y}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{\frac{1}{t}}{\frac{y - z}{x}}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 4: 90.4% accurate, 0.6× speedup?

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

      1. Initial program 99.9%

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

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

          \[\leadsto 1 + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\frac{x}{t \cdot \left(y - z\right)}\right)\right)\right)\right) \]
        2. mul-1-negN/A

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

          \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(-1 \cdot \frac{x}{t \cdot \left(y - z\right)}\right)\right)}\right) \]
        4. mul-1-negN/A

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

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

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

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

          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(y - z\right)\right), t\right)\right) \]
        9. --lowering--.f6495.6%

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

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

      if -5.10000000000000025e-70 < t < 6.99999999999999989e-101

      1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.1 \cdot 10^{-70}:\\ \;\;\;\;1 + \frac{\frac{x}{y - z}}{t}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-101}:\\ \;\;\;\;1 + \frac{\frac{x}{z - y}}{y}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{\frac{x}{y - z}}{t}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 5: 90.1% accurate, 0.6× speedup?

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

      1. Initial program 99.9%

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

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

          \[\leadsto 1 + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\frac{x}{t \cdot \left(y - z\right)}\right)\right)\right)\right) \]
        2. mul-1-negN/A

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

          \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(-1 \cdot \frac{x}{t \cdot \left(y - z\right)}\right)\right)}\right) \]
        4. mul-1-negN/A

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

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

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

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

          \[\leadsto \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, \left(y - z\right)\right), t\right)\right) \]
        9. --lowering--.f6495.0%

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

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

      if -4.30000000000000019e-82 < t < 2.74999999999999986e-101

      1. Initial program 96.8%

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.3 \cdot 10^{-82}:\\ \;\;\;\;1 + \frac{\frac{x}{y - z}}{t}\\ \mathbf{elif}\;t \leq 2.75 \cdot 10^{-101}:\\ \;\;\;\;1 + \frac{x}{y \cdot \left(z - y\right)}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{\frac{x}{y - z}}{t}\\ \end{array} \]
      7. Add Preprocessing

      Alternative 6: 81.1% accurate, 0.6× speedup?

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

        1. Initial program 100.0%

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

          \[\leadsto \color{blue}{1} \]
        4. Step-by-step derivation
          1. Simplified85.9%

            \[\leadsto \color{blue}{1} \]

          if -2.6499999999999999e-142 < y < 2.55000000000000018e-83

          1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

          if 2.55000000000000018e-83 < y

          1. Initial program 99.9%

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

            \[\leadsto \color{blue}{1 + -1 \cdot \frac{x}{{y}^{2}}} \]
          4. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto 1 + \left(\mathsf{neg}\left(\frac{x}{{y}^{2}}\right)\right) \]
            2. unsub-negN/A

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

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

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

              \[\leadsto \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(x, \left(y \cdot \color{blue}{y}\right)\right)\right) \]
            6. *-lowering-*.f6486.2%

              \[\leadsto \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \color{blue}{y}\right)\right)\right) \]
          5. Simplified86.2%

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

        Alternative 7: 81.4% accurate, 0.6× speedup?

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

          1. Initial program 100.0%

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

            \[\leadsto \color{blue}{1} \]
          4. Step-by-step derivation
            1. Simplified85.9%

              \[\leadsto \color{blue}{1} \]

            if -1.05e-142 < y < 3.6999999999999999e-84

            1. Initial program 96.2%

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

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

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

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

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

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

            if 3.6999999999999999e-84 < y

            1. Initial program 99.9%

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

              \[\leadsto \color{blue}{1 + -1 \cdot \frac{x}{{y}^{2}}} \]
            4. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto 1 + \left(\mathsf{neg}\left(\frac{x}{{y}^{2}}\right)\right) \]
              2. unsub-negN/A

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

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

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

                \[\leadsto \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(x, \left(y \cdot \color{blue}{y}\right)\right)\right) \]
              6. *-lowering-*.f6486.2%

                \[\leadsto \mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \color{blue}{y}\right)\right)\right) \]
            5. Simplified86.2%

              \[\leadsto \color{blue}{1 - \frac{x}{y \cdot y}} \]
          5. Recombined 3 regimes into one program.
          6. Final simplification82.8%

            \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.05 \cdot 10^{-142}:\\ \;\;\;\;1\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{-84}:\\ \;\;\;\;1 - \frac{x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{x}{y \cdot y}\\ \end{array} \]
          7. Add Preprocessing

          Alternative 8: 83.0% accurate, 0.6× speedup?

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

            1. Initial program 100.0%

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

              \[\leadsto \color{blue}{1} \]
            4. Step-by-step derivation
              1. Simplified84.9%

                \[\leadsto \color{blue}{1} \]

              if -2.6499999999999999e-142 < y < 1.9499999999999999e-113

              1. Initial program 95.8%

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

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

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

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

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

                \[\leadsto \color{blue}{1 - \frac{x}{t \cdot z}} \]
            5. Recombined 2 regimes into one program.
            6. Final simplification82.0%

              \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.65 \cdot 10^{-142}:\\ \;\;\;\;1\\ \mathbf{elif}\;y \leq 1.95 \cdot 10^{-113}:\\ \;\;\;\;1 - \frac{x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
            7. Add Preprocessing

            Alternative 9: 99.1% accurate, 1.0× speedup?

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

              \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
            2. Add Preprocessing
            3. Final simplification98.8%

              \[\leadsto 1 + \frac{x}{\left(y - z\right) \cdot \left(t - y\right)} \]
            4. Add Preprocessing

            Alternative 10: 74.5% accurate, 11.0× speedup?

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

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

              \[\leadsto \color{blue}{1} \]
            4. Step-by-step derivation
              1. Simplified74.7%

                \[\leadsto \color{blue}{1} \]
              2. Add Preprocessing

              Reproduce

              ?
              herbie shell --seed 2024139 
              (FPCore (x y z t)
                :name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, A"
                :precision binary64
                (- 1.0 (/ x (* (- y z) (- y t)))))