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

Percentage Accurate: 89.2% → 97.7%
Time: 13.4s
Alternatives: 19
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 19 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: 97.7% accurate, 0.0× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \frac{{\left(\sqrt[3]{x}\right)}^{2}}{y - z} \cdot \frac{\sqrt[3]{x}}{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
 (* (/ (pow (cbrt x) 2.0) (- y z)) (/ (cbrt x) (- t z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	return (pow(cbrt(x), 2.0) / (y - z)) * (cbrt(x) / (t - z));
}
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	return (Math.pow(Math.cbrt(x), 2.0) / (y - z)) * (Math.cbrt(x) / (t - z));
}
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	return Float64(Float64((cbrt(x) ^ 2.0) / Float64(y - z)) * Float64(cbrt(x) / Float64(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[(N[Power[N[Power[x, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision] * N[(N[Power[x, 1/3], $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{{\left(\sqrt[3]{x}\right)}^{2}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z}
\end{array}
Derivation
  1. Initial program 87.5%

    \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-cube-cbrt86.7%

      \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. times-frac97.4%

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

      \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z} \]
  4. Applied egg-rr97.4%

    \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{x}\right)}^{2}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z}} \]
  5. Final simplification97.4%

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

Alternative 2: 80.7% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{+204}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{-63}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{-126}:\\ \;\;\;\;\frac{-x}{z \cdot \left(t - z\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 (<= y -7.5e+204)
   (/ (/ x (- t z)) y)
   (if (<= y -4.1e-63)
     (/ x (* y (- t z)))
     (if (<= y 1.3e-126) (/ (- x) (* z (- t 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 (y <= -7.5e+204) {
		tmp = (x / (t - z)) / y;
	} else if (y <= -4.1e-63) {
		tmp = x / (y * (t - z));
	} else if (y <= 1.3e-126) {
		tmp = -x / (z * (t - 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 (y <= (-7.5d+204)) then
        tmp = (x / (t - z)) / y
    else if (y <= (-4.1d-63)) then
        tmp = x / (y * (t - z))
    else if (y <= 1.3d-126) then
        tmp = -x / (z * (t - 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 (y <= -7.5e+204) {
		tmp = (x / (t - z)) / y;
	} else if (y <= -4.1e-63) {
		tmp = x / (y * (t - z));
	} else if (y <= 1.3e-126) {
		tmp = -x / (z * (t - 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 y <= -7.5e+204:
		tmp = (x / (t - z)) / y
	elif y <= -4.1e-63:
		tmp = x / (y * (t - z))
	elif y <= 1.3e-126:
		tmp = -x / (z * (t - 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 (y <= -7.5e+204)
		tmp = Float64(Float64(x / Float64(t - z)) / y);
	elseif (y <= -4.1e-63)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif (y <= 1.3e-126)
		tmp = Float64(Float64(-x) / Float64(z * Float64(t - 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 (y <= -7.5e+204)
		tmp = (x / (t - z)) / y;
	elseif (y <= -4.1e-63)
		tmp = x / (y * (t - z));
	elseif (y <= 1.3e-126)
		tmp = -x / (z * (t - 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[y, -7.5e+204], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -4.1e-63], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e-126], N[((-x) / N[(z * N[(t - z), $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}\;y \leq -7.5 \cdot 10^{+204}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7.4999999999999998e204

    1. Initial program 59.7%

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

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

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

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

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

    if -7.4999999999999998e204 < y < -4.0999999999999998e-63

    1. Initial program 99.5%

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

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

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

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

    if -4.0999999999999998e-63 < y < 1.3e-126

    1. Initial program 89.4%

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{z \cdot \left(t - z\right)}} \]
      2. neg-mul-175.9%

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

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

    if 1.3e-126 < y

    1. Initial program 86.8%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt86.0%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}}{\left(y - z\right) \cdot \left(t - z\right)} \]
      2. times-frac97.9%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z} \]
    4. Applied egg-rr97.9%

      \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{x}\right)}^{2}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z}} \]
    5. Step-by-step derivation
      1. frac-times86.0%

        \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{x}\right)}^{2} \cdot \sqrt[3]{x}}{\left(y - z\right) \cdot \left(t - z\right)}} \]
      2. unpow286.0%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)} \cdot \sqrt[3]{x}}{\left(y - z\right) \cdot \left(t - z\right)} \]
      3. add-cube-cbrt86.8%

        \[\leadsto \frac{\color{blue}{x}}{\left(y - z\right) \cdot \left(t - z\right)} \]
      4. *-commutative86.8%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y - z}} \]
    6. Applied egg-rr98.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{+204}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{-63}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{-126}:\\ \;\;\;\;\frac{-x}{z \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 82.6% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -5.2 \cdot 10^{+204}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq -4.7 \cdot 10^{-63}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-126}:\\ \;\;\;\;\frac{-\frac{x}{z}}{t - 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 (<= y -5.2e+204)
   (/ (/ x (- t z)) y)
   (if (<= y -4.7e-63)
     (/ x (* y (- t z)))
     (if (<= y 1.9e-126) (/ (- (/ x z)) (- t 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 (y <= -5.2e+204) {
		tmp = (x / (t - z)) / y;
	} else if (y <= -4.7e-63) {
		tmp = x / (y * (t - z));
	} else if (y <= 1.9e-126) {
		tmp = -(x / z) / (t - 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 (y <= (-5.2d+204)) then
        tmp = (x / (t - z)) / y
    else if (y <= (-4.7d-63)) then
        tmp = x / (y * (t - z))
    else if (y <= 1.9d-126) then
        tmp = -(x / z) / (t - 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 (y <= -5.2e+204) {
		tmp = (x / (t - z)) / y;
	} else if (y <= -4.7e-63) {
		tmp = x / (y * (t - z));
	} else if (y <= 1.9e-126) {
		tmp = -(x / z) / (t - 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 y <= -5.2e+204:
		tmp = (x / (t - z)) / y
	elif y <= -4.7e-63:
		tmp = x / (y * (t - z))
	elif y <= 1.9e-126:
		tmp = -(x / z) / (t - 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 (y <= -5.2e+204)
		tmp = Float64(Float64(x / Float64(t - z)) / y);
	elseif (y <= -4.7e-63)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif (y <= 1.9e-126)
		tmp = Float64(Float64(-Float64(x / z)) / Float64(t - 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 (y <= -5.2e+204)
		tmp = (x / (t - z)) / y;
	elseif (y <= -4.7e-63)
		tmp = x / (y * (t - z));
	elseif (y <= 1.9e-126)
		tmp = -(x / z) / (t - 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[y, -5.2e+204], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -4.7e-63], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e-126], N[((-N[(x / z), $MachinePrecision]) / N[(t - 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}\;y \leq -5.2 \cdot 10^{+204}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.2000000000000002e204

    1. Initial program 59.7%

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

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

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

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

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

    if -5.2000000000000002e204 < y < -4.7000000000000001e-63

    1. Initial program 99.5%

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

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

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

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

    if -4.7000000000000001e-63 < y < 1.8999999999999999e-126

    1. Initial program 89.4%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt88.4%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}}{\left(y - z\right) \cdot \left(t - z\right)} \]
      2. times-frac95.2%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z} \]
    4. Applied egg-rr95.2%

      \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{x}\right)}^{2}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z}} \]
    5. Taylor expanded in y around 0 75.9%

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

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

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

        \[\leadsto \color{blue}{\frac{-\frac{x}{z}}{t - z}} \]
      4. distribute-frac-neg82.9%

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

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

    if 1.8999999999999999e-126 < y

    1. Initial program 86.8%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt86.0%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}}{\left(y - z\right) \cdot \left(t - z\right)} \]
      2. times-frac97.9%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z} \]
    4. Applied egg-rr97.9%

      \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{x}\right)}^{2}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z}} \]
    5. Step-by-step derivation
      1. frac-times86.0%

        \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{x}\right)}^{2} \cdot \sqrt[3]{x}}{\left(y - z\right) \cdot \left(t - z\right)}} \]
      2. unpow286.0%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)} \cdot \sqrt[3]{x}}{\left(y - z\right) \cdot \left(t - z\right)} \]
      3. add-cube-cbrt86.8%

        \[\leadsto \frac{\color{blue}{x}}{\left(y - z\right) \cdot \left(t - z\right)} \]
      4. *-commutative86.8%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y - z}} \]
    6. Applied egg-rr98.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.2 \cdot 10^{+204}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq -4.7 \cdot 10^{-63}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-126}:\\ \;\;\;\;\frac{-\frac{x}{z}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 74.0% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -5.2 \cdot 10^{+204}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq -1.3 \cdot 10^{-63}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-207}:\\ \;\;\;\;\frac{1}{z} \cdot \frac{x}{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 (<= y -5.2e+204)
   (/ (/ x (- t z)) y)
   (if (<= y -1.3e-63)
     (/ x (* y (- t z)))
     (if (<= y -1.9e-207) (* (/ 1.0 z) (/ x 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 (y <= -5.2e+204) {
		tmp = (x / (t - z)) / y;
	} else if (y <= -1.3e-63) {
		tmp = x / (y * (t - z));
	} else if (y <= -1.9e-207) {
		tmp = (1.0 / z) * (x / 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 (y <= (-5.2d+204)) then
        tmp = (x / (t - z)) / y
    else if (y <= (-1.3d-63)) then
        tmp = x / (y * (t - z))
    else if (y <= (-1.9d-207)) then
        tmp = (1.0d0 / z) * (x / 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 (y <= -5.2e+204) {
		tmp = (x / (t - z)) / y;
	} else if (y <= -1.3e-63) {
		tmp = x / (y * (t - z));
	} else if (y <= -1.9e-207) {
		tmp = (1.0 / z) * (x / 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 y <= -5.2e+204:
		tmp = (x / (t - z)) / y
	elif y <= -1.3e-63:
		tmp = x / (y * (t - z))
	elif y <= -1.9e-207:
		tmp = (1.0 / z) * (x / 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 (y <= -5.2e+204)
		tmp = Float64(Float64(x / Float64(t - z)) / y);
	elseif (y <= -1.3e-63)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif (y <= -1.9e-207)
		tmp = Float64(Float64(1.0 / z) * Float64(x / 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 (y <= -5.2e+204)
		tmp = (x / (t - z)) / y;
	elseif (y <= -1.3e-63)
		tmp = x / (y * (t - z));
	elseif (y <= -1.9e-207)
		tmp = (1.0 / z) * (x / 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[y, -5.2e+204], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -1.3e-63], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.9e-207], N[(N[(1.0 / z), $MachinePrecision] * N[(x / 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}\;y \leq -5.2 \cdot 10^{+204}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\

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

\mathbf{elif}\;y \leq -1.9 \cdot 10^{-207}:\\
\;\;\;\;\frac{1}{z} \cdot \frac{x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.2000000000000002e204

    1. Initial program 59.7%

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

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

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

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

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

    if -5.2000000000000002e204 < y < -1.3000000000000001e-63

    1. Initial program 99.5%

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

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

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

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

    if -1.3000000000000001e-63 < y < -1.9e-207

    1. Initial program 91.6%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt90.5%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}}{\left(y - z\right) \cdot \left(t - z\right)} \]
      2. times-frac98.6%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z} \]
    4. Applied egg-rr98.6%

      \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{x}\right)}^{2}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z}} \]
    5. Taylor expanded in t around 0 57.7%

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

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

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

        \[\leadsto \color{blue}{\frac{-\frac{x}{z}}{y - z}} \]
      4. distribute-frac-neg61.9%

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

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

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

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

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

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

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

    if -1.9e-207 < y

    1. Initial program 87.4%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt86.6%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}}{\left(y - z\right) \cdot \left(t - z\right)} \]
      2. times-frac96.5%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z} \]
    4. Applied egg-rr96.5%

      \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{x}\right)}^{2}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z}} \]
    5. Step-by-step derivation
      1. frac-times86.6%

        \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{x}\right)}^{2} \cdot \sqrt[3]{x}}{\left(y - z\right) \cdot \left(t - z\right)}} \]
      2. unpow286.6%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)} \cdot \sqrt[3]{x}}{\left(y - z\right) \cdot \left(t - z\right)} \]
      3. add-cube-cbrt87.4%

        \[\leadsto \frac{\color{blue}{x}}{\left(y - z\right) \cdot \left(t - z\right)} \]
      4. *-commutative87.4%

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

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

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

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

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

