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

Percentage Accurate: 88.6% → 98.4%
Time: 10.1s
Alternatives: 18
Speedup: 0.4×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 88.6% 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: 98.4% accurate, 0.4× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \left(t - z\right)\\ \mathbf{if}\;t_1 \leq -2 \cdot 10^{+212}:\\ \;\;\;\;\frac{\frac{1}{y - z} \cdot x}{t - z}\\ \mathbf{elif}\;t_1 \leq 10^{+137}:\\ \;\;\;\;\frac{x}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\ \end{array} \end{array} \]
NOTE: y 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 -2e+212)
     (/ (* (/ 1.0 (- y z)) x) (- t z))
     (if (<= t_1 1e+137) (/ x t_1) (/ (/ x (- y z)) (- t z))))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (t - z);
	double tmp;
	if (t_1 <= -2e+212) {
		tmp = ((1.0 / (y - z)) * x) / (t - z);
	} else if (t_1 <= 1e+137) {
		tmp = x / t_1;
	} else {
		tmp = (x / (y - z)) / (t - z);
	}
	return tmp;
}
NOTE: y 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 = (y - z) * (t - z)
    if (t_1 <= (-2d+212)) then
        tmp = ((1.0d0 / (y - z)) * x) / (t - z)
    else if (t_1 <= 1d+137) then
        tmp = x / t_1
    else
        tmp = (x / (y - z)) / (t - z)
    end if
    code = tmp
end function
assert y < 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 <= -2e+212) {
		tmp = ((1.0 / (y - z)) * x) / (t - z);
	} else if (t_1 <= 1e+137) {
		tmp = x / t_1;
	} else {
		tmp = (x / (y - z)) / (t - z);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	t_1 = (y - z) * (t - z)
	tmp = 0
	if t_1 <= -2e+212:
		tmp = ((1.0 / (y - z)) * x) / (t - z)
	elif t_1 <= 1e+137:
		tmp = x / t_1
	else:
		tmp = (x / (y - z)) / (t - z)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(y - z) * Float64(t - z))
	tmp = 0.0
	if (t_1 <= -2e+212)
		tmp = Float64(Float64(Float64(1.0 / Float64(y - z)) * x) / Float64(t - z));
	elseif (t_1 <= 1e+137)
		tmp = Float64(x / t_1);
	else
		tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - z));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = (y - z) * (t - z);
	tmp = 0.0;
	if (t_1 <= -2e+212)
		tmp = ((1.0 / (y - z)) * x) / (t - z);
	elseif (t_1 <= 1e+137)
		tmp = x / t_1;
	else
		tmp = (x / (y - z)) / (t - z);
	end
	tmp_2 = tmp;
