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

Percentage Accurate: 89.2% → 96.3%
Time: 11.6s
Alternatives: 17
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 17 alternatives:

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

Initial Program: 89.2% 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.3% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \left(t - z\right)\\ \mathbf{if}\;t\_1 \leq 2 \cdot 10^{+284}:\\ \;\;\;\;\frac{x}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{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
 (let* ((t_1 (* (- y z) (- t z))))
   (if (<= t_1 2e+284) (/ x t_1) (/ (/ x (- t z)) (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (t - z);
	double tmp;
	if (t_1 <= 2e+284) {
		tmp = x / t_1;
	} else {
		tmp = (x / (t - z)) / (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) :: t_1
    real(8) :: tmp
    t_1 = (y - z) * (t - z)
    if (t_1 <= 2d+284) then
        tmp = x / t_1
    else
        tmp = (x / (t - z)) / (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 t_1 = (y - z) * (t - z);
	double tmp;
	if (t_1 <= 2e+284) {
		tmp = x / t_1;
	} else {
		tmp = (x / (t - z)) / (y - z);
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	t_1 = (y - z) * (t - z)
	tmp = 0
	if t_1 <= 2e+284:
		tmp = x / t_1
	else:
		tmp = (x / (t - z)) / (y - z)
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(y - z) * Float64(t - z))
	tmp = 0.0
	if (t_1 <= 2e+284)
		tmp = Float64(x / t_1);
	else
		tmp = Float64(Float64(x / Float64(t - z)) / 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)
	t_1 = (y - z) * (t - z);
	tmp = 0.0;
	if (t_1 <= 2e+284)
		tmp = x / t_1;
	else
		tmp = (x / (t - z)) / (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_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+284], N[(x / t$95$1), $MachinePrecision], 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])\\
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{+284}:\\
\;\;\;\;\frac{x}{t\_1}\\

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


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

    1. Initial program 97.4%

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

    if 2.00000000000000016e284 < (*.f64 (-.f64 y z) (-.f64 t z))

    1. Initial program 73.7%

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

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

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

Alternative 2: 70.5% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+160}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-114} \lor \neg \left(z \leq 1.6 \cdot 10^{-59}\right):\\ \;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\ \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 -2.4e+160)
   (/ (/ x z) z)
   (if (or (<= z -1.65e-114) (not (<= z 1.6e-59)))
     (/ x (* z (- 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 <= -2.4e+160) {
		tmp = (x / z) / z;
	} else if ((z <= -1.65e-114) || !(z <= 1.6e-59)) {
		tmp = x / (z * (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 <= (-2.4d+160)) then
        tmp = (x / z) / z
    else if ((z <= (-1.65d-114)) .or. (.not. (z <= 1.6d-59))) then
        tmp = x / (z * (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 <= -2.4e+160) {
		tmp = (x / z) / z;
	} else if ((z <= -1.65e-114) || !(z <= 1.6e-59)) {
		tmp = x / (z * (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 <= -2.4e+160:
		tmp = (x / z) / z
	elif (z <= -1.65e-114) or not (z <= 1.6e-59):
		tmp = x / (z * (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 <= -2.4e+160)
		tmp = Float64(Float64(x / z) / z);
	elseif ((z <= -1.65e-114) || !(z <= 1.6e-59))
		tmp = Float64(x / Float64(z * Float64(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 <= -2.4e+160)
		tmp = (x / z) / z;
	elseif ((z <= -1.65e-114) || ~((z <= 1.6e-59)))
		tmp = x / (z * (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[LessEqual[z, -2.4e+160], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[Or[LessEqual[z, -1.65e-114], N[Not[LessEqual[z, 1.6e-59]], $MachinePrecision]], N[(x / N[(z * N[(z - y), $MachinePrecision]), $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 -2.4 \cdot 10^{+160}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\

\mathbf{elif}\;z \leq -1.65 \cdot 10^{-114} \lor \neg \left(z \leq 1.6 \cdot 10^{-59}\right):\\
\;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\

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


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

    1. Initial program 64.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.4000000000000001e160 < z < -1.65000000000000017e-114 or 1.6e-59 < z

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

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

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

    if -1.65000000000000017e-114 < z < 1.6e-59

    1. Initial program 95.7%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{1 \cdot x}{t}}}{y} \]
      3. *-un-lft-identity74.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+160}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-114} \lor \neg \left(z \leq 1.6 \cdot 10^{-59}\right):\\ \;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 77.8% accurate, 0.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.5000000000000001e46

    1. Initial program 76.1%

      \[\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 y around 0 91.2%

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

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

      \[\leadsto \frac{\frac{x}{t - z}}{\color{blue}{-z}} \]
    8. Step-by-step derivation
      1. frac-2neg91.2%

        \[\leadsto \color{blue}{\frac{-\frac{x}{t - z}}{-\left(-z\right)}} \]
      2. div-inv91.1%

        \[\leadsto \color{blue}{\left(-\frac{x}{t - z}\right) \cdot \frac{1}{-\left(-z\right)}} \]
      3. distribute-neg-frac291.1%

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{\left(-t\right) + z}}}{z} \]
      3. +-commutative91.2%

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-t\right)}}}{z} \]
      4. unsub-neg91.2%

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

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

    if -2.5000000000000001e46 < z < -2.2999999999999999e-114

    1. Initial program 93.0%

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

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

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

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

    if -2.2999999999999999e-114 < z < 6.3999999999999998e-37

    1. Initial program 96.0%

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

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

    if 6.3999999999999998e-37 < z

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 77.8% 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.1 \cdot 10^{+46}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-113}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-35}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - 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.1e+46)
   (/ (/ x z) (- z t))
   (if (<= z -3.4e-113)
     (/ (/ x y) (- t z))
     (if (<= z 3.8e-35) (/ x (* (- y z) t)) (/ (/ x z) (- z y))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -4.1e+46) {
		tmp = (x / z) / (z - t);
	} else if (z <= -3.4e-113) {
		tmp = (x / y) / (t - z);
	} else if (z <= 3.8e-35) {
		tmp = x / ((y - z) * t);
	} else {
		tmp = (x / z) / (z - 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.1d+46)) then
        tmp = (x / z) / (z - t)
    else if (z <= (-3.4d-113)) then
        tmp = (x / y) / (t - z)
    else if (z <= 3.8d-35) then
        tmp = x / ((y - z) * t)
    else
        tmp = (x / z) / (z - 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.1e+46) {
		tmp = (x / z) / (z - t);
	} else if (z <= -3.4e-113) {
		tmp = (x / y) / (t - z);
	} else if (z <= 3.8e-35) {
		tmp = x / ((y - z) * t);
	} else {
		tmp = (x / z) / (z - y);
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if z <= -4.1e+46:
		tmp = (x / z) / (z - t)
	elif z <= -3.4e-113:
		tmp = (x / y) / (t - z)
	elif z <= 3.8e-35:
		tmp = x / ((y - z) * t)
	else:
		tmp = (x / z) / (z - y)
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -4.1e+46)
		tmp = Float64(Float64(x / z) / Float64(z - t));
	elseif (z <= -3.4e-113)
		tmp = Float64(Float64(x / y) / Float64(t - z));
	elseif (z <= 3.8e-35)
		tmp = Float64(x / Float64(Float64(y - z) * t));
	else
		tmp = Float64(Float64(x / z) / Float64(z - 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.1e+46)
		tmp = (x / z) / (z - t);
	elseif (z <= -3.4e-113)
		tmp = (x / y) / (t - z);
	elseif (z <= 3.8e-35)
		tmp = x / ((y - z) * t);
	else
		tmp = (x / z) / (z - 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.1e+46], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.4e-113], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e-35], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{+46}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.1e46

    1. Initial program 76.1%

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

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

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

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

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

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

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

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

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

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

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

    if -4.1e46 < z < -3.4000000000000002e-113

    1. Initial program 93.0%

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

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

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

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

    if -3.4000000000000002e-113 < z < 3.8000000000000001e-35

    1. Initial program 96.0%

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

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

    if 3.8000000000000001e-35 < z

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.7999999999999996e46 or 1.0500000000000001e-30 < z

    1. Initial program 81.5%

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

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

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

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

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

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

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

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

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

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

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

    if -6.7999999999999996e46 < z < -9.49999999999999987e-113

    1. Initial program 93.0%

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

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

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

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

    if -9.49999999999999987e-113 < z < 1.0500000000000001e-30

    1. Initial program 96.1%

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

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

Alternative 6: 74.1% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+160}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-113}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+47}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{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
 (if (<= z -2.4e+160)
   (/ (/ x z) z)
   (if (<= z -2e-113)
     (/ x (* z (- z y)))
     (if (<= z 1.65e+47) (/ x (* (- y z) t)) (* (/ x z) (/ 1.0 z))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.4e+160) {
		tmp = (x / z) / z;
	} else if (z <= -2e-113) {
		tmp = x / (z * (z - y));
	} else if (z <= 1.65e+47) {
		tmp = x / ((y - z) * t);
	} else {
		tmp = (x / 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) :: tmp
    if (z <= (-2.4d+160)) then
        tmp = (x / z) / z
    else if (z <= (-2d-113)) then
        tmp = x / (z * (z - y))
    else if (z <= 1.65d+47) then
        tmp = x / ((y - z) * t)
    else
        tmp = (x / 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 tmp;
	if (z <= -2.4e+160) {
		tmp = (x / z) / z;
	} else if (z <= -2e-113) {
		tmp = x / (z * (z - y));
	} else if (z <= 1.65e+47) {
		tmp = x / ((y - z) * t);
	} else {
		tmp = (x / z) * (1.0 / z);
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if z <= -2.4e+160:
		tmp = (x / z) / z
	elif z <= -2e-113:
		tmp = x / (z * (z - y))
	elif z <= 1.65e+47:
		tmp = x / ((y - z) * t)
	else:
		tmp = (x / z) * (1.0 / z)
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -2.4e+160)
		tmp = Float64(Float64(x / z) / z);
	elseif (z <= -2e-113)
		tmp = Float64(x / Float64(z * Float64(z - y)));
	elseif (z <= 1.65e+47)
		tmp = Float64(x / Float64(Float64(y - z) * t));
	else
		tmp = Float64(Float64(x / 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)
	tmp = 0.0;
	if (z <= -2.4e+160)
		tmp = (x / z) / z;
	elseif (z <= -2e-113)
		tmp = x / (z * (z - y));
	elseif (z <= 1.65e+47)
		tmp = x / ((y - z) * t);
	else
		tmp = (x / 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_] := If[LessEqual[z, -2.4e+160], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -2e-113], N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e+47], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+160}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.4000000000000001e160

    1. Initial program 64.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.4000000000000001e160 < z < -1.99999999999999996e-113

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999996e-113 < z < 1.65e47

    1. Initial program 96.4%

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

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

    if 1.65e47 < z

    1. Initial program 84.5%

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

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

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

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

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

      \[\leadsto \frac{\frac{x}{t - z}}{\color{blue}{-z}} \]
    8. Step-by-step derivation
      1. add-sqr-sqrt0.0%

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

        \[\leadsto \frac{\frac{x}{t - z}}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}} \]
      3. sqr-neg68.7%

        \[\leadsto \frac{\frac{x}{t - z}}{\sqrt{\color{blue}{z \cdot z}}} \]
      4. sqrt-unprod68.5%

        \[\leadsto \frac{\frac{x}{t - z}}{\color{blue}{\sqrt{z} \cdot \sqrt{z}}} \]
      5. add-sqr-sqrt68.5%

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

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \frac{1}{z}} \]
      7. sub-neg68.5%

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

        \[\leadsto \frac{x}{\color{blue}{\left(-z\right) + t}} \cdot \frac{1}{z} \]
      9. add-sqr-sqrt0.0%

        \[\leadsto \frac{x}{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}} + t} \cdot \frac{1}{z} \]
      10. sqrt-unprod80.5%

        \[\leadsto \frac{x}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}} + t} \cdot \frac{1}{z} \]
      11. sqr-neg80.5%

        \[\leadsto \frac{x}{\sqrt{\color{blue}{z \cdot z}} + t} \cdot \frac{1}{z} \]
      12. sqrt-unprod87.9%

        \[\leadsto \frac{x}{\color{blue}{\sqrt{z} \cdot \sqrt{z}} + t} \cdot \frac{1}{z} \]
      13. add-sqr-sqrt88.0%

        \[\leadsto \frac{x}{\color{blue}{z} + t} \cdot \frac{1}{z} \]
    9. Applied egg-rr88.0%

      \[\leadsto \color{blue}{\frac{x}{z + t} \cdot \frac{1}{z}} \]
    10. Taylor expanded in z around inf 86.1%

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

