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

Percentage Accurate: 88.7% → 96.9%
Time: 12.6s
Alternatives: 22
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 22 alternatives:

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

Initial Program: 88.7% accurate, 1.0× speedup?

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

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

Alternative 1: 96.9% accurate, 1.0× speedup?

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

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

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

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

Alternative 2: 93.1% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 66.9%

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

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

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

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

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

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

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

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

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

    if -5.00000000000000031e289 < (*.f64 (-.f64 y z) (-.f64 t z)) < 4.0000000000000002e300

    1. Initial program 97.7%

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

    if 4.0000000000000002e300 < (*.f64 (-.f64 y z) (-.f64 t z))

    1. Initial program 72.9%

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

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

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

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

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

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

Alternative 3: 63.7% accurate, 0.3× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -2.75 \cdot 10^{+94}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-108}:\\ \;\;\;\;\frac{\frac{x}{z}}{-t}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-55}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 1.16 \cdot 10^{+95}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{z \cdot \frac{z}{x}}\\ \end{array} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (<= z -2.75e+94)
   (/ (/ x z) z)
   (if (<= z -3.8e-108)
     (/ (/ x z) (- t))
     (if (<= z 2.6e-55)
       (/ (/ x t) y)
       (if (<= z 1.16e+95) (/ (/ (- x) z) y) (/ 1.0 (* z (/ z x))))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.75e+94) {
		tmp = (x / z) / z;
	} else if (z <= -3.8e-108) {
		tmp = (x / z) / -t;
	} else if (z <= 2.6e-55) {
		tmp = (x / t) / y;
	} else if (z <= 1.16e+95) {
		tmp = (-x / z) / y;
	} else {
		tmp = 1.0 / (z * (z / x));
	}
	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 (z <= (-2.75d+94)) then
        tmp = (x / z) / z
    else if (z <= (-3.8d-108)) then
        tmp = (x / z) / -t
    else if (z <= 2.6d-55) then
        tmp = (x / t) / y
    else if (z <= 1.16d+95) then
        tmp = (-x / z) / y
    else
        tmp = 1.0d0 / (z * (z / x))
    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 (z <= -2.75e+94) {
		tmp = (x / z) / z;
	} else if (z <= -3.8e-108) {
		tmp = (x / z) / -t;
	} else if (z <= 2.6e-55) {
		tmp = (x / t) / y;
	} else if (z <= 1.16e+95) {
		tmp = (-x / z) / y;
	} else {
		tmp = 1.0 / (z * (z / x));
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if z <= -2.75e+94:
		tmp = (x / z) / z
	elif z <= -3.8e-108:
		tmp = (x / z) / -t
	elif z <= 2.6e-55:
		tmp = (x / t) / y
	elif z <= 1.16e+95:
		tmp = (-x / z) / y
	else:
		tmp = 1.0 / (z * (z / x))
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -2.75e+94)
		tmp = Float64(Float64(x / z) / z);
	elseif (z <= -3.8e-108)
		tmp = Float64(Float64(x / z) / Float64(-t));
	elseif (z <= 2.6e-55)
		tmp = Float64(Float64(x / t) / y);
	elseif (z <= 1.16e+95)
		tmp = Float64(Float64(Float64(-x) / z) / y);
	else
		tmp = Float64(1.0 / Float64(z * Float64(z / x)));
	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 (z <= -2.75e+94)
		tmp = (x / z) / z;
	elseif (z <= -3.8e-108)
		tmp = (x / z) / -t;
	elseif (z <= 2.6e-55)
		tmp = (x / t) / y;
	elseif (z <= 1.16e+95)
		tmp = (-x / z) / y;
	else
		tmp = 1.0 / (z * (z / x));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := If[LessEqual[z, -2.75e+94], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -3.8e-108], N[(N[(x / z), $MachinePrecision] / (-t)), $MachinePrecision], If[LessEqual[z, 2.6e-55], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.16e+95], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision], N[(1.0 / N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.75 \cdot 10^{+94}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.7499999999999999e94

    1. Initial program 81.6%

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

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

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      3. distribute-neg-frac296.3%

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

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{0 - \left(y - z\right)}} \]
      5. sub-neg96.3%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(y + \left(-z\right)\right)}} \]
      6. +-commutative96.3%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(\left(-z\right) + y\right)}} \]
      7. associate--r+96.3%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(0 - \left(-z\right)\right) - y}} \]
      8. neg-sub096.3%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right)} - y} \]
      9. remove-double-neg96.3%

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

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

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

    if -2.7499999999999999e94 < z < -3.79999999999999973e-108

    1. Initial program 92.0%

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

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

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

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

      \[\leadsto \frac{\frac{x}{t}}{\color{blue}{-1 \cdot z}} \]
    7. Step-by-step derivation
      1. neg-mul-138.5%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{t \cdot z}} \]
    10. Step-by-step derivation
      1. mul-1-neg38.3%

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{-t}} \]
    11. Simplified41.1%

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

    if -3.79999999999999973e-108 < z < 2.5999999999999999e-55

    1. Initial program 91.6%

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

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

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

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

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

    if 2.5999999999999999e-55 < z < 1.1599999999999999e95

    1. Initial program 79.0%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z \cdot \left(y - z\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg54.8%

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      3. distribute-neg-frac259.1%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{-\left(y - z\right)}} \]
      4. neg-sub059.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{0 - \left(y - z\right)}} \]
      5. sub-neg59.1%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(y + \left(-z\right)\right)}} \]
      6. +-commutative59.1%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(\left(-z\right) + y\right)}} \]
      7. associate--r+59.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(0 - \left(-z\right)\right) - y}} \]
      8. neg-sub059.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right)} - y} \]
      9. remove-double-neg59.1%

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

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

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

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

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

    if 1.1599999999999999e95 < z

    1. Initial program 83.2%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z \cdot \left(y - z\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg82.7%

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      3. distribute-neg-frac292.4%

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

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{0 - \left(y - z\right)}} \]
      5. sub-neg92.4%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(y + \left(-z\right)\right)}} \]
      6. +-commutative92.4%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(\left(-z\right) + y\right)}} \]
      7. associate--r+92.4%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(0 - \left(-z\right)\right) - y}} \]
      8. neg-sub092.4%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right)} - y} \]
      9. remove-double-neg92.4%

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

      \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z - y}} \]
    6. Step-by-step derivation
      1. clear-num92.4%

        \[\leadsto \color{blue}{\frac{1}{\frac{z - y}{\frac{x}{z}}}} \]
      2. inv-pow92.5%

        \[\leadsto \color{blue}{{\left(\frac{z - y}{\frac{x}{z}}\right)}^{-1}} \]
      3. div-inv92.4%

        \[\leadsto {\color{blue}{\left(\left(z - y\right) \cdot \frac{1}{\frac{x}{z}}\right)}}^{-1} \]
      4. clear-num92.5%

        \[\leadsto {\left(\left(z - y\right) \cdot \color{blue}{\frac{z}{x}}\right)}^{-1} \]
    7. Applied egg-rr92.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.75 \cdot 10^{+94}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-108}:\\ \;\;\;\;\frac{\frac{x}{z}}{-t}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-55}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 1.16 \cdot 10^{+95}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{z \cdot \frac{z}{x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 63.8% accurate, 0.3× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.0000000000000001e94 or 1.2e95 < z

    1. Initial program 82.3%

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

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

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      3. distribute-neg-frac294.7%

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

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{0 - \left(y - z\right)}} \]
      5. sub-neg94.7%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(y + \left(-z\right)\right)}} \]
      6. +-commutative94.7%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(\left(-z\right) + y\right)}} \]
      7. associate--r+94.7%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(0 - \left(-z\right)\right) - y}} \]
      8. neg-sub094.7%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right)} - y} \]
      9. remove-double-neg94.7%

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

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

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

    if -3.0000000000000001e94 < z < -3.79999999999999973e-108

    1. Initial program 92.0%

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

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

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

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

      \[\leadsto \frac{\frac{x}{t}}{\color{blue}{-1 \cdot z}} \]
    7. Step-by-step derivation
      1. neg-mul-138.5%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{t \cdot z}} \]
    10. Step-by-step derivation
      1. mul-1-neg38.3%

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{-t}} \]
    11. Simplified41.1%

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

    if -3.79999999999999973e-108 < z < 2.8000000000000002e-54

    1. Initial program 91.6%

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

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

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

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

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

    if 2.8000000000000002e-54 < z < 1.2e95

    1. Initial program 79.0%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z \cdot \left(y - z\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg54.8%

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      3. distribute-neg-frac259.1%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{-\left(y - z\right)}} \]
      4. neg-sub059.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{0 - \left(y - z\right)}} \]
      5. sub-neg59.1%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(y + \left(-z\right)\right)}} \]
      6. +-commutative59.1%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(\left(-z\right) + y\right)}} \]
      7. associate--r+59.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(0 - \left(-z\right)\right) - y}} \]
      8. neg-sub059.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right)} - y} \]
      9. remove-double-neg59.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+94}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-108}:\\ \;\;\;\;\frac{\frac{x}{z}}{-t}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-54}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+95}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 63.5% accurate, 0.3× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.7499999999999999e94 or 1.1599999999999999e95 < z

    1. Initial program 82.3%

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

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

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      3. distribute-neg-frac294.7%

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

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{0 - \left(y - z\right)}} \]
      5. sub-neg94.7%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(y + \left(-z\right)\right)}} \]
      6. +-commutative94.7%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(\left(-z\right) + y\right)}} \]
      7. associate--r+94.7%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(0 - \left(-z\right)\right) - y}} \]
      8. neg-sub094.7%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right)} - y} \]
      9. remove-double-neg94.7%

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

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

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

    if -2.7499999999999999e94 < z < -3.79999999999999973e-108

    1. Initial program 92.0%

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

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

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

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

      \[\leadsto \frac{\frac{x}{t}}{\color{blue}{-1 \cdot z}} \]
    7. Step-by-step derivation
      1. neg-mul-138.5%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{t \cdot z}} \]
    10. Step-by-step derivation
      1. mul-1-neg38.3%

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{-t}} \]
    11. Simplified41.1%

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

    if -3.79999999999999973e-108 < z < 3.8000000000000002e-56

    1. Initial program 91.6%

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

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

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

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

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

    if 3.8000000000000002e-56 < z < 1.1599999999999999e95

    1. Initial program 79.0%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z \cdot \left(y - z\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg54.8%

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      3. distribute-neg-frac259.1%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{-\left(y - z\right)}} \]
      4. neg-sub059.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{0 - \left(y - z\right)}} \]
      5. sub-neg59.1%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(y + \left(-z\right)\right)}} \]
      6. +-commutative59.1%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(\left(-z\right) + y\right)}} \]
      7. associate--r+59.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(0 - \left(-z\right)\right) - y}} \]
      8. neg-sub059.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right)} - y} \]
      9. remove-double-neg59.1%

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

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

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

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

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

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

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

