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

Percentage Accurate: 89.3% → 97.1%
Time: 11.0s
Alternatives: 15
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 15 alternatives:

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

Initial Program: 89.3% accurate, 1.0× speedup?

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

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

Alternative 1: 97.1% accurate, 1.0× speedup?

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

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

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

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

Alternative 2: 92.7% accurate, 0.3× speedup?

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

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

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


\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 66.3%

      \[\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}} \]
      3. div-inv99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 1.00000000000000007e294

    1. Initial program 97.9%

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

    if 1.00000000000000007e294 < (*.f64 (-.f64 y z) (-.f64 t z))

    1. Initial program 82.2%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 51.1% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;z \leq 1.45 \cdot 10^{+117} \lor \neg \left(z \leq 1.2 \cdot 10^{+219}\right):\\
\;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\

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


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

    1. Initial program 89.0%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{-z \cdot \left(t - z\right)}} \]
      3. distribute-rgt-neg-in78.2%

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

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

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

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

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

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

        \[\leadsto \frac{x}{z \cdot \left(z + \color{blue}{\left(-t\right)}\right)} \]
      10. unsub-neg78.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.01999999999999995e37 < z < 1.44999999999999994e-126

    1. Initial program 91.1%

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

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

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

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

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

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

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

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

    if 1.44999999999999994e-126 < z < 1.45000000000000014e117 or 1.2e219 < z

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

    if 1.45000000000000014e117 < z < 1.2e219

    1. Initial program 72.0%

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

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

        \[\leadsto \color{blue}{-\frac{x}{z \cdot \left(t - z\right)}} \]
      2. distribute-neg-frac268.3%

        \[\leadsto \color{blue}{\frac{x}{-z \cdot \left(t - z\right)}} \]
      3. distribute-rgt-neg-in68.3%

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

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

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

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

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

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

        \[\leadsto \frac{x}{z \cdot \left(z + \color{blue}{\left(-t\right)}\right)} \]
      10. unsub-neg68.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.02 \cdot 10^{+37}:\\ \;\;\;\;\frac{\frac{x}{z}}{-t}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-126}:\\ \;\;\;\;\frac{1}{t \cdot \frac{y}{x}}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+117} \lor \neg \left(z \leq 1.2 \cdot 10^{+219}\right):\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{-1}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 72.1% 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 \left(z - t\right)}\\ \mathbf{if}\;z \leq -37000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-127}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+27} \lor \neg \left(z \leq 3.5 \cdot 10^{+52}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(-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
 (let* ((t_1 (/ x (* z (- z t)))))
   (if (<= z -37000000000.0)
     t_1
     (if (<= z 7.2e-127)
       (/ x (* (- y z) t))
       (if (or (<= z 1.25e+27) (not (<= z 3.5e+52))) t_1 (/ x (* 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 (z <= -37000000000.0) {
		tmp = t_1;
	} else if (z <= 7.2e-127) {
		tmp = x / ((y - z) * t);
	} else if ((z <= 1.25e+27) || !(z <= 3.5e+52)) {
		tmp = t_1;
	} else {
		tmp = x / (y * -z);
	}
	return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x / (z * (z - t))
    if (z <= (-37000000000.0d0)) then
        tmp = t_1
    else if (z <= 7.2d-127) then
        tmp = x / ((y - z) * t)
    else if ((z <= 1.25d+27) .or. (.not. (z <= 3.5d+52))) then
        tmp = t_1
    else
        tmp = x / (y * -z)
    end if
    code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = x / (z * (z - t));
	double tmp;
	if (z <= -37000000000.0) {
		tmp = t_1;
	} else if (z <= 7.2e-127) {
		tmp = x / ((y - z) * t);
	} else if ((z <= 1.25e+27) || !(z <= 3.5e+52)) {
		tmp = t_1;
	} else {
		tmp = x / (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 z <= -37000000000.0:
		tmp = t_1
	elif z <= 7.2e-127:
		tmp = x / ((y - z) * t)
	elif (z <= 1.25e+27) or not (z <= 3.5e+52):
		tmp = t_1
	else:
		tmp = x / (y * -z)
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	t_1 = Float64(x / Float64(z * Float64(z - t)))
	tmp = 0.0
	if (z <= -37000000000.0)
		tmp = t_1;
	elseif (z <= 7.2e-127)
		tmp = Float64(x / Float64(Float64(y - z) * t));
	elseif ((z <= 1.25e+27) || !(z <= 3.5e+52))
		tmp = t_1;
	else
		tmp = Float64(x / Float64(y * Float64(-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 (z <= -37000000000.0)
		tmp = t_1;
	elseif (z <= 7.2e-127)
		tmp = x / ((y - z) * t);
	elseif ((z <= 1.25e+27) || ~((z <= 3.5e+52)))
		tmp = t_1;
	else
		tmp = x / (y * -z);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -37000000000.0], t$95$1, If[LessEqual[z, 7.2e-127], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 1.25e+27], N[Not[LessEqual[z, 3.5e+52]], $MachinePrecision]], t$95$1, N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{if}\;z \leq -37000000000:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1.25 \cdot 10^{+27} \lor \neg \left(z \leq 3.5 \cdot 10^{+52}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.7e10 or 7.1999999999999999e-127 < z < 1.24999999999999995e27 or 3.5e52 < z

    1. Initial program 88.4%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{-z \cdot \left(t - z\right)}} \]
      3. distribute-rgt-neg-in74.0%

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

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

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

        \[\leadsto \frac{x}{z \cdot \left(\color{blue}{\left(-t\right)} + z\right)} \]
      7. mul-1-neg74.0%

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

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

        \[\leadsto \frac{x}{z \cdot \left(z + \color{blue}{\left(-t\right)}\right)} \]
      10. unsub-neg74.0%

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

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

    if -3.7e10 < z < 7.1999999999999999e-127

    1. Initial program 90.6%

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

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

    if 1.24999999999999995e27 < z < 3.5e52

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -37000000000:\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-127}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+27} \lor \neg \left(z \leq 3.5 \cdot 10^{+52}\right):\\ \;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 49.3% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq 2.9 \cdot 10^{+63}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.8999999999999999e-11 or 1.1499999999999999e-54 < t < 2.8999999999999999e63

    1. Initial program 87.5%

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

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

    if -1.8999999999999999e-11 < t < 1.1499999999999999e-54

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

    if 2.8999999999999999e63 < t

    1. Initial program 87.3%

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

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

        \[\leadsto \color{blue}{-\frac{x}{z \cdot \left(t - z\right)}} \]
      2. distribute-neg-frac261.9%

        \[\leadsto \color{blue}{\frac{x}{-z \cdot \left(t - z\right)}} \]
      3. distribute-rgt-neg-in61.9%

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

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

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

        \[\leadsto \frac{x}{z \cdot \left(\color{blue}{\left(-t\right)} + z\right)} \]
      7. mul-1-neg61.9%

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

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z + -1 \cdot t\right)}} \]
      9. mul-1-neg61.9%

        \[\leadsto \frac{x}{z \cdot \left(z + \color{blue}{\left(-t\right)}\right)} \]
      10. unsub-neg61.9%

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

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

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

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

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

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

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

Alternative 6: 50.8% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq 6.2 \cdot 10^{+63}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.79999999999999992e-11 or 4.3999999999999999e-55 < t < 6.2000000000000001e63

    1. Initial program 87.5%

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

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

    if -1.79999999999999992e-11 < t < 4.3999999999999999e-55

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

    if 6.2000000000000001e63 < t

    1. Initial program 87.3%

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

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

        \[\leadsto \color{blue}{-\frac{x}{z \cdot \left(t - z\right)}} \]
      2. distribute-neg-frac261.9%

        \[\leadsto \color{blue}{\frac{x}{-z \cdot \left(t - z\right)}} \]
      3. distribute-rgt-neg-in61.9%

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

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

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

        \[\leadsto \frac{x}{z \cdot \left(\color{blue}{\left(-t\right)} + z\right)} \]
      7. mul-1-neg61.9%

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

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z + -1 \cdot t\right)}} \]
      9. mul-1-neg61.9%

        \[\leadsto \frac{x}{z \cdot \left(z + \color{blue}{\left(-t\right)}\right)} \]
      10. unsub-neg61.9%

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot \color{blue}{\frac{--1}{-t}}}{z} \]
      3. metadata-eval64.3%

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

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

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

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