Alternative 7: 66.2% accurate, 0.4× 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^{+46}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-112}:\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{elif}\;z \leq 21000000:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{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
 (if (<= z -2.8e+46)
   (/ (/ x z) z)
   (if (<= z -2.1e-112)
     (/ x (* y (- z)))
     (if (<= z 21000000.0) (/ (/ x t) y) (* (/ x z) (/ 1.0 z))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.8e+46) {
		tmp = (x / z) / z;
	} else if (z <= -2.1e-112) {
		tmp = x / (y * -z);
	} else if (z <= 21000000.0) {
		tmp = (x / t) / y;
	} else {
		tmp = (x / 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) :: tmp
    if (z <= (-2.8d+46)) then
        tmp = (x / z) / z
    else if (z <= (-2.1d-112)) then
        tmp = x / (y * -z)
    else if (z <= 21000000.0d0) then
        tmp = (x / t) / y
    else
        tmp = (x / 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 tmp;
	if (z <= -2.8e+46) {
		tmp = (x / z) / z;
	} else if (z <= -2.1e-112) {
		tmp = x / (y * -z);
	} else if (z <= 21000000.0) {
		tmp = (x / t) / y;
	} else {
		tmp = (x / z) * (1.0 / z);
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if z <= -2.8e+46:
		tmp = (x / z) / z
	elif z <= -2.1e-112:
		tmp = x / (y * -z)
	elif z <= 21000000.0:
		tmp = (x / t) / y
	else:
		tmp = (x / z) * (1.0 / 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+46)
		tmp = Float64(Float64(x / z) / z);
	elseif (z <= -2.1e-112)
		tmp = Float64(x / Float64(y * Float64(-z)));
	elseif (z <= 21000000.0)
		tmp = Float64(Float64(x / t) / y);
	else
		tmp = Float64(Float64(x / 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)
	tmp = 0.0;
	if (z <= -2.8e+46)
		tmp = (x / z) / z;
	elseif (z <= -2.1e-112)
		tmp = x / (y * -z);
	elseif (z <= 21000000.0)
		tmp = (x / t) / y;
	else
		tmp = (x / 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_] := If[LessEqual[z, -2.8e+46], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -2.1e-112], N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 21000000.0], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(1.0 / 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^{+46}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\

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

\mathbf{elif}\;z \leq 21000000:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.80000000000000018e46

    1. Initial program 76.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.80000000000000018e46 < z < -2.1000000000000001e-112

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

    if -2.1000000000000001e-112 < z < 2.1e7

    1. Initial program 96.3%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{1 \cdot x}{t}}}{y} \]
      3. *-un-lft-identity68.8%

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

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

    if 2.1e7 < z

    1. Initial program 85.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 y around 0 92.5%

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

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

      \[\leadsto \frac{\frac{x}{t - z}}{\color{blue}{-z}} \]
    8. Step-by-step derivation
      1. add-sqr-sqrt0.0%

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

        \[\leadsto \frac{\frac{x}{t - z}}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}} \]
      3. sqr-neg65.5%

        \[\leadsto \frac{\frac{x}{t - z}}{\sqrt{\color{blue}{z \cdot z}}} \]
      4. sqrt-unprod65.3%

        \[\leadsto \frac{\frac{x}{t - z}}{\color{blue}{\sqrt{z} \cdot \sqrt{z}}} \]
      5. add-sqr-sqrt65.3%

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

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \frac{1}{z}} \]
      7. sub-neg65.3%

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

        \[\leadsto \frac{x}{\color{blue}{\left(-z\right) + t}} \cdot \frac{1}{z} \]
      9. add-sqr-sqrt0.0%

        \[\leadsto \frac{x}{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}} + t} \cdot \frac{1}{z} \]
      10. sqrt-unprod78.4%

        \[\leadsto \frac{x}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}} + t} \cdot \frac{1}{z} \]
      11. sqr-neg78.4%

        \[\leadsto \frac{x}{\sqrt{\color{blue}{z \cdot z}} + t} \cdot \frac{1}{z} \]
      12. sqrt-unprod85.3%

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

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

      \[\leadsto \color{blue}{\frac{x}{z + t} \cdot \frac{1}{z}} \]
    10. Taylor expanded in z around inf 81.9%

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

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

