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

Percentage Accurate: 89.4% → 97.0%
Time: 11.1s
Alternatives: 18
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 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: 89.4% accurate, 1.0× speedup?

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

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

Alternative 1: 97.0% accurate, 1.0× speedup?

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

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

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

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

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

Alternative 2: 79.7% accurate, 0.6× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} t_1 := \frac{-x}{z \cdot \left(y - z\right)}\\ \mathbf{if}\;t \leq -2.8 \cdot 10^{-184}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;t \leq 1.68 \cdot 10^{-49}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{+31}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+51}:\\ \;\;\;\;t_1\\ \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) (* z (- y z)))))
   (if (<= t -2.8e-184)
     (/ (/ x y) (- t z))
     (if (<= t 1.68e-49)
       t_1
       (if (<= t 6.8e+31)
         (/ x (* (- y z) t))
         (if (<= t 4e+51) t_1 (/ (/ x t) (- y z))))))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double t_1 = -x / (z * (y - z));
	double tmp;
	if (t <= -2.8e-184) {
		tmp = (x / y) / (t - z);
	} else if (t <= 1.68e-49) {
		tmp = t_1;
	} else if (t <= 6.8e+31) {
		tmp = x / ((y - z) * t);
	} else if (t <= 4e+51) {
		tmp = t_1;
	} 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 / (z * (y - z))
    if (t <= (-2.8d-184)) then
        tmp = (x / y) / (t - z)
    else if (t <= 1.68d-49) then
        tmp = t_1
    else if (t <= 6.8d+31) then
        tmp = x / ((y - z) * t)
    else if (t <= 4d+51) then
        tmp = t_1
    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 / (z * (y - z));
	double tmp;
	if (t <= -2.8e-184) {
		tmp = (x / y) / (t - z);
	} else if (t <= 1.68e-49) {
		tmp = t_1;
	} else if (t <= 6.8e+31) {
		tmp = x / ((y - z) * t);
	} else if (t <= 4e+51) {
		tmp = t_1;
	} else {
		tmp = (x / t) / (y - z);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	t_1 = -x / (z * (y - z))
	tmp = 0
	if t <= -2.8e-184:
		tmp = (x / y) / (t - z)
	elif t <= 1.68e-49:
		tmp = t_1
	elif t <= 6.8e+31:
		tmp = x / ((y - z) * t)
	elif t <= 4e+51:
		tmp = t_1
	else:
		tmp = (x / t) / (y - z)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(-x) / Float64(z * Float64(y - z)))
	tmp = 0.0
	if (t <= -2.8e-184)
		tmp = Float64(Float64(x / y) / Float64(t - z));
	elseif (t <= 1.68e-49)
		tmp = t_1;
	elseif (t <= 6.8e+31)
		tmp = Float64(x / Float64(Float64(y - z) * t));
	elseif (t <= 4e+51)
		tmp = t_1;
	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 / (z * (y - z));
	tmp = 0.0;
	if (t <= -2.8e-184)
		tmp = (x / y) / (t - z);
	elseif (t <= 1.68e-49)
		tmp = t_1;
	elseif (t <= 6.8e+31)
		tmp = x / ((y - z) * t);
	elseif (t <= 4e+51)
		tmp = t_1;
	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[(z * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e-184], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.68e-49], t$95$1, If[LessEqual[t, 6.8e+31], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e+51], t$95$1, 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}{z \cdot \left(y - z\right)}\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{-184}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\