Alternative 5: 52.7% 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}}{y}\\ \mathbf{if}\;z \leq -4.8 \cdot 10^{+118}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-87}:\\ \;\;\;\;\frac{\frac{-x}{t}}{z}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+65}:\\ \;\;\;\;\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)) y)))
   (if (<= z -4.8e+118)
     t_1
     (if (<= z -2.4e-87)
       (/ (/ (- x) t) z)
       (if (<= z 5.8e+65) (/ (/ 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) / y;
	double tmp;
	if (z <= -4.8e+118) {
		tmp = t_1;
	} else if (z <= -2.4e-87) {
		tmp = (-x / t) / z;
	} else if (z <= 5.8e+65) {
		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) / y
    if (z <= (-4.8d+118)) then
        tmp = t_1
    else if (z <= (-2.4d-87)) then
        tmp = (-x / t) / z
    else if (z <= 5.8d+65) 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) / y;
	double tmp;
	if (z <= -4.8e+118) {
		tmp = t_1;
	} else if (z <= -2.4e-87) {
		tmp = (-x / t) / z;
	} else if (z <= 5.8e+65) {
		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) / y
	tmp = 0
	if z <= -4.8e+118:
		tmp = t_1
	elif z <= -2.4e-87:
		tmp = (-x / t) / z
	elif z <= 5.8e+65:
		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(-Float64(x / z)) / y)
	tmp = 0.0
	if (z <= -4.8e+118)
		tmp = t_1;
	elseif (z <= -2.4e-87)
		tmp = Float64(Float64(Float64(-x) / t) / z);
	elseif (z <= 5.8e+65)
		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) / y;
	tmp = 0.0;
	if (z <= -4.8e+118)
		tmp = t_1;
	elseif (z <= -2.4e-87)
		tmp = (-x / t) / z;
	elseif (z <= 5.8e+65)
		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]) / y), $MachinePrecision]}, If[LessEqual[z, -4.8e+118], t$95$1, If[LessEqual[z, -2.4e-87], N[(N[((-x) / t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 5.8e+65], 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}}{y}\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{+118}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.8e118 or 5.8000000000000001e65 < z

    1. Initial program 77.7%

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

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

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

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

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

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

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

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

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

    if -4.8e118 < z < -2.4e-87

    1. Initial program 93.5%

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

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

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

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

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

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

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

    if -2.4e-87 < z < 5.8000000000000001e65

    1. Initial program 92.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{+118}:\\ \;\;\;\;\frac{-\frac{x}{z}}{y}\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-87}:\\ \;\;\;\;\frac{\frac{-x}{t}}{z}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+65}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\frac{x}{z}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 52.7% accurate, 0.4× speedup?

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

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

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

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


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

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{-x}{z}}}{y} \]
    9. Step-by-step derivation
      1. associate-/l/42.2%

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

        \[\leadsto \frac{\color{blue}{-1 \cdot x}}{y \cdot z} \]
      3. times-frac51.6%

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

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

    if -6.19999999999999947e120 < z < -1.5000000000000001e-93

    1. Initial program 93.5%

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

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

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

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

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

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

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

    if -1.5000000000000001e-93 < z < 3.40000000000000014e62

    1. Initial program 92.1%

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

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

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

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

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

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

    if 3.40000000000000014e62 < z

    1. Initial program 79.1%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 67.3% accurate, 0.5× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.5999999999999999e-10 or 7e19 < z

    1. Initial program 82.5%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt82.0%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}}{\left(y - z\right) \cdot \left(t - z\right)} \]
      2. times-frac99.0%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z} \]
    4. Applied egg-rr99.0%

      \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{x}\right)}^{2}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z}} \]
    5. Taylor expanded in t around 0 71.9%

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

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

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

        \[\leadsto \color{blue}{\frac{-\frac{x}{z}}{y - z}} \]
      4. distribute-frac-neg83.2%

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

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

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

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

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

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

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

    if -1.5999999999999999e-10 < z < 7e19

    1. Initial program 92.6%

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

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

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

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

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

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

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