Alternative 8: 66.2% 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 -3.7 \cdot 10^{+46}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-112}:\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{elif}\;z \leq 230000:\\ \;\;\;\;\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 -3.7e+46)
     t_1
     (if (<= z -2.1e-112)
       (/ x (* y (- z)))
       (if (<= z 230000.0) (/ (/ 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 <= -3.7e+46) {
		tmp = t_1;
	} else if (z <= -2.1e-112) {
		tmp = x / (y * -z);
	} else if (z <= 230000.0) {
		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 <= (-3.7d+46)) then
        tmp = t_1
    else if (z <= (-2.1d-112)) then
        tmp = x / (y * -z)
    else if (z <= 230000.0d0) 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 <= -3.7e+46) {
		tmp = t_1;
	} else if (z <= -2.1e-112) {
		tmp = x / (y * -z);
	} else if (z <= 230000.0) {
		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 <= -3.7e+46:
		tmp = t_1
	elif z <= -2.1e-112:
		tmp = x / (y * -z)
	elif z <= 230000.0:
		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 <= -3.7e+46)
		tmp = t_1;
	elseif (z <= -2.1e-112)
		tmp = Float64(x / Float64(y * Float64(-z)));
	elseif (z <= 230000.0)
		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 <= -3.7e+46)
		tmp = t_1;
	elseif (z <= -2.1e-112)
		tmp = x / (y * -z);
	elseif (z <= 230000.0)
		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, -3.7e+46], t$95$1, If[LessEqual[z, -2.1e-112], N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 230000.0], 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 -3.7 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 230000:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.6999999999999999e46 or 2.3e5 < 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 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.6999999999999999e46 < z < -2.1000000000000001e-112

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

    if -2.1000000000000001e-112 < z < 2.3e5

    1. Initial program 96.3%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{1 \cdot x}{t}}}{y} \]
      3. *-un-lft-identity68.8%

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

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

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

