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

Percentage Accurate: 89.4% → 96.0%
Time: 17.7s
Alternatives: 19
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 19 alternatives:

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

Initial Program: 89.4% accurate, 1.0× speedup?

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

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

Alternative 1: 96.0% accurate, 0.1× speedup?

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

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

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

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

      \[\leadsto \color{blue}{{\left(\frac{y - z}{\frac{x}{t - z}}\right)}^{-1}} \]
    4. div-inv96.8%

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

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

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

    \[\leadsto {\left(\left(y - z\right) \cdot \frac{t - z}{x}\right)}^{-1} \]
  6. Add Preprocessing

Alternative 2: 49.4% accurate, 0.2× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{x}{y \cdot \left(-z\right)}\\ t_2 := \frac{\frac{x}{t}}{y}\\ \mathbf{if}\;y \leq -4.5 \cdot 10^{+247}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{+231}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;y \leq -7.8 \cdot 10^{+61}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.5 \cdot 10^{+43}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -6.6 \cdot 10^{+32}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-75} \lor \neg \left(y \leq 2.6 \cdot 10^{-83}\right):\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{-z}\\ \end{array} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ x (* y (- z)))) (t_2 (/ (/ x t) y)))
   (if (<= y -4.5e+247)
     t_1
     (if (<= y -1.9e+231)
       (/ (/ x y) t)
       (if (<= y -7.8e+61)
         t_1
         (if (<= y -1.5e+43)
           t_2
           (if (<= y -6.6e+32)
             t_1
             (if (or (<= y -1.2e-75) (not (<= y 2.6e-83)))
               t_2
               (/ (/ x t) (- z))))))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double t_1 = x / (y * -z);
	double t_2 = (x / t) / y;
	double tmp;
	if (y <= -4.5e+247) {
		tmp = t_1;
	} else if (y <= -1.9e+231) {
		tmp = (x / y) / t;
	} else if (y <= -7.8e+61) {
		tmp = t_1;
	} else if (y <= -1.5e+43) {
		tmp = t_2;
	} else if (y <= -6.6e+32) {
		tmp = t_1;
	} else if ((y <= -1.2e-75) || !(y <= 2.6e-83)) {
		tmp = t_2;
	} else {
		tmp = (x / t) / -z;
	}
	return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x / (y * -z)
    t_2 = (x / t) / y
    if (y <= (-4.5d+247)) then
        tmp = t_1
    else if (y <= (-1.9d+231)) then
        tmp = (x / y) / t
    else if (y <= (-7.8d+61)) then
        tmp = t_1
    else if (y <= (-1.5d+43)) then
        tmp = t_2
    else if (y <= (-6.6d+32)) then
        tmp = t_1
    else if ((y <= (-1.2d-75)) .or. (.not. (y <= 2.6d-83))) then
        tmp = t_2
    else
        tmp = (x / t) / -z
    end if
    code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = x / (y * -z);
	double t_2 = (x / t) / y;
	double tmp;
	if (y <= -4.5e+247) {
		tmp = t_1;
	} else if (y <= -1.9e+231) {
		tmp = (x / y) / t;
	} else if (y <= -7.8e+61) {
		tmp = t_1;
	} else if (y <= -1.5e+43) {
		tmp = t_2;
	} else if (y <= -6.6e+32) {
		tmp = t_1;
	} else if ((y <= -1.2e-75) || !(y <= 2.6e-83)) {
		tmp = t_2;
	} else {
		tmp = (x / t) / -z;
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	t_1 = x / (y * -z)
	t_2 = (x / t) / y
	tmp = 0
	if y <= -4.5e+247:
		tmp = t_1
	elif y <= -1.9e+231:
		tmp = (x / y) / t
	elif y <= -7.8e+61:
		tmp = t_1
	elif y <= -1.5e+43:
		tmp = t_2
	elif y <= -6.6e+32:
		tmp = t_1
	elif (y <= -1.2e-75) or not (y <= 2.6e-83):
		tmp = t_2
	else:
		tmp = (x / t) / -z
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	t_1 = Float64(x / Float64(y * Float64(-z)))
	t_2 = Float64(Float64(x / t) / y)
	tmp = 0.0
	if (y <= -4.5e+247)
		tmp = t_1;
	elseif (y <= -1.9e+231)
		tmp = Float64(Float64(x / y) / t);
	elseif (y <= -7.8e+61)
		tmp = t_1;
	elseif (y <= -1.5e+43)
		tmp = t_2;
	elseif (y <= -6.6e+32)
		tmp = t_1;
	elseif ((y <= -1.2e-75) || !(y <= 2.6e-83))
		tmp = t_2;
	else
		tmp = Float64(Float64(x / t) / Float64(-z));
	end
	return tmp
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = x / (y * -z);
	t_2 = (x / t) / y;
	tmp = 0.0;
	if (y <= -4.5e+247)
		tmp = t_1;
	elseif (y <= -1.9e+231)
		tmp = (x / y) / t;
	elseif (y <= -7.8e+61)
		tmp = t_1;
	elseif (y <= -1.5e+43)
		tmp = t_2;
	elseif (y <= -6.6e+32)
		tmp = t_1;
	elseif ((y <= -1.2e-75) || ~((y <= 2.6e-83)))
		tmp = t_2;
	else
		tmp = (x / t) / -z;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -4.5e+247], t$95$1, If[LessEqual[y, -1.9e+231], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, -7.8e+61], t$95$1, If[LessEqual[y, -1.5e+43], t$95$2, If[LessEqual[y, -6.6e+32], t$95$1, If[Or[LessEqual[y, -1.2e-75], N[Not[LessEqual[y, 2.6e-83]], $MachinePrecision]], t$95$2, N[(N[(x / t), $MachinePrecision] / (-z)), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot \left(-z\right)}\\
t_2 := \frac{\frac{x}{t}}{y}\\
\mathbf{if}\;y \leq -4.5 \cdot 10^{+247}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq -7.8 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -1.5 \cdot 10^{+43}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -6.6 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -1.2 \cdot 10^{-75} \lor \neg \left(y \leq 2.6 \cdot 10^{-83}\right):\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.50000000000000002e247 or -1.9e231 < y < -7.79999999999999975e61 or -1.50000000000000008e43 < y < -6.60000000000000039e32

    1. Initial program 95.2%

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

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

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

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

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

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

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

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

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

    if -4.50000000000000002e247 < y < -1.9e231

    1. Initial program 81.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{y}}{t}} \]
      2. *-lft-identity99.7%

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

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

    if -7.79999999999999975e61 < y < -1.50000000000000008e43 or -6.60000000000000039e32 < y < -1.2000000000000001e-75 or 2.60000000000000009e-83 < y

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    12. Simplified52.5%

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

    if -1.2000000000000001e-75 < y < 2.60000000000000009e-83

    1. Initial program 92.1%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{t \cdot z}} \]
    7. Step-by-step derivation
      1. mul-1-neg43.0%

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{-z}} \]
    8. Simplified40.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.5 \cdot 10^{+247}:\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{+231}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;y \leq -7.8 \cdot 10^{+61}:\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{elif}\;y \leq -1.5 \cdot 10^{+43}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;y \leq -6.6 \cdot 10^{+32}:\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-75} \lor \neg \left(y \leq 2.6 \cdot 10^{-83}\right):\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{-z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 49.5% accurate, 0.2× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{x}{y \cdot \left(-z\right)}\\ t_2 := \frac{\frac{x}{t}}{y}\\ \mathbf{if}\;y \leq -6 \cdot 10^{+247}:\\ \;\;\;\;x \cdot \frac{\frac{-1}{y}}{z}\\ \mathbf{elif}\;y \leq -3.7 \cdot 10^{+229}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;y \leq -6.5 \cdot 10^{+62}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -9.2 \cdot 10^{+42}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -7.6 \cdot 10^{+32}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -4 \cdot 10^{-75} \lor \neg \left(y \leq 1.35 \cdot 10^{-81}\right):\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{-z}\\ \end{array} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ x (* y (- z)))) (t_2 (/ (/ x t) y)))
   (if (<= y -6e+247)
     (* x (/ (/ -1.0 y) z))
     (if (<= y -3.7e+229)
       (/ (/ x y) t)
       (if (<= y -6.5e+62)
         t_1
         (if (<= y -9.2e+42)
           t_2
           (if (<= y -7.6e+32)
             t_1
             (if (or (<= y -4e-75) (not (<= y 1.35e-81)))
               t_2
               (/ (/ x t) (- z))))))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double t_1 = x / (y * -z);
	double t_2 = (x / t) / y;
	double tmp;
	if (y <= -6e+247) {
		tmp = x * ((-1.0 / y) / z);
	} else if (y <= -3.7e+229) {
		tmp = (x / y) / t;
	} else if (y <= -6.5e+62) {
		tmp = t_1;
	} else if (y <= -9.2e+42) {
		tmp = t_2;
	} else if (y <= -7.6e+32) {
		tmp = t_1;
	} else if ((y <= -4e-75) || !(y <= 1.35e-81)) {
		tmp = t_2;
	} else {
		tmp = (x / t) / -z;
	}
	return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x / (y * -z)
    t_2 = (x / t) / y
    if (y <= (-6d+247)) then
        tmp = x * (((-1.0d0) / y) / z)
    else if (y <= (-3.7d+229)) then
        tmp = (x / y) / t
    else if (y <= (-6.5d+62)) then
        tmp = t_1
    else if (y <= (-9.2d+42)) then
        tmp = t_2
    else if (y <= (-7.6d+32)) then
        tmp = t_1
    else if ((y <= (-4d-75)) .or. (.not. (y <= 1.35d-81))) then
        tmp = t_2
    else
        tmp = (x / t) / -z
    end if
    code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = x / (y * -z);
	double t_2 = (x / t) / y;
	double tmp;
	if (y <= -6e+247) {
		tmp = x * ((-1.0 / y) / z);
	} else if (y <= -3.7e+229) {
		tmp = (x / y) / t;
	} else if (y <= -6.5e+62) {
		tmp = t_1;
	} else if (y <= -9.2e+42) {
		tmp = t_2;
	} else if (y <= -7.6e+32) {
		tmp = t_1;
	} else if ((y <= -4e-75) || !(y <= 1.35e-81)) {
		tmp = t_2;
	} else {
		tmp = (x / t) / -z;
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	t_1 = x / (y * -z)
	t_2 = (x / t) / y
	tmp = 0
	if y <= -6e+247:
		tmp = x * ((-1.0 / y) / z)
	elif y <= -3.7e+229:
		tmp = (x / y) / t
	elif y <= -6.5e+62:
		tmp = t_1
	elif y <= -9.2e+42:
		tmp = t_2
	elif y <= -7.6e+32:
		tmp = t_1
	elif (y <= -4e-75) or not (y <= 1.35e-81):
		tmp = t_2
	else:
		tmp = (x / t) / -z
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	t_1 = Float64(x / Float64(y * Float64(-z)))
	t_2 = Float64(Float64(x / t) / y)
	tmp = 0.0
	if (y <= -6e+247)
		tmp = Float64(x * Float64(Float64(-1.0 / y) / z));
	elseif (y <= -3.7e+229)
		tmp = Float64(Float64(x / y) / t);
	elseif (y <= -6.5e+62)
		tmp = t_1;
	elseif (y <= -9.2e+42)
		tmp = t_2;
	elseif (y <= -7.6e+32)
		tmp = t_1;
	elseif ((y <= -4e-75) || !(y <= 1.35e-81))
		tmp = t_2;
	else
		tmp = Float64(Float64(x / t) / Float64(-z));
	end
	return tmp
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = x / (y * -z);
	t_2 = (x / t) / y;
	tmp = 0.0;
	if (y <= -6e+247)
		tmp = x * ((-1.0 / y) / z);
	elseif (y <= -3.7e+229)
		tmp = (x / y) / t;
	elseif (y <= -6.5e+62)
		tmp = t_1;
	elseif (y <= -9.2e+42)
		tmp = t_2;
	elseif (y <= -7.6e+32)
		tmp = t_1;
	elseif ((y <= -4e-75) || ~((y <= 1.35e-81)))
		tmp = t_2;
	else
		tmp = (x / t) / -z;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -6e+247], N[(x * N[(N[(-1.0 / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.7e+229], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, -6.5e+62], t$95$1, If[LessEqual[y, -9.2e+42], t$95$2, If[LessEqual[y, -7.6e+32], t$95$1, If[Or[LessEqual[y, -4e-75], N[Not[LessEqual[y, 1.35e-81]], $MachinePrecision]], t$95$2, N[(N[(x / t), $MachinePrecision] / (-z)), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot \left(-z\right)}\\
t_2 := \frac{\frac{x}{t}}{y}\\
\mathbf{if}\;y \leq -6 \cdot 10^{+247}:\\
\;\;\;\;x \cdot \frac{\frac{-1}{y}}{z}\\

\mathbf{elif}\;y \leq -3.7 \cdot 10^{+229}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\

\mathbf{elif}\;y \leq -6.5 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -9.2 \cdot 10^{+42}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -7.6 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -4 \cdot 10^{-75} \lor \neg \left(y \leq 1.35 \cdot 10^{-81}\right):\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -6e247

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

    if -6e247 < y < -3.70000000000000002e229

    1. Initial program 81.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{y}}{t}} \]
      2. *-lft-identity99.7%

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

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

    if -3.70000000000000002e229 < y < -6.5000000000000003e62 or -9.2e42 < y < -7.6000000000000006e32

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

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

    if -6.5000000000000003e62 < y < -9.2e42 or -7.6000000000000006e32 < y < -3.9999999999999998e-75 or 1.34999999999999995e-81 < y

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    12. Simplified52.5%

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

    if -3.9999999999999998e-75 < y < 1.34999999999999995e-81

    1. Initial program 92.1%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{t \cdot z}} \]
    7. Step-by-step derivation
      1. mul-1-neg43.0%

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{-z}} \]
    8. Simplified40.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6 \cdot 10^{+247}:\\ \;\;\;\;x \cdot \frac{\frac{-1}{y}}{z}\\ \mathbf{elif}\;y \leq -3.7 \cdot 10^{+229}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;y \leq -6.5 \cdot 10^{+62}:\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{elif}\;y \leq -9.2 \cdot 10^{+42}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;y \leq -7.6 \cdot 10^{+32}:\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{elif}\;y \leq -4 \cdot 10^{-75} \lor \neg \left(y \leq 1.35 \cdot 10^{-81}\right):\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{-z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 47.3% accurate, 0.3× speedup?

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

\mathbf{elif}\;t \leq 2.3 \cdot 10^{-186}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\

\mathbf{elif}\;t \leq 4.5 \cdot 10^{-146}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 3.8 \cdot 10^{+106}:\\
\;\;\;\;x \cdot \frac{\frac{1}{y}}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < 1.64999999999999993e-232 or 2.3000000000000001e-186 < t < 4.5000000000000001e-146

    1. Initial program 87.4%

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

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

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

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

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

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

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

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

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

    if 1.64999999999999993e-232 < t < 2.3000000000000001e-186

    1. Initial program 93.8%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x}{y}}{t}} \]
      2. *-lft-identity26.7%

        \[\leadsto \frac{\color{blue}{\frac{x}{y}}}{t} \]
    7. Simplified26.7%

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

    if 4.5000000000000001e-146 < t < 3.7999999999999998e106

    1. Initial program 93.7%

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

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

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

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

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

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

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

    if 3.7999999999999998e106 < t

    1. Initial program 93.1%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{t \cdot z}} \]
    7. Step-by-step derivation
      1. mul-1-neg63.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.65 \cdot 10^{-232}:\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-186}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-146}:\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{+106}:\\ \;\;\;\;x \cdot \frac{\frac{1}{y}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{-z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 47.3% accurate, 0.3× speedup?

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

\mathbf{elif}\;t \leq 2.3 \cdot 10^{-186}:\\
\;\;\;\;\frac{1}{t \cdot \frac{y}{x}}\\

\mathbf{elif}\;t \leq 1.22 \cdot 10^{-145}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 6.4 \cdot 10^{+105}:\\
\;\;\;\;x \cdot \frac{\frac{1}{y}}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < 5.40000000000000023e-230 or 2.3000000000000001e-186 < t < 1.2199999999999999e-145

    1. Initial program 87.4%

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

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

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

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

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

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

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

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

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

    if 5.40000000000000023e-230 < t < 2.3000000000000001e-186

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\color{blue}{\frac{y \cdot t}{x}}} \]
      3. *-commutative20.9%

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

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

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

    if 1.2199999999999999e-145 < t < 6.4e105

    1. Initial program 93.7%

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

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

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

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

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

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

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

    if 6.4e105 < t

    1. Initial program 93.1%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{t \cdot z}} \]
    7. Step-by-step derivation
      1. mul-1-neg63.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 5.4 \cdot 10^{-230}:\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-186}:\\ \;\;\;\;\frac{1}{t \cdot \frac{y}{x}}\\ \mathbf{elif}\;t \leq 1.22 \cdot 10^{-145}:\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{elif}\;t \leq 6.4 \cdot 10^{+105}:\\ \;\;\;\;x \cdot \frac{\frac{1}{y}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{-z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 65.5% accurate, 0.3× speedup?

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

\mathbf{elif}\;t \leq 5.5 \cdot 10^{-230}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 2.6 \cdot 10^{-186}:\\
\;\;\;\;\frac{1}{t \cdot \frac{y}{x}}\\

\mathbf{elif}\;t \leq 4.8 \cdot 10^{-145}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 91.4%

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{\frac{1}{y}}{\color{blue}{t + \left(-z\right)}} \]
      4. add-sqr-sqrt32.0%

        \[\leadsto x \cdot \frac{\frac{1}{y}}{t + \color{blue}{\sqrt{-z} \cdot \sqrt{-z}}} \]
      5. sqrt-unprod65.8%

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

        \[\leadsto x \cdot \frac{\frac{1}{y}}{t + \sqrt{\color{blue}{z \cdot z}}} \]
      7. sqrt-unprod25.3%

        \[\leadsto x \cdot \frac{\frac{1}{y}}{t + \color{blue}{\sqrt{z} \cdot \sqrt{z}}} \]
      8. add-sqr-sqrt57.2%

        \[\leadsto x \cdot \frac{\frac{1}{y}}{t + \color{blue}{z}} \]
      9. +-commutative57.2%

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

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

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

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

        \[\leadsto \frac{\color{blue}{x}}{y \cdot \left(z + t\right)} \]
    9. Simplified57.2%

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

    if -3.3000000000000002e-113 < t < 5.4999999999999997e-230 or 2.59999999999999993e-186 < t < 4.8000000000000003e-145

    1. Initial program 83.1%

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

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

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

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

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

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

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

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

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

    if 5.4999999999999997e-230 < t < 2.59999999999999993e-186

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\color{blue}{\frac{y \cdot t}{x}}} \]
      3. *-commutative20.9%

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

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

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

    if 4.8000000000000003e-145 < t

    1. Initial program 93.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.3 \cdot 10^{-113}:\\ \;\;\;\;\frac{x}{y \cdot \left(z + t\right)}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-230}:\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-186}:\\ \;\;\;\;\frac{1}{t \cdot \frac{y}{x}}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-145}:\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 61.5% accurate, 0.4× speedup?

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