Alternative 8: 73.8% accurate, 0.5× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7e4 or 2.0500000000000002e56 < z

    1. Initial program 82.0%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt81.5%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}}{\left(y - z\right) \cdot \left(t - z\right)} \]
      2. times-frac99.0%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z} \]
    4. Applied egg-rr99.0%

      \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{x}\right)}^{2}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z}} \]
    5. Taylor expanded in t around 0 73.0%

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

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

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

        \[\leadsto \color{blue}{\frac{-\frac{x}{z}}{y - z}} \]
      4. distribute-frac-neg85.1%

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

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

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

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

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

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

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

    if -7e4 < z < 2.0500000000000002e56

    1. Initial program 92.4%

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

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

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

Alternative 9: 74.3% accurate, 0.5× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7e4 or 9.0000000000000006e56 < z

    1. Initial program 82.0%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt81.5%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}}{\left(y - z\right) \cdot \left(t - z\right)} \]
      2. times-frac99.0%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z} \]
    4. Applied egg-rr99.0%

      \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{x}\right)}^{2}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z}} \]
    5. Taylor expanded in t around 0 73.0%

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

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

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

        \[\leadsto \color{blue}{\frac{-\frac{x}{z}}{y - z}} \]
      4. distribute-frac-neg85.1%

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

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

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

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

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

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

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

    if -7e4 < z < 9.0000000000000006e56

    1. Initial program 92.4%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt91.3%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}}{\left(y - z\right) \cdot \left(t - z\right)} \]
      2. times-frac95.9%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z} \]
    4. Applied egg-rr95.9%

      \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{x}\right)}^{2}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z}} \]
    5. Step-by-step derivation
      1. frac-times91.3%

        \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{x}\right)}^{2} \cdot \sqrt[3]{x}}{\left(y - z\right) \cdot \left(t - z\right)}} \]
      2. unpow291.3%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)} \cdot \sqrt[3]{x}}{\left(y - z\right) \cdot \left(t - z\right)} \]
      3. add-cube-cbrt92.4%

        \[\leadsto \frac{\color{blue}{x}}{\left(y - z\right) \cdot \left(t - z\right)} \]
      4. *-commutative92.4%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y - z}} \]
    6. Applied egg-rr94.2%

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.2000000000000001e-93

    1. Initial program 85.5%

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

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

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, y, z \cdot \left(-1 \cdot t + -1 \cdot y\right)\right)}} \]
      2. mul-1-neg60.5%

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, y, z \cdot \left(-1 \cdot t + \color{blue}{\left(-y\right)}\right)\right)} \]
      3. unsub-neg60.5%

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, y, z \cdot \color{blue}{\left(-1 \cdot t - y\right)}\right)} \]
      4. mul-1-neg60.5%

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, y, z \cdot \left(\color{blue}{\left(-t\right)} - y\right)\right)} \]
    5. Simplified60.5%

      \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, y, z \cdot \left(\left(-t\right) - y\right)\right)}} \]
    6. Taylor expanded in y around 0 35.0%

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

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

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

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

    if -1.2000000000000001e-93 < z < 2.05e170

    1. Initial program 90.6%

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

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

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

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

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

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

    if 2.05e170 < z

    1. Initial program 78.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 49.2% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.50000000000000012e-87

    1. Initial program 85.5%

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

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

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

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

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

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

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

    if -3.50000000000000012e-87 < z < 5.39999999999999981e169

    1. Initial program 90.6%

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

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

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

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

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

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

    if 5.39999999999999981e169 < z

    1. Initial program 78.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 46.2% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -92000000000000 \lor \neg \left(z \leq 1.95 \cdot 10^{+18}\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 -92000000000000.0) (not (<= z 1.95e+18)))
   (/ 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 <= -92000000000000.0) || !(z <= 1.95e+18)) {
		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 <= (-92000000000000.0d0)) .or. (.not. (z <= 1.95d+18))) 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 <= -92000000000000.0) || !(z <= 1.95e+18)) {
		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 <= -92000000000000.0) or not (z <= 1.95e+18):
		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 <= -92000000000000.0) || !(z <= 1.95e+18))
		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 <= -92000000000000.0) || ~((z <= 1.95e+18)))
		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, -92000000000000.0], N[Not[LessEqual[z, 1.95e+18]], $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 -92000000000000 \lor \neg \left(z \leq 1.95 \cdot 10^{+18}\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 < -9.2e13 or 1.95e18 < z

    1. Initial program 81.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{-x}{t}}{z}} \]
    7. Step-by-step derivation
      1. expm1-log1p-u38.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\frac{-x}{t}}{z}\right)\right)} \]
      2. expm1-udef53.1%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\frac{-x}{t}}{z}\right)} - 1} \]
      3. associate-/l/52.9%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{-x}{z \cdot t}}\right)} - 1 \]
      4. add-sqr-sqrt24.5%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{z \cdot t}\right)} - 1 \]
      5. sqrt-unprod51.2%

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

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\sqrt{\color{blue}{x \cdot x}}}{z \cdot t}\right)} - 1 \]
      7. sqrt-unprod28.3%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{z \cdot t}\right)} - 1 \]
      8. add-sqr-sqrt52.8%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{x}}{z \cdot t}\right)} - 1 \]
      9. *-commutative52.8%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{x}{\color{blue}{t \cdot z}}\right)} - 1 \]
    8. Applied egg-rr52.8%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{x}{t \cdot z}\right)} - 1} \]
    9. Step-by-step derivation
      1. expm1-def34.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{x}{t \cdot z}\right)\right)} \]
      2. expm1-log1p34.4%

        \[\leadsto \color{blue}{\frac{x}{t \cdot z}} \]
    10. Simplified34.4%

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

    if -9.2e13 < z < 1.95e18

    1. Initial program 92.9%

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

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

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