\mathbf{elif}\;t \leq 1.68 \cdot 10^{-49}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 4 \cdot 10^{+51}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 91.7%

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

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

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

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

    if -2.7999999999999998e-184 < t < 1.6800000000000001e-49 or 6.7999999999999996e31 < t < 4e51

    1. Initial program 87.5%

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

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

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

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

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

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

    if 1.6800000000000001e-49 < t < 6.7999999999999996e31

    1. Initial program 99.9%

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

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

    if 4e51 < t

    1. Initial program 89.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{-184}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;t \leq 1.68 \cdot 10^{-49}:\\ \;\;\;\;\frac{-x}{z \cdot \left(y - z\right)}\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{+31}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+51}:\\ \;\;\;\;\frac{-x}{z \cdot \left(y - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]

Alternative 3: 79.8% accurate, 0.6× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -4 \cdot 10^{-253}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{-49}:\\ \;\;\;\;\frac{\frac{x}{y - z}}{-z}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+31}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{+51}:\\ \;\;\;\;\frac{-x}{z \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 -4e-253)
   (/ x (* y (- t z)))
   (if (<= t 5.4e-49)
     (/ (/ x (- y z)) (- z))
     (if (<= t 5.5e+31)
       (/ x (* (- y z) t))
       (if (<= t 4.4e+51) (/ (- x) (* z (- y z))) (/ (/ x t) (- y z)))))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -4e-253) {
		tmp = x / (y * (t - z));
	} else if (t <= 5.4e-49) {
		tmp = (x / (y - z)) / -z;
	} else if (t <= 5.5e+31) {
		tmp = x / ((y - z) * t);
	} else if (t <= 4.4e+51) {
		tmp = -x / (z * (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 <= (-4d-253)) then
        tmp = x / (y * (t - z))
    else if (t <= 5.4d-49) then
        tmp = (x / (y - z)) / -z
    else if (t <= 5.5d+31) then
        tmp = x / ((y - z) * t)
    else if (t <= 4.4d+51) then
        tmp = -x / (z * (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 <= -4e-253) {
		tmp = x / (y * (t - z));
	} else if (t <= 5.4e-49) {
		tmp = (x / (y - z)) / -z;
	} else if (t <= 5.5e+31) {
		tmp = x / ((y - z) * t);
	} else if (t <= 4.4e+51) {
		tmp = -x / (z * (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 <= -4e-253:
		tmp = x / (y * (t - z))
	elif t <= 5.4e-49:
		tmp = (x / (y - z)) / -z
	elif t <= 5.5e+31:
		tmp = x / ((y - z) * t)
	elif t <= 4.4e+51:
		tmp = -x / (z * (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 <= -4e-253)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif (t <= 5.4e-49)
		tmp = Float64(Float64(x / Float64(y - z)) / Float64(-z));
	elseif (t <= 5.5e+31)
		tmp = Float64(x / Float64(Float64(y - z) * t));
	elseif (t <= 4.4e+51)
		tmp = Float64(Float64(-x) / Float64(z * 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 <= -4e-253)
		tmp = x / (y * (t - z));
	elseif (t <= 5.4e-49)
		tmp = (x / (y - z)) / -z;
	elseif (t <= 5.5e+31)
		tmp = x / ((y - z) * t);
	elseif (t <= 4.4e+51)
		tmp = -x / (z * (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, -4e-253], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.4e-49], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / (-z)), $MachinePrecision], If[LessEqual[t, 5.5e+31], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.4e+51], N[((-x) / N[(z * 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 -4 \cdot 10^{-253}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\

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

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

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

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


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

    1. Initial program 90.9%

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

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

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

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

    if -4.0000000000000003e-253 < t < 5.3999999999999999e-49

    1. Initial program 88.6%

      \[\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. Step-by-step derivation
      1. neg-mul-171.7%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{-z}} \]
    8. Applied egg-rr79.8%

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

    if 5.3999999999999999e-49 < t < 5.50000000000000002e31

    1. Initial program 99.9%

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

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

    if 5.50000000000000002e31 < t < 4.39999999999999984e51

    1. Initial program 81.5%

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

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

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

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

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

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

    if 4.39999999999999984e51 < t

    1. Initial program 89.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4 \cdot 10^{-253}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{-49}:\\ \;\;\;\;\frac{\frac{x}{y - z}}{-z}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+31}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{+51}:\\ \;\;\;\;\frac{-x}{z \cdot \left(y - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]

Alternative 4: 73.8% accurate, 0.6× speedup?

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

\mathbf{elif}\;z \leq 4.75 \cdot 10^{-85}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 2.7 \cdot 10^{+62}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 81.8%

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

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

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

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

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

    if -1.50000000000000012e46 < z < 4.74999999999999982e-85 or 4.4000000000000003e29 < z < 2.7e62

    1. Initial program 95.0%

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

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

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

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

    if 4.74999999999999982e-85 < z < 4.4000000000000003e29

    1. Initial program 95.3%

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

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

    if 2.7e62 < z

    1. Initial program 86.8%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{1}{z}} \]
    7. Step-by-step derivation
      1. clear-num84.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{+46}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 4.75 \cdot 10^{-85}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+29}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{+62}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{z \cdot \frac{z}{x}}\\ \end{array} \]

Alternative 5: 79.5% accurate, 0.6× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.36 \cdot 10^{-17}:\\ \;\;\;\;\frac{\frac{-x}{z}}{t - z}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-146}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+29}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y - 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.36e-17)
   (/ (/ (- x) z) (- t z))
   (if (<= z 3e-146)
     (/ x (* y (- t z)))
     (if (<= z 1.2e+29) (/ (/ x (- t z)) y) (/ (/ x (- y z)) (- z))))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.36e-17) {
		tmp = (-x / z) / (t - z);
	} else if (z <= 3e-146) {
		tmp = x / (y * (t - z));
	} else if (z <= 1.2e+29) {
		tmp = (x / (t - z)) / y;
	} else {
		tmp = (x / (y - 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.36d-17)) then
        tmp = (-x / z) / (t - z)
    else if (z <= 3d-146) then
        tmp = x / (y * (t - z))
    else if (z <= 1.2d+29) then
        tmp = (x / (t - z)) / y
    else
        tmp = (x / (y - 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.36e-17) {
		tmp = (-x / z) / (t - z);
	} else if (z <= 3e-146) {
		tmp = x / (y * (t - z));
	} else if (z <= 1.2e+29) {
		tmp = (x / (t - z)) / y;
	} else {
		tmp = (x / (y - z)) / -z;
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if z <= -1.36e-17:
		tmp = (-x / z) / (t - z)
	elif z <= 3e-146:
		tmp = x / (y * (t - z))
	elif z <= 1.2e+29:
		tmp = (x / (t - z)) / y
	else:
		tmp = (x / (y - z)) / -z
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -1.36e-17)
		tmp = Float64(Float64(Float64(-x) / z) / Float64(t - z));
	elseif (z <= 3e-146)
		tmp = Float64(x / Float64(y * Float64(t - z)));
	elseif (z <= 1.2e+29)
		tmp = Float64(Float64(x / Float64(t - z)) / y);
	else
		tmp = Float64(Float64(x / Float64(y - z)) / Float64(-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.36e-17)
		tmp = (-x / z) / (t - z);
	elseif (z <= 3e-146)
		tmp = x / (y * (t - z));
	elseif (z <= 1.2e+29)
		tmp = (x / (t - z)) / y;
	else
		tmp = (x / (y - 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.36e-17], N[(N[((-x) / z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e-146], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e+29], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / (-z)), $MachinePrecision]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.36 \cdot 10^{-17}:\\
\;\;\;\;\frac{\frac{-x}{z}}{t - z}\\

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

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

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


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

    1. Initial program 84.5%

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

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

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

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

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

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

    if -1.36e-17 < z < 3.00000000000000019e-146

    1. Initial program 97.7%

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

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

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

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

    if 3.00000000000000019e-146 < z < 1.2e29

    1. Initial program 84.8%

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

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

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

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

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

    if 1.2e29 < z

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{-z}} \]
    8. Applied egg-rr91.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.36 \cdot 10^{-17}:\\ \;\;\;\;\frac{\frac{-x}{z}}{t - z}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-146}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+29}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y - z}}{-z}\\ \end{array} \]