\mathbf{elif}\;t \leq 2.3 \cdot 10^{-186}:\\
\;\;\;\;\frac{1}{t \cdot \frac{y}{x}}\\

\mathbf{elif}\;t \leq 4.5 \cdot 10^{-145}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < 5.4999999999999997e-230 or 2.3000000000000001e-186 < t < 4.5000000000000001e-145

    1. Initial program 87.4%

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

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

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

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

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

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

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

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

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

    if 5.4999999999999997e-230 < t < 2.3000000000000001e-186

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\color{blue}{\frac{y \cdot t}{x}}} \]
      3. *-commutative20.9%

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

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

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

    if 4.5000000000000001e-145 < t

    1. Initial program 93.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 5.5 \cdot 10^{-230}:\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-186}:\\ \;\;\;\;\frac{1}{t \cdot \frac{y}{x}}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-145}:\\ \;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 77.9% accurate, 0.5× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.00000000000000024e56 or 2.5999999999999998e-93 < z

    1. Initial program 87.2%

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

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

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

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

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

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

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

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

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

    if -5.00000000000000024e56 < z < 2.5999999999999998e-93

    1. Initial program 93.6%

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

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

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

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

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

Alternative 9: 73.1% accurate, 0.5× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.00000000000000024e56 or 5.49999999999999965e-91 < z

    1. Initial program 87.2%

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

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

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

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

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

    if -5.00000000000000024e56 < z < 5.49999999999999965e-91

    1. Initial program 93.6%

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

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

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

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

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