Alternative 13: 46.6% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 82.4%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{-x}{t}}{z}} \]
    7. Step-by-step derivation
      1. expm1-log1p-u37.4%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\frac{-x}{t}}{z}\right)\right)} \]
      2. expm1-udef53.5%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\frac{-x}{t}}{z}\right)} - 1} \]
      3. associate-/l/53.1%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{-x}{z \cdot t}}\right)} - 1 \]
      4. add-sqr-sqrt20.1%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{z \cdot t}\right)} - 1 \]
      5. sqrt-unprod52.9%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{z \cdot t}\right)} - 1 \]
      6. sqr-neg52.9%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\sqrt{\color{blue}{x \cdot x}}}{z \cdot t}\right)} - 1 \]
      7. sqrt-unprod33.2%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{z \cdot t}\right)} - 1 \]
      8. add-sqr-sqrt53.3%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{x}}{z \cdot t}\right)} - 1 \]
      9. *-commutative53.3%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{x}{\color{blue}{t \cdot z}}\right)} - 1 \]
    8. Applied egg-rr53.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{x}{t \cdot z}\right)} - 1} \]
    9. Step-by-step derivation
      1. expm1-def31.8%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{x}{t \cdot z}\right)\right)} \]
      2. expm1-log1p32.0%

        \[\leadsto \color{blue}{\frac{x}{t \cdot z}} \]
    10. Simplified32.0%

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

    if -3.6e13 < z < 6.5e77

    1. Initial program 92.7%

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

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

    if 6.5e77 < z

    1. Initial program 77.4%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{-x}{z}}}{y} \]
    9. Step-by-step derivation
      1. expm1-log1p-u56.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\frac{-x}{z}}{y}\right)\right)} \]
      2. expm1-udef64.5%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\frac{-x}{z}}{y}\right)} - 1} \]
      3. associate-/l/64.5%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{-x}{y \cdot z}}\right)} - 1 \]
      4. add-sqr-sqrt37.6%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{y \cdot z}\right)} - 1 \]
      5. sqrt-unprod64.0%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{y \cdot z}\right)} - 1 \]
      6. sqr-neg64.0%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\sqrt{\color{blue}{x \cdot x}}}{y \cdot z}\right)} - 1 \]
      7. sqrt-unprod26.9%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{y \cdot z}\right)} - 1 \]
      8. add-sqr-sqrt64.5%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{x}}{y \cdot z}\right)} - 1 \]
    10. Applied egg-rr64.5%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{x}{y \cdot z}\right)} - 1} \]
    11. Step-by-step derivation
      1. expm1-def41.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{x}{y \cdot z}\right)\right)} \]
      2. expm1-log1p42.1%

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

        \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
    12. Simplified42.1%

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

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

