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

Percentage Accurate: 89.0% → 96.9%
Time: 11.6s
Alternatives: 17
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 17 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.0% accurate, 1.0× speedup?

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

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

Alternative 1: 96.9% accurate, 1.0× speedup?

\[\begin{array}{l} [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.1%

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

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

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

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

Alternative 2: 93.4% accurate, 0.4× speedup?

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

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+307}:\\
\;\;\;\;\frac{x}{t_1}\\

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


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

    1. Initial program 79.8%

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

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

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

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

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

    if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 5e307

    1. Initial program 99.1%

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

    if 5e307 < (*.f64 (-.f64 y z) (-.f64 t z))

    1. Initial program 74.3%

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

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

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

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

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

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

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

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

Alternative 3: 93.4% accurate, 0.4× speedup?

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

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+307}:\\
\;\;\;\;\frac{x}{t_1}\\

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


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

    1. Initial program 79.8%

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

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

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

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

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

    if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 5e307

    1. Initial program 99.1%

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

    if 5e307 < (*.f64 (-.f64 y z) (-.f64 t z))

    1. Initial program 74.3%

      \[\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. Step-by-step derivation
      1. clear-num99.8%

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

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

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

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

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

Alternative 4: 72.9% accurate, 0.5× speedup?

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

\mathbf{elif}\;z \leq -1.25 \cdot 10^{-135}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq 1.75 \cdot 10^{-38}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.2e9 or 1.8500000000000001e74 < z

    1. Initial program 84.5%

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

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

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

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

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

    if -5.2e9 < z < -1.25000000000000005e-135 or 1.89999999999999987e-119 < z < 1.7500000000000001e-38

    1. Initial program 97.7%

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

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

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

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

    if -1.25000000000000005e-135 < z < 1.89999999999999987e-119

    1. Initial program 91.5%

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

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

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

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

    if 1.7500000000000001e-38 < z < 1.8500000000000001e74

    1. Initial program 99.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5200000000:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-135}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-119}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-38}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{+74}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 5: 73.7% accurate, 0.5× speedup?

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