Alternative 6: 79.6% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 84.5%

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

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

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

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

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

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

    if -1.15000000000000004e-10 < z < 4.99999999999999968e-149

    1. Initial program 97.7%

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

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

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

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

    if 4.99999999999999968e-149 < z < 1.46e29

    1. Initial program 84.8%

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

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

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

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

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

    if 1.46e29 < z

    1. Initial program 88.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{-10}:\\ \;\;\;\;\frac{\frac{-x}{z}}{t - z}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-149}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;z \leq 1.46 \cdot 10^{+29}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y - z}\\ \end{array} \]

Alternative 7: 66.6% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq 9.5 \cdot 10^{+28}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\

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


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

    1. Initial program 83.2%

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

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

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

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

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

    if -2.3e13 < z < -1.25000000000000007e-129

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

    if -1.25000000000000007e-129 < z < 9.49999999999999927e28

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{t - z}{\frac{1}{y - z} \cdot x}}} \]
      4. *-un-lft-identity94.3%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{t}}{y}} \]
      4. *-lft-identity68.8%

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

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

    if 9.49999999999999927e28 < z

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -23000000000000:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-129}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+28}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{z \cdot \frac{z}{x}}\\ \end{array} \]

Alternative 8: 73.9% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 81.8%

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

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

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

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

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

    if -4.5999999999999997e47 < z < 8.1999999999999995e-145

    1. Initial program 97.9%

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

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

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

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

    if 8.1999999999999995e-145 < z < 3.5e28

    1. Initial program 84.8%

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

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

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

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

    if 3.5e28 < z

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.6 \cdot 10^{+47}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-145}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+28}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{z \cdot \frac{z}{x}}\\ \end{array} \]