Alternative 9: 93.7% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 70.9%

      \[\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 y around 0 94.9%

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

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

      \[\leadsto \frac{\frac{x}{t - z}}{\color{blue}{-z}} \]
    8. Step-by-step derivation
      1. frac-2neg94.9%

        \[\leadsto \color{blue}{\frac{-\frac{x}{t - z}}{-\left(-z\right)}} \]
      2. div-inv94.8%

        \[\leadsto \color{blue}{\left(-\frac{x}{t - z}\right) \cdot \frac{1}{-\left(-z\right)}} \]
      3. distribute-neg-frac294.8%

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

        \[\leadsto \frac{x}{-\color{blue}{\left(t + \left(-z\right)\right)}} \cdot \frac{1}{-\left(-z\right)} \]
      5. distribute-neg-in94.8%

        \[\leadsto \frac{x}{\color{blue}{\left(-t\right) + \left(-\left(-z\right)\right)}} \cdot \frac{1}{-\left(-z\right)} \]
      6. remove-double-neg94.8%

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{\left(-t\right) + z} \cdot 1}{z}} \]
      2. *-rgt-identity94.9%

        \[\leadsto \frac{\color{blue}{\frac{x}{\left(-t\right) + z}}}{z} \]
      3. +-commutative94.9%

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-t\right)}}}{z} \]
      4. unsub-neg94.9%

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

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

    if -3.9999999999999998e105 < z < 2.7999999999999999e134

    1. Initial program 95.0%

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

    if 2.7999999999999999e134 < z

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 82.9% 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.8 \cdot 10^{-156}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;t \leq 5800:\\ \;\;\;\;\frac{x}{y - z} \cdot \frac{-1}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (<= t -2.8e-156)
   (/ (/ x y) (- t z))
   (if (<= t 5800.0) (* (/ x (- y z)) (/ -1.0 z)) (/ (/ x t) (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -2.8e-156) {
		tmp = (x / y) / (t - z);
	} else if (t <= 5800.0) {
		tmp = (x / (y - z)) * (-1.0 / z);
	} else {
		tmp = (x / t) / (y - z);
	}
	return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-2.8d-156)) then
        tmp = (x / y) / (t - z)
    else if (t <= 5800.0d0) then
        tmp = (x / (y - z)) * ((-1.0d0) / z)
    else
        tmp = (x / t) / (y - z)
    end if
    code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -2.8e-156) {
		tmp = (x / y) / (t - z);
	} else if (t <= 5800.0) {
		tmp = (x / (y - z)) * (-1.0 / z);
	} else {
		tmp = (x / t) / (y - z);
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if t <= -2.8e-156:
		tmp = (x / y) / (t - z)
	elif t <= 5800.0:
		tmp = (x / (y - z)) * (-1.0 / z)
	else:
		tmp = (x / t) / (y - z)
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	tmp = 0.0
	if (t <= -2.8e-156)
		tmp = Float64(Float64(x / y) / Float64(t - z));
	elseif (t <= 5800.0)
		tmp = Float64(Float64(x / Float64(y - z)) * Float64(-1.0 / z));
	else
		tmp = Float64(Float64(x / t) / Float64(y - z));
	end
	return tmp
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (t <= -2.8e-156)
		tmp = (x / y) / (t - z);
	elseif (t <= 5800.0)
		tmp = (x / (y - z)) * (-1.0 / z);
	else
		tmp = (x / t) / (y - z);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := If[LessEqual[t, -2.8e-156], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5800.0], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / z), $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.8 \cdot 10^{-156}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\

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

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


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

    1. Initial program 92.5%

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

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

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

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

    if -2.8000000000000002e-156 < t < 5800

    1. Initial program 88.7%

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

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

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

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

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

    if 5800 < t

    1. Initial program 82.4%

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

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

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

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