\mathbf{elif}\;z \leq -5 \cdot 10^{-291}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;z \leq 1.05 \cdot 10^{-120}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.85 \cdot 10^{-41}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;z \leq 2.3 \cdot 10^{+70}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.2e9 or 2.29999999999999994e70 < z

    1. Initial program 84.5%

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

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

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

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

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

    if -5.2e9 < z < -5.0000000000000003e-291 or 1.05e-120 < z < 1.8500000000000001e-41

    1. Initial program 90.8%

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

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

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

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

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

    if -5.0000000000000003e-291 < z < 1.05e-120 or 1.8500000000000001e-41 < z < 2.29999999999999994e70

    1. Initial program 99.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5200000000:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-291}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-120}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-41}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+70}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 6: 72.1% accurate, 0.6× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -3.4 \cdot 10^{-16}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -9.2 \cdot 10^{-138}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;y \leq -5.4 \cdot 10^{-304} \lor \neg \left(y \leq 5.2 \cdot 10^{-181}\right):\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{z}{\frac{x}{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 (<= y -3.4e-16)
   (/ (/ x y) (- t z))
   (if (<= y -9.2e-138)
     (/ (/ x z) z)
     (if (or (<= y -5.4e-304) (not (<= y 5.2e-181)))
       (/ (/ x t) (- y z))
       (/ 1.0 (/ z (/ x z)))))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -3.4e-16) {
		tmp = (x / y) / (t - z);
	} else if (y <= -9.2e-138) {
		tmp = (x / z) / z;
	} else if ((y <= -5.4e-304) || !(y <= 5.2e-181)) {
		tmp = (x / t) / (y - z);
	} else {
		tmp = 1.0 / (z / (x / 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 (y <= (-3.4d-16)) then
        tmp = (x / y) / (t - z)
    else if (y <= (-9.2d-138)) then
        tmp = (x / z) / z
    else if ((y <= (-5.4d-304)) .or. (.not. (y <= 5.2d-181))) then
        tmp = (x / t) / (y - z)
    else
        tmp = 1.0d0 / (z / (x / 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 (y <= -3.4e-16) {
		tmp = (x / y) / (t - z);
	} else if (y <= -9.2e-138) {
		tmp = (x / z) / z;
	} else if ((y <= -5.4e-304) || !(y <= 5.2e-181)) {
		tmp = (x / t) / (y - z);
	} else {
		tmp = 1.0 / (z / (x / z));
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if y <= -3.4e-16:
		tmp = (x / y) / (t - z)
	elif y <= -9.2e-138:
		tmp = (x / z) / z
	elif (y <= -5.4e-304) or not (y <= 5.2e-181):
		tmp = (x / t) / (y - z)
	else:
		tmp = 1.0 / (z / (x / z))
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -3.4e-16)
		tmp = Float64(Float64(x / y) / Float64(t - z));
	elseif (y <= -9.2e-138)
		tmp = Float64(Float64(x / z) / z);
	elseif ((y <= -5.4e-304) || !(y <= 5.2e-181))
		tmp = Float64(Float64(x / t) / Float64(y - z));
	else
		tmp = Float64(1.0 / Float64(z / Float64(x / z)));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -3.4e-16)
		tmp = (x / y) / (t - z);
	elseif (y <= -9.2e-138)
		tmp = (x / z) / z;
	elseif ((y <= -5.4e-304) || ~((y <= 5.2e-181)))
		tmp = (x / t) / (y - z);
	else
		tmp = 1.0 / (z / (x / 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[y, -3.4e-16], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9.2e-138], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[Or[LessEqual[y, -5.4e-304], N[Not[LessEqual[y, 5.2e-181]], $MachinePrecision]], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{-16}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\

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

\mathbf{elif}\;y \leq -5.4 \cdot 10^{-304} \lor \neg \left(y \leq 5.2 \cdot 10^{-181}\right):\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -3.4e-16

    1. Initial program 91.9%

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

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

    if -3.4e-16 < y < -9.1999999999999996e-138

    1. Initial program 92.6%

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

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

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

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

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

    if -9.1999999999999996e-138 < y < -5.40000000000000021e-304 or 5.19999999999999998e-181 < y

    1. Initial program 89.3%

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

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

    if -5.40000000000000021e-304 < y < 5.19999999999999998e-181

    1. Initial program 86.7%

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{1}{t - z} \cdot x}}{y - z} \]
    6. Step-by-step derivation
      1. clear-num95.5%

        \[\leadsto \color{blue}{\frac{1}{\frac{y - z}{\frac{1}{t - z} \cdot x}}} \]
      2. inv-pow95.5%

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

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

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

        \[\leadsto {\left(\color{blue}{\frac{t - z}{1}} \cdot \frac{y - z}{x}\right)}^{-1} \]
      6. /-rgt-identity95.1%

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

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

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

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

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

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

        \[\leadsto \frac{1}{\color{blue}{\frac{z}{\frac{x}{z}}}} \]
    12. Simplified59.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.4 \cdot 10^{-16}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;y \leq -9.2 \cdot 10^{-138}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;y \leq -5.4 \cdot 10^{-304} \lor \neg \left(y \leq 5.2 \cdot 10^{-181}\right):\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\ \end{array} \]

Alternative 7: 67.2% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq 4.2 \cdot 10^{-42}:\\
\;\;\;\;\frac{\frac{-x}{y}}{z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.8e9 or 3.8e17 < z

    1. Initial program 85.6%

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

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

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

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

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

    if -2.8e9 < z < 9.9999999999999996e-82

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{t}}}{y} \]
    6. Simplified65.5%

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

    if 9.9999999999999996e-82 < z < 4.20000000000000013e-42

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\frac{x}{y \cdot z}} \]
      2. add-sqr-sqrt40.2%

        \[\leadsto -\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{y \cdot z} \]
      3. sqrt-unprod43.5%

        \[\leadsto -\frac{\color{blue}{\sqrt{x \cdot x}}}{y \cdot z} \]
      4. sqr-neg43.5%

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

        \[\leadsto -\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{y \cdot z} \]
      6. add-sqr-sqrt12.5%

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

        \[\leadsto -\color{blue}{\frac{\frac{-x}{y}}{z}} \]
      8. add-sqr-sqrt11.0%

        \[\leadsto -\frac{\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{y}}{z} \]
      9. sqrt-unprod43.6%

        \[\leadsto -\frac{\frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{y}}{z} \]
      10. sqr-neg43.6%

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

        \[\leadsto -\frac{\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{y}}{z} \]
      12. add-sqr-sqrt51.8%

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

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

    if 4.20000000000000013e-42 < z < 3.8e17

    1. Initial program 99.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2800000000:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 10^{-81}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-42}:\\ \;\;\;\;\frac{\frac{-x}{y}}{z}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+17}:\\ \;\;\;\;\frac{-x}{t \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 8: 66.7% accurate, 0.7× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} t_1 := \frac{\frac{x}{z}}{z}\\ \mathbf{if}\;z \leq -760000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{-79}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-39}:\\ \;\;\;\;\frac{\frac{-x}{y}}{z}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{+15}:\\ \;\;\;\;\frac{x}{t \cdot y}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (/ x z) z)))
   (if (<= z -760000000.0)
     t_1
     (if (<= z 4.7e-79)
       (/ (/ x t) y)
       (if (<= z 1.9e-39)
         (/ (/ (- x) y) z)
         (if (<= z 2.7e+15) (/ 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 <= -760000000.0) {
		tmp = t_1;
	} else if (z <= 4.7e-79) {
		tmp = (x / t) / y;
	} else if (z <= 1.9e-39) {
		tmp = (-x / y) / z;
	} else if (z <= 2.7e+15) {
		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 <= (-760000000.0d0)) then
        tmp = t_1
    else if (z <= 4.7d-79) then
        tmp = (x / t) / y
    else if (z <= 1.9d-39) then
        tmp = (-x / y) / z
    else if (z <= 2.7d+15) 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 <= -760000000.0) {
		tmp = t_1;
	} else if (z <= 4.7e-79) {
		tmp = (x / t) / y;
	} else if (z <= 1.9e-39) {
		tmp = (-x / y) / z;
	} else if (z <= 2.7e+15) {
		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 <= -760000000.0:
		tmp = t_1
	elif z <= 4.7e-79:
		tmp = (x / t) / y
	elif z <= 1.9e-39:
		tmp = (-x / y) / z
	elif z <= 2.7e+15:
		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 <= -760000000.0)
		tmp = t_1;
	elseif (z <= 4.7e-79)
		tmp = Float64(Float64(x / t) / y);
	elseif (z <= 1.9e-39)
		tmp = Float64(Float64(Float64(-x) / y) / z);
	elseif (z <= 2.7e+15)
		tmp = Float64(x / Float64(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 <= -760000000.0)
		tmp = t_1;
	elseif (z <= 4.7e-79)
		tmp = (x / t) / y;
	elseif (z <= 1.9e-39)
		tmp = (-x / y) / z;
	elseif (z <= 2.7e+15)
		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, -760000000.0], t$95$1, If[LessEqual[z, 4.7e-79], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.9e-39], N[(N[((-x) / y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 2.7e+15], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -760000000:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.9 \cdot 10^{-39}:\\
\;\;\;\;\frac{\frac{-x}{y}}{z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.6e8 or 2.7e15 < z

    1. Initial program 85.6%

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

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

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

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

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

    if -7.6e8 < z < 4.7000000000000002e-79

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{t}}}{y} \]
    6. Simplified65.5%

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

    if 4.7000000000000002e-79 < z < 1.9000000000000001e-39

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\frac{x}{y \cdot z}} \]
      2. add-sqr-sqrt40.2%

        \[\leadsto -\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{y \cdot z} \]
      3. sqrt-unprod43.5%

        \[\leadsto -\frac{\color{blue}{\sqrt{x \cdot x}}}{y \cdot z} \]
      4. sqr-neg43.5%

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

        \[\leadsto -\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{y \cdot z} \]
      6. add-sqr-sqrt12.5%

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

        \[\leadsto -\color{blue}{\frac{\frac{-x}{y}}{z}} \]
      8. add-sqr-sqrt11.0%

        \[\leadsto -\frac{\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{y}}{z} \]
      9. sqrt-unprod43.6%

        \[\leadsto -\frac{\frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{y}}{z} \]
      10. sqr-neg43.6%

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

        \[\leadsto -\frac{\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{y}}{z} \]
      12. add-sqr-sqrt51.8%

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

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

    if 1.9000000000000001e-39 < z < 2.7e15

    1. Initial program 99.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -760000000:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{-79}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-39}:\\ \;\;\;\;\frac{\frac{-x}{y}}{z}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{+15}:\\ \;\;\;\;\frac{x}{t \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 9: 73.4% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.6e9 or 6.20000000000000037e66 < z

    1. Initial program 84.5%

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

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

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

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

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

    if -4.6e9 < z < 8.6000000000000002e-42

    1. Initial program 94.0%

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

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

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

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

    if 8.6000000000000002e-42 < z < 6.20000000000000037e66

    1. Initial program 99.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4600000000:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{-42}:\\ \;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+66}:\\ \;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \end{array} \]

