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

Percentage Accurate: 88.9% → 97.5%
Time: 18.4s
Alternatives: 18
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 18 alternatives:

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

Initial Program: 88.9% 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.5% 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 90.5%

    \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-cube-cbrt89.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-frac95.8%

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

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

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

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

Alternative 2: 79.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 -2.7 \cdot 10^{+201}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -4.6 \cdot 10^{-27}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 7.1 \cdot 10^{-217}:\\ \;\;\;\;\frac{-x}{z \cdot \left(t - z\right)}\\ \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 (<= y -2.7e+201)
   (/ (/ x y) (- t z))
   (if (<= y -4.6e-27)
     (/ x (* y (- t z)))
     (if (<= y 7.1e-217) (/ (- x) (* z (- t 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 (y <= -2.7e+201) {
		tmp = (x / y) / (t - z);
	} else if (y <= -4.6e-27) {
		tmp = x / (y * (t - z));
	} else if (y <= 7.1e-217) {
		tmp = -x / (z * (t - 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 (y <= (-2.7d+201)) then
        tmp = (x / y) / (t - z)
    else if (y <= (-4.6d-27)) then
        tmp = x / (y * (t - z))
    else if (y <= 7.1d-217) then
        tmp = -x / (z * (t - 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 (y <= -2.7e+201) {
		tmp = (x / y) / (t - z);
	} else if (y <= -4.6e-27) {
		tmp = x / (y * (t - z));
	} else if (y <= 7.1e-217) {
		tmp = -x / (z * (t - 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 y <= -2.7e+201:
		tmp = (x / y) / (t - z)
	elif y <= -4.6e-27:
		tmp = x / (y * (t - z))
	elif y <= 7.1e-217:
		tmp = -x / (z * (t - 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 (y <= -2.7e+201)
		tmp = Float64(Float64(x / y) / Float64(t - z));
	elseif (y <= -4.6e-27)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif (y <= 7.1e-217)
		tmp = Float64(Float64(-x) / Float64(z * Float64(t - 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 (y <= -2.7e+201)
		tmp = (x / y) / (t - z);
	elseif (y <= -4.6e-27)
		tmp = x / (y * (t - z));
	elseif (y <= 7.1e-217)
		tmp = -x / (z * (t - 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[LessEqual[y, -2.7e+201], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.6e-27], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.1e-217], N[((-x) / N[(z * N[(t - z), $MachinePrecision]), $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}\;y \leq -2.7 \cdot 10^{+201}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\

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

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

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


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

    1. Initial program 80.3%

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

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

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z} \]
    4. Applied egg-rr94.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. associate-*r/94.4%

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

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

        \[\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-cbrt94.8%

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

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

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

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

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

    if -2.7e201 < y < -4.5999999999999999e-27

    1. Initial program 89.9%

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

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

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

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

    if -4.5999999999999999e-27 < y < 7.1000000000000002e-217

    1. Initial program 89.9%

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

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

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

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

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

    if 7.1000000000000002e-217 < y

    1. Initial program 92.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{+201}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -4.6 \cdot 10^{-27}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 7.1 \cdot 10^{-217}:\\ \;\;\;\;\frac{-x}{z \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 72.1% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -6 \cdot 10^{-291}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-215}:\\ \;\;\;\;\frac{1}{y \cdot \left(-\frac{z}{x}\right)}\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-24}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \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 (<= t -6e-291)
   (/ (/ x y) (- t z))
   (if (<= t 2.6e-215)
     (/ 1.0 (* y (- (/ z x))))
     (if (<= t 6.8e-24) (/ (/ x (- t z)) y) (/ x (* (- y z) t))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -6e-291) {
		tmp = (x / y) / (t - z);
	} else if (t <= 2.6e-215) {
		tmp = 1.0 / (y * -(z / x));
	} else if (t <= 6.8e-24) {
		tmp = (x / (t - z)) / y;
	} 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 (t <= (-6d-291)) then
        tmp = (x / y) / (t - z)
    else if (t <= 2.6d-215) then
        tmp = 1.0d0 / (y * -(z / x))
    else if (t <= 6.8d-24) then
        tmp = (x / (t - z)) / y
    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 (t <= -6e-291) {
		tmp = (x / y) / (t - z);
	} else if (t <= 2.6e-215) {
		tmp = 1.0 / (y * -(z / x));
	} else if (t <= 6.8e-24) {
		tmp = (x / (t - z)) / y;
	} 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 t <= -6e-291:
		tmp = (x / y) / (t - z)
	elif t <= 2.6e-215:
		tmp = 1.0 / (y * -(z / x))
	elif t <= 6.8e-24:
		tmp = (x / (t - z)) / y
	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 (t <= -6e-291)
		tmp = Float64(Float64(x / y) / Float64(t - z));
	elseif (t <= 2.6e-215)
		tmp = Float64(1.0 / Float64(y * Float64(-Float64(z / x))));
	elseif (t <= 6.8e-24)
		tmp = Float64(Float64(x / Float64(t - z)) / y);
	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 (t <= -6e-291)
		tmp = (x / y) / (t - z);
	elseif (t <= 2.6e-215)
		tmp = 1.0 / (y * -(z / x));
	elseif (t <= 6.8e-24)
		tmp = (x / (t - z)) / y;
	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[LessEqual[t, -6e-291], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e-215], N[(1.0 / N[(y * (-N[(z / x), $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.8e-24], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $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}\;t \leq -6 \cdot 10^{-291}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -6.0000000000000001e-291

    1. Initial program 89.9%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{{\left(\sqrt[3]{x}\right)}^{2} \cdot \sqrt[3]{x}}{y - z}}}{t - z} \]
      3. unpow295.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-cbrt96.0%

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

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

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

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

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

    if -6.0000000000000001e-291 < t < 2.6e-215

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{y \cdot \frac{t - z}{x}}} \]
    9. Simplified68.6%

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

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

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

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

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

    if 2.6e-215 < t < 6.79999999999999985e-24

    1. Initial program 91.9%

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

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

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

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

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

    if 6.79999999999999985e-24 < t

    1. Initial program 90.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6 \cdot 10^{-291}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-215}:\\ \;\;\;\;\frac{1}{y \cdot \left(-\frac{z}{x}\right)}\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-24}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 93.8% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{t - z}\\


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

    1. Initial program 78.6%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt78.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-frac99.6%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z} \]
    4. Applied egg-rr99.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 78.6%

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

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

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

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

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

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

    if -5.50000000000000017e150 < z < 1.6200000000000001e137

    1. Initial program 93.7%

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

    if 1.6200000000000001e137 < z

    1. Initial program 85.7%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt85.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-frac99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 77.3% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.1e9

    1. Initial program 90.6%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt90.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-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. associate-*r/92.9%

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

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

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

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

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

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

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

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

    if -1.1e9 < t < 1.02000000000000001e-20

    1. Initial program 90.5%

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

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

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

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

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

    if 1.02000000000000001e-20 < t

    1. Initial program 90.4%

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

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

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

Alternative 6: 80.5% accurate, 0.5× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1200000000:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;t \leq 3.85 \cdot 10^{-22}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y - 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 (<= t -1200000000.0)
   (/ (/ x y) (- t z))
   (if (<= t 3.85e-22) (/ (/ (- x) z) (- y 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 (t <= -1200000000.0) {
		tmp = (x / y) / (t - z);
	} else if (t <= 3.85e-22) {
		tmp = (-x / z) / (y - 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 (t <= (-1200000000.0d0)) then
        tmp = (x / y) / (t - z)
    else if (t <= 3.85d-22) then
        tmp = (-x / z) / (y - 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 (t <= -1200000000.0) {
		tmp = (x / y) / (t - z);
	} else if (t <= 3.85e-22) {
		tmp = (-x / z) / (y - 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 t <= -1200000000.0:
		tmp = (x / y) / (t - z)
	elif t <= 3.85e-22:
		tmp = (-x / z) / (y - 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 (t <= -1200000000.0)
		tmp = Float64(Float64(x / y) / Float64(t - z));
	elseif (t <= 3.85e-22)
		tmp = Float64(Float64(Float64(-x) / z) / Float64(y - 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 (t <= -1200000000.0)
		tmp = (x / y) / (t - z);
	elseif (t <= 3.85e-22)
		tmp = (-x / z) / (y - 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[LessEqual[t, -1200000000.0], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.85e-22], N[(N[((-x) / z), $MachinePrecision] / N[(y - 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}\;t \leq -1200000000:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.2e9

    1. Initial program 90.6%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt90.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-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. associate-*r/92.9%

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

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

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

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

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

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

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

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

    if -1.2e9 < t < 3.8500000000000001e-22

    1. Initial program 90.5%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt89.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.4%

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

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

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

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

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

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

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

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

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

    if 3.8500000000000001e-22 < t

    1. Initial program 90.4%

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

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

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

Alternative 7: 52.2% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5e8

    1. Initial program 90.6%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{y}}}{t} \]
    7. Simplified53.7%

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

    if -5e8 < t < 3.5000000000000002e-177

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

    if 3.5000000000000002e-177 < t

    1. Initial program 92.0%

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

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

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

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

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

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

Alternative 8: 52.3% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.95e9

    1. Initial program 90.6%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{y}}}{t} \]
    7. Simplified53.7%

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

    if -1.95e9 < t < 3.80000000000000004e-177

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

    if 3.80000000000000004e-177 < t

    1. Initial program 92.0%

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

      \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
    4. Step-by-step derivation
      1. clear-num48.8%

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

        \[\leadsto \color{blue}{{\left(\frac{t \cdot y}{x}\right)}^{-1}} \]
      3. *-commutative48.8%

        \[\leadsto {\left(\frac{\color{blue}{y \cdot t}}{x}\right)}^{-1} \]
      4. associate-/l*54.2%

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{\frac{x}{t}}}} \]
      2. associate-/r/48.5%

        \[\leadsto \frac{1}{\color{blue}{\frac{y}{x} \cdot t}} \]
    7. Simplified48.5%

      \[\leadsto \color{blue}{\frac{1}{\frac{y}{x} \cdot t}} \]
    8. Taylor expanded in y around 0 48.8%

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

        \[\leadsto \frac{1}{\color{blue}{\frac{t}{\frac{x}{y}}}} \]
      2. associate-/r/56.1%

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

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

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

Alternative 9: 65.5% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.3e8

    1. Initial program 90.6%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{y}}}{t} \]
    7. Simplified53.7%

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

    if -5.3e8 < t < 3.5000000000000002e-177

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

    if 3.5000000000000002e-177 < t

    1. Initial program 92.0%

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

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

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

Alternative 10: 51.5% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.8e8

    1. Initial program 90.6%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{y}}}{t} \]
    7. Simplified53.7%

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

    if -3.8e8 < t < 2.5e-177

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

    if 2.5e-177 < t

    1. Initial program 92.0%

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

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

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

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

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

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

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

Alternative 11: 52.2% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.4e8

    1. Initial program 90.6%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{y}}}{t} \]
    7. Simplified53.7%

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

    if -4.4e8 < t < 3.80000000000000004e-177

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

    if 3.80000000000000004e-177 < t

    1. Initial program 92.0%

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

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

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

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

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

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

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

Alternative 12: 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 -1.8 \cdot 10^{+38} \lor \neg \left(z \leq 1.9 \cdot 10^{+30}\right):\\ \;\;\;\;\frac{x}{y \cdot z}\\ \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 -1.8e+38) (not (<= z 1.9e+30))) (/ x (* y z)) (/ x (* y t))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -1.8e+38) || !(z <= 1.9e+30)) {
		tmp = x / (y * z);
	} else {
		tmp = x / (y * t);
	}
	return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((z <= (-1.8d+38)) .or. (.not. (z <= 1.9d+30))) then
        tmp = x / (y * z)
    else
        tmp = x / (y * t)
    end if
    code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -1.8e+38) || !(z <= 1.9e+30)) {
		tmp = x / (y * z);
	} else {
		tmp = x / (y * t);
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if (z <= -1.8e+38) or not (z <= 1.9e+30):
		tmp = x / (y * z)
	else:
		tmp = x / (y * t)
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -1.8e+38) || !(z <= 1.9e+30))
		tmp = Float64(x / Float64(y * z));
	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 <= -1.8e+38) || ~((z <= 1.9e+30)))
		tmp = x / (y * z);
	else
		tmp = x / (y * t);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.8e+38], N[Not[LessEqual[z, 1.9e+30]], $MachinePrecision]], N[(x / N[(y * z), $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 -1.8 \cdot 10^{+38} \lor \neg \left(z \leq 1.9 \cdot 10^{+30}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.79999999999999985e38 or 1.9000000000000001e30 < z

    1. Initial program 85.7%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt85.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-frac99.2%

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

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

      \[\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 81.8%

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

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

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

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

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

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{-x}{\left(y - z\right) \cdot z}}\right)} - 1 \]
      4. associate-/r*69.3%

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

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

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\frac{\color{blue}{x}}{y - z}}{z}\right)} - 1 \]
    9. Applied egg-rr65.3%

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{z}} \]
      3. associate-/l/63.7%

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

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

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

      \[\leadsto \color{blue}{\frac{x}{y \cdot z}} \]
    13. Step-by-step derivation
      1. *-commutative37.6%

        \[\leadsto \frac{x}{\color{blue}{z \cdot y}} \]
    14. Simplified37.6%

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

    if -1.79999999999999985e38 < z < 1.9000000000000001e30

    1. Initial program 94.4%

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

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

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