Alternative 11: 80.3% 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.85 \cdot 10^{-161}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;t \leq 1520:\\ \;\;\;\;\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.85e-161)
   (/ (/ x y) (- t z))
   (if (<= t 1520.0) (/ 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.85e-161) {
		tmp = (x / y) / (t - z);
	} else if (t <= 1520.0) {
		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.85d-161)) then
        tmp = (x / y) / (t - z)
    else if (t <= 1520.0d0) 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.85e-161) {
		tmp = (x / y) / (t - z);
	} else if (t <= 1520.0) {
		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.85e-161:
		tmp = (x / y) / (t - z)
	elif t <= 1520.0:
		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.85e-161)
		tmp = Float64(Float64(x / y) / Float64(t - z));
	elseif (t <= 1520.0)
		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.85e-161)
		tmp = (x / y) / (t - z);
	elseif (t <= 1520.0)
		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.85e-161], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1520.0], 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.85 \cdot 10^{-161}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\

\mathbf{elif}\;t \leq 1520:\\
\;\;\;\;\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.85000000000000011e-161

    1. Initial program 92.5%

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

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

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

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

    if -2.85000000000000011e-161 < t < 1520

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

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

    if 1520 < t

    1. Initial program 82.4%

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

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

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

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

Alternative 12: 67.5% 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^{+46} \lor \neg \left(z \leq 2000\right):\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \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+46) (not (<= z 2000.0))) (/ (/ x z) z) (/ (/ x y) t)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -5.5e+46) || !(z <= 2000.0)) {
		tmp = (x / z) / z;
	} else {
		tmp = (x / y) / t;
	}
	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+46)) .or. (.not. (z <= 2000.0d0))) then
        tmp = (x / z) / z
    else
        tmp = (x / y) / t
    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+46) || !(z <= 2000.0)) {
		tmp = (x / z) / z;
	} else {
		tmp = (x / y) / t;
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if (z <= -5.5e+46) or not (z <= 2000.0):
		tmp = (x / z) / z
	else:
		tmp = (x / y) / t
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -5.5e+46) || !(z <= 2000.0))
		tmp = Float64(Float64(x / z) / z);
	else
		tmp = Float64(Float64(x / y) / t);
	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+46) || ~((z <= 2000.0)))
		tmp = (x / z) / z;
	else
		tmp = (x / y) / t;
	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+46], N[Not[LessEqual[z, 2000.0]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / t), $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^{+46} \lor \neg \left(z \leq 2000\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.4999999999999998e46 or 2e3 < 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 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.4999999999999998e46 < z < 2e3

    1. Initial program 95.5%

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

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

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

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

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

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

Alternative 13: 49.0% accurate, 0.6× 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^{+99} \lor \neg \left(z \leq 1.26 \cdot 10^{+92}\right):\\ \;\;\;\;\frac{x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \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 -3.7e+99) (not (<= z 1.26e+92))) (/ x (* z t)) (/ (/ x y) t)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -3.7e+99) || !(z <= 1.26e+92)) {
		tmp = x / (z * t);
	} else {
		tmp = (x / y) / t;
	}
	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+99)) .or. (.not. (z <= 1.26d+92))) then
        tmp = x / (z * t)
    else
        tmp = (x / y) / t
    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+99) || !(z <= 1.26e+92)) {
		tmp = x / (z * t);
	} else {
		tmp = (x / y) / t;
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if (z <= -3.7e+99) or not (z <= 1.26e+92):
		tmp = x / (z * t)
	else:
		tmp = (x / y) / t
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -3.7e+99) || !(z <= 1.26e+92))
		tmp = Float64(x / Float64(z * t));
	else
		tmp = Float64(Float64(x / y) / t);
	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+99) || ~((z <= 1.26e+92)))
		tmp = x / (z * t);
	else
		tmp = (x / y) / t;
	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, -3.7e+99], N[Not[LessEqual[z, 1.26e+92]], $MachinePrecision]], N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / t), $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^{+99} \lor \neg \left(z \leq 1.26 \cdot 10^{+92}\right):\\