Alternative 10: 82.3% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 91.9%

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

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

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

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

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

    if -1.7e-16 < y < 6.0000000000000006e-101

    1. Initial program 92.0%

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

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

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

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

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

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

    if 6.0000000000000006e-101 < y

    1. Initial program 87.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{-16}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-101}:\\ \;\;\;\;\frac{\frac{-x}{z}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]

Alternative 11: 82.3% accurate, 0.7× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{-87}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{-35}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y - z}\\ \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 -2.5e-87)
   (/ (/ x y) (- t z))
   (if (<= t 3.8e-35) (/ (/ (- 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 <= -2.5e-87) {
		tmp = (x / y) / (t - z);
	} else if (t <= 3.8e-35) {
		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 <= (-2.5d-87)) then
        tmp = (x / y) / (t - z)
    else if (t <= 3.8d-35) 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 <= -2.5e-87) {
		tmp = (x / y) / (t - z);
	} else if (t <= 3.8e-35) {
		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 <= -2.5e-87:
		tmp = (x / y) / (t - z)
	elif t <= 3.8e-35:
		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 <= -2.5e-87)
		tmp = Float64(Float64(x / y) / Float64(t - z));
	elseif (t <= 3.8e-35)
		tmp = Float64(Float64(Float64(-x) / 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 <= -2.5e-87)
		tmp = (x / y) / (t - z);
	elseif (t <= 3.8e-35)
		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, -2.5e-87], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.8e-35], N[(N[((-x) / z), $MachinePrecision] / N[(y - z), $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 -2.5 \cdot 10^{-87}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\

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

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


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

    1. Initial program 87.5%

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

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

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

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

    if -2.50000000000000021e-87 < t < 3.8000000000000001e-35

    1. Initial program 90.1%

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

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

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

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

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

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

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

    if 3.8000000000000001e-35 < t

    1. Initial program 93.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{-87}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{-35}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]

Alternative 12: 69.2% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 87.5%

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

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

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

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

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

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

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

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

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

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

    if -4.1999999999999999e-88 < t < 4.2e-35

    1. Initial program 90.1%

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

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

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

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

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

    if 4.2e-35 < t

    1. Initial program 93.5%

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

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

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

Alternative 13: 45.9% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.6000000000000001e93 or 3.0499999999999999e88 < z

    1. Initial program 83.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.6000000000000001e93 < z < 3.0499999999999999e88

    1. Initial program 93.8%

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

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

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

Alternative 14: 61.2% accurate, 1.0× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1800000000 \lor \neg \left(z \leq 1.2 \cdot 10^{-81}\right):\\ \;\;\;\;\frac{x}{z \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot y}\\ \end{array} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -1800000000.0) (not (<= z 1.2e-81)))
   (/ x (* z z))
   (/ x (* t y))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -1800000000.0) || !(z <= 1.2e-81)) {
		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 <= (-1800000000.0d0)) .or. (.not. (z <= 1.2d-81))) 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 <= -1800000000.0) || !(z <= 1.2e-81)) {
		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 <= -1800000000.0) or not (z <= 1.2e-81):
		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 <= -1800000000.0) || !(z <= 1.2e-81))
		tmp = Float64(x / Float64(z * z));
	else
		tmp = Float64(x / Float64(t * y));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -1800000000.0) || ~((z <= 1.2e-81)))
		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, -1800000000.0], N[Not[LessEqual[z, 1.2e-81]], $MachinePrecision]], N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1800000000 \lor \neg \left(z \leq 1.2 \cdot 10^{-81}\right):\\