Alternative 9: 72.6% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 81.8%

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

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

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

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

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

    if -3.5999999999999999e46 < z < 2.7e-145

    1. Initial program 97.9%

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

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

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

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

    if 2.7e-145 < z < 1.3e182

    1. Initial program 85.1%

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

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

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

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

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

    if 1.3e182 < z

    1. Initial program 91.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{1}}{\frac{z}{x} \cdot z} \]
    8. Applied egg-rr100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+46}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-145}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+182}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{z \cdot \frac{z}{x}}\\ \end{array} \]

Alternative 10: 93.6% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.4000000000000001e110

    1. Initial program 72.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{-z}} \]
    8. Applied egg-rr97.3%

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

    if -3.4000000000000001e110 < z < 4.19999999999999971e131

    1. Initial program 96.0%

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

    if 4.19999999999999971e131 < z

    1. Initial program 82.2%

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

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

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

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

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

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

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

Alternative 11: 66.7% accurate, 0.8× 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.4 \cdot 10^{+14}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-130}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+28}:\\ \;\;\;\;\frac{\frac{x}{t}}{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.4e+14)
     t_1
     (if (<= z -6.5e-130)
       (/ (- x) (* z t))
       (if (<= z 3.6e+28) (/ (/ x t) 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.4e+14) {
		tmp = t_1;
	} else if (z <= -6.5e-130) {
		tmp = -x / (z * t);
	} else if (z <= 3.6e+28) {
		tmp = (x / t) / 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.4d+14)) then
        tmp = t_1
    else if (z <= (-6.5d-130)) then
        tmp = -x / (z * t)
    else if (z <= 3.6d+28) then
        tmp = (x / t) / 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.4e+14) {
		tmp = t_1;
	} else if (z <= -6.5e-130) {
		tmp = -x / (z * t);
	} else if (z <= 3.6e+28) {
		tmp = (x / t) / 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.4e+14:
		tmp = t_1
	elif z <= -6.5e-130:
		tmp = -x / (z * t)
	elif z <= 3.6e+28:
		tmp = (x / t) / 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.4e+14)
		tmp = t_1;
	elseif (z <= -6.5e-130)
		tmp = Float64(Float64(-x) / Float64(z * t));
	elseif (z <= 3.6e+28)
		tmp = Float64(Float64(x / t) / 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.4e+14)
		tmp = t_1;
	elseif (z <= -6.5e-130)
		tmp = -x / (z * t);
	elseif (z <= 3.6e+28)
		tmp = (x / t) / 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.4e+14], t$95$1, If[LessEqual[z, -6.5e-130], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e+28], N[(N[(x / t), $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 -1.4 \cdot 10^{+14}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 3.6 \cdot 10^{+28}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.4e14 or 3.5999999999999999e28 < z

    1. Initial program 85.9%

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

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

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

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

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

    if -1.4e14 < z < -6.5000000000000002e-130

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

    if -6.5000000000000002e-130 < z < 3.5999999999999999e28

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{t - z}{\frac{1}{y - z} \cdot x}}} \]
      4. *-un-lft-identity94.3%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{t}}{y}} \]
      4. *-lft-identity68.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+14}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-130}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+28}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 12: 74.3% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.2499999999999999e47

    1. Initial program 81.8%

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

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

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

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

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

    if -2.2499999999999999e47 < z < 3.49999999999999979e29

    1. Initial program 94.8%

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

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

    if 3.49999999999999979e29 < z

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 47.0% accurate, 1.0× speedup?

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

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.1e47 < z < 2.24999999999999999e55

    1. Initial program 95.0%

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

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

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

Alternative 14: 62.8% accurate, 1.0× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -96000000000 \lor \neg \left(z \leq 5.5 \cdot 10^{+22}\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 -96000000000.0) (not (<= z 5.5e+22)))
   (/ x (* z z))
   (/ x (* y t))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -96000000000.0) || !(z <= 5.5e+22)) {
		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 <= (-96000000000.0d0)) .or. (.not. (z <= 5.5d+22))) 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 <= -96000000000.0) || !(z <= 5.5e+22)) {
		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 <= -96000000000.0) or not (z <= 5.5e+22):
		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 <= -96000000000.0) || !(z <= 5.5e+22))
		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 <= -96000000000.0) || ~((z <= 5.5e+22)))
		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, -96000000000.0], N[Not[LessEqual[z, 5.5e+22]], $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 -96000000000 \lor \neg \left(z \leq 5.5 \cdot 10^{+22}\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 < -9.6e10 or 5.50000000000000021e22 < z

    1. Initial program 85.3%

      \[\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 -9.6e10 < z < 5.50000000000000021e22

    1. Initial program 95.2%

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

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

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

Alternative 15: 64.2% accurate, 1.0× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -22000000000000 \lor \neg \left(z \leq 1.46 \cdot 10^{+29}\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 -22000000000000.0) (not (<= z 1.46e+29)))
   (/ x (* z z))
   (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -22000000000000.0) || !(z <= 1.46e+29)) {
		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 <= (-22000000000000.0d0)) .or. (.not. (z <= 1.46d+29))) 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 <= -22000000000000.0) || !(z <= 1.46e+29)) {
		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 <= -22000000000000.0) or not (z <= 1.46e+29):
		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 <= -22000000000000.0) || !(z <= 1.46e+29))
		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 <= -22000000000000.0) || ~((z <= 1.46e+29)))
		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, -22000000000000.0], N[Not[LessEqual[z, 1.46e+29]], $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 -22000000000000 \lor \neg \left(z \leq 1.46 \cdot 10^{+29}\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 < -2.2e13 or 1.46e29 < z

    1. Initial program 85.9%

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

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

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

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

    if -2.2e13 < z < 1.46e29

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{t - z}{\frac{1}{y - z} \cdot x}}} \]
      4. *-un-lft-identity94.4%

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

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

        \[\leadsto \frac{1}{\color{blue}{\frac{y - z}{1}} \cdot \frac{t - z}{x}} \]
      7. /-rgt-identity94.7%

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

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

      \[\leadsto \color{blue}{\frac{x}{y \cdot t}} \]
    7. Step-by-step derivation
      1. *-lft-identity58.0%

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{t}}{y}} \]
      4. *-lft-identity63.1%

        \[\leadsto \frac{\color{blue}{\frac{x}{t}}}{y} \]
    8. Simplified63.1%

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

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

Alternative 16: 67.8% accurate, 1.0× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -780000000000 \lor \neg \left(z \leq 4.2 \cdot 10^{+28}\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 -780000000000.0) (not (<= z 4.2e+28)))
   (/ (/ x z) z)
   (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -780000000000.0) || !(z <= 4.2e+28)) {
		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 <= (-780000000000.0d0)) .or. (.not. (z <= 4.2d+28))) 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 <= -780000000000.0) || !(z <= 4.2e+28)) {
		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 <= -780000000000.0) or not (z <= 4.2e+28):
		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 <= -780000000000.0) || !(z <= 4.2e+28))
		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 <= -780000000000.0) || ~((z <= 4.2e+28)))
		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, -780000000000.0], N[Not[LessEqual[z, 4.2e+28]], $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 -780000000000 \lor \neg \left(z \leq 4.2 \cdot 10^{+28}\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 < -7.8e11 or 4.19999999999999978e28 < z

    1. Initial program 85.9%

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

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

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

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

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

    if -7.8e11 < z < 4.19999999999999978e28

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{t - z}{\frac{1}{y - z} \cdot x}}} \]
      4. *-un-lft-identity94.4%

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

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

        \[\leadsto \frac{1}{\color{blue}{\frac{y - z}{1}} \cdot \frac{t - z}{x}} \]
      7. /-rgt-identity94.7%

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

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

      \[\leadsto \color{blue}{\frac{x}{y \cdot t}} \]
    7. Step-by-step derivation
      1. *-lft-identity58.0%

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{t}}{y}} \]
      4. *-lft-identity63.1%

        \[\leadsto \frac{\color{blue}{\frac{x}{t}}}{y} \]
    8. Simplified63.1%

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

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

Alternative 17: 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 90.2%

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

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

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

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

Alternative 18: 39.8% 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 90.2%

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

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

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

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