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

Percentage Accurate: 88.5% → 96.9%
Time: 11.5s
Alternatives: 22
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 22 alternatives:

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

Initial Program: 88.5% accurate, 1.0× speedup?

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

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

Alternative 1: 96.9% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 2: 78.8% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;y \leq 1.2 \cdot 10^{-86}:\\
\;\;\;\;\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 5 regimes
  2. if y < -3.5e13

    1. Initial program 84.5%

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

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

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

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

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

    if -3.5e13 < y < -1.0199999999999999e-44

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

    if -1.0199999999999999e-44 < y < -4.09999999999999984e-81

    1. Initial program 88.5%

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{t - z} \cdot \color{blue}{\frac{1}{\frac{y - z}{x}}} \]
      5. un-div-inv100.0%

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

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

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

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

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

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

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

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

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

    if -4.09999999999999984e-81 < y < 1.20000000000000007e-86

    1. Initial program 87.6%

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

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

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

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

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

    if 1.20000000000000007e-86 < y

    1. Initial program 83.7%

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

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

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

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

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

Alternative 3: 51.0% 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}{y}}{t}\\ \mathbf{if}\;t \leq -1.45 \cdot 10^{-87}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-151}:\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{+91}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{+211}:\\ \;\;\;\;\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
 (let* ((t_1 (/ (/ x y) t)))
   (if (<= t -1.45e-87)
     t_1
     (if (<= t 1.2e-151)
       (/ x (* y (- z)))
       (if (<= t 1.65e+91)
         t_1
         (if (<= t 1.45e+211) (/ x (* z (- t))) (/ (/ x t) y)))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double t_1 = (x / y) / t;
	double tmp;
	if (t <= -1.45e-87) {
		tmp = t_1;
	} else if (t <= 1.2e-151) {
		tmp = x / (y * -z);
	} else if (t <= 1.65e+91) {
		tmp = t_1;
	} else if (t <= 1.45e+211) {
		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) :: t_1
    real(8) :: tmp
    t_1 = (x / y) / t
    if (t <= (-1.45d-87)) then
        tmp = t_1
    else if (t <= 1.2d-151) then
        tmp = x / (y * -z)
    else if (t <= 1.65d+91) then
        tmp = t_1
    else if (t <= 1.45d+211) 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 t_1 = (x / y) / t;
	double tmp;
	if (t <= -1.45e-87) {
		tmp = t_1;
	} else if (t <= 1.2e-151) {
		tmp = x / (y * -z);
	} else if (t <= 1.65e+91) {
		tmp = t_1;
	} else if (t <= 1.45e+211) {
		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):
	t_1 = (x / y) / t
	tmp = 0
	if t <= -1.45e-87:
		tmp = t_1
	elif t <= 1.2e-151:
		tmp = x / (y * -z)
	elif t <= 1.65e+91:
		tmp = t_1
	elif t <= 1.45e+211:
		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)
	t_1 = Float64(Float64(x / y) / t)
	tmp = 0.0
	if (t <= -1.45e-87)
		tmp = t_1;
	elseif (t <= 1.2e-151)
		tmp = Float64(x / Float64(y * Float64(-z)));
	elseif (t <= 1.65e+91)
		tmp = t_1;
	elseif (t <= 1.45e+211)
		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)
	t_1 = (x / y) / t;
	tmp = 0.0;
	if (t <= -1.45e-87)
		tmp = t_1;
	elseif (t <= 1.2e-151)
		tmp = x / (y * -z);
	elseif (t <= 1.65e+91)
		tmp = t_1;
	elseif (t <= 1.45e+211)
		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_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[t, -1.45e-87], t$95$1, If[LessEqual[t, 1.2e-151], N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e+91], t$95$1, If[LessEqual[t, 1.45e+211], 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}
t_1 := \frac{\frac{x}{y}}{t}\\
\mathbf{if}\;t \leq -1.45 \cdot 10^{-87}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 1.65 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.45e-87 or 1.2e-151 < t < 1.65000000000000009e91

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x \cdot 1}{y}}}{t} \]
      6. *-rgt-identity50.9%

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

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

    if -1.45e-87 < t < 1.2e-151

    1. Initial program 84.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\frac{x}{y \cdot z}} \]
      2. distribute-neg-frac252.8%

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

        \[\leadsto \frac{x}{-\color{blue}{z \cdot y}} \]
      4. distribute-rgt-neg-out52.8%

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

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

    if 1.65000000000000009e91 < t < 1.45e211

    1. Initial program 66.4%

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

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

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

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

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

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

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

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

    if 1.45e211 < t

    1. Initial program 74.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    9. Simplified73.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{-87}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-151}:\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{+91}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{+211}:\\ \;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]
  5. Add Preprocessing

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

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