Alternative 13: 48.8% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -2.05 \cdot 10^{+61} \lor \neg \left(z \leq 2.7 \cdot 10^{+124}\right):\\ \;\;\;\;\frac{x}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -2.05e+61) (not (<= z 2.7e+124))) (/ x (* y 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 <= -2.05e+61) || !(z <= 2.7e+124)) {
		tmp = x / (y * 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 <= (-2.05d+61)) .or. (.not. (z <= 2.7d+124))) then
        tmp = x / (y * 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 <= -2.05e+61) || !(z <= 2.7e+124)) {
		tmp = x / (y * 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 <= -2.05e+61) or not (z <= 2.7e+124):
		tmp = x / (y * 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 <= -2.05e+61) || !(z <= 2.7e+124))
		tmp = Float64(x / Float64(y * 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 <= -2.05e+61) || ~((z <= 2.7e+124)))
		tmp = x / (y * 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, -2.05e+61], N[Not[LessEqual[z, 2.7e+124]], $MachinePrecision]], N[(x / N[(y * 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 -2.05 \cdot 10^{+61} \lor \neg \left(z \leq 2.7 \cdot 10^{+124}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.04999999999999986e61 or 2.69999999999999978e124 < z

    1. Initial program 85.6%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt85.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.5%

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

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

      \[\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 83.2%

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

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

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

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

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

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{-x}{\left(y - z\right) \cdot z}}\right)} - 1 \]
      4. associate-/r*76.9%

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

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

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\frac{\color{blue}{x}}{y - z}}{z}\right)} - 1 \]
    9. Applied egg-rr74.0%

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{z}} \]
      3. associate-/l/72.4%

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

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

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

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

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

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

    if -2.04999999999999986e61 < z < 2.69999999999999978e124

    1. Initial program 93.4%

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

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

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

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

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

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

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