Alternative 6: 63.5% accurate, 0.3× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.7499999999999999e94 or 1.1599999999999999e95 < z

    1. Initial program 82.3%

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

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

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      3. distribute-neg-frac294.7%

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

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{0 - \left(y - z\right)}} \]
      5. sub-neg94.7%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(y + \left(-z\right)\right)}} \]
      6. +-commutative94.7%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(\left(-z\right) + y\right)}} \]
      7. associate--r+94.7%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(0 - \left(-z\right)\right) - y}} \]
      8. neg-sub094.7%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right)} - y} \]
      9. remove-double-neg94.7%

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

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

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

    if -2.7499999999999999e94 < z < -3.4999999999999999e-108

    1. Initial program 92.0%

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

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

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

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

      \[\leadsto \frac{\frac{x}{t}}{\color{blue}{-1 \cdot z}} \]
    7. Step-by-step derivation
      1. neg-mul-138.5%

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

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

    if -3.4999999999999999e-108 < z < 8.3999999999999998e-57

    1. Initial program 91.6%

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

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

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

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

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

    if 8.3999999999999998e-57 < z < 1.1599999999999999e95

    1. Initial program 79.0%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z \cdot \left(y - z\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg54.8%

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      3. distribute-neg-frac259.1%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{-\left(y - z\right)}} \]
      4. neg-sub059.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{0 - \left(y - z\right)}} \]
      5. sub-neg59.1%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(y + \left(-z\right)\right)}} \]
      6. +-commutative59.1%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(\left(-z\right) + y\right)}} \]
      7. associate--r+59.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(0 - \left(-z\right)\right) - y}} \]
      8. neg-sub059.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right)} - y} \]
      9. remove-double-neg59.1%

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

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

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

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

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

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

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

