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

Percentage Accurate: 88.8% → 96.4%
Time: 13.7s
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.8% accurate, 1.0× speedup?

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

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

Alternative 1: 96.4% accurate, 0.8× speedup?

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

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

      \[\leadsto \color{blue}{\frac{1}{\frac{\left(y - z\right) \cdot \left(t - z\right)}{x}}} \]
    2. inv-pow87.6%

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

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

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

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

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

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

Alternative 2: 78.5% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;z \leq -6.5 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.1e161 or -4.2999999999999998e42 < z < -6.4999999999999999e-40 or 1.36e10 < z

    1. Initial program 81.9%

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

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

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

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{\left(0 - z\right)} + t} \]
      5. associate-+l-99.8%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{-\left(y - z\right)}}}{z - t} \]
      10. sub-neg99.8%

        \[\leadsto \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{z - t} \]
      11. distribute-neg-in99.8%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}}{z - t} \]
      12. remove-double-neg99.8%

        \[\leadsto \frac{\frac{x}{\left(-y\right) + \color{blue}{z}}}{z - t} \]
      13. +-commutative99.8%

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-y\right)}}}{z - t} \]
      14. sub-neg99.8%

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

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

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

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

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

    if -1.1e161 < z < -4.2999999999999998e42

    1. Initial program 93.1%

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

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

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

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{\left(0 - z\right)} + t} \]
      5. associate-+l-99.7%

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

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

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

        \[\leadsto \color{blue}{\frac{-\frac{x}{y - z}}{z - t}} \]
      9. distribute-neg-frac299.7%

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

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

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

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

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-y\right)}}}{z - t} \]
      14. sub-neg99.7%

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

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

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

    if -6.4999999999999999e-40 < z < 2.14999999999999997e-128

    1. Initial program 90.8%

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

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

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

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

    if 2.14999999999999997e-128 < z < 1.36e10

    1. Initial program 99.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{+161}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{elif}\;z \leq -4.3 \cdot 10^{+42}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-40}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{-128}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \mathbf{elif}\;z \leq 13600000000:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 48.3% accurate, 0.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.80000000000000016e155 or 7.5999999999999998e78 < z

    1. Initial program 79.7%

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

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

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

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{\left(0 - z\right)} + t} \]
      5. associate-+l-99.9%

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{-\left(z - t\right)}} \]
      7. distribute-neg-frac299.9%

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{-\left(y - z\right)}}}{z - t} \]
      10. sub-neg99.9%

        \[\leadsto \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{z - t} \]
      11. distribute-neg-in99.9%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}}{z - t} \]
      12. remove-double-neg99.9%

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

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-y\right)}}}{z - t} \]
      14. sub-neg99.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{\left(\sqrt{-z} \cdot \sqrt{-z}\right)} \cdot t} + 0 \]
      4. sqrt-unprod62.8%

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

        \[\leadsto \frac{x}{\sqrt{\color{blue}{z \cdot z}} \cdot t} + 0 \]
      6. sqrt-unprod20.8%

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

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

      \[\leadsto \color{blue}{\frac{x}{z \cdot t} + 0} \]
    11. Step-by-step derivation
      1. *-commutative33.9%

        \[\leadsto \frac{x}{\color{blue}{t \cdot z}} + 0 \]
      2. add033.9%

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

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

    if -2.80000000000000016e155 < z < -2.49999999999999989e-58

    1. Initial program 93.8%

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

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

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

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{\left(0 - z\right)} + t} \]
      5. associate-+l-98.3%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{-\left(y - z\right)}}}{z - t} \]
      10. sub-neg98.3%

        \[\leadsto \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{z - t} \]
      11. distribute-neg-in98.3%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}}{z - t} \]
      12. remove-double-neg98.3%

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

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-y\right)}}}{z - t} \]
      14. sub-neg98.3%

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

      \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num98.2%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
    12. Step-by-step derivation
      1. *-rgt-identity22.9%

        \[\leadsto \frac{\color{blue}{x \cdot 1}}{t \cdot y} \]
      2. *-commutative22.9%

        \[\leadsto \frac{x \cdot 1}{\color{blue}{y \cdot t}} \]
      3. times-frac35.1%

        \[\leadsto \color{blue}{\frac{x}{y} \cdot \frac{1}{t}} \]
      4. associate-*r/35.2%

        \[\leadsto \color{blue}{\frac{\frac{x}{y} \cdot 1}{t}} \]
      5. *-rgt-identity35.2%

        \[\leadsto \frac{\color{blue}{\frac{x}{y}}}{t} \]
    13. Simplified35.2%

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

    if -2.49999999999999989e-58 < z < 5.2000000000000002e-283

    1. Initial program 96.8%

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

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

    if 5.2000000000000002e-283 < z < 7.5999999999999998e78

    1. Initial program 87.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+155}:\\ \;\;\;\;\frac{x}{z \cdot t}\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{-58}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-283}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{elif}\;z \leq 7.6 \cdot 10^{+78}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 74.7% accurate, 0.4× speedup?

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