\;\;\;\;\frac{x}{z \cdot t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.7000000000000001e99 or 1.26e92 < z

    1. Initial program 77.1%

      \[\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 y around 0 95.1%

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

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

      \[\leadsto \frac{\frac{x}{t - z}}{\color{blue}{-z}} \]
    8. Step-by-step derivation
      1. add-sqr-sqrt52.6%

        \[\leadsto \frac{\frac{x}{t - z}}{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}} \]
      2. sqrt-unprod75.0%

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

        \[\leadsto \frac{\frac{x}{t - z}}{\sqrt{\color{blue}{z \cdot z}}} \]
      4. sqrt-unprod33.4%

        \[\leadsto \frac{\frac{x}{t - z}}{\color{blue}{\sqrt{z} \cdot \sqrt{z}}} \]
      5. add-sqr-sqrt65.5%

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

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \frac{1}{z}} \]
      7. sub-neg65.5%

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

        \[\leadsto \frac{x}{\color{blue}{\left(-z\right) + t}} \cdot \frac{1}{z} \]
      9. add-sqr-sqrt32.2%

        \[\leadsto \frac{x}{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}} + t} \cdot \frac{1}{z} \]
      10. sqrt-unprod69.4%

        \[\leadsto \frac{x}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}} + t} \cdot \frac{1}{z} \]
      11. sqr-neg69.4%

        \[\leadsto \frac{x}{\sqrt{\color{blue}{z \cdot z}} + t} \cdot \frac{1}{z} \]
      12. sqrt-unprod40.4%

        \[\leadsto \frac{x}{\color{blue}{\sqrt{z} \cdot \sqrt{z}} + t} \cdot \frac{1}{z} \]
      13. add-sqr-sqrt89.9%

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

      \[\leadsto \color{blue}{\frac{x}{z + t} \cdot \frac{1}{z}} \]
    10. Taylor expanded in z around 0 37.3%

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

    if -3.7000000000000001e99 < z < 1.26e92

    1. Initial program 95.5%

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

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

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

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

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

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