end
NOTE: y 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, -2e+212], N[(N[(N[(1.0 / N[(y - z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+137], N[(x / t$95$1), $MachinePrecision], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+212}:\\
\;\;\;\;\frac{\frac{1}{y - z} \cdot x}{t - z}\\

\mathbf{elif}\;t_1 \leq 10^{+137}:\\
\;\;\;\;\frac{x}{t_1}\\

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


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

    1. Initial program 76.2%

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

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

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

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

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

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

    if -1.9999999999999998e212 < (*.f64 (-.f64 y z) (-.f64 t z)) < 1e137

    1. Initial program 98.9%

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

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

    1. Initial program 87.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(y - z\right) \cdot \left(t - z\right) \leq -2 \cdot 10^{+212}:\\ \;\;\;\;\frac{\frac{1}{y - z} \cdot x}{t - z}\\ \mathbf{elif}\;\left(y - z\right) \cdot \left(t - z\right) \leq 10^{+137}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\ \end{array} \]

Alternative 2: 92.2% accurate, 0.4× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \left(t - z\right)\\ \mathbf{if}\;t_1 \leq -2 \cdot 10^{+212}:\\ \;\;\;\;\frac{x}{y - z} \cdot \frac{1}{t}\\ \mathbf{elif}\;t_1 \leq 1.1 \cdot 10^{+306}:\\ \;\;\;\;\frac{x}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{z} \cdot \frac{x}{t - z}\\ \end{array} \end{array} \]
NOTE: y 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 -2e+212)
     (* (/ x (- y z)) (/ 1.0 t))
     (if (<= t_1 1.1e+306) (/ x t_1) (* (/ -1.0 z) (/ x (- t z)))))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (t - z);
	double tmp;
	if (t_1 <= -2e+212) {
		tmp = (x / (y - z)) * (1.0 / t);
	} else if (t_1 <= 1.1e+306) {
		tmp = x / t_1;
	} else {
		tmp = (-1.0 / z) * (x / (t - z));
	}
	return tmp;
}
NOTE: y 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 = (y - z) * (t - z)
    if (t_1 <= (-2d+212)) then
        tmp = (x / (y - z)) * (1.0d0 / t)
    else if (t_1 <= 1.1d+306) then
        tmp = x / t_1
    else
        tmp = ((-1.0d0) / z) * (x / (t - z))
    end if
    code = tmp
end function
assert y < 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 <= -2e+212) {
		tmp = (x / (y - z)) * (1.0 / t);
	} else if (t_1 <= 1.1e+306) {
		tmp = x / t_1;
	} else {
		tmp = (-1.0 / z) * (x / (t - z));
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	t_1 = (y - z) * (t - z)
	tmp = 0
	if t_1 <= -2e+212:
		tmp = (x / (y - z)) * (1.0 / t)
	elif t_1 <= 1.1e+306:
		tmp = x / t_1
	else:
		tmp = (-1.0 / z) * (x / (t - z))
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(y - z) * Float64(t - z))
	tmp = 0.0
	if (t_1 <= -2e+212)
		tmp = Float64(Float64(x / Float64(y - z)) * Float64(1.0 / t));
	elseif (t_1 <= 1.1e+306)
		tmp = Float64(x / t_1);
	else
		tmp = Float64(Float64(-1.0 / z) * Float64(x / Float64(t - z)));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = (y - z) * (t - z);
	tmp = 0.0;
	if (t_1 <= -2e+212)
		tmp = (x / (y - z)) * (1.0 / t);
	elseif (t_1 <= 1.1e+306)
		tmp = x / t_1;
	else
		tmp = (-1.0 / z) * (x / (t - z));
	end
	tmp_2 = tmp;
end
NOTE: y 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, -2e+212], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1.1e+306], N[(x / t$95$1), $MachinePrecision], N[(N[(-1.0 / z), $MachinePrecision] * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+212}:\\
\;\;\;\;\frac{x}{y - z} \cdot \frac{1}{t}\\

\mathbf{elif}\;t_1 \leq 1.1 \cdot 10^{+306}:\\
\;\;\;\;\frac{x}{t_1}\\

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


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

    1. Initial program 76.2%

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

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

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

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

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

    if -1.9999999999999998e212 < (*.f64 (-.f64 y z) (-.f64 t z)) < 1.1e306

    1. Initial program 99.1%

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

    if 1.1e306 < (*.f64 (-.f64 y z) (-.f64 t z))

    1. Initial program 80.6%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity80.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(y - z\right) \cdot \left(t - z\right) \leq -2 \cdot 10^{+212}:\\ \;\;\;\;\frac{x}{y - z} \cdot \frac{1}{t}\\ \mathbf{elif}\;\left(y - z\right) \cdot \left(t - z\right) \leq 1.1 \cdot 10^{+306}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{z} \cdot \frac{x}{t - z}\\ \end{array} \]

Alternative 3: 96.0% accurate, 0.4× speedup?

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

\mathbf{elif}\;t_1 \leq 10^{+137}:\\
\;\;\;\;\frac{x}{t_1}\\

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


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

    1. Initial program 76.2%

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

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

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

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

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

    if -1.9999999999999998e212 < (*.f64 (-.f64 y z) (-.f64 t z)) < 1e137

    1. Initial program 98.9%

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

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

    1. Initial program 87.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(y - z\right) \cdot \left(t - z\right) \leq -2 \cdot 10^{+212}:\\ \;\;\;\;\frac{x}{y - z} \cdot \frac{1}{t}\\ \mathbf{elif}\;\left(y - z\right) \cdot \left(t - z\right) \leq 10^{+137}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\ \end{array} \]

Alternative 4: 74.1% accurate, 0.5× speedup?

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