\;\;\;\;\frac{x}{z \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.8e9 or 1.2e-81 < z

    1. Initial program 87.8%

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

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

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

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

    if -1.8e9 < z < 1.2e-81

    1. Initial program 93.4%

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

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

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

Alternative 15: 62.3% accurate, 1.0× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -4100000000 \lor \neg \left(z \leq 2.05 \cdot 10^{-78}\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 -4100000000.0) (not (<= z 2.05e-78)))
   (/ x (* z z))
   (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -4100000000.0) || !(z <= 2.05e-78)) {
		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 <= (-4100000000.0d0)) .or. (.not. (z <= 2.05d-78))) 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 <= -4100000000.0) || !(z <= 2.05e-78)) {
		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 <= -4100000000.0) or not (z <= 2.05e-78):
		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 <= -4100000000.0) || !(z <= 2.05e-78))
		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 <= -4100000000.0) || ~((z <= 2.05e-78)))
		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, -4100000000.0], N[Not[LessEqual[z, 2.05e-78]], $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 -4100000000 \lor \neg \left(z \leq 2.05 \cdot 10^{-78}\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 < -4.1e9 or 2.0499999999999999e-78 < z

    1. Initial program 87.8%

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

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

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

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

    if -4.1e9 < z < 2.0499999999999999e-78

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{t}}}{y} \]
    6. Simplified65.5%

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

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

Alternative 16: 66.1% accurate, 1.0× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -4200000000 \lor \neg \left(z \leq 2.05 \cdot 10^{-78}\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 -4200000000.0) (not (<= z 2.05e-78)))
   (/ (/ x z) z)
   (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -4200000000.0) || !(z <= 2.05e-78)) {
		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 <= (-4200000000.0d0)) .or. (.not. (z <= 2.05d-78))) 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 <= -4200000000.0) || !(z <= 2.05e-78)) {
		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 <= -4200000000.0) or not (z <= 2.05e-78):
		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 <= -4200000000.0) || !(z <= 2.05e-78))
		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 <= -4200000000.0) || ~((z <= 2.05e-78)))
		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, -4200000000.0], N[Not[LessEqual[z, 2.05e-78]], $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 -4200000000 \lor \neg \left(z \leq 2.05 \cdot 10^{-78}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.2e9 or 2.0499999999999999e-78 < z

    1. Initial program 87.8%

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

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

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

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

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

    if -4.2e9 < z < 2.0499999999999999e-78

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{t}}}{y} \]
    6. Simplified65.5%

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

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

Alternative 17: 38.5% accurate, 1.8× speedup?

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

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

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

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

Developer target: 87.9% 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 2023171 
(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))))