Alternative 14: 48.7% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 82.4%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{-x}{t}}{z}} \]
    7. Step-by-step derivation
      1. expm1-log1p-u37.4%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\frac{-x}{t}}{z}\right)\right)} \]
      2. expm1-udef53.5%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\frac{-x}{t}}{z}\right)} - 1} \]
      3. associate-/l/53.1%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{-x}{z \cdot t}}\right)} - 1 \]
      4. add-sqr-sqrt20.1%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{z \cdot t}\right)} - 1 \]
      5. sqrt-unprod52.9%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{z \cdot t}\right)} - 1 \]
      6. sqr-neg52.9%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\sqrt{\color{blue}{x \cdot x}}}{z \cdot t}\right)} - 1 \]
      7. sqrt-unprod33.2%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{z \cdot t}\right)} - 1 \]
      8. add-sqr-sqrt53.3%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{x}}{z \cdot t}\right)} - 1 \]
      9. *-commutative53.3%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{x}{\color{blue}{t \cdot z}}\right)} - 1 \]
    8. Applied egg-rr53.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{x}{t \cdot z}\right)} - 1} \]
    9. Step-by-step derivation
      1. expm1-def31.8%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{x}{t \cdot z}\right)\right)} \]
      2. expm1-log1p32.0%

        \[\leadsto \color{blue}{\frac{x}{t \cdot z}} \]
    10. Simplified32.0%

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

    if -9.2e13 < z < 3.7999999999999999e128

    1. Initial program 91.5%

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

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

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

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

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

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

    if 3.7999999999999999e128 < z

    1. Initial program 77.7%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{-x}{z}}}{y} \]
    9. Step-by-step derivation
      1. expm1-log1p-u54.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\frac{-x}{z}}{y}\right)\right)} \]
      2. expm1-udef71.4%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\frac{-x}{z}}{y}\right)} - 1} \]
      3. associate-/l/71.4%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{-x}{y \cdot z}}\right)} - 1 \]
      4. add-sqr-sqrt47.1%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{y \cdot z}\right)} - 1 \]
      5. sqrt-unprod70.7%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{y \cdot z}\right)} - 1 \]
      6. sqr-neg70.7%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\sqrt{\color{blue}{x \cdot x}}}{y \cdot z}\right)} - 1 \]
      7. sqrt-unprod24.2%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{y \cdot z}\right)} - 1 \]
      8. add-sqr-sqrt71.4%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{x}}{y \cdot z}\right)} - 1 \]
    10. Applied egg-rr71.4%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{x}{y \cdot z}\right)} - 1} \]
    11. Step-by-step derivation
      1. expm1-def43.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{x}{y \cdot z}\right)\right)} \]
      2. expm1-log1p43.9%

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

        \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
    12. Simplified43.9%

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

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

