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

Percentage Accurate: 89.6% → 96.8%
Time: 9.7s
Alternatives: 15
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 89.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: 96.8% accurate, 1.0× speedup?

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

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

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

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

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

Alternative 2: 72.9% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq 2.3 \cdot 10^{-83}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.35000000000000003e-260 or 6.5000000000000005e-271 < t < 2.2999999999999999e-83

    1. Initial program 89.1%

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

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

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

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

    if -1.35000000000000003e-260 < t < 6.5000000000000005e-271

    1. Initial program 84.6%

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
    4. Simplified67.2%

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

    if 2.2999999999999999e-83 < t < 4.6000000000000003e185

    1. Initial program 92.6%

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

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

    if 4.6000000000000003e185 < t

    1. Initial program 75.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.35 \cdot 10^{-260}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-271}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-83}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+185}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]

Alternative 3: 73.4% 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 -5.4 \cdot 10^{+41}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-171}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+69}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \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 -5.4e+41)
     t_1
     (if (<= z -4.2e-171)
       (/ x (* t (- y z)))
       (if (<= z 2e+69) (/ x (* (- t z) y)) 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 <= -5.4e+41) {
		tmp = t_1;
	} else if (z <= -4.2e-171) {
		tmp = x / (t * (y - z));
	} else if (z <= 2e+69) {
		tmp = x / ((t - z) * y);
	} 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 <= (-5.4d+41)) then
        tmp = t_1
    else if (z <= (-4.2d-171)) then
        tmp = x / (t * (y - z))
    else if (z <= 2d+69) then
        tmp = x / ((t - z) * y)
    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 <= -5.4e+41) {
		tmp = t_1;
	} else if (z <= -4.2e-171) {
		tmp = x / (t * (y - z));
	} else if (z <= 2e+69) {
		tmp = x / ((t - z) * y);
	} 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 <= -5.4e+41:
		tmp = t_1
	elif z <= -4.2e-171:
		tmp = x / (t * (y - z))
	elif z <= 2e+69:
		tmp = x / ((t - z) * y)
	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 <= -5.4e+41)
		tmp = t_1;
	elseif (z <= -4.2e-171)
		tmp = Float64(x / Float64(t * Float64(y - z)));
	elseif (z <= 2e+69)
		tmp = Float64(x / Float64(Float64(t - z) * y));
	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 <= -5.4e+41)
		tmp = t_1;
	elseif (z <= -4.2e-171)
		tmp = x / (t * (y - z));
	elseif (z <= 2e+69)
		tmp = x / ((t - z) * y);
	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, -5.4e+41], t$95$1, If[LessEqual[z, -4.2e-171], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+69], N[(x / N[(N[(t - z), $MachinePrecision] * y), $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 -5.4 \cdot 10^{+41}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.39999999999999999e41 or 2.0000000000000001e69 < z

    1. Initial program 76.3%

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

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

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

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

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

    if -5.39999999999999999e41 < z < -4.2e-171

    1. Initial program 91.4%

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

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

    if -4.2e-171 < z < 2.0000000000000001e69

    1. Initial program 96.2%

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

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

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

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

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

Alternative 4: 80.1% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.69999999999999995e-135

    1. Initial program 91.6%

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

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

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

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

    if -1.69999999999999995e-135 < t < 1.2500000000000001e-23

    1. Initial program 85.3%

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

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

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

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

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

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

    if 1.2500000000000001e-23 < t < 4.79999999999999978e185

    1. Initial program 94.6%

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

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

    if 4.79999999999999978e185 < t

    1. Initial program 75.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{-135}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-23}:\\ \;\;\;\;\frac{-x}{z \cdot \left(y - z\right)}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{+185}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]

Alternative 5: 82.2% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.25e-132

    1. Initial program 91.6%

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

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

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

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

    if -1.25e-132 < t < 3.2999999999999998e-26

    1. Initial program 85.3%

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

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

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

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

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

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

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

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

    if 3.2999999999999998e-26 < t < 5.4999999999999996e185

    1. Initial program 94.6%

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

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

    if 5.4999999999999996e185 < t

    1. Initial program 75.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.25 \cdot 10^{-132}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-26}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y - z}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+185}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]