\mathbf{elif}\;t \leq 3 \cdot 10^{+177}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 3.9 \cdot 10^{+246}:\\
\;\;\;\;\frac{\frac{x}{-z}}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.2999999999999998e-90 or 4.59999999999999992e-151 < t < 3e177

    1. Initial program 89.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{t - z} \cdot \frac{x}{y - z}} \]
      4. clear-num97.0%

        \[\leadsto \frac{1}{t - z} \cdot \color{blue}{\frac{1}{\frac{y - z}{x}}} \]
      5. un-div-inv97.7%

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

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

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

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

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

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

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

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

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

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

    if -2.2999999999999998e-90 < t < 4.59999999999999992e-151

    1. Initial program 85.8%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{-\color{blue}{z \cdot y}} \]
      4. distribute-rgt-neg-out53.4%

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

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

    if 3e177 < t < 3.9e246

    1. Initial program 70.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.9e246 < t

    1. Initial program 71.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.3 \cdot 10^{-90}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-151}:\\ \;\;\;\;\frac{x}{z \cdot \left(-y\right)}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+177}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{+246}:\\ \;\;\;\;\frac{\frac{x}{-z}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 51.8% accurate, 0.3× speedup?

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

\mathbf{elif}\;t \leq 4.2 \cdot 10^{-153}:\\
\;\;\;\;\frac{t\_1}{y}\\

\mathbf{elif}\;t \leq 3.9 \cdot 10^{+177}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 4.5 \cdot 10^{+246}:\\
\;\;\;\;\frac{t\_1}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -8.99999999999999982e-88 or 4.20000000000000008e-153 < t < 3.8999999999999999e177

    1. Initial program 89.7%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{t - z} \cdot \frac{x}{y - z}} \]
      4. clear-num97.0%

        \[\leadsto \frac{1}{t - z} \cdot \color{blue}{\frac{1}{\frac{y - z}{x}}} \]
      5. un-div-inv97.7%

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

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

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

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

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

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

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

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

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

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

    if -8.99999999999999982e-88 < t < 4.20000000000000008e-153

    1. Initial program 84.8%

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{t - z} \cdot \color{blue}{\frac{1}{\frac{y - z}{x}}} \]
      5. un-div-inv95.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.8999999999999999e177 < t < 4.5e246

    1. Initial program 70.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.5e246 < t

    1. Initial program 71.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{-88}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-153}:\\ \;\;\;\;\frac{\frac{x}{-z}}{y}\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{+177}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{+246}:\\ \;\;\;\;\frac{\frac{x}{-z}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 51.7% accurate, 0.3× speedup?

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

\mathbf{elif}\;t \leq 6.5 \cdot 10^{-151}:\\
\;\;\;\;\frac{t\_1}{y}\\

\mathbf{elif}\;t \leq 3.9 \cdot 10^{+177}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\

\mathbf{elif}\;t \leq 3.9 \cdot 10^{+246}:\\
\;\;\;\;\frac{t\_1}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -9.5e-87

    1. Initial program 87.8%

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

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

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

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

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

    if -9.5e-87 < t < 6.4999999999999994e-151

    1. Initial program 84.8%

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{t - z} \cdot \color{blue}{\frac{1}{\frac{y - z}{x}}} \]
      5. un-div-inv95.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.4999999999999994e-151 < t < 3.8999999999999999e177

    1. Initial program 93.1%

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{t - z} \cdot \color{blue}{\frac{1}{\frac{y - z}{x}}} \]
      5. un-div-inv98.0%

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x \cdot 1}{y}}}{t} \]
      6. *-rgt-identity52.8%

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

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

    if 3.8999999999999999e177 < t < 3.9e246

    1. Initial program 70.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.9e246 < t

    1. Initial program 71.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.5 \cdot 10^{-87}:\\ \;\;\;\;\frac{1}{y} \cdot \frac{x}{t}\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-151}:\\ \;\;\;\;\frac{\frac{x}{-z}}{y}\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{+177}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{+246}:\\ \;\;\;\;\frac{\frac{x}{-z}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 78.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 -2.4 \cdot 10^{-46}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - y}\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-97}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+46}:\\ \;\;\;\;\frac{x}{t - z} \cdot \frac{1}{y}\\ \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 -2.4e-46)
   (/ (/ x z) (- z y))
   (if (<= z -5e-97)
     (/ x (* z (- z t)))
     (if (<= z 6.2e+46) (* (/ x (- t z)) (/ 1.0 y)) (/ (/ 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 <= -2.4e-46) {
		tmp = (x / z) / (z - y);
	} else if (z <= -5e-97) {
		tmp = x / (z * (z - t));
	} else if (z <= 6.2e+46) {
		tmp = (x / (t - z)) * (1.0 / y);
	} 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 <= (-2.4d-46)) then
        tmp = (x / z) / (z - y)
    else if (z <= (-5d-97)) then
        tmp = x / (z * (z - t))
    else if (z <= 6.2d+46) then
        tmp = (x / (t - z)) * (1.0d0 / y)
    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 <= -2.4e-46) {
		tmp = (x / z) / (z - y);
	} else if (z <= -5e-97) {
		tmp = x / (z * (z - t));
	} else if (z <= 6.2e+46) {
		tmp = (x / (t - z)) * (1.0 / y);
	} 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 <= -2.4e-46:
		tmp = (x / z) / (z - y)
	elif z <= -5e-97:
		tmp = x / (z * (z - t))
	elif z <= 6.2e+46:
		tmp = (x / (t - z)) * (1.0 / y)
	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 <= -2.4e-46)
		tmp = Float64(Float64(x / z) / Float64(z - y));
	elseif (z <= -5e-97)
		tmp = Float64(x / Float64(z * Float64(z - t)));
	elseif (z <= 6.2e+46)
		tmp = Float64(Float64(x / Float64(t - z)) * Float64(1.0 / y));
	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 <= -2.4e-46)
		tmp = (x / z) / (z - y);
	elseif (z <= -5e-97)
		tmp = x / (z * (z - t));
	elseif (z <= 6.2e+46)
		tmp = (x / (t - z)) * (1.0 / y);
	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, -2.4e-46], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5e-97], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+46], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / y), $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 -2.4 \cdot 10^{-46}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\

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

