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

Percentage Accurate: 88.5% → 96.9%
Time: 13.1s
Alternatives: 20
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 20 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}{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 82.4%

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

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

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

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

Alternative 2: 50.5% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t \leq 1.6 \cdot 10^{-8}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\

\mathbf{elif}\;t \leq 3.35 \cdot 10^{+270} \lor \neg \left(t \leq 4.1 \cdot 10^{+304}\right):\\
\;\;\;\;\frac{\frac{x}{t}}{-z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.09999999999999994e-168 or 3.35e270 < t < 4.09999999999999985e304

    1. Initial program 84.8%

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{t} \cdot \frac{1}{y}} \]
    6. Step-by-step derivation
      1. un-div-inv56.2%

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

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

    if -2.09999999999999994e-168 < t < 2.14999999999999989e-156

    1. Initial program 90.3%

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

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

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

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

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

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

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

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

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

    if 2.14999999999999989e-156 < t < 1.6000000000000001e-8

    1. Initial program 78.6%

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

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

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

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

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

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

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

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

    if 1.6000000000000001e-8 < t < 3.35e270 or 4.09999999999999985e304 < t

    1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{-168}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{-156}:\\ \;\;\;\;\frac{-x}{z \cdot y}\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-8}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;t \leq 3.35 \cdot 10^{+270} \lor \neg \left(t \leq 4.1 \cdot 10^{+304}\right):\\ \;\;\;\;\frac{\frac{x}{t}}{-z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 53.9% accurate, 0.3× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -6 \cdot 10^{-168}:\\ \;\;\;\;\frac{x}{t} \cdot \frac{1}{y}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-160}:\\ \;\;\;\;\frac{-x}{z \cdot y}\\ \mathbf{elif}\;t \leq 9.8 \cdot 10^{+125}:\\ \;\;\;\;\frac{x}{t \cdot \left(z + y\right)}\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{+270} \lor \neg \left(t \leq 1.85 \cdot 10^{+301}\right):\\ \;\;\;\;\frac{\frac{x}{t}}{-z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (<= t -6e-168)
   (* (/ x t) (/ 1.0 y))
   (if (<= t 1.2e-160)
     (/ (- x) (* z y))
     (if (<= t 9.8e+125)
       (/ x (* t (+ z y)))
       (if (or (<= t 1.95e+270) (not (<= t 1.85e+301)))
         (/ (/ x t) (- 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 <= -6e-168) {
		tmp = (x / t) * (1.0 / y);
	} else if (t <= 1.2e-160) {
		tmp = -x / (z * y);
	} else if (t <= 9.8e+125) {
		tmp = x / (t * (z + y));
	} else if ((t <= 1.95e+270) || !(t <= 1.85e+301)) {
		tmp = (x / t) / -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 <= (-6d-168)) then
        tmp = (x / t) * (1.0d0 / y)
    else if (t <= 1.2d-160) then
        tmp = -x / (z * y)
    else if (t <= 9.8d+125) then
        tmp = x / (t * (z + y))
    else if ((t <= 1.95d+270) .or. (.not. (t <= 1.85d+301))) then
        tmp = (x / t) / -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 <= -6e-168) {
		tmp = (x / t) * (1.0 / y);
	} else if (t <= 1.2e-160) {
		tmp = -x / (z * y);
	} else if (t <= 9.8e+125) {
		tmp = x / (t * (z + y));
	} else if ((t <= 1.95e+270) || !(t <= 1.85e+301)) {
		tmp = (x / t) / -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 <= -6e-168:
		tmp = (x / t) * (1.0 / y)
	elif t <= 1.2e-160:
		tmp = -x / (z * y)
	elif t <= 9.8e+125:
		tmp = x / (t * (z + y))
	elif (t <= 1.95e+270) or not (t <= 1.85e+301):
		tmp = (x / t) / -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 <= -6e-168)
		tmp = Float64(Float64(x / t) * Float64(1.0 / y));
	elseif (t <= 1.2e-160)
		tmp = Float64(Float64(-x) / Float64(z * y));
	elseif (t <= 9.8e+125)
		tmp = Float64(x / Float64(t * Float64(z + y)));
	elseif ((t <= 1.95e+270) || !(t <= 1.85e+301))
		tmp = Float64(Float64(x / t) / 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 <= -6e-168)
		tmp = (x / t) * (1.0 / y);
	elseif (t <= 1.2e-160)
		tmp = -x / (z * y);
	elseif (t <= 9.8e+125)
		tmp = x / (t * (z + y));
	elseif ((t <= 1.95e+270) || ~((t <= 1.85e+301)))
		tmp = (x / t) / -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, -6e-168], N[(N[(x / t), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e-160], N[((-x) / N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.8e+125], N[(x / N[(t * N[(z + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 1.95e+270], N[Not[LessEqual[t, 1.85e+301]], $MachinePrecision]], N[(N[(x / t), $MachinePrecision] / (-z)), $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 -6 \cdot 10^{-168}:\\
\;\;\;\;\frac{x}{t} \cdot \frac{1}{y}\\

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

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

\mathbf{elif}\;t \leq 1.95 \cdot 10^{+270} \lor \neg \left(t \leq 1.85 \cdot 10^{+301}\right):\\
\;\;\;\;\frac{\frac{x}{t}}{-z}\\

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


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

    1. Initial program 84.4%

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

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

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

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

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

    if -5.99999999999999983e-168 < t < 1.19999999999999995e-160

    1. Initial program 90.3%

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

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

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

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

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

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

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

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

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

    if 1.19999999999999995e-160 < t < 9.80000000000000032e125

    1. Initial program 80.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 inf 57.0%

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

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

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

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

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

        \[\leadsto x \cdot \frac{\frac{1}{t}}{y + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}} \]
      6. sqr-neg57.9%

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

        \[\leadsto x \cdot \frac{\frac{1}{t}}{y + \color{blue}{\sqrt{z} \cdot \sqrt{z}}} \]
      8. add-sqr-sqrt46.2%

        \[\leadsto x \cdot \frac{\frac{1}{t}}{y + \color{blue}{z}} \]
    7. Applied egg-rr46.2%

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

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

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

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

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

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

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

    if 9.80000000000000032e125 < t < 1.95e270 or 1.85e301 < t

    1. Initial program 60.7%

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

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

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

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

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

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

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

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

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

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

    if 1.95e270 < t < 1.85e301

    1. Initial program 89.4%

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{t} \cdot \frac{1}{y}} \]
    6. Step-by-step derivation
      1. un-div-inv99.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6 \cdot 10^{-168}:\\ \;\;\;\;\frac{x}{t} \cdot \frac{1}{y}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-160}:\\ \;\;\;\;\frac{-x}{z \cdot y}\\ \mathbf{elif}\;t \leq 9.8 \cdot 10^{+125}:\\ \;\;\;\;\frac{x}{t \cdot \left(z + y\right)}\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{+270} \lor \neg \left(t \leq 1.85 \cdot 10^{+301}\right):\\ \;\;\;\;\frac{\frac{x}{t}}{-z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 93.4% accurate, 0.3× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \left(t - z\right) \cdot \left(y - z\right)\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\frac{x}{y - z} \cdot \frac{1}{t}\\ \mathbf{elif}\;t\_1 \leq 10^{+297}:\\ \;\;\;\;\frac{x}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t - z} \cdot \frac{-1}{z}\\ \end{array} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (- t z) (- y z))))
   (if (<= t_1 (- INFINITY))
     (* (/ x (- y z)) (/ 1.0 t))
     (if (<= t_1 1e+297) (/ x t_1) (* (/ x (- t z)) (/ -1.0 z))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double t_1 = (t - z) * (y - z);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = (x / (y - z)) * (1.0 / t);
	} else if (t_1 <= 1e+297) {
		tmp = x / t_1;
	} else {
		tmp = (x / (t - z)) * (-1.0 / z);
	}
	return tmp;
}
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = (t - z) * (y - z);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = (x / (y - z)) * (1.0 / t);
	} else if (t_1 <= 1e+297) {
		tmp = x / t_1;
	} else {
		tmp = (x / (t - z)) * (-1.0 / z);
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	t_1 = (t - z) * (y - z)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = (x / (y - z)) * (1.0 / t)
	elif t_1 <= 1e+297:
		tmp = x / t_1
	else:
		tmp = (x / (t - z)) * (-1.0 / z)
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(t - z) * Float64(y - z))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(Float64(x / Float64(y - z)) * Float64(1.0 / t));
	elseif (t_1 <= 1e+297)
		tmp = Float64(x / t_1);
	else
		tmp = Float64(Float64(x / Float64(t - z)) * Float64(-1.0 / z));
	end
	return tmp
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = (t - z) * (y - z);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = (x / (y - z)) * (1.0 / t);
	elseif (t_1 <= 1e+297)
		tmp = x / t_1;
	else
		tmp = (x / (t - z)) * (-1.0 / z);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t - z), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+297], N[(x / t$95$1), $MachinePrecision], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \left(t - z\right) \cdot \left(y - z\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{x}{y - z} \cdot \frac{1}{t}\\

\mathbf{elif}\;t\_1 \leq 10^{+297}:\\
\;\;\;\;\frac{x}{t\_1}\\

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


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

    1. Initial program 55.8%

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

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

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

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

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

    if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 1e297

    1. Initial program 99.7%

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

    if 1e297 < (*.f64 (-.f64 y z) (-.f64 t z))

    1. Initial program 63.6%

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

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

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

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.4e9 or 7.7999999999999997e-8 < z

    1. Initial program 72.9%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-1 \cdot x}}{t \cdot z} \]
      2. times-frac40.7%

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

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

    if -4.4e9 < z < -1.05000000000000009e-40

    1. Initial program 71.7%

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

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

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

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

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

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

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

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

    if -1.05000000000000009e-40 < z < -1.34e-79

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

    if -1.34e-79 < z < 7.7999999999999997e-8

    1. Initial program 94.7%

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{t} \cdot \frac{1}{y}} \]
    6. Step-by-step derivation
      1. un-div-inv67.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4400000000:\\ \;\;\;\;\frac{x}{z} \cdot \frac{-1}{t}\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-40}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;z \leq -1.34 \cdot 10^{-79}:\\ \;\;\;\;\frac{\frac{x}{t}}{-z}\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{-8}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{-1}{t}\\ \end{array} \]
  5. Add Preprocessing

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