Alternative 7: 63.5% accurate, 0.3× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.79999999999999998e94 or 1.75e95 < z

    1. Initial program 82.3%

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

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

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      3. distribute-neg-frac294.7%

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

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{0 - \left(y - z\right)}} \]
      5. sub-neg94.7%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(y + \left(-z\right)\right)}} \]
      6. +-commutative94.7%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(\left(-z\right) + y\right)}} \]
      7. associate--r+94.7%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(0 - \left(-z\right)\right) - y}} \]
      8. neg-sub094.7%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right)} - y} \]
      9. remove-double-neg94.7%

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

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

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

    if -2.79999999999999998e94 < z < -3.79999999999999973e-108

    1. Initial program 92.0%

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

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

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

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

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

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

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

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

    if -3.79999999999999973e-108 < z < 7.5999999999999995e-57

    1. Initial program 91.6%

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

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

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

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

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

    if 7.5999999999999995e-57 < z < 1.75e95

    1. Initial program 79.0%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z \cdot \left(y - z\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg54.8%

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      3. distribute-neg-frac259.1%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{-\left(y - z\right)}} \]
      4. neg-sub059.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{0 - \left(y - z\right)}} \]
      5. sub-neg59.1%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(y + \left(-z\right)\right)}} \]
      6. +-commutative59.1%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(\left(-z\right) + y\right)}} \]
      7. associate--r+59.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(0 - \left(-z\right)\right) - y}} \]
      8. neg-sub059.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right)} - y} \]
      9. remove-double-neg59.1%

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

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

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

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

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

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

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