\mathbf{elif}\;z \leq 6.2 \cdot 10^{+46}:\\
\;\;\;\;\frac{x}{t - z} \cdot \frac{1}{y}\\

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


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

    1. Initial program 84.5%

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

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

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

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

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

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

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

    if -2.40000000000000013e-46 < z < -4.9999999999999995e-97

    1. Initial program 100.0%

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

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

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

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

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

    if -4.9999999999999995e-97 < z < 6.1999999999999995e46

    1. Initial program 91.2%

      \[\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. associate-/r/91.1%

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{t - z} \cdot \frac{x}{y - z}} \]
      4. clear-num95.5%

        \[\leadsto \frac{1}{t - z} \cdot \color{blue}{\frac{1}{\frac{y - z}{x}}} \]
      5. un-div-inv96.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y}} \]
    10. Step-by-step derivation
      1. div-inv79.4%

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

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

    if 6.1999999999999995e46 < z

    1. Initial program 73.2%

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

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

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

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

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

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

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

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

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

Alternative 8: 78.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 -3.4 \cdot 10^{-47}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - y}\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-97}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{elif}\;z \leq 1.52 \cdot 10^{+47}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \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 -3.4e-47)
   (/ (/ x z) (- z y))
   (if (<= z -5e-97)
     (/ x (* z (- z t)))
     (if (<= z 1.52e+47) (/ (/ x (- t z)) y) (/ (/ 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 <= -3.4e-47) {
		tmp = (x / z) / (z - y);
	} else if (z <= -5e-97) {
		tmp = x / (z * (z - t));
	} else if (z <= 1.52e+47) {
		tmp = (x / (t - z)) / y;
	} 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 <= (-3.4d-47)) then
        tmp = (x / z) / (z - y)
    else if (z <= (-5d-97)) then
        tmp = x / (z * (z - t))
    else if (z <= 1.52d+47) then
        tmp = (x / (t - z)) / y
    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 <= -3.4e-47) {
		tmp = (x / z) / (z - y);
	} else if (z <= -5e-97) {
		tmp = x / (z * (z - t));
	} else if (z <= 1.52e+47) {
		tmp = (x / (t - z)) / y;
	} 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 <= -3.4e-47:
		tmp = (x / z) / (z - y)
	elif z <= -5e-97:
		tmp = x / (z * (z - t))
	elif z <= 1.52e+47:
		tmp = (x / (t - z)) / y
	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 <= -3.4e-47)
		tmp = Float64(Float64(x / z) / Float64(z - y));
	elseif (z <= -5e-97)
		tmp = Float64(x / Float64(z * Float64(z - t)));
	elseif (z <= 1.52e+47)
		tmp = Float64(Float64(x / Float64(t - z)) / y);
	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 <= -3.4e-47)
		tmp = (x / z) / (z - y);
	elseif (z <= -5e-97)
		tmp = x / (z * (z - t));
	elseif (z <= 1.52e+47)
		tmp = (x / (t - z)) / y;
	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, -3.4e-47], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5e-97], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.52e+47], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $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 -3.4 \cdot 10^{-47}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\

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

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

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


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

    1. Initial program 84.5%

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

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

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

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

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

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

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

    if -3.4000000000000002e-47 < z < -4.9999999999999995e-97

    1. Initial program 100.0%

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

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

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

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

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

    if -4.9999999999999995e-97 < z < 1.52e47

    1. Initial program 91.2%

      \[\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. associate-/r/91.1%

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{t - z} \cdot \frac{x}{y - z}} \]
      4. clear-num95.5%

        \[\leadsto \frac{1}{t - z} \cdot \color{blue}{\frac{1}{\frac{y - z}{x}}} \]
      5. un-div-inv96.2%

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

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

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

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

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

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

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

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

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

    if 1.52e47 < z

    1. Initial program 73.2%

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

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

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

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

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

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

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

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

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