\mathbf{elif}\;z \leq -7.5 \cdot 10^{-38}:\\
\;\;\;\;\frac{1}{t} \cdot \frac{x}{y}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -9e8 or 2.76e-5 < z

    1. Initial program 72.9%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-1 \cdot x}}{t \cdot z} \]
      2. times-frac40.7%

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

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

    if -9e8 < z < -7.5e-38

    1. Initial program 71.7%

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

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

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

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

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

    if -7.5e-38 < z < -1.2000000000000001e-75

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

    if -1.2000000000000001e-75 < z < 2.76e-5

    1. Initial program 94.7%

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{t} \cdot \frac{1}{y}} \]
    6. Step-by-step derivation
      1. un-div-inv67.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -900000000:\\ \;\;\;\;\frac{x}{z} \cdot \frac{-1}{t}\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-38}:\\ \;\;\;\;\frac{1}{t} \cdot \frac{x}{y}\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-75}:\\ \;\;\;\;\frac{\frac{x}{t}}{-z}\\ \mathbf{elif}\;z \leq 2.76 \cdot 10^{-5}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{-1}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 81.7% accurate, 0.3× speedup?

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

\mathbf{elif}\;y \leq -5000:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 2.8 \cdot 10^{-235}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 77.6%

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

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

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

    if -8.8e14 < y < -5e3 or -1.0200000000000001e-16 < y < 2.79999999999999995e-235

    1. Initial program 81.2%

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

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

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

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

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

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

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

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

    if -5e3 < y < -1.0200000000000001e-16

    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 inf 81.3%

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

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

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

    if 2.79999999999999995e-235 < y

    1. Initial program 84.7%

      \[\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. Taylor expanded in t around inf 52.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.8 \cdot 10^{+14}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -5000:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{elif}\;y \leq -1.02 \cdot 10^{-16}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{-235}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]
  5. Add Preprocessing

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -5.99999999999999983e-168 or 2.09999999999999995e192 < t

    1. Initial program 79.9%

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{t} \cdot \frac{1}{y}} \]
    6. Step-by-step derivation
      1. un-div-inv56.7%

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

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

    if -5.99999999999999983e-168 < t < 6e-157

    1. Initial program 90.3%

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

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

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

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

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

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

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

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

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

    if 6e-157 < t < 2.39999999999999998e-8

    1. Initial program 78.6%

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

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

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

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

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

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

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

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

    if 2.39999999999999998e-8 < t < 2.09999999999999995e192

    1. Initial program 80.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6 \cdot 10^{-168}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-157}:\\ \;\;\;\;\frac{-x}{z \cdot y}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-8}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{+192}:\\ \;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 75.4% accurate, 0.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.79999999999999965e31 or 2.4000000000000001e39 < z

    1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{y + \color{blue}{\sqrt{z} \cdot \sqrt{z}}}{x} \cdot \left(t - z\right)} \]
      12. add-sqr-sqrt68.6%

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

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

        \[\leadsto \frac{1}{\frac{y + z}{x} \cdot \left(t + \color{blue}{\sqrt{-z} \cdot \sqrt{-z}}\right)} \]
      15. sqrt-unprod67.9%

        \[\leadsto \frac{1}{\frac{y + z}{x} \cdot \left(t + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right)} \]
      16. sqr-neg67.9%

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

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

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

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

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

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

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

    if -4.79999999999999965e31 < z < 1.95000000000000003e-57

    1. Initial program 91.5%

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

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

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

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

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

    if 1.95000000000000003e-57 < z < 2.4000000000000001e39

    1. Initial program 99.7%

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

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

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