Alternative 8: 69.6% accurate, 0.4× speedup?

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

\mathbf{elif}\;z \leq -2.6 \cdot 10^{-103} \lor \neg \left(z \leq 3.4 \cdot 10^{-87}\right):\\
\;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\

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


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

    1. Initial program 72.8%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z \cdot \left(y - z\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg72.8%

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      3. distribute-neg-frac294.2%

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

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{0 - \left(y - z\right)}} \]
      5. sub-neg94.2%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(y + \left(-z\right)\right)}} \]
      6. +-commutative94.2%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(\left(-z\right) + y\right)}} \]
      7. associate--r+94.2%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(0 - \left(-z\right)\right) - y}} \]
      8. neg-sub094.2%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right)} - y} \]
      9. remove-double-neg94.2%

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

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

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

    if -4.2000000000000001e163 < z < -2.59999999999999996e-103 or 3.3999999999999999e-87 < z

    1. Initial program 87.0%

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

      \[\leadsto \frac{x}{\color{blue}{-1 \cdot \left(z \cdot \left(y - z\right)\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg71.0%

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

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

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

        \[\leadsto \frac{x}{z \cdot \left(0 - \color{blue}{\left(y + \left(-z\right)\right)}\right)} \]
      5. +-commutative71.0%

        \[\leadsto \frac{x}{z \cdot \left(0 - \color{blue}{\left(\left(-z\right) + y\right)}\right)} \]
      6. associate--r+71.0%

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(\left(0 - \left(-z\right)\right) - y\right)}} \]
      7. neg-sub071.0%

        \[\leadsto \frac{x}{z \cdot \left(\color{blue}{\left(-\left(-z\right)\right)} - y\right)} \]
      8. remove-double-neg71.0%

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

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

    if -2.59999999999999996e-103 < z < 3.3999999999999999e-87

    1. Initial program 91.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+163}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-103} \lor \neg \left(z \leq 3.4 \cdot 10^{-87}\right):\\ \;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t} \cdot \frac{1}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 64.5% accurate, 0.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.7499999999999999e94 or 8.1999999999999997e35 < z

    1. Initial program 80.5%

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

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

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      3. distribute-neg-frac292.8%

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

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{0 - \left(y - z\right)}} \]
      5. sub-neg92.8%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(y + \left(-z\right)\right)}} \]
      6. +-commutative92.8%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(\left(-z\right) + y\right)}} \]
      7. associate--r+92.8%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(0 - \left(-z\right)\right) - y}} \]
      8. neg-sub092.8%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right)} - y} \]
      9. remove-double-neg92.8%

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

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

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

    if -2.7499999999999999e94 < z < -4.79999999999999977e-109

    1. Initial program 92.0%

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

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

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

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

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

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

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

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

    if -4.79999999999999977e-109 < z < 8.1999999999999997e35

    1. Initial program 90.6%

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

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

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

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

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

Alternative 10: 81.2% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 85.7%

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

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

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

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

    if -2.24999999999999996e-165 < t < 3.95e33

    1. Initial program 87.4%

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

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

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      3. distribute-neg-frac282.1%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{-\left(y - z\right)}} \]
      4. neg-sub082.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{0 - \left(y - z\right)}} \]
      5. sub-neg82.1%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(y + \left(-z\right)\right)}} \]
      6. +-commutative82.1%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(\left(-z\right) + y\right)}} \]
      7. associate--r+82.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(0 - \left(-z\right)\right) - y}} \]
      8. neg-sub082.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right)} - y} \]
      9. remove-double-neg82.1%

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

      \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z - y}} \]
    6. Step-by-step derivation
      1. clear-num81.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{z - y}{\frac{x}{z}}}} \]
      2. inv-pow81.9%

        \[\leadsto \color{blue}{{\left(\frac{z - y}{\frac{x}{z}}\right)}^{-1}} \]
      3. div-inv81.8%

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

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

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

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

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

    if 3.95e33 < t

    1. Initial program 87.5%

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

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

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

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