Alternative 6: 93.7% accurate, 0.7× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+122} \lor \neg \left(z \leq 1.1 \cdot 10^{+128}\right):\\ \;\;\;\;\frac{\frac{-x}{z}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot \left(y - z\right)}\\ \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 -2.2e+122) (not (<= z 1.1e+128)))
   (/ (/ (- x) z) (- t z))
   (/ x (* (- t z) (- y z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -2.2e+122) || !(z <= 1.1e+128)) {
		tmp = (-x / z) / (t - z);
	} else {
		tmp = x / ((t - z) * (y - 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 <= (-2.2d+122)) .or. (.not. (z <= 1.1d+128))) then
        tmp = (-x / z) / (t - z)
    else
        tmp = x / ((t - z) * (y - 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 <= -2.2e+122) || !(z <= 1.1e+128)) {
		tmp = (-x / z) / (t - z);
	} else {
		tmp = x / ((t - z) * (y - z));
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if (z <= -2.2e+122) or not (z <= 1.1e+128):
		tmp = (-x / z) / (t - z)
	else:
		tmp = x / ((t - z) * (y - z))
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -2.2e+122) || !(z <= 1.1e+128))
		tmp = Float64(Float64(Float64(-x) / z) / Float64(t - z));
	else
		tmp = Float64(x / Float64(Float64(t - z) * Float64(y - z)));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -2.2e+122) || ~((z <= 1.1e+128)))
		tmp = (-x / z) / (t - z);
	else
		tmp = x / ((t - z) * (y - 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[Or[LessEqual[z, -2.2e+122], N[Not[LessEqual[z, 1.1e+128]], $MachinePrecision]], N[(N[((-x) / z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(t - z), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+122} \lor \neg \left(z \leq 1.1 \cdot 10^{+128}\right):\\
\;\;\;\;\frac{\frac{-x}{z}}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.1999999999999999e122 or 1.10000000000000008e128 < z

    1. Initial program 72.5%

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

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

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

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

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

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

    if -2.1999999999999999e122 < z < 1.10000000000000008e128

    1. Initial program 93.3%

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

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

Alternative 7: 65.4% 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.42 \cdot 10^{+54}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-17}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+68}:\\ \;\;\;\;\frac{-x}{z \cdot y}\\ \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.42e+54)
     t_1
     (if (<= z 6.8e-17)
       (/ (/ x t) y)
       (if (<= z 1.5e+68) (/ (- x) (* z y)) 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.42e+54) {
		tmp = t_1;
	} else if (z <= 6.8e-17) {
		tmp = (x / t) / y;
	} else if (z <= 1.5e+68) {
		tmp = -x / (z * y);
	} 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.42d+54)) then
        tmp = t_1
    else if (z <= 6.8d-17) then
        tmp = (x / t) / y
    else if (z <= 1.5d+68) then
        tmp = -x / (z * y)
    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.42e+54) {
		tmp = t_1;
	} else if (z <= 6.8e-17) {
		tmp = (x / t) / y;
	} else if (z <= 1.5e+68) {
		tmp = -x / (z * y);
	} 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.42e+54:
		tmp = t_1
	elif z <= 6.8e-17:
		tmp = (x / t) / y
	elif z <= 1.5e+68:
		tmp = -x / (z * y)
	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.42e+54)
		tmp = t_1;
	elseif (z <= 6.8e-17)
		tmp = Float64(Float64(x / t) / y);
	elseif (z <= 1.5e+68)
		tmp = Float64(Float64(-x) / Float64(z * y));
	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.42e+54)
		tmp = t_1;
	elseif (z <= 6.8e-17)
		tmp = (x / t) / y;
	elseif (z <= 1.5e+68)
		tmp = -x / (z * y);
	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.42e+54], t$95$1, If[LessEqual[z, 6.8e-17], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.5e+68], N[((-x) / N[(z * y), $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.42 \cdot 10^{+54}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.41999999999999995e54 or 1.5000000000000001e68 < z

    1. Initial program 77.5%

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

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

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

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

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

    if -1.41999999999999995e54 < z < 6.7999999999999996e-17

    1. Initial program 92.5%

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

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

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

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

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

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

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

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

    if 6.7999999999999996e-17 < z < 1.5000000000000001e68

    1. Initial program 99.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.42 \cdot 10^{+54}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-17}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+68}:\\ \;\;\;\;\frac{-x}{z \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 8: 65.6% 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 -5.5 \cdot 10^{+55}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-17}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+68}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y}\\ \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 -5.5e+55)
     t_1
     (if (<= z 6.8e-17)
       (/ (/ x t) y)
       (if (<= z 2.2e+68) (/ (/ (- x) z) y) 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 <= -5.5e+55) {
		tmp = t_1;
	} else if (z <= 6.8e-17) {
		tmp = (x / t) / y;
	} else if (z <= 2.2e+68) {
		tmp = (-x / z) / y;
	} 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 <= (-5.5d+55)) then
        tmp = t_1
    else if (z <= 6.8d-17) then
        tmp = (x / t) / y
    else if (z <= 2.2d+68) then
        tmp = (-x / z) / y
    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 <= -5.5e+55) {
		tmp = t_1;
	} else if (z <= 6.8e-17) {
		tmp = (x / t) / y;
	} else if (z <= 2.2e+68) {
		tmp = (-x / z) / y;
	} 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 <= -5.5e+55:
		tmp = t_1
	elif z <= 6.8e-17:
		tmp = (x / t) / y
	elif z <= 2.2e+68:
		tmp = (-x / z) / y
	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 <= -5.5e+55)
		tmp = t_1;
	elseif (z <= 6.8e-17)
		tmp = Float64(Float64(x / t) / y);
	elseif (z <= 2.2e+68)
		tmp = Float64(Float64(Float64(-x) / z) / y);
	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 <= -5.5e+55)
		tmp = t_1;
	elseif (z <= 6.8e-17)
		tmp = (x / t) / y;
	elseif (z <= 2.2e+68)
		tmp = (-x / z) / y;
	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, -5.5e+55], t$95$1, If[LessEqual[z, 6.8e-17], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 2.2e+68], N[(N[((-x) / z), $MachinePrecision] / y), $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 -5.5 \cdot 10^{+55}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.5000000000000004e55 or 2.19999999999999987e68 < z

    1. Initial program 77.5%

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

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

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

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

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

    if -5.5000000000000004e55 < z < 6.7999999999999996e-17

    1. Initial program 92.5%

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

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

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

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

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

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

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

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

    if 6.7999999999999996e-17 < z < 2.19999999999999987e68

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\frac{x}{\color{blue}{z \cdot y}} \]
      3. distribute-neg-frac33.6%

        \[\leadsto \color{blue}{\frac{-x}{z \cdot y}} \]
    10. Simplified33.6%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-\frac{x}{z}}{y}} \]
    13. Simplified33.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{+55}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-17}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+68}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 9: 65.5% 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 -5.5 \cdot 10^{+55}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-17}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+68}:\\ \;\;\;\;\frac{\frac{-x}{y}}{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 -5.5e+55)
     t_1
     (if (<= z 6.8e-17)
       (/ (/ x t) y)
       (if (<= z 1.75e+68) (/ (/ (- 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 <= -5.5e+55) {
		tmp = t_1;
	} else if (z <= 6.8e-17) {
		tmp = (x / t) / y;
	} else if (z <= 1.75e+68) {
		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 <= (-5.5d+55)) then
        tmp = t_1
    else if (z <= 6.8d-17) then
        tmp = (x / t) / y
    else if (z <= 1.75d+68) 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 <= -5.5e+55) {
		tmp = t_1;
	} else if (z <= 6.8e-17) {
		tmp = (x / t) / y;
	} else if (z <= 1.75e+68) {
		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 <= -5.5e+55:
		tmp = t_1
	elif z <= 6.8e-17:
		tmp = (x / t) / y
	elif z <= 1.75e+68:
		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 <= -5.5e+55)
		tmp = t_1;
	elseif (z <= 6.8e-17)
		tmp = Float64(Float64(x / t) / y);
	elseif (z <= 1.75e+68)
		tmp = Float64(Float64(Float64(-x) / 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 <= -5.5e+55)
		tmp = t_1;
	elseif (z <= 6.8e-17)
		tmp = (x / t) / y;
	elseif (z <= 1.75e+68)
		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, -5.5e+55], t$95$1, If[LessEqual[z, 6.8e-17], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.75e+68], N[(N[((-x) / y), $MachinePrecision] / z), $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 -5.5 \cdot 10^{+55}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.5000000000000004e55 or 1.74999999999999989e68 < z

    1. Initial program 77.5%

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

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

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

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

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

    if -5.5000000000000004e55 < z < 6.7999999999999996e-17

    1. Initial program 92.5%

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

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

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

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

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

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

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

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

    if 6.7999999999999996e-17 < z < 1.74999999999999989e68

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{+55}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-17}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+68}:\\ \;\;\;\;\frac{\frac{-x}{y}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 10: 73.4% accurate, 0.8× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+41} \lor \neg \left(z \leq 2.8 \cdot 10^{+20}\right):\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \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.2e+41) (not (<= z 2.8e+20)))
   (/ (/ x z) z)
   (/ x (* t (- y z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -3.2e+41) || !(z <= 2.8e+20)) {
		tmp = (x / z) / z;
	} else {
		tmp = x / (t * (y - 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 <= (-3.2d+41)) .or. (.not. (z <= 2.8d+20))) then
        tmp = (x / z) / z
    else
        tmp = x / (t * (y - 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 <= -3.2e+41) || !(z <= 2.8e+20)) {
		tmp = (x / z) / z;
	} else {
		tmp = x / (t * (y - z));
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if (z <= -3.2e+41) or not (z <= 2.8e+20):
		tmp = (x / z) / z
	else:
		tmp = x / (t * (y - z))
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -3.2e+41) || !(z <= 2.8e+20))
		tmp = Float64(Float64(x / z) / z);
	else
		tmp = Float64(x / Float64(t * Float64(y - z)));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -3.2e+41) || ~((z <= 2.8e+20)))
		tmp = (x / z) / z;
	else
		tmp = x / (t * (y - 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[Or[LessEqual[z, -3.2e+41], N[Not[LessEqual[z, 2.8e+20]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+41} \lor \neg \left(z \leq 2.8 \cdot 10^{+20}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.2000000000000001e41 or 2.8e20 < z

    1. Initial program 78.7%

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
    4. Simplified77.6%

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

    if -3.2000000000000001e41 < z < 2.8e20

    1. Initial program 94.1%

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

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

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

Alternative 11: 46.0% accurate, 1.0× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{+108} \lor \neg \left(z \leq 7.4 \cdot 10^{+46}\right):\\ \;\;\;\;\frac{x}{z \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot 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 -8e+108) (not (<= z 7.4e+46))) (/ x (* z y)) (/ x (* t y))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -8e+108) || !(z <= 7.4e+46)) {
		tmp = x / (z * y);
	} 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 <= (-8d+108)) .or. (.not. (z <= 7.4d+46))) then
        tmp = x / (z * y)
    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 <= -8e+108) || !(z <= 7.4e+46)) {
		tmp = x / (z * y);
	} else {
		tmp = x / (t * y);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if (z <= -8e+108) or not (z <= 7.4e+46):
		tmp = x / (z * y)
	else:
		tmp = x / (t * y)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -8e+108) || !(z <= 7.4e+46))
		tmp = Float64(x / Float64(z * y));
	else
		tmp = Float64(x / Float64(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 <= -8e+108) || ~((z <= 7.4e+46)))
		tmp = x / (z * y);
	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, -8e+108], N[Not[LessEqual[z, 7.4e+46]], $MachinePrecision]], N[(x / N[(z * y), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+108} \lor \neg \left(z \leq 7.4 \cdot 10^{+46}\right):\\
\;\;\;\;\frac{x}{z \cdot y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.0000000000000003e108 or 7.3999999999999998e46 < z

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\frac{-x}{y}}{z}\right)} - 1} \]
      3. associate-/l/65.1%

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

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

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

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

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

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

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

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

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

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

    if -8.0000000000000003e108 < z < 7.3999999999999998e46

    1. Initial program 93.3%

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

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

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