Alternative 15: 49.4% 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^{-88}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+128}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot 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 -6.5e-88)
   (/ (- x) (* z t))
   (if (<= z 1.9e+128) (/ (/ x t) y) (/ x (* y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -6.5e-88) {
		tmp = -x / (z * t);
	} else if (z <= 1.9e+128) {
		tmp = (x / t) / y;
	} else {
		tmp = x / (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 (z <= (-6.5d-88)) then
        tmp = -x / (z * t)
    else if (z <= 1.9d+128) then
        tmp = (x / t) / y
    else
        tmp = x / (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 (z <= -6.5e-88) {
		tmp = -x / (z * t);
	} else if (z <= 1.9e+128) {
		tmp = (x / t) / y;
	} else {
		tmp = x / (y * z);
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if z <= -6.5e-88:
		tmp = -x / (z * t)
	elif z <= 1.9e+128:
		tmp = (x / t) / y
	else:
		tmp = x / (y * z)
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -6.5e-88)
		tmp = Float64(Float64(-x) / Float64(z * t));
	elseif (z <= 1.9e+128)
		tmp = Float64(Float64(x / t) / y);
	else
		tmp = Float64(x / 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 (z <= -6.5e-88)
		tmp = -x / (z * t);
	elseif (z <= 1.9e+128)
		tmp = (x / t) / y;
	else
		tmp = x / (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[z, -6.5e-88], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e+128], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * z), $MachinePrecision]), $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^{-88}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.50000000000000006e-88

    1. Initial program 85.5%

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

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

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, y, z \cdot \left(-1 \cdot t + -1 \cdot y\right)\right)}} \]
      2. mul-1-neg60.5%

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, y, z \cdot \left(-1 \cdot t + \color{blue}{\left(-y\right)}\right)\right)} \]
      3. unsub-neg60.5%

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, y, z \cdot \color{blue}{\left(-1 \cdot t - y\right)}\right)} \]
      4. mul-1-neg60.5%

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, y, z \cdot \left(\color{blue}{\left(-t\right)} - y\right)\right)} \]
    5. Simplified60.5%

      \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, y, z \cdot \left(\left(-t\right) - y\right)\right)}} \]
    6. Taylor expanded in y around 0 35.0%

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

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

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

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

    if -6.50000000000000006e-88 < z < 1.89999999999999995e128

    1. Initial program 91.0%

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

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

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

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

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

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

    if 1.89999999999999995e128 < z

    1. Initial program 77.7%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{-x}{z}}}{y} \]
    9. Step-by-step derivation
      1. expm1-log1p-u54.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\frac{-x}{z}}{y}\right)\right)} \]
      2. expm1-udef71.4%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\frac{-x}{z}}{y}\right)} - 1} \]
      3. associate-/l/71.4%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{-x}{y \cdot z}}\right)} - 1 \]
      4. add-sqr-sqrt47.1%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{y \cdot z}\right)} - 1 \]
      5. sqrt-unprod70.7%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{y \cdot z}\right)} - 1 \]
      6. sqr-neg70.7%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\sqrt{\color{blue}{x \cdot x}}}{y \cdot z}\right)} - 1 \]
      7. sqrt-unprod24.2%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{y \cdot z}\right)} - 1 \]
      8. add-sqr-sqrt71.4%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\color{blue}{x}}{y \cdot z}\right)} - 1 \]
    10. Applied egg-rr71.4%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{x}{y \cdot z}\right)} - 1} \]
    11. Step-by-step derivation
      1. expm1-def43.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{x}{y \cdot z}\right)\right)} \]
      2. expm1-log1p43.9%

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

        \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
    12. Simplified43.9%

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

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