Alternative 14: 48.8% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{+91} \lor \neg \left(z \leq 2.5 \cdot 10^{+95}\right):\\ \;\;\;\;\frac{x}{z \cdot 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 -6.5e+91) (not (<= z 2.5e+95))) (/ 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 <= -6.5e+91) || !(z <= 2.5e+95)) {
		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 <= (-6.5d+91)) .or. (.not. (z <= 2.5d+95))) 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 <= -6.5e+91) || !(z <= 2.5e+95)) {
		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 <= -6.5e+91) or not (z <= 2.5e+95):
		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 <= -6.5e+91) || !(z <= 2.5e+95))
		tmp = Float64(x / Float64(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 <= -6.5e+91) || ~((z <= 2.5e+95)))
		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, -6.5e+91], N[Not[LessEqual[z, 2.5e+95]], $MachinePrecision]], N[(x / N[(z * t), $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 -6.5 \cdot 10^{+91} \lor \neg \left(z \leq 2.5 \cdot 10^{+95}\right):\\
\;\;\;\;\frac{x}{z \cdot t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.4999999999999997e91 or 2.50000000000000012e95 < z

    1. Initial program 77.8%

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

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

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

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

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

      \[\leadsto \frac{\frac{x}{t - z}}{\color{blue}{-z}} \]
    8. Step-by-step derivation
      1. add-sqr-sqrt54.1%

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

        \[\leadsto \frac{\frac{x}{t - z}}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}} \]
      3. sqr-neg75.8%

        \[\leadsto \frac{\frac{x}{t - z}}{\sqrt{\color{blue}{z \cdot z}}} \]
      4. sqrt-unprod32.3%

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

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

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \frac{1}{z}} \]
      7. sub-neg66.6%

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

        \[\leadsto \frac{x}{\color{blue}{\left(-z\right) + t}} \cdot \frac{1}{z} \]
      9. add-sqr-sqrt34.3%

        \[\leadsto \frac{x}{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}} + t} \cdot \frac{1}{z} \]
      10. sqrt-unprod70.3%

        \[\leadsto \frac{x}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}} + t} \cdot \frac{1}{z} \]
      11. sqr-neg70.3%

        \[\leadsto \frac{x}{\sqrt{\color{blue}{z \cdot z}} + t} \cdot \frac{1}{z} \]
      12. sqrt-unprod39.1%

        \[\leadsto \frac{x}{\color{blue}{\sqrt{z} \cdot \sqrt{z}} + t} \cdot \frac{1}{z} \]
      13. add-sqr-sqrt90.3%

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

      \[\leadsto \color{blue}{\frac{x}{z + t} \cdot \frac{1}{z}} \]
    10. Taylor expanded in z around 0 38.3%

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

    if -6.4999999999999997e91 < z < 2.50000000000000012e95

    1. Initial program 95.4%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{1 \cdot x}{t}}}{y} \]
      3. *-un-lft-identity56.9%

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.3499999999999999e91 or 2.0000000000000001e92 < z

    1. Initial program 77.8%

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

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

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

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

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

      \[\leadsto \frac{\frac{x}{t - z}}{\color{blue}{-z}} \]
    8. Step-by-step derivation
      1. add-sqr-sqrt54.1%

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

        \[\leadsto \frac{\frac{x}{t - z}}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}} \]
      3. sqr-neg75.8%

        \[\leadsto \frac{\frac{x}{t - z}}{\sqrt{\color{blue}{z \cdot z}}} \]
      4. sqrt-unprod32.3%

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

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

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \frac{1}{z}} \]
      7. sub-neg66.6%

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

        \[\leadsto \frac{x}{\color{blue}{\left(-z\right) + t}} \cdot \frac{1}{z} \]
      9. add-sqr-sqrt34.3%

        \[\leadsto \frac{x}{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}} + t} \cdot \frac{1}{z} \]
      10. sqrt-unprod70.3%

        \[\leadsto \frac{x}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}} + t} \cdot \frac{1}{z} \]
      11. sqr-neg70.3%

        \[\leadsto \frac{x}{\sqrt{\color{blue}{z \cdot z}} + t} \cdot \frac{1}{z} \]
      12. sqrt-unprod39.1%

        \[\leadsto \frac{x}{\color{blue}{\sqrt{z} \cdot \sqrt{z}} + t} \cdot \frac{1}{z} \]
      13. add-sqr-sqrt90.3%

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

      \[\leadsto \color{blue}{\frac{x}{z + t} \cdot \frac{1}{z}} \]
    10. Taylor expanded in z around 0 38.3%

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

    if -2.3499999999999999e91 < z < 2.0000000000000001e92

    1. Initial program 95.4%

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

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

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