Alternative 11: 77.0% accurate, 0.5× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8000000000000002e-60 or 1.7499999999999999e94 < z

    1. Initial program 84.6%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{-\left(t - z\right)}} \]
      4. sub-neg86.1%

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

        \[\leadsto \frac{\frac{x}{z}}{-\color{blue}{\left(\left(-z\right) + t\right)}} \]
      6. distribute-neg-in86.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right) + \left(-t\right)}} \]
      7. remove-double-neg86.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z} + \left(-t\right)} \]
      8. unsub-neg86.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z - t}} \]
    5. Simplified86.1%

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

    if -2.8000000000000002e-60 < z < 1.7499999999999999e94

    1. Initial program 88.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{-60} \lor \neg \left(z \leq 1.75 \cdot 10^{+94}\right):\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 81.5% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 85.7%

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

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

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

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

    if -4.25e-165 < t < 8.8000000000000004e31

    1. Initial program 87.4%

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

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

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      3. distribute-neg-frac282.1%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{-\left(y - z\right)}} \]
      4. neg-sub082.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{0 - \left(y - z\right)}} \]
      5. sub-neg82.1%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(y + \left(-z\right)\right)}} \]
      6. +-commutative82.1%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(\left(-z\right) + y\right)}} \]
      7. associate--r+82.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(0 - \left(-z\right)\right) - y}} \]
      8. neg-sub082.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right)} - y} \]
      9. remove-double-neg82.1%

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

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

    if 8.8000000000000004e31 < t

    1. Initial program 87.5%

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

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

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

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

Alternative 13: 78.5% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 85.2%

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

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

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

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

    if -1.69999999999999991e-190 < t < 4.19999999999999958e31

    1. Initial program 88.0%

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

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

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

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

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

        \[\leadsto \frac{x}{z \cdot \left(0 - \color{blue}{\left(y + \left(-z\right)\right)}\right)} \]
      5. +-commutative73.5%

        \[\leadsto \frac{x}{z \cdot \left(0 - \color{blue}{\left(\left(-z\right) + y\right)}\right)} \]
      6. associate--r+73.5%

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(\left(0 - \left(-z\right)\right) - y\right)}} \]
      7. neg-sub073.5%

        \[\leadsto \frac{x}{z \cdot \left(\color{blue}{\left(-\left(-z\right)\right)} - y\right)} \]
      8. remove-double-neg73.5%

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

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

    if 4.19999999999999958e31 < t

    1. Initial program 87.5%

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

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

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

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