\mathbf{elif}\;z \leq -1.04 \cdot 10^{-39} \lor \neg \left(z \leq 2 \cdot 10^{-62}\right):\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\

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


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

    1. Initial program 72.8%

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

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

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

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{\left(0 - z\right)} + t} \]
      5. associate-+l-99.9%

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{-\left(z - t\right)}} \]
      7. distribute-neg-frac299.9%

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{-\left(y - z\right)}}}{z - t} \]
      10. sub-neg99.9%

        \[\leadsto \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{z - t} \]
      11. distribute-neg-in99.9%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}}{z - t} \]
      12. remove-double-neg99.9%

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

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-y\right)}}}{z - t} \]
      14. sub-neg99.9%

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

      \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.8%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\color{blue}{z \cdot \frac{z - y}{x}}} \]
    11. Simplified93.9%

      \[\leadsto \frac{1}{\color{blue}{z \cdot \frac{z - y}{x}}} \]
    12. Taylor expanded in z around inf 92.3%

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

    if -1.1e161 < z < -1.0400000000000001e-39 or 2.0000000000000001e-62 < z

    1. Initial program 88.8%

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

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

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

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{\left(0 - z\right)} + t} \]
      5. associate-+l-99.7%

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

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

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

        \[\leadsto \color{blue}{\frac{-\frac{x}{y - z}}{z - t}} \]
      9. distribute-neg-frac299.7%

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

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

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

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

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-y\right)}}}{z - t} \]
      14. sub-neg99.7%

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

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

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

    if -1.0400000000000001e-39 < z < 2.0000000000000001e-62

    1. Initial program 91.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{+161}:\\ \;\;\;\;\frac{1}{z \cdot \frac{z}{x}}\\ \mathbf{elif}\;z \leq -1.04 \cdot 10^{-39} \lor \neg \left(z \leq 2 \cdot 10^{-62}\right):\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 74.3% accurate, 0.4× speedup?

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