Alternative 10: 76.8% accurate, 0.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.5999999999999999e31 or 3.0000000000000001e137 < z

    1. Initial program 70.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{y + z}{x} \cdot \left(t + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right)} \]
      16. sqr-neg67.8%

        \[\leadsto \frac{1}{\frac{y + z}{x} \cdot \left(t + \sqrt{\color{blue}{z \cdot z}}\right)} \]
      17. sqrt-unprod37.1%

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

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

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

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

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

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

    if -4.5999999999999999e31 < z < 1.69999999999999987e-7

    1. Initial program 92.4%

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

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

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

    if 1.69999999999999987e-7 < z < 3.0000000000000001e137

    1. Initial program 82.1%

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

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

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

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

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

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

Alternative 11: 82.2% accurate, 0.5× speedup?

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

\mathbf{elif}\;t \leq 1.1 \cdot 10^{-16}:\\
\;\;\;\;\frac{x}{y - z} \cdot \frac{-1}{z}\\

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


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

    1. Initial program 85.2%

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

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

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

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

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

    if -2e-204 < t < 1.1e-16

    1. Initial program 85.7%

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

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

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

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

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

    if 1.1e-16 < t

    1. Initial program 73.1%

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

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

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

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

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

Alternative 12: 64.0% 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.4 \cdot 10^{-186}:\\ \;\;\;\;\frac{x}{t} \cdot \frac{1}{y}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-161}:\\ \;\;\;\;\frac{-x}{z \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - 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 (<= t -3.4e-186)
   (* (/ x t) (/ 1.0 y))
   (if (<= t 5.5e-161) (/ (- x) (* 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.4e-186) {
		tmp = (x / t) * (1.0 / y);
	} else if (t <= 5.5e-161) {
		tmp = -x / (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.4d-186)) then
        tmp = (x / t) * (1.0d0 / y)
    else if (t <= 5.5d-161) then
        tmp = -x / (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.4e-186) {
		tmp = (x / t) * (1.0 / y);
	} else if (t <= 5.5e-161) {
		tmp = -x / (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.4e-186:
		tmp = (x / t) * (1.0 / y)
	elif t <= 5.5e-161:
		tmp = -x / (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.4e-186)
		tmp = Float64(Float64(x / t) * Float64(1.0 / y));
	elseif (t <= 5.5e-161)
		tmp = Float64(Float64(-x) / Float64(z * y));
	else
		tmp = Float64(x / Float64(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.4e-186)
		tmp = (x / t) * (1.0 / y);
	elseif (t <= 5.5e-161)
		tmp = -x / (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.4e-186], N[(N[(x / t), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e-161], N[((-x) / N[(z * y), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.4 \cdot 10^{-186}:\\
\;\;\;\;\frac{x}{t} \cdot \frac{1}{y}\\

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

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


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

    1. Initial program 85.1%

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

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

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

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

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

    if -3.3999999999999999e-186 < t < 5.5e-161

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

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

    if 5.5e-161 < t

    1. Initial program 74.5%

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

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

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

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

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

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


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

    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/96.5%

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

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

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

    if -2.9999999999999999e-235 < t < 1.2999999999999999e-16

    1. Initial program 84.8%

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

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

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

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

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

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

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

    if 1.2999999999999999e-16 < t

    1. Initial program 73.1%

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

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

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

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

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

Alternative 14: 51.7% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 78.3%

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

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

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

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

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

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

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

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

    if -4.4999999999999998e-54 < y < 100

    1. Initial program 85.6%

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

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

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

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

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

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

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

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

    if 100 < y

    1. Initial program 81.9%

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{t} \cdot \frac{1}{y}} \]
    6. Step-by-step derivation
      1. un-div-inv45.1%

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

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

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

Alternative 15: 46.1% accurate, 0.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.5999999999999999e31 or 1.7e7 < z

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.5999999999999999e31 < z < 1.7e7

    1. Initial program 92.6%

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

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

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

Alternative 16: 48.4% accurate, 0.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.20000000000000003e79 or 1.90000000000000012e162 < z

    1. Initial program 69.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 36.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.20000000000000003e79 < z < 1.90000000000000012e162

    1. Initial program 89.0%

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{t} \cdot \frac{1}{y}} \]
    6. Step-by-step derivation
      1. un-div-inv54.3%

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

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

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

Alternative 17: 70.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^{-55}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - 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 (<= t 3.1e-55) (/ 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-55) {
		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-55) 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-55) {
		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-55:
		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-55)
		tmp = Float64(x / Float64(Float64(t - z) * y));
	else
		tmp = Float64(x / Float64(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-55)
		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-55], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * N[(y - z), $MachinePrecision]), $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^{-55}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\

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


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

    1. Initial program 85.1%

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

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

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

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

    if 3.09999999999999997e-55 < t

    1. Initial program 74.7%

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

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

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

Alternative 18: 72.1% accurate, 0.7× speedup?

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

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


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

    1. Initial program 85.1%

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

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

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

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

    if 1.45e-55 < t

    1. Initial program 74.7%

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

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

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

Alternative 19: 72.7% accurate, 0.7× speedup?

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

    1. Initial program 85.1%

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

      \[\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 inf 63.2%

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

    if 2.9499999999999999e-55 < t

    1. Initial program 74.7%

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

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

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

Alternative 20: 39.8% accurate, 1.8× speedup?

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

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

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

    \[\leadsto \frac{x}{t \cdot y} \]
  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 2024071 
(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))))