Alternative 10: 80.7% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 91.4%

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

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

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

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

    if -9.49999999999999953e-144 < t < 3.3000000000000001e43

    1. Initial program 87.7%

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

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

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

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

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

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

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

    if 3.3000000000000001e43 < t

    1. Initial program 91.7%

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

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

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

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

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

Alternative 11: 49.0% accurate, 0.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.00000000000000024e56 or 1.70000000000000001e-93 < z

    1. Initial program 87.2%

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

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

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

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

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

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

    if -5.00000000000000024e56 < z < 1.70000000000000001e-93

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    12. Simplified66.1%

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

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

Alternative 12: 89.8% accurate, 0.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 7.1999999999999999e70

    1. Initial program 89.3%

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

    if 7.1999999999999999e70 < t

    1. Initial program 92.3%

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

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

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

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

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

Alternative 13: 70.4% accurate, 0.7× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 2.9000000000000002e-6

    1. Initial program 88.9%

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

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

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

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

    if 2.9000000000000002e-6 < t

    1. Initial program 92.8%

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

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

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

Alternative 14: 71.7% accurate, 0.7× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.2e-56

    1. Initial program 88.6%

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

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

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

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

    if 1.2e-56 < t

    1. Initial program 93.2%

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

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

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

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

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

Alternative 15: 71.3% accurate, 0.7× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.36e-7

    1. Initial program 88.9%

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

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

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

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

    if 1.36e-7 < t

    1. Initial program 92.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.36 \cdot 10^{-7}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 44.7% accurate, 0.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.99999999999999999e63

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

    if -2.99999999999999999e63 < y

    1. Initial program 89.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
    12. Simplified40.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{+63}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 96.7% accurate, 1.0× speedup?

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

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

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

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

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

Alternative 18: 39.6% accurate, 1.8× speedup?

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

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

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

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

Alternative 19: 42.7% accurate, 1.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
  12. Simplified41.5%

    \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
  13. Final simplification41.5%

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

Developer target: 88.2% 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 2024067 
(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))))