\mathbf{elif}\;z \leq -7.5 \cdot 10^{-41} \lor \neg \left(z \leq 1.3 \cdot 10^{-69}\right):\\
\;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\

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


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

    1. Initial program 72.8%

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

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

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

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{\left(0 - z\right)} + t} \]
      5. associate-+l-99.9%

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{-\left(z - t\right)}} \]
      7. distribute-neg-frac299.9%

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{-\left(y - z\right)}}}{z - t} \]
      10. sub-neg99.9%

        \[\leadsto \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{z - t} \]
      11. distribute-neg-in99.9%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}}{z - t} \]
      12. remove-double-neg99.9%

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

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-y\right)}}}{z - t} \]
      14. sub-neg99.9%

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

      \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.8%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\color{blue}{z \cdot \frac{z - y}{x}}} \]
    11. Simplified93.9%

      \[\leadsto \frac{1}{\color{blue}{z \cdot \frac{z - y}{x}}} \]
    12. Taylor expanded in z around inf 92.3%

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

    if -2.5999999999999998e161 < z < -7.50000000000000049e-41 or 1.3000000000000001e-69 < z

    1. Initial program 88.9%

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

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

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

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{\left(0 - z\right)} + t} \]
      5. associate-+l-99.7%

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

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

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

        \[\leadsto \color{blue}{\frac{-\frac{x}{y - z}}{z - t}} \]
      9. distribute-neg-frac299.7%

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

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

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

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

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-y\right)}}}{z - t} \]
      14. sub-neg99.7%

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

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

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

    if -7.50000000000000049e-41 < z < 1.3000000000000001e-69

    1. Initial program 91.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{+161}:\\ \;\;\;\;\frac{1}{z \cdot \frac{z}{x}}\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-41} \lor \neg \left(z \leq 1.3 \cdot 10^{-69}\right):\\ \;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 78.9% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -8.2 \cdot 10^{-42}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - y}\\ \mathbf{elif}\;z \leq 1.42 \cdot 10^{-128}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \mathbf{elif}\;z \leq 9000000000000:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - 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 (<= z -8.2e-42)
   (/ (/ x z) (- z y))
   (if (<= z 1.42e-128)
     (/ (/ x t) (- y z))
     (if (<= z 9000000000000.0) (/ x (* y (- t z))) (/ (/ x z) (- z t))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -8.2e-42) {
		tmp = (x / z) / (z - y);
	} else if (z <= 1.42e-128) {
		tmp = (x / t) / (y - z);
	} else if (z <= 9000000000000.0) {
		tmp = x / (y * (t - z));
	} else {
		tmp = (x / z) / (z - t);
	}
	return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-8.2d-42)) then
        tmp = (x / z) / (z - y)
    else if (z <= 1.42d-128) then
        tmp = (x / t) / (y - z)
    else if (z <= 9000000000000.0d0) then
        tmp = x / (y * (t - z))
    else
        tmp = (x / z) / (z - t)
    end if
    code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -8.2e-42) {
		tmp = (x / z) / (z - y);
	} else if (z <= 1.42e-128) {
		tmp = (x / t) / (y - z);
	} else if (z <= 9000000000000.0) {
		tmp = x / (y * (t - z));
	} else {
		tmp = (x / z) / (z - t);
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if z <= -8.2e-42:
		tmp = (x / z) / (z - y)
	elif z <= 1.42e-128:
		tmp = (x / t) / (y - z)
	elif z <= 9000000000000.0:
		tmp = x / (y * (t - z))
	else:
		tmp = (x / z) / (z - t)
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -8.2e-42)
		tmp = Float64(Float64(x / z) / Float64(z - y));
	elseif (z <= 1.42e-128)
		tmp = Float64(Float64(x / t) / Float64(y - z));
	elseif (z <= 9000000000000.0)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	else
		tmp = Float64(Float64(x / z) / Float64(z - t));
	end
	return tmp
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -8.2e-42)
		tmp = (x / z) / (z - y);
	elseif (z <= 1.42e-128)
		tmp = (x / t) / (y - z);
	elseif (z <= 9000000000000.0)
		tmp = x / (y * (t - z));
	else
		tmp = (x / z) / (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[z, -8.2e-42], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.42e-128], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9000000000000.0], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{-42}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -8.2000000000000003e-42

    1. Initial program 85.0%

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

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

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

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{\left(0 - z\right)} + t} \]
      5. associate-+l-99.7%

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

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

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

        \[\leadsto \color{blue}{\frac{-\frac{x}{y - z}}{z - t}} \]
      9. distribute-neg-frac299.7%

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

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

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

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

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-y\right)}}}{z - t} \]
      14. sub-neg99.7%

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

      \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.6%

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

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

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

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

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

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

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

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

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

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

    if -8.2000000000000003e-42 < z < 1.4199999999999999e-128

    1. Initial program 90.8%

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

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

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

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

    if 1.4199999999999999e-128 < z < 9e12

    1. Initial program 99.6%

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

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

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

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

    if 9e12 < z

    1. Initial program 83.3%

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

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

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

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{\left(0 - z\right)} + t} \]
      5. associate-+l-99.8%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{-\left(y - z\right)}}}{z - t} \]
      10. sub-neg99.8%

        \[\leadsto \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{z - t} \]
      11. distribute-neg-in99.8%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}}{z - t} \]
      12. remove-double-neg99.8%

        \[\leadsto \frac{\frac{x}{\left(-y\right) + \color{blue}{z}}}{z - t} \]
      13. +-commutative99.8%

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-y\right)}}}{z - t} \]
      14. sub-neg99.8%

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

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

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

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

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

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