\mathbf{elif}\;z \leq -7.6 \cdot 10^{-134}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.65 \cdot 10^{+71}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.99999999999999997e157

    1. Initial program 89.4%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow289.4%

        \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
    4. Simplified89.4%

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

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

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

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

    if -1.99999999999999997e157 < z < -7.60000000000000006e-134 or 4.0999999999999999e-7 < z < 1.6499999999999999e71

    1. Initial program 93.1%

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

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

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

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

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

    if -7.60000000000000006e-134 < z < 4.0999999999999999e-7

    1. Initial program 97.0%

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

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

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

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

    if 1.6499999999999999e71 < z < 9.19999999999999953e82

    1. Initial program 73.7%

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

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

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

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

    if 9.19999999999999953e82 < z

    1. Initial program 82.5%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity82.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    7. Step-by-step derivation
      1. *-rgt-identity82.4%

        \[\leadsto \frac{\color{blue}{x \cdot 1}}{{z}^{2}} \]
      2. unpow282.4%

        \[\leadsto \frac{x \cdot 1}{\color{blue}{z \cdot z}} \]
      3. times-frac94.4%

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{z}}}{z} \]
    8. Simplified94.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+157}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \mathbf{elif}\;z \leq -7.6 \cdot 10^{-134}:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t}\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{-7}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+71}:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{+82}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 5: 73.4% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.99999999999999997e157

    1. Initial program 89.4%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow289.4%

        \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
    4. Simplified89.4%

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

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

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

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

    if -1.99999999999999997e157 < z < -1.3e-133

    1. Initial program 91.5%

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

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

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

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

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

    if -1.3e-133 < z < 4.99999999999999989e-121

    1. Initial program 96.0%

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

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

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

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

    if 4.99999999999999989e-121 < z < 2.0500000000000001e161

    1. Initial program 95.6%

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

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

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

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

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

    if 2.0500000000000001e161 < z

    1. Initial program 76.8%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity76.8%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    7. Step-by-step derivation
      1. *-rgt-identity76.8%

        \[\leadsto \frac{\color{blue}{x \cdot 1}}{{z}^{2}} \]
      2. unpow276.8%

        \[\leadsto \frac{x \cdot 1}{\color{blue}{z \cdot z}} \]
      3. times-frac96.9%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z} \cdot 1}{z}} \]
      5. *-rgt-identity97.0%

        \[\leadsto \frac{\color{blue}{\frac{x}{z}}}{z} \]
    8. Simplified97.0%

      \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification80.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+157}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{-133}:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-121}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+161}:\\ \;\;\;\;\frac{-x}{z \cdot \left(y - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 6: 73.5% accurate, 0.6× speedup?

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

\mathbf{elif}\;z \leq -4.3 \cdot 10^{-131}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq 9 \cdot 10^{+82}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.5999999999999999e77 or 8.9999999999999993e82 < z

    1. Initial program 84.9%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity84.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    7. Step-by-step derivation
      1. *-rgt-identity82.6%

        \[\leadsto \frac{\color{blue}{x \cdot 1}}{{z}^{2}} \]
      2. unpow282.6%

        \[\leadsto \frac{x \cdot 1}{\color{blue}{z \cdot z}} \]
      3. times-frac91.4%

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{z}}}{z} \]
    8. Simplified91.4%

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

    if -4.5999999999999999e77 < z < -4.30000000000000019e-131 or 3.4999999999999997e-89 < z < 8.9999999999999993e82

    1. Initial program 95.1%

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

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

    if -4.30000000000000019e-131 < z < 3.4999999999999997e-89

    1. Initial program 96.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.6 \cdot 10^{+77}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq -4.3 \cdot 10^{-131}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-89}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+82}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 7: 78.8% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 91.7%

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

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

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

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

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

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

    if -1.42e-13 < z < -1.1199999999999999e-138

    1. Initial program 89.1%

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

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

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

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

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

    if -1.1199999999999999e-138 < z < 1.5999999999999999e-93

    1. Initial program 96.3%

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

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

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

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

    if 1.5999999999999999e-93 < z

    1. Initial program 88.9%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity88.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.42 \cdot 10^{-13}:\\ \;\;\;\;\frac{-\frac{x}{z}}{t - z}\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-138}:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-93}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{z} \cdot \frac{x}{t - z}\\ \end{array} \]