Alternative 9: 65.7% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 87.8%

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

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

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

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

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

    if -3.20000000000000006e-86 < t < 1.00000000000000007e-152

    1. Initial program 84.8%

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{t - z} \cdot \color{blue}{\frac{1}{\frac{y - z}{x}}} \]
      5. un-div-inv95.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000007e-152 < t

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

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

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

Alternative 10: 79.0% accurate, 0.5× speedup?

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

\mathbf{elif}\;y \leq 3.2 \cdot 10^{-87}:\\
\;\;\;\;\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 < -8.6000000000000006e-81

    1. Initial program 86.0%

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

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

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

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

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

    if -8.6000000000000006e-81 < y < 3.19999999999999979e-87

    1. Initial program 87.6%

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

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

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

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

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

    if 3.19999999999999979e-87 < y

    1. Initial program 83.7%

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

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

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

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

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

Alternative 11: 81.9% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 85.5%

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

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

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

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

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

    if -4.69999999999999986e-4 < y < 2.2e-63

    1. Initial program 86.9%

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

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

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

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

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

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

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

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

    if 2.2e-63 < y

    1. Initial program 84.5%

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

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

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

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

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

Alternative 12: 51.3% accurate, 0.6× speedup?

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

\mathbf{elif}\;t \leq 1.25 \cdot 10^{-107}:\\
\;\;\;\;\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 t < -1.05e-88

    1. Initial program 87.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{t - z} \cdot \frac{x}{y - z}} \]
      4. clear-num96.5%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x \cdot 1}{y}}}{t} \]
      6. *-rgt-identity50.9%

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

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

    if -1.05e-88 < t < 1.24999999999999993e-107

    1. Initial program 85.5%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{-\color{blue}{z \cdot y}} \]
      4. distribute-rgt-neg-out51.1%

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

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

    if 1.24999999999999993e-107 < t

    1. Initial program 84.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{t - z} \cdot \frac{x}{y - z}} \]
      4. clear-num98.4%

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

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

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

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

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

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

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