Alternative 16: 90.9% accurate, 0.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.4999999999999998e204

    1. Initial program 59.7%

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

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

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

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

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

    if -7.4999999999999998e204 < y

    1. Initial program 90.3%

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

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

Alternative 17: 97.1% accurate, 1.0× speedup?

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

    \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-cube-cbrt86.7%

      \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. times-frac97.4%

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

      \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z} \]
  4. Applied egg-rr97.4%

    \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{x}\right)}^{2}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z}} \]
  5. Step-by-step derivation
    1. frac-times86.7%

      \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{x}\right)}^{2} \cdot \sqrt[3]{x}}{\left(y - z\right) \cdot \left(t - z\right)}} \]
    2. unpow286.7%

      \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)} \cdot \sqrt[3]{x}}{\left(y - z\right) \cdot \left(t - z\right)} \]
    3. add-cube-cbrt87.5%

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

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

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

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

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

Alternative 18: 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 87.5%

    \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-cube-cbrt86.7%

      \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. times-frac97.4%

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

      \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z} \]
  4. Applied egg-rr97.4%

    \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{x}\right)}^{2}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z}} \]
  5. Step-by-step derivation
    1. associate-*r/96.1%

      \[\leadsto \color{blue}{\frac{\frac{{\left(\sqrt[3]{x}\right)}^{2}}{y - z} \cdot \sqrt[3]{x}}{t - z}} \]
    2. associate-*l/96.1%

      \[\leadsto \frac{\color{blue}{\frac{{\left(\sqrt[3]{x}\right)}^{2} \cdot \sqrt[3]{x}}{y - z}}}{t - z} \]
    3. unpow296.1%

      \[\leadsto \frac{\frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)} \cdot \sqrt[3]{x}}{y - z}}{t - z} \]
    4. add-cube-cbrt97.1%

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

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

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

Alternative 19: 39.8% accurate, 1.8× speedup?

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

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

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

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

Developer target: 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 2024027 
(FPCore (x y z t)
  :name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
  :precision binary64

  :herbie-target
  (if (< (/ x (* (- y z) (- t z))) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 (* (- y z) (- t z)))))

  (/ x (* (- y z) (- t z))))