Alternative 8: 78.8% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 91.7%

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

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

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

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

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

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

    if -1.55e-13 < z < -9.5000000000000006e-139

    1. Initial program 89.1%

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

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

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

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

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

    if -9.5000000000000006e-139 < z < 7.20000000000000032e-92

    1. Initial program 96.3%

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

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

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

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

    if 7.20000000000000032e-92 < z

    1. Initial program 88.9%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity88.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{-13}:\\ \;\;\;\;\frac{-\frac{x}{z}}{t - z}\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-139}:\\ \;\;\;\;\frac{x}{y - z} \cdot \frac{1}{t}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-92}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{z} \cdot \frac{x}{t - z}\\ \end{array} \]

Alternative 9: 78.6% accurate, 0.6× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.29999999999999989e-12 or 1.02000000000000005e-92 < z

    1. Initial program 89.9%

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

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

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

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

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

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

    if -2.29999999999999989e-12 < z < -9.000000000000001e-134

    1. Initial program 89.1%

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

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

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

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

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

    if -9.000000000000001e-134 < z < 1.02000000000000005e-92

    1. Initial program 96.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{-12}:\\ \;\;\;\;\frac{-\frac{x}{z}}{t - z}\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-134}:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t}\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{-92}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\frac{x}{z}}{t - z}\\ \end{array} \]

Alternative 10: 72.9% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 88.4%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow288.4%

        \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
    4. Simplified88.4%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
      2. div-inv94.1%

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

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

    if -1.84999999999999996e139 < z < -2.0999999999999999e-134

    1. Initial program 92.3%

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

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

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

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

    if -2.0999999999999999e-134 < z < 9.19999999999999953e82

    1. Initial program 96.7%

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

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

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

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

    if 9.19999999999999953e82 < z

    1. Initial program 82.5%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity82.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    7. Step-by-step derivation
      1. *-rgt-identity82.4%

        \[\leadsto \frac{\color{blue}{x \cdot 1}}{{z}^{2}} \]
      2. unpow282.4%

        \[\leadsto \frac{x \cdot 1}{\color{blue}{z \cdot z}} \]
      3. times-frac94.4%

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{z}}}{z} \]
    8. Simplified94.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+139}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-134}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{+82}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 11: 66.2% accurate, 0.7× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.0000000000000001e-15 or 8.9999999999999993e82 < z

    1. Initial program 87.2%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity87.2%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    7. Step-by-step derivation
      1. *-rgt-identity75.8%

        \[\leadsto \frac{\color{blue}{x \cdot 1}}{{z}^{2}} \]
      2. unpow275.8%

        \[\leadsto \frac{x \cdot 1}{\color{blue}{z \cdot z}} \]
      3. times-frac83.1%

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{z}}}{z} \]
    8. Simplified83.1%

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

    if -7.0000000000000001e-15 < z < 8.99999999999999994e-98

    1. Initial program 94.4%

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

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

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

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

    if 8.99999999999999994e-98 < z < 8.9999999999999993e82

    1. Initial program 97.7%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity97.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{-15}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-98}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+82}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 12: 65.7% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq 9 \cdot 10^{+82}:\\
\;\;\;\;\frac{-x}{y \cdot z}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.3e-11 or 8.9999999999999993e82 < z

    1. Initial program 87.2%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity87.2%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    7. Step-by-step derivation
      1. *-rgt-identity75.8%

        \[\leadsto \frac{\color{blue}{x \cdot 1}}{{z}^{2}} \]
      2. unpow275.8%

        \[\leadsto \frac{x \cdot 1}{\color{blue}{z \cdot z}} \]
      3. times-frac83.1%

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{z}}}{z} \]
    8. Simplified83.1%

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

    if -1.3e-11 < z < 4.99999999999999989e-121

    1. Initial program 94.2%

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

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

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

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

    if 4.99999999999999989e-121 < z < 8.9999999999999993e82

    1. Initial program 97.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{-11}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-121}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+82}:\\ \;\;\;\;\frac{-x}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 13: 73.2% accurate, 0.8× speedup?

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