Alternative 14: 76.4% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 85.7%

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

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

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

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

      \[\leadsto \frac{\frac{x}{t}}{\color{blue}{y}} \]
    7. Step-by-step derivation
      1. clear-num58.9%

        \[\leadsto \frac{\color{blue}{\frac{1}{\frac{t}{x}}}}{y} \]
      2. inv-pow58.9%

        \[\leadsto \frac{\color{blue}{{\left(\frac{t}{x}\right)}^{-1}}}{y} \]
    8. Applied egg-rr58.9%

      \[\leadsto \frac{\color{blue}{{\left(\frac{t}{x}\right)}^{-1}}}{y} \]
    9. Step-by-step derivation
      1. unpow-158.9%

        \[\leadsto \frac{\color{blue}{\frac{1}{\frac{t}{x}}}}{y} \]
    10. Simplified58.9%

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

    if -2.24999999999999994e-48 < t < 7.7999999999999998e32

    1. Initial program 87.1%

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

      \[\leadsto \frac{x}{\color{blue}{-1 \cdot \left(z \cdot \left(y - z\right)\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg70.7%

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

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

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

        \[\leadsto \frac{x}{z \cdot \left(0 - \color{blue}{\left(y + \left(-z\right)\right)}\right)} \]
      5. +-commutative70.7%

        \[\leadsto \frac{x}{z \cdot \left(0 - \color{blue}{\left(\left(-z\right) + y\right)}\right)} \]
      6. associate--r+70.7%

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(\left(0 - \left(-z\right)\right) - y\right)}} \]
      7. neg-sub070.7%

        \[\leadsto \frac{x}{z \cdot \left(\color{blue}{\left(-\left(-z\right)\right)} - y\right)} \]
      8. remove-double-neg70.7%

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

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

    if 7.7999999999999998e32 < t

    1. Initial program 87.5%

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

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

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

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

Alternative 15: 75.0% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 85.4%

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

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

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

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

      \[\leadsto \frac{\frac{x}{t}}{\color{blue}{y}} \]
    7. Step-by-step derivation
      1. clear-num60.2%

        \[\leadsto \frac{\color{blue}{\frac{1}{\frac{t}{x}}}}{y} \]
      2. inv-pow60.2%

        \[\leadsto \frac{\color{blue}{{\left(\frac{t}{x}\right)}^{-1}}}{y} \]
    8. Applied egg-rr60.2%

      \[\leadsto \frac{\color{blue}{{\left(\frac{t}{x}\right)}^{-1}}}{y} \]
    9. Step-by-step derivation
      1. unpow-160.2%

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

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

    if -8.9999999999999997e-45 < t < 4.19999999999999958e31

    1. Initial program 87.3%

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

      \[\leadsto \frac{x}{\color{blue}{-1 \cdot \left(z \cdot \left(y - z\right)\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg71.2%

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

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

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

        \[\leadsto \frac{x}{z \cdot \left(0 - \color{blue}{\left(y + \left(-z\right)\right)}\right)} \]
      5. +-commutative71.2%

        \[\leadsto \frac{x}{z \cdot \left(0 - \color{blue}{\left(\left(-z\right) + y\right)}\right)} \]
      6. associate--r+71.2%

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(\left(0 - \left(-z\right)\right) - y\right)}} \]
      7. neg-sub071.2%

        \[\leadsto \frac{x}{z \cdot \left(\color{blue}{\left(-\left(-z\right)\right)} - y\right)} \]
      8. remove-double-neg71.2%

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

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

    if 4.19999999999999958e31 < t

    1. Initial program 87.5%

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

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

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

Alternative 16: 75.0% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 85.5%

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

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

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

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

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

    if -4.00000000000000009e-46 < t < 4.4999999999999996e31

    1. Initial program 87.2%

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

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

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

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

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

        \[\leadsto \frac{x}{z \cdot \left(0 - \color{blue}{\left(y + \left(-z\right)\right)}\right)} \]
      5. +-commutative70.9%

        \[\leadsto \frac{x}{z \cdot \left(0 - \color{blue}{\left(\left(-z\right) + y\right)}\right)} \]
      6. associate--r+70.9%

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(\left(0 - \left(-z\right)\right) - y\right)}} \]
      7. neg-sub070.9%

        \[\leadsto \frac{x}{z \cdot \left(\color{blue}{\left(-\left(-z\right)\right)} - y\right)} \]
      8. remove-double-neg70.9%

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

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

    if 4.4999999999999996e31 < t

    1. Initial program 87.5%

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

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

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