Alternative 13: 46.7% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+55} \lor \neg \left(z \leq 6.5 \cdot 10^{+81}\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.4e+55) (not (<= z 6.5e+81))) (/ 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.4e+55) || !(z <= 6.5e+81)) {
		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.4d+55)) .or. (.not. (z <= 6.5d+81))) 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.4e+55) || !(z <= 6.5e+81)) {
		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.4e+55) or not (z <= 6.5e+81):
		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.4e+55) || !(z <= 6.5e+81))
		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.4e+55) || ~((z <= 6.5e+81)))
		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.4e+55], N[Not[LessEqual[z, 6.5e+81]], $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.4 \cdot 10^{+55} \lor \neg \left(z \leq 6.5 \cdot 10^{+81}\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.4e55 or 6.4999999999999996e81 < z

    1. Initial program 76.8%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{t \cdot z}} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt28.5%

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

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

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

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

        \[\leadsto \frac{\color{blue}{x}}{t \cdot z} \]
      6. *-un-lft-identity35.3%

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

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

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

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

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

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

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

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

    if -1.4e55 < z < 6.4999999999999996e81

    1. Initial program 91.1%

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

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

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

Alternative 14: 90.3% accurate, 0.6× speedup?

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

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


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

    1. Initial program 83.2%

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

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

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

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

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

    if -1.7e151 < y

    1. Initial program 86.3%

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

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

Alternative 15: 70.1% accurate, 0.7× speedup?

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

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


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

    1. Initial program 87.1%

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

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

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

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

    if 1.00000000000000004e-89 < t

    1. Initial program 83.1%

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

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

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

Alternative 16: 71.9% accurate, 0.7× speedup?

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

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


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

    1. Initial program 87.1%

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

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

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

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

    if 3.59999999999999981e-90 < t

    1. Initial program 83.1%

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

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

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

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

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

Alternative 17: 72.2% accurate, 0.7× speedup?

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

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


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

    1. Initial program 87.1%

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

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

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

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

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

    if 1.00000000000000004e-89 < t

    1. Initial program 83.1%

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

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

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

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

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

Alternative 18: 73.7% accurate, 0.7× speedup?

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

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


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

    1. Initial program 87.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{t - z} \cdot \frac{x}{y - z}} \]
      4. clear-num96.4%

        \[\leadsto \frac{1}{t - z} \cdot \color{blue}{\frac{1}{\frac{y - z}{x}}} \]
      5. un-div-inv97.0%

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

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

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

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

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

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

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

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

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

    if 3.09999999999999996e-89 < t

    1. Initial program 82.9%

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

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

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

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

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

Alternative 19: 46.3% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+57}:\\ \;\;\;\;\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 (<= z -2.5e+57) (/ 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 <= -2.5e+57) {
		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 <= (-2.5d+57)) 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 <= -2.5e+57) {
		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 <= -2.5e+57:
		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 <= -2.5e+57)
		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 <= -2.5e+57)
		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[z, -2.5e+57], 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 -2.5 \cdot 10^{+57}:\\
\;\;\;\;\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 < -2.49999999999999986e57

    1. Initial program 84.8%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{t \cdot z}} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt34.2%

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

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

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

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

        \[\leadsto \frac{\color{blue}{x}}{t \cdot z} \]
      6. *-un-lft-identity35.7%

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

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

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

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

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

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

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

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

    if -2.49999999999999986e57 < z

    1. Initial program 86.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{t - z} \cdot \frac{x}{y - z}} \]
      4. clear-num96.3%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    9. Simplified45.6%

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

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

Alternative 20: 44.9% accurate, 0.9× speedup?

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

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


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

    1. Initial program 87.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{t - z} \cdot \frac{x}{y - z}} \]
      4. clear-num96.5%

        \[\leadsto \frac{1}{t - z} \cdot \color{blue}{\frac{1}{\frac{y - z}{x}}} \]
      5. un-div-inv97.0%

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x \cdot 1}{y}}}{t} \]
      6. *-rgt-identity39.9%

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

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

    if 2.49999999999999999e-74 < t

    1. Initial program 81.7%

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{t - z} \cdot \color{blue}{\frac{1}{\frac{y - z}{x}}} \]
      5. un-div-inv98.4%

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

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

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

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

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

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

Alternative 21: 97.2% accurate, 1.0× speedup?

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

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

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

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

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

Alternative 22: 39.8% accurate, 1.8× speedup?

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

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

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

    \[\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 2024082 
(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))))