Alternative 12: 61.8% accurate, 1.0× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{+32} \lor \neg \left(z \leq 6.6 \cdot 10^{+14}\right):\\ \;\;\;\;\frac{x}{z \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot 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.8e+32) (not (<= z 6.6e+14))) (/ x (* z z)) (/ x (* t y))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -4.8e+32) || !(z <= 6.6e+14)) {
		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.8d+32)) .or. (.not. (z <= 6.6d+14))) 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.8e+32) || !(z <= 6.6e+14)) {
		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.8e+32) or not (z <= 6.6e+14):
		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.8e+32) || !(z <= 6.6e+14))
		tmp = Float64(x / Float64(z * z));
	else
		tmp = Float64(x / Float64(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.8e+32) || ~((z <= 6.6e+14)))
		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.8e+32], N[Not[LessEqual[z, 6.6e+14]], $MachinePrecision]], N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+32} \lor \neg \left(z \leq 6.6 \cdot 10^{+14}\right):\\
\;\;\;\;\frac{x}{z \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.79999999999999983e32 or 6.6e14 < z

    1. Initial program 79.3%

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

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

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

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

    if -4.79999999999999983e32 < z < 6.6e14

    1. Initial program 94.0%

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

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

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

Alternative 13: 62.8% accurate, 1.0× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.42 \cdot 10^{+54} \lor \neg \left(z \leq 7.2 \cdot 10^{+14}\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.42e+54) (not (<= z 7.2e+14))) (/ x (* z z)) (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -1.42e+54) || !(z <= 7.2e+14)) {
		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.42d+54)) .or. (.not. (z <= 7.2d+14))) 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.42e+54) || !(z <= 7.2e+14)) {
		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.42e+54) or not (z <= 7.2e+14):
		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.42e+54) || !(z <= 7.2e+14))
		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.42e+54) || ~((z <= 7.2e+14)))
		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.42e+54], N[Not[LessEqual[z, 7.2e+14]], $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.42 \cdot 10^{+54} \lor \neg \left(z \leq 7.2 \cdot 10^{+14}\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.41999999999999995e54 or 7.2e14 < z

    1. Initial program 80.4%

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

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

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

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

    if -1.41999999999999995e54 < z < 7.2e14

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

Alternative 14: 66.2% accurate, 1.0× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.12 \cdot 10^{+55} \lor \neg \left(z \leq 8 \cdot 10^{+14}\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 -1.12e+55) (not (<= z 8e+14))) (/ (/ x z) z) (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -1.12e+55) || !(z <= 8e+14)) {
		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.12d+55)) .or. (.not. (z <= 8d+14))) 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.12e+55) || !(z <= 8e+14)) {
		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.12e+55) or not (z <= 8e+14):
		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.12e+55) || !(z <= 8e+14))
		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 <= -1.12e+55) || ~((z <= 8e+14)))
		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.12e+55], N[Not[LessEqual[z, 8e+14]], $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 -1.12 \cdot 10^{+55} \lor \neg \left(z \leq 8 \cdot 10^{+14}\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 < -1.12000000000000006e55 or 8e14 < z

    1. Initial program 80.4%

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
    4. Simplified77.7%

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

    if -1.12000000000000006e55 < z < 8e14

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

Alternative 15: 39.0% accurate, 1.8× speedup?

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

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

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

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

Developer target: 88.5% accurate, 0.4× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{t_1}\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023199 
(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))))