Alternative 17: 65.6% accurate, 0.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.00000000000000002e-35 or 8.9999999999999992e31 < z

    1. Initial program 81.8%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z \cdot \left(y - z\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg77.2%

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      3. distribute-neg-frac288.2%

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

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{0 - \left(y - z\right)}} \]
      5. sub-neg88.2%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(y + \left(-z\right)\right)}} \]
      6. +-commutative88.2%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(\left(-z\right) + y\right)}} \]
      7. associate--r+88.2%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(0 - \left(-z\right)\right) - y}} \]
      8. neg-sub088.2%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right)} - y} \]
      9. remove-double-neg88.2%

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

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

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

    if -2.00000000000000002e-35 < z < 8.9999999999999992e31

    1. Initial program 91.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{-35} \lor \neg \left(z \leq 9 \cdot 10^{+31}\right):\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 49.9% accurate, 0.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.4999999999999998e111 or 8.9999999999999998e27 < z

    1. Initial program 79.9%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{z \cdot \left(y - z\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg79.7%

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      3. distribute-neg-frac292.7%

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

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{0 - \left(y - z\right)}} \]
      5. sub-neg92.7%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(y + \left(-z\right)\right)}} \]
      6. +-commutative92.7%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(\left(-z\right) + y\right)}} \]
      7. associate--r+92.7%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(0 - \left(-z\right)\right) - y}} \]
      8. neg-sub092.7%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right)} - y} \]
      9. remove-double-neg92.7%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z} - y} \]
    5. Simplified92.7%

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

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

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

      \[\leadsto \frac{\frac{x}{z}}{\color{blue}{-y}} \]
    9. Step-by-step derivation
      1. *-un-lft-identity48.8%

        \[\leadsto \color{blue}{1 \cdot \frac{\frac{x}{z}}{-y}} \]
      2. div-inv48.8%

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

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

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

        \[\leadsto 1 \cdot \frac{\color{blue}{\frac{x}{1}}}{z \cdot \left(-y\right)} \]
      6. /-rgt-identity36.7%

        \[\leadsto 1 \cdot \frac{\color{blue}{x}}{z \cdot \left(-y\right)} \]
      7. add-sqr-sqrt19.0%

        \[\leadsto 1 \cdot \frac{x}{z \cdot \color{blue}{\left(\sqrt{-y} \cdot \sqrt{-y}\right)}} \]
      8. sqrt-unprod35.7%

        \[\leadsto 1 \cdot \frac{x}{z \cdot \color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}} \]
      9. sqr-neg35.7%

        \[\leadsto 1 \cdot \frac{x}{z \cdot \sqrt{\color{blue}{y \cdot y}}} \]
      10. sqrt-unprod18.0%

        \[\leadsto 1 \cdot \frac{x}{z \cdot \color{blue}{\left(\sqrt{y} \cdot \sqrt{y}\right)}} \]
      11. add-sqr-sqrt36.2%

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

      \[\leadsto \color{blue}{1 \cdot \frac{x}{z \cdot y}} \]
    11. Step-by-step derivation
      1. *-lft-identity36.2%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{y}} \]
    12. Simplified44.5%

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

    if -5.4999999999999998e111 < z < 8.9999999999999998e27

    1. Initial program 91.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{+111} \lor \neg \left(z \leq 9 \cdot 10^{+27}\right):\\ \;\;\;\;\frac{\frac{x}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 50.2% accurate, 0.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.8999999999999999e95 or 2e94 < z

    1. Initial program 82.5%

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

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

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

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

      \[\leadsto \frac{\frac{x}{t}}{\color{blue}{-1 \cdot z}} \]
    7. Step-by-step derivation
      1. neg-mul-135.2%

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

      \[\leadsto \frac{\frac{x}{t}}{\color{blue}{-z}} \]
    9. Step-by-step derivation
      1. *-un-lft-identity35.2%

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

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

        \[\leadsto 1 \cdot \color{blue}{\frac{\frac{x}{-z}}{t}} \]
      4. add-sqr-sqrt24.5%

        \[\leadsto 1 \cdot \frac{\frac{x}{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}}}{t} \]
      5. sqrt-unprod60.0%

        \[\leadsto 1 \cdot \frac{\frac{x}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}}{t} \]
      6. sqr-neg60.0%

        \[\leadsto 1 \cdot \frac{\frac{x}{\sqrt{\color{blue}{z \cdot z}}}}{t} \]
      7. sqrt-unprod16.7%

        \[\leadsto 1 \cdot \frac{\frac{x}{\color{blue}{\sqrt{z} \cdot \sqrt{z}}}}{t} \]
      8. add-sqr-sqrt39.6%

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

      \[\leadsto \color{blue}{1 \cdot \frac{\frac{x}{z}}{t}} \]
    11. Step-by-step derivation
      1. *-lft-identity39.6%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{t}} \]
    12. Simplified39.6%

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

    if -4.8999999999999999e95 < z < 2e94

    1. Initial program 89.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.9 \cdot 10^{+95} \lor \neg \left(z \leq 2 \cdot 10^{+94}\right):\\ \;\;\;\;\frac{\frac{x}{z}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 45.5% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+94}:\\ \;\;\;\;\frac{x}{t \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{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 (<= z -4e+94) (/ x (* t z)) (/ (/ x t) y)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -4e+94) {
		tmp = x / (t * z);
	} else {
		tmp = (x / t) / 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 (z <= (-4d+94)) then
        tmp = x / (t * z)
    else
        tmp = (x / t) / 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 (z <= -4e+94) {
		tmp = x / (t * z);
	} else {
		tmp = (x / t) / y;
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if z <= -4e+94:
		tmp = x / (t * z)
	else:
		tmp = (x / t) / y
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -4e+94)
		tmp = Float64(x / Float64(t * z));
	else
		tmp = Float64(Float64(x / t) / 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 (z <= -4e+94)
		tmp = x / (t * z);
	else
		tmp = (x / t) / 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[z, -4e+94], N[(x / N[(t * z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+94}:\\
\;\;\;\;\frac{x}{t \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.0000000000000001e94

    1. Initial program 81.6%

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

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

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

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

      \[\leadsto \frac{\frac{x}{t}}{\color{blue}{-1 \cdot z}} \]
    7. Step-by-step derivation
      1. neg-mul-135.6%

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

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

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

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

        \[\leadsto 1 \cdot \color{blue}{\frac{\frac{x}{-z}}{t}} \]
      4. add-sqr-sqrt42.6%

        \[\leadsto 1 \cdot \frac{\frac{x}{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}}}{t} \]
      5. sqrt-unprod60.2%

        \[\leadsto 1 \cdot \frac{\frac{x}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}}{t} \]
      6. sqr-neg60.2%

        \[\leadsto 1 \cdot \frac{\frac{x}{\sqrt{\color{blue}{z \cdot z}}}}{t} \]
      7. sqrt-unprod0.0%

        \[\leadsto 1 \cdot \frac{\frac{x}{\color{blue}{\sqrt{z} \cdot \sqrt{z}}}}{t} \]
      8. add-sqr-sqrt39.7%

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

      \[\leadsto \color{blue}{1 \cdot \frac{\frac{x}{z}}{t}} \]
    11. Step-by-step derivation
      1. *-lft-identity39.7%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{t}} \]
    12. Simplified39.7%

      \[\leadsto \color{blue}{\frac{\frac{x}{z}}{t}} \]
    13. Taylor expanded in x around 0 36.2%

      \[\leadsto \color{blue}{\frac{x}{t \cdot z}} \]
    14. Step-by-step derivation
      1. *-commutative36.2%

        \[\leadsto \frac{x}{\color{blue}{z \cdot t}} \]
    15. Simplified36.2%

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

    if -4.0000000000000001e94 < z

    1. Initial program 88.1%

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

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

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

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

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

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

Alternative 21: 41.5% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -3.7 \cdot 10^{-55}:\\ \;\;\;\;\frac{x}{t \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \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 (<= z -3.7e-55) (/ x (* t z)) (/ x (* t y))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -3.7e-55) {
		tmp = x / (t * z);
	} else {
		tmp = x / (t * 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 (z <= (-3.7d-55)) then
        tmp = x / (t * z)
    else
        tmp = x / (t * 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 (z <= -3.7e-55) {
		tmp = x / (t * z);
	} else {
		tmp = x / (t * y);
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if z <= -3.7e-55:
		tmp = x / (t * z)
	else:
		tmp = x / (t * y)
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -3.7e-55)
		tmp = Float64(x / Float64(t * z));
	else
		tmp = Float64(x / Float64(t * 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 (z <= -3.7e-55)
		tmp = x / (t * z);
	else
		tmp = x / (t * 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[z, -3.7e-55], N[(x / N[(t * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{-55}:\\
\;\;\;\;\frac{x}{t \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.69999999999999985e-55

    1. Initial program 84.4%

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

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

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

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

      \[\leadsto \frac{\frac{x}{t}}{\color{blue}{-1 \cdot z}} \]
    7. Step-by-step derivation
      1. neg-mul-134.8%

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

      \[\leadsto \frac{\frac{x}{t}}{\color{blue}{-z}} \]
    9. Step-by-step derivation
      1. *-un-lft-identity34.8%

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

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

        \[\leadsto 1 \cdot \color{blue}{\frac{\frac{x}{-z}}{t}} \]
      4. add-sqr-sqrt39.4%

        \[\leadsto 1 \cdot \frac{\frac{x}{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}}}{t} \]
      5. sqrt-unprod51.0%

        \[\leadsto 1 \cdot \frac{\frac{x}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}}{t} \]
      6. sqr-neg51.0%

        \[\leadsto 1 \cdot \frac{\frac{x}{\sqrt{\color{blue}{z \cdot z}}}}{t} \]
      7. sqrt-unprod0.0%

        \[\leadsto 1 \cdot \frac{\frac{x}{\color{blue}{\sqrt{z} \cdot \sqrt{z}}}}{t} \]
      8. add-sqr-sqrt30.8%

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

      \[\leadsto \color{blue}{1 \cdot \frac{\frac{x}{z}}{t}} \]
    11. Step-by-step derivation
      1. *-lft-identity30.8%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{t}} \]
    12. Simplified30.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{z}}{t}} \]
    13. Taylor expanded in x around 0 28.5%

      \[\leadsto \color{blue}{\frac{x}{t \cdot z}} \]
    14. Step-by-step derivation
      1. *-commutative28.5%

        \[\leadsto \frac{x}{\color{blue}{z \cdot t}} \]
    15. Simplified28.5%

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

    if -3.69999999999999985e-55 < z

    1. Initial program 87.8%

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

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

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

Alternative 22: 39.6% accurate, 1.8× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \frac{x}{t \cdot 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 (/ x (* t y)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	return 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 = 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 x / (t * y);
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	return x / (t * y)
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	return Float64(x / Float64(t * y))
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
	tmp = 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[(x / N[(t * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{x}{t \cdot y}
\end{array}
Derivation
  1. Initial program 86.7%

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

    \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
  4. Add Preprocessing

Developer Target 1: 87.5% 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 2024167 
(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))))