Alternative 14: 70.6% accurate, 0.7× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq 2.1 \cdot 10^{-27}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \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 (<= t 2.1e-27) (/ x (* y (- t 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 (t <= 2.1e-27) {
		tmp = x / (y * (t - 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 (t <= 2.1d-27) then
        tmp = x / (y * (t - 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 (t <= 2.1e-27) {
		tmp = x / (y * (t - 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 t <= 2.1e-27:
		tmp = x / (y * (t - 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 (t <= 2.1e-27)
		tmp = Float64(x / Float64(y * Float64(t - 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 (t <= 2.1e-27)
		tmp = x / (y * (t - 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[LessEqual[t, 2.1e-27], N[(x / N[(y * N[(t - z), $MachinePrecision]), $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}\;t \leq 2.1 \cdot 10^{-27}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 2.10000000000000015e-27

    1. Initial program 90.5%

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

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

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

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

    if 2.10000000000000015e-27 < t

    1. Initial program 90.4%

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

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

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

Alternative 15: 71.1% accurate, 0.7× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq 1.25 \cdot 10^{-22}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - 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 (<= t 1.25e-22) (/ (/ x y) (- t 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 (t <= 1.25e-22) {
		tmp = (x / y) / (t - 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 (t <= 1.25d-22) then
        tmp = (x / y) / (t - 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 (t <= 1.25e-22) {
		tmp = (x / y) / (t - 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 t <= 1.25e-22:
		tmp = (x / y) / (t - 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 (t <= 1.25e-22)
		tmp = Float64(Float64(x / y) / Float64(t - 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 (t <= 1.25e-22)
		tmp = (x / y) / (t - 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[LessEqual[t, 1.25e-22], N[(N[(x / y), $MachinePrecision] / N[(t - 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}\;t \leq 1.25 \cdot 10^{-22}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.24999999999999988e-22

    1. Initial program 90.5%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt89.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-frac95.6%

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

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

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

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

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

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

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

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

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

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

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

    if 1.24999999999999988e-22 < t

    1. Initial program 90.4%

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

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

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

Alternative 16: 72.7% accurate, 0.7× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 2.15000000000000001e-23

    1. Initial program 90.5%

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

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

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

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

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

    if 2.15000000000000001e-23 < t

    1. Initial program 90.4%

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

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

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

Alternative 17: 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 90.5%

    \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-cube-cbrt89.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-frac95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Developer target: 87.8% 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 2024036 
(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))))