Alternative 7: 66.5% accurate, 0.5× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.4e115 or 1.60000000000000006e63 < z

    1. Initial program 83.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      6. associate-/r*70.4%

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

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

    if -1.4e115 < z < 1.60000000000000006e63

    1. Initial program 93.6%

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

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

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

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

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

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


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

    1. Initial program 84.3%

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

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

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

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

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

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

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

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

    if -1.15e-114 < t < 7.5999999999999993e-55

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

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

    if 7.5999999999999993e-55 < t

    1. Initial program 89.2%

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

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

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

Alternative 9: 76.9% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.49999999999999971e29

    1. Initial program 88.8%

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

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

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

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

    if -6.49999999999999971e29 < y < 1.0200000000000001e-157

    1. Initial program 92.6%

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

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

        \[\leadsto \color{blue}{-\frac{x}{z \cdot \left(t - z\right)}} \]
      2. distribute-neg-frac278.3%

        \[\leadsto \color{blue}{\frac{x}{-z \cdot \left(t - z\right)}} \]
      3. distribute-rgt-neg-in78.3%

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

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

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

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

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

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

        \[\leadsto \frac{x}{z \cdot \left(z + \color{blue}{\left(-t\right)}\right)} \]
      10. unsub-neg78.3%

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

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

    if 1.0200000000000001e-157 < y

    1. Initial program 86.4%

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

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

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