\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.15000000000000002e80 or 8.9999999999999993e82 < z

    1. Initial program 84.9%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity84.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    7. Step-by-step derivation
      1. *-rgt-identity82.6%

        \[\leadsto \frac{\color{blue}{x \cdot 1}}{{z}^{2}} \]
      2. unpow282.6%

        \[\leadsto \frac{x \cdot 1}{\color{blue}{z \cdot z}} \]
      3. times-frac91.4%

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{z}}}{z} \]
    8. Simplified91.4%

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

    if -1.15000000000000002e80 < z < 8.9999999999999993e82

    1. Initial program 95.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+80} \lor \neg \left(z \leq 9 \cdot 10^{+82}\right):\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \]

Alternative 14: 46.1% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.59999999999999981e121 or 4.3000000000000001e67 < z

    1. Initial program 83.6%

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

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

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

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

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

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

        \[\leadsto \frac{-x}{\color{blue}{z \cdot y}} \]
    7. Simplified42.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.59999999999999981e121 < z < 4.3000000000000001e67

    1. Initial program 96.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+121} \lor \neg \left(z \leq 4.3 \cdot 10^{+67}\right):\\ \;\;\;\;\frac{x}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \end{array} \]

Alternative 15: 61.0% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.00000000000000006e-17 or 3.3e-95 < z

    1. Initial program 90.0%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow263.3%

        \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
    4. Simplified63.3%

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

    if -3.00000000000000006e-17 < z < 3.3e-95

    1. Initial program 94.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{-17} \lor \neg \left(z \leq 3.3 \cdot 10^{-95}\right):\\ \;\;\;\;\frac{x}{z \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \end{array} \]

Alternative 16: 62.2% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.01999999999999994e-11 or 3.3e-95 < z

    1. Initial program 90.0%

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    3. Step-by-step derivation
      1. unpow263.3%

        \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
    4. Simplified63.3%

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

    if -1.01999999999999994e-11 < z < 3.3e-95

    1. Initial program 94.5%

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    4. Simplified69.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.02 \cdot 10^{-11} \lor \neg \left(z \leq 3.3 \cdot 10^{-95}\right):\\ \;\;\;\;\frac{x}{z \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]

Alternative 17: 66.0% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.59999999999999958e-13 or 3.3e-95 < z

    1. Initial program 90.0%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. *-un-lft-identity90.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    7. Step-by-step derivation
      1. *-rgt-identity63.3%

        \[\leadsto \frac{\color{blue}{x \cdot 1}}{{z}^{2}} \]
      2. unpow263.3%

        \[\leadsto \frac{x \cdot 1}{\color{blue}{z \cdot z}} \]
      3. times-frac68.7%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z} \cdot 1}{z}} \]
      5. *-rgt-identity68.7%

        \[\leadsto \frac{\color{blue}{\frac{x}{z}}}{z} \]
    8. Simplified68.7%

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

    if -4.59999999999999958e-13 < z < 3.3e-95

    1. Initial program 94.5%

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    4. Simplified69.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.6 \cdot 10^{-13} \lor \neg \left(z \leq 3.3 \cdot 10^{-95}\right):\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]

Alternative 18: 39.1% accurate, 1.8× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \frac{x}{y \cdot t} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t) :precision binary64 (/ x (* y t)))
assert(y < t);
double code(double x, double y, double z, double t) {
	return x / (y * t);
}
NOTE: y 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 y < t;
public static double code(double x, double y, double z, double t) {
	return x / (y * t);
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	return x / (y * t)
y, t = sort([y, t])
function code(x, y, z, t)
	return Float64(x / Float64(y * t))
end
y, t = num2cell(sort([y, t])){:}
function tmp = code(x, y, z, t)
	tmp = x / (y * t);
end
NOTE: y 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}
[y, t] = \mathsf{sort}([y, t])\\
\\
\frac{x}{y \cdot t}
\end{array}
Derivation
  1. Initial program 91.9%

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

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

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

Developer target: 87.4% 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 2023271 
(FPCore (x y z t)
  :name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
  :precision binary64

  :herbie-target
  (if (< (/ x (* (- y z) (- t z))) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 (* (- y z) (- t z)))))

  (/ x (* (- y z) (- t z))))