Alternative 16: 97.0% accurate, 1.0× speedup?

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

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

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

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

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

Alternative 17: 39.3% accurate, 1.8× speedup?

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

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

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

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

Developer Target 1: 88.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \left(t - z\right)\\ \mathbf{if}\;\frac{x}{t\_1} < 0:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{1}{t\_1}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (- y z) (- t z))))
   (if (< (/ x t_1) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 t_1)))))
double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (t - z);
	double tmp;
	if ((x / t_1) < 0.0) {
		tmp = (x / (y - z)) / (t - z);
	} else {
		tmp = x * (1.0 / t_1);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y - z) * (t - z)
    if ((x / t_1) < 0.0d0) then
        tmp = (x / (y - z)) / (t - z)
    else
        tmp = x * (1.0d0 / t_1)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (t - z);
	double tmp;
	if ((x / t_1) < 0.0) {
		tmp = (x / (y - z)) / (t - z);
	} else {
		tmp = x * (1.0 / t_1);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (y - z) * (t - z)
	tmp = 0
	if (x / t_1) < 0.0:
		tmp = (x / (y - z)) / (t - z)
	else:
		tmp = x * (1.0 / t_1)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(y - z) * Float64(t - z))
	tmp = 0.0
	if (Float64(x / t_1) < 0.0)
		tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - z));
	else
		tmp = Float64(x * Float64(1.0 / t_1));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (y - z) * (t - z);
	tmp = 0.0;
	if ((x / t_1) < 0.0)
		tmp = (x / (y - z)) / (t - z);
	else
		tmp = x * (1.0 / t_1);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[Less[N[(x / t$95$1), $MachinePrecision], 0.0], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;\frac{x}{t\_1} < 0:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024158 
(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))))