Alternative 10: 77.1% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.4999999999999997e57

    1. Initial program 87.7%

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

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

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

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

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

    if -6.4999999999999997e57 < y < 1.9000000000000001e-157

    1. Initial program 93.0%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{-z \cdot \left(t - z\right)}} \]
      3. distribute-rgt-neg-in76.5%

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

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

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

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

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

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

        \[\leadsto \frac{x}{z \cdot \left(z + \color{blue}{\left(-t\right)}\right)} \]
      10. unsub-neg76.5%

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

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

    if 1.9000000000000001e-157 < y

    1. Initial program 86.4%

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

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

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

Alternative 11: 80.2% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.99999999999999944e57

    1. Initial program 87.7%

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

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

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

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

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

    if -9.99999999999999944e57 < y < 2.3500000000000001e-157

    1. Initial program 93.0%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{-z \cdot \left(t - z\right)}} \]
      3. distribute-rgt-neg-in76.5%

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

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

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

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

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

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

        \[\leadsto \frac{x}{z \cdot \left(z + \color{blue}{\left(-t\right)}\right)} \]
      10. unsub-neg76.5%

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

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

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

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

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

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

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

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

    if 2.3500000000000001e-157 < y

    1. Initial program 86.4%

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.20000000000000018e-5 or 3.1999999999999998e-150 < y

    1. Initial program 88.2%

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

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

    if -7.20000000000000018e-5 < y < 3.1999999999999998e-150

    1. Initial program 91.8%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{-z \cdot \left(t - z\right)}} \]
      3. distribute-rgt-neg-in78.2%

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

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

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

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

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

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

        \[\leadsto \frac{x}{z \cdot \left(z + \color{blue}{\left(-t\right)}\right)} \]
      10. unsub-neg78.2%

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

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

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

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

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

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

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

Alternative 13: 45.7% accurate, 0.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.60000000000000032e-36 or 1.05000000000000001e102 < z

    1. Initial program 86.9%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{-z \cdot \left(t - z\right)}} \]
      3. distribute-rgt-neg-in75.2%

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

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

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

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

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

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

        \[\leadsto \frac{x}{z \cdot \left(z + \color{blue}{\left(-t\right)}\right)} \]
      10. unsub-neg75.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.60000000000000032e-36 < z < 1.05000000000000001e102

    1. Initial program 91.9%

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

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

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

Alternative 14: 97.3% 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 89.5%

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

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

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

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

Alternative 15: 39.5% accurate, 1.8× speedup?

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

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

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

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

Developer target: 88.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 2024066 
(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))))