Alternative 7: 48.7% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+208}:\\ \;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{+52} \lor \neg \left(z \leq 2.15 \cdot 10^{+98}\right):\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (<= z -1.75e+208)
   (/ x (* z (- t)))
   (if (or (<= z -6.8e+52) (not (<= z 2.15e+98)))
     (/ 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 <= -1.75e+208) {
		tmp = x / (z * -t);
	} else if ((z <= -6.8e+52) || !(z <= 2.15e+98)) {
		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 <= (-1.75d+208)) then
        tmp = x / (z * -t)
    else if ((z <= (-6.8d+52)) .or. (.not. (z <= 2.15d+98))) 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 <= -1.75e+208) {
		tmp = x / (z * -t);
	} else if ((z <= -6.8e+52) || !(z <= 2.15e+98)) {
		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 <= -1.75e+208:
		tmp = x / (z * -t)
	elif (z <= -6.8e+52) or not (z <= 2.15e+98):
		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 <= -1.75e+208)
		tmp = Float64(x / Float64(z * Float64(-t)));
	elseif ((z <= -6.8e+52) || !(z <= 2.15e+98))
		tmp = Float64(x / Float64(y * Float64(-z)));
	else
		tmp = Float64(Float64(x / t) / y);
	end
	return tmp
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -1.75e+208)
		tmp = x / (z * -t);
	elseif ((z <= -6.8e+52) || ~((z <= 2.15e+98)))
		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[z, -1.75e+208], N[(x / N[(z * (-t)), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -6.8e+52], N[Not[LessEqual[z, 2.15e+98]], $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 -1.75 \cdot 10^{+208}:\\
\;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\

\mathbf{elif}\;z \leq -6.8 \cdot 10^{+52} \lor \neg \left(z \leq 2.15 \cdot 10^{+98}\right):\\
\;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\

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


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

    1. Initial program 78.1%

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

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

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

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{\left(0 - z\right)} + t} \]
      5. associate-+l-99.9%

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{-\left(z - t\right)}} \]
      7. distribute-neg-frac299.9%

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{-\left(y - z\right)}}}{z - t} \]
      10. sub-neg99.9%

        \[\leadsto \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{z - t} \]
      11. distribute-neg-in99.9%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}}{z - t} \]
      12. remove-double-neg99.9%

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

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-y\right)}}}{z - t} \]
      14. sub-neg99.9%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-x}{\color{blue}{z \cdot t}} \]
    10. Simplified30.9%

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

    if -1.75000000000000008e208 < z < -6.8e52 or 2.1500000000000001e98 < z

    1. Initial program 83.7%

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

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

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

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{\left(0 - z\right)} + t} \]
      5. associate-+l-99.9%

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{-\left(z - t\right)}} \]
      7. distribute-neg-frac299.9%

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{-\left(y - z\right)}}}{z - t} \]
      10. sub-neg99.9%

        \[\leadsto \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{z - t} \]
      11. distribute-neg-in99.9%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}}{z - t} \]
      12. remove-double-neg99.9%

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

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-y\right)}}}{z - t} \]
      14. sub-neg99.9%

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

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

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

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

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

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

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

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

    if -6.8e52 < z < 2.1500000000000001e98

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 48.3% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{+208}:\\ \;\;\;\;\frac{\frac{x}{t}}{-z}\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{+52} \lor \neg \left(z \leq 5.4 \cdot 10^{+96}\right):\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (<= z -1.35e+208)
   (/ (/ x t) (- z))
   (if (or (<= z -6.5e+52) (not (<= z 5.4e+96)))
     (/ 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 <= -1.35e+208) {
		tmp = (x / t) / -z;
	} else if ((z <= -6.5e+52) || !(z <= 5.4e+96)) {
		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 <= (-1.35d+208)) then
        tmp = (x / t) / -z
    else if ((z <= (-6.5d+52)) .or. (.not. (z <= 5.4d+96))) 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 <= -1.35e+208) {
		tmp = (x / t) / -z;
	} else if ((z <= -6.5e+52) || !(z <= 5.4e+96)) {
		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 <= -1.35e+208:
		tmp = (x / t) / -z
	elif (z <= -6.5e+52) or not (z <= 5.4e+96):
		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 <= -1.35e+208)
		tmp = Float64(Float64(x / t) / Float64(-z));
	elseif ((z <= -6.5e+52) || !(z <= 5.4e+96))
		tmp = Float64(x / Float64(y * Float64(-z)));
	else
		tmp = Float64(Float64(x / t) / y);
	end
	return tmp
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -1.35e+208)
		tmp = (x / t) / -z;
	elseif ((z <= -6.5e+52) || ~((z <= 5.4e+96)))
		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[z, -1.35e+208], N[(N[(x / t), $MachinePrecision] / (-z)), $MachinePrecision], If[Or[LessEqual[z, -6.5e+52], N[Not[LessEqual[z, 5.4e+96]], $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 -1.35 \cdot 10^{+208}:\\
\;\;\;\;\frac{\frac{x}{t}}{-z}\\

\mathbf{elif}\;z \leq -6.5 \cdot 10^{+52} \lor \neg \left(z \leq 5.4 \cdot 10^{+96}\right):\\
\;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\

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


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

    1. Initial program 78.1%

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

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

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

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{\left(0 - z\right)} + t} \]
      5. associate-+l-99.9%

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{-\left(z - t\right)}} \]
      7. distribute-neg-frac299.9%

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{-\left(y - z\right)}}}{z - t} \]
      10. sub-neg99.9%

        \[\leadsto \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{z - t} \]
      11. distribute-neg-in99.9%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}}{z - t} \]
      12. remove-double-neg99.9%

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

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-y\right)}}}{z - t} \]
      14. sub-neg99.9%

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

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

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

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

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

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

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

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

    if -1.35e208 < z < -6.49999999999999996e52 or 5.40000000000000044e96 < z

    1. Initial program 83.7%

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

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

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

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{\left(0 - z\right)} + t} \]
      5. associate-+l-99.9%

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{-\left(z - t\right)}} \]
      7. distribute-neg-frac299.9%

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{-\left(y - z\right)}}}{z - t} \]
      10. sub-neg99.9%

        \[\leadsto \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{z - t} \]
      11. distribute-neg-in99.9%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}}{z - t} \]
      12. remove-double-neg99.9%

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

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-y\right)}}}{z - t} \]
      14. sub-neg99.9%

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

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

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

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

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

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

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

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

    if -6.49999999999999996e52 < z < 5.40000000000000044e96

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 93.3% accurate, 0.5× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.1e161 or 1.00000000000000002e144 < z

    1. Initial program 75.6%

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

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

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

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{\left(0 - z\right)} + t} \]
      5. associate-+l-99.9%

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{-\left(z - t\right)}} \]
      7. distribute-neg-frac299.9%

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{-\left(y - z\right)}}}{z - t} \]
      10. sub-neg99.9%

        \[\leadsto \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{z - t} \]
      11. distribute-neg-in99.9%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}}{z - t} \]
      12. remove-double-neg99.9%

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

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-y\right)}}}{z - t} \]
      14. sub-neg99.9%

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

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

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

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

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

    if -1.1e161 < z < 1.00000000000000002e144

    1. Initial program 92.8%

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

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

Alternative 10: 65.9% accurate, 0.5× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{-39} \lor \neg \left(z \leq 1.68 \cdot 10^{+22}\right):\\ \;\;\;\;\frac{1}{z \cdot \frac{z}{x}}\\ \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 -3.2e-39) (not (<= z 1.68e+22)))
   (/ 1.0 (* z (/ z x)))
   (/ (/ x t) y)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -3.2e-39) || !(z <= 1.68e+22)) {
		tmp = 1.0 / (z * (z / x));
	} else {
		tmp = (x / t) / y;
	}
	return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((z <= (-3.2d-39)) .or. (.not. (z <= 1.68d+22))) then
        tmp = 1.0d0 / (z * (z / x))
    else
        tmp = (x / t) / y
    end if
    code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -3.2e-39) || !(z <= 1.68e+22)) {
		tmp = 1.0 / (z * (z / x));
	} else {
		tmp = (x / t) / y;
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if (z <= -3.2e-39) or not (z <= 1.68e+22):
		tmp = 1.0 / (z * (z / x))
	else:
		tmp = (x / t) / y
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -3.2e-39) || !(z <= 1.68e+22))
		tmp = Float64(1.0 / Float64(z * Float64(z / x)));
	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 <= -3.2e-39) || ~((z <= 1.68e+22)))
		tmp = 1.0 / (z * (z / x));
	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, -3.2e-39], N[Not[LessEqual[z, 1.68e+22]], $MachinePrecision]], N[(1.0 / N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{-39} \lor \neg \left(z \leq 1.68 \cdot 10^{+22}\right):\\
\;\;\;\;\frac{1}{z \cdot \frac{z}{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.1999999999999998e-39 or 1.68e22 < z

    1. Initial program 84.1%

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

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

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

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{\left(0 - z\right)} + t} \]
      5. associate-+l-99.8%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{-\left(y - z\right)}}}{z - t} \]
      10. sub-neg99.8%

        \[\leadsto \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{z - t} \]
      11. distribute-neg-in99.8%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}}{z - t} \]
      12. remove-double-neg99.8%

        \[\leadsto \frac{\frac{x}{\left(-y\right) + \color{blue}{z}}}{z - t} \]
      13. +-commutative99.8%

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-y\right)}}}{z - t} \]
      14. sub-neg99.8%

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

      \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.5%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\color{blue}{z \cdot \frac{z - y}{x}}} \]
    12. Taylor expanded in z around inf 73.9%

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

    if -3.1999999999999998e-39 < z < 1.68e22

    1. Initial program 92.7%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(y - z\right) \cdot \left(t - z\right)}{x}}} \]
      2. inv-pow91.7%

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

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

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

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

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

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

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

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

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

Alternative 11: 72.5% accurate, 0.5× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.1e-7 or 1.95e16 < z

    1. Initial program 83.8%

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

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

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

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{\left(0 - z\right)} + t} \]
      5. associate-+l-99.8%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{-\left(y - z\right)}}}{z - t} \]
      10. sub-neg99.8%

        \[\leadsto \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{z - t} \]
      11. distribute-neg-in99.8%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}}{z - t} \]
      12. remove-double-neg99.8%

        \[\leadsto \frac{\frac{x}{\left(-y\right) + \color{blue}{z}}}{z - t} \]
      13. +-commutative99.8%

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-y\right)}}}{z - t} \]
      14. sub-neg99.8%

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

      \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.5%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\color{blue}{z \cdot \frac{z - y}{x}}} \]
    12. Taylor expanded in z around inf 75.1%

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

    if -2.1e-7 < z < 1.95e16

    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 76.7%

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

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

Alternative 12: 78.3% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 87.7%

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

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

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

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

    if -4.4000000000000002e-46 < y < 1.10000000000000003e-195

    1. Initial program 92.8%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. sub-neg97.4%

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

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{\left(0 - z\right)} + t} \]
      5. associate-+l-97.4%

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

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

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

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

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

        \[\leadsto \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{z - t} \]
      11. distribute-neg-in97.4%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}}{z - t} \]
      12. remove-double-neg97.4%

        \[\leadsto \frac{\frac{x}{\left(-y\right) + \color{blue}{z}}}{z - t} \]
      13. +-commutative97.4%

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-y\right)}}}{z - t} \]
      14. sub-neg97.4%

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

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

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

    if 1.10000000000000003e-195 < y

    1. Initial program 84.8%

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

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

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

Alternative 13: 79.2% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 87.7%

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

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

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

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

    if -1.0400000000000001e-45 < y < 1.70000000000000005e-194

    1. Initial program 92.8%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. sub-neg97.4%

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

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{\left(0 - z\right)} + t} \]
      5. associate-+l-97.4%

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

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

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

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

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

        \[\leadsto \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{z - t} \]
      11. distribute-neg-in97.4%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}}{z - t} \]
      12. remove-double-neg97.4%

        \[\leadsto \frac{\frac{x}{\left(-y\right) + \color{blue}{z}}}{z - t} \]
      13. +-commutative97.4%

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-y\right)}}}{z - t} \]
      14. sub-neg97.4%

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

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

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

    if 1.70000000000000005e-194 < y

    1. Initial program 84.8%

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

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

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

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

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

Alternative 14: 52.8% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.80000000000000011e-73

    1. Initial program 89.2%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. sub-neg97.4%

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

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{\left(0 - z\right)} + t} \]
      5. associate-+l-97.4%

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

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

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

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

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

        \[\leadsto \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{z - t} \]
      11. distribute-neg-in97.4%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}}{z - t} \]
      12. remove-double-neg97.4%

        \[\leadsto \frac{\frac{x}{\left(-y\right) + \color{blue}{z}}}{z - t} \]
      13. +-commutative97.4%

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-y\right)}}}{z - t} \]
      14. sub-neg97.4%

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

      \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num96.9%

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\left(z - t\right) \cdot \color{blue}{\frac{1}{\frac{x}{z - y}}}} \]
      2. un-div-inv96.9%

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

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

      \[\leadsto \color{blue}{\frac{x}{t \cdot y}} \]
    12. Step-by-step derivation
      1. *-rgt-identity56.8%

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

        \[\leadsto \frac{x \cdot 1}{\color{blue}{y \cdot t}} \]
      3. times-frac61.3%

        \[\leadsto \color{blue}{\frac{x}{y} \cdot \frac{1}{t}} \]
      4. associate-*r/61.3%

        \[\leadsto \color{blue}{\frac{\frac{x}{y} \cdot 1}{t}} \]
      5. *-rgt-identity61.3%

        \[\leadsto \frac{\color{blue}{\frac{x}{y}}}{t} \]
    13. Simplified61.3%

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

    if -4.80000000000000011e-73 < y < 1.15e-62

    1. Initial program 90.6%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      2. sub-neg95.4%

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

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{\left(0 - z\right)} + t} \]
      5. associate-+l-95.4%

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

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

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

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

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

        \[\leadsto \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{z - t} \]
      11. distribute-neg-in95.4%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}}{z - t} \]
      12. remove-double-neg95.4%

        \[\leadsto \frac{\frac{x}{\left(-y\right) + \color{blue}{z}}}{z - t} \]
      13. +-commutative95.4%

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-y\right)}}}{z - t} \]
      14. sub-neg95.4%

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

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

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

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

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

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

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

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

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

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

    if 1.15e-62 < y

    1. Initial program 84.6%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(y - z\right) \cdot \left(t - z\right)}{x}}} \]
      2. inv-pow84.6%

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

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

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

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

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

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

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

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

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

Alternative 15: 46.3% accurate, 0.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.11999999999999995e89 or 1.45e13 < z

    1. Initial program 82.8%

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

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

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

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{\left(0 - z\right)} + t} \]
      5. associate-+l-99.9%

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{-\left(z - t\right)}} \]
      7. distribute-neg-frac299.9%

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{-\left(y - z\right)}}}{z - t} \]
      10. sub-neg99.9%

        \[\leadsto \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{z - t} \]
      11. distribute-neg-in99.9%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}}{z - t} \]
      12. remove-double-neg99.9%

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

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-y\right)}}}{z - t} \]
      14. sub-neg99.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\sqrt{\color{blue}{z \cdot z}} \cdot t} + 0 \]
      6. sqrt-unprod17.9%

        \[\leadsto \frac{x}{\color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)} \cdot t} + 0 \]
      7. add-sqr-sqrt30.4%

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

      \[\leadsto \color{blue}{\frac{x}{z \cdot t} + 0} \]
    11. Step-by-step derivation
      1. *-commutative30.4%

        \[\leadsto \frac{x}{\color{blue}{t \cdot z}} + 0 \]
      2. add030.4%

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

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

    if -1.11999999999999995e89 < z < 1.45e13

    1. Initial program 92.1%

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

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

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

Alternative 16: 48.9% accurate, 0.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.80000000000000011e87 or 2.60000000000000015e79 < z

    1. Initial program 82.5%

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

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

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

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{\left(0 - z\right)} + t} \]
      5. associate-+l-99.9%

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

        \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{-\left(z - t\right)}} \]
      7. distribute-neg-frac299.9%

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{-\left(y - z\right)}}}{z - t} \]
      10. sub-neg99.9%

        \[\leadsto \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{z - t} \]
      11. distribute-neg-in99.9%

        \[\leadsto \frac{\frac{x}{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}}{z - t} \]
      12. remove-double-neg99.9%

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

        \[\leadsto \frac{\frac{x}{\color{blue}{z + \left(-y\right)}}}{z - t} \]
      14. sub-neg99.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{\left(\sqrt{-z} \cdot \sqrt{-z}\right)} \cdot t} + 0 \]
      4. sqrt-unprod56.4%

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

        \[\leadsto \frac{x}{\sqrt{\color{blue}{z \cdot z}} \cdot t} + 0 \]
      6. sqrt-unprod17.8%

        \[\leadsto \frac{x}{\color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)} \cdot t} + 0 \]
      7. add-sqr-sqrt31.8%

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

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

        \[\leadsto \frac{x}{\color{blue}{t \cdot z}} + 0 \]
      2. add031.8%

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

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

    if -3.80000000000000011e87 < z < 2.60000000000000015e79

    1. Initial program 91.6%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{\left(y - z\right) \cdot \left(t - z\right)}{x}}} \]
      2. inv-pow90.8%

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

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

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

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

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

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

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

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

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

Alternative 17: 96.8% accurate, 1.0× speedup?

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

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

      \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
    2. sub-neg97.0%

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

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

      \[\leadsto \frac{\frac{x}{y - z}}{\color{blue}{\left(0 - z\right)} + t} \]
    5. associate-+l-97.0%

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

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

      \[\leadsto \color{blue}{-\frac{\frac{x}{y - z}}{z - t}} \]
    8. distribute-frac-neg97.0%

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

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

      \[\leadsto \frac{\frac{x}{-\color{blue}{\left(y + \left(-z\right)\right)}}}{z - t} \]
    11. distribute-neg-in97.0%

      \[\leadsto \frac{\frac{x}{\color{blue}{\left(-y\right) + \left(-\left(-z\right)\right)}}}{z - t} \]
    12. remove-double-neg97.0%

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

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

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

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

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

Alternative 18: 39.2% accurate, 1.8× speedup?

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

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

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

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

Developer target: 87.5% accurate, 0.4× speedup?

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

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

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


\end{array}
\end{array}

Reproduce

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

  :alt
  (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))))