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

Percentage Accurate: 88.6% → 96.7%
Time: 12.8s
Alternatives: 19
Speedup: 0.7×

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: 88.6% accurate, 1.0× speedup?

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

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

Alternative 1: 96.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 4.5 \cdot 10^{+255}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y - z} \cdot \frac{1}{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
 (if (<= t 4.5e+255)
   (/ (/ x (- t z)) (- y z))
   (* (/ x (- y z)) (/ 1.0 (- t z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= 4.5e+255) {
		tmp = (x / (t - z)) / (y - z);
	} else {
		tmp = (x / (y - z)) * (1.0 / (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) :: tmp
    if (t <= 4.5d+255) then
        tmp = (x / (t - z)) / (y - z)
    else
        tmp = (x / (y - z)) * (1.0d0 / (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 tmp;
	if (t <= 4.5e+255) {
		tmp = (x / (t - z)) / (y - z);
	} else {
		tmp = (x / (y - z)) * (1.0 / (t - z));
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if t <= 4.5e+255:
		tmp = (x / (t - z)) / (y - z)
	else:
		tmp = (x / (y - z)) * (1.0 / (t - z))
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	tmp = 0.0
	if (t <= 4.5e+255)
		tmp = Float64(Float64(x / Float64(t - z)) / Float64(y - z));
	else
		tmp = Float64(Float64(x / Float64(y - z)) * Float64(1.0 / Float64(t - 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 <= 4.5e+255)
		tmp = (x / (t - z)) / (y - z);
	else
		tmp = (x / (y - z)) * (1.0 / (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_] := If[LessEqual[t, 4.5e+255], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.5 \cdot 10^{+255}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y - z}\\

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


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

    1. Initial program 90.1%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. add-sqr-sqrt43.9%

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

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

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

        \[\leadsto \color{blue}{\frac{\sqrt{x} \cdot \sqrt{x}}{\left(y - z\right) \cdot \left(t - z\right)}} \]
      2. add-sqr-sqrt90.1%

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

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

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

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

    if 4.49999999999999964e255 < t

    1. Initial program 78.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 4.5 \cdot 10^{+255}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y - z} \cdot \frac{1}{t - z}\\ \end{array} \]

Alternative 2: 49.9% accurate, 0.0× speedup?

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

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

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

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

    \[\leadsto \color{blue}{\frac{\sqrt{x}}{y - z} \cdot \frac{\sqrt{x}}{t - z}} \]
  4. Final simplification48.2%

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

Alternative 3: 92.4% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \left(t - z\right)\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+290}:\\ \;\;\;\;\frac{x}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-x}{z}}{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
 (let* ((t_1 (* (- y z) (- t z))))
   (if (<= t_1 (- INFINITY))
     (/ (/ x t) (- y z))
     (if (<= t_1 2e+290) (/ x t_1) (/ (/ (- x) z) (- y z))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (t - z);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = (x / t) / (y - z);
	} else if (t_1 <= 2e+290) {
		tmp = x / t_1;
	} else {
		tmp = (-x / z) / (y - z);
	}
	return tmp;
}
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (t - z);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = (x / t) / (y - z);
	} else if (t_1 <= 2e+290) {
		tmp = x / t_1;
	} else {
		tmp = (-x / z) / (y - z);
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	t_1 = (y - z) * (t - z)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = (x / t) / (y - z)
	elif t_1 <= 2e+290:
		tmp = x / t_1
	else:
		tmp = (-x / z) / (y - z)
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(y - z) * Float64(t - z))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(Float64(x / t) / Float64(y - z));
	elseif (t_1 <= 2e+290)
		tmp = Float64(x / t_1);
	else
		tmp = Float64(Float64(Float64(-x) / z) / 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)
	t_1 = (y - z) * (t - z);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = (x / t) / (y - z);
	elseif (t_1 <= 2e+290)
		tmp = x / t_1;
	else
		tmp = (-x / z) / (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_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+290], N[(x / t$95$1), $MachinePrecision], N[(N[((-x) / z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+290}:\\
\;\;\;\;\frac{x}{t_1}\\

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


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

    1. Initial program 56.3%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\sqrt{x} \cdot \sqrt{x}}{\left(y - z\right) \cdot \left(t - z\right)}} \]
      2. add-sqr-sqrt56.3%

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

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

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

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

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

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

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

    if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 2.00000000000000012e290

    1. Initial program 98.6%

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

    if 2.00000000000000012e290 < (*.f64 (-.f64 y z) (-.f64 t z))

    1. Initial program 76.0%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. add-sqr-sqrt36.0%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 93.1% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \left(t - z\right)\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+290}:\\ \;\;\;\;\frac{x}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-1}{z}}{\frac{y - z}{x}}\\ \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 (* (- y z) (- t z))))
   (if (<= t_1 (- INFINITY))
     (/ (/ x t) (- y z))
     (if (<= t_1 2e+290) (/ x t_1) (/ (/ -1.0 z) (/ (- y z) x))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (t - z);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = (x / t) / (y - z);
	} else if (t_1 <= 2e+290) {
		tmp = x / t_1;
	} else {
		tmp = (-1.0 / z) / ((y - z) / x);
	}
	return tmp;
}
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (t - z);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = (x / t) / (y - z);
	} else if (t_1 <= 2e+290) {
		tmp = x / t_1;
	} else {
		tmp = (-1.0 / z) / ((y - z) / x);
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	t_1 = (y - z) * (t - z)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = (x / t) / (y - z)
	elif t_1 <= 2e+290:
		tmp = x / t_1
	else:
		tmp = (-1.0 / z) / ((y - z) / x)
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(y - z) * Float64(t - z))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(Float64(x / t) / Float64(y - z));
	elseif (t_1 <= 2e+290)
		tmp = Float64(x / t_1);
	else
		tmp = Float64(Float64(-1.0 / z) / Float64(Float64(y - z) / x));
	end
	return tmp
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = (y - z) * (t - z);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = (x / t) / (y - z);
	elseif (t_1 <= 2e+290)
		tmp = x / t_1;
	else
		tmp = (-1.0 / z) / ((y - z) / x);
	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[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+290], N[(x / t$95$1), $MachinePrecision], N[(N[(-1.0 / z), $MachinePrecision] / N[(N[(y - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+290}:\\
\;\;\;\;\frac{x}{t_1}\\

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


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

    1. Initial program 56.3%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\sqrt{x} \cdot \sqrt{x}}{\left(y - z\right) \cdot \left(t - z\right)}} \]
      2. add-sqr-sqrt56.3%

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

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

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

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

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

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

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

    if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 2.00000000000000012e290

    1. Initial program 98.6%

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

    if 2.00000000000000012e290 < (*.f64 (-.f64 y z) (-.f64 t z))

    1. Initial program 76.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 97.8% accurate, 0.5× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\ \mathbf{if}\;t_1 \leq 0:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y - z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \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 z)))))
   (if (<= t_1 0.0) (/ (/ x (- t z)) (- y z)) t_1)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double t_1 = x / ((y - z) * (t - z));
	double tmp;
	if (t_1 <= 0.0) {
		tmp = (x / (t - z)) / (y - z);
	} else {
		tmp = t_1;
	}
	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) * (t - z))
    if (t_1 <= 0.0d0) then
        tmp = (x / (t - z)) / (y - z)
    else
        tmp = t_1
    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) * (t - z));
	double tmp;
	if (t_1 <= 0.0) {
		tmp = (x / (t - z)) / (y - z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	t_1 = x / ((y - z) * (t - z))
	tmp = 0
	if t_1 <= 0.0:
		tmp = (x / (t - z)) / (y - z)
	else:
		tmp = t_1
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	t_1 = Float64(x / Float64(Float64(y - z) * Float64(t - z)))
	tmp = 0.0
	if (t_1 <= 0.0)
		tmp = Float64(Float64(x / Float64(t - z)) / Float64(y - z));
	else
		tmp = t_1;
	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 - z));
	tmp = 0.0;
	if (t_1 <= 0.0)
		tmp = (x / (t - z)) / (y - z);
	else
		tmp = t_1;
	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[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], t$95$1]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\mathbf{if}\;t_1 \leq 0:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) < -0.0

    1. Initial program 84.6%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. add-sqr-sqrt38.8%

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

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

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

        \[\leadsto \color{blue}{\frac{\sqrt{x} \cdot \sqrt{x}}{\left(y - z\right) \cdot \left(t - z\right)}} \]
      2. add-sqr-sqrt84.6%

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

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

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

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

    if -0.0 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z)))

    1. Initial program 99.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \leq 0:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\ \end{array} \]

Alternative 6: 50.5% accurate, 0.5× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{\frac{x}{t}}{y}\\ t_2 := \frac{-x}{z \cdot t}\\ \mathbf{if}\;t \leq -4.6 \cdot 10^{-38}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-91}:\\ \;\;\;\;\frac{-x}{y \cdot z}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+91}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{+133}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{+218}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{+251}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{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 t) y)) (t_2 (/ (- x) (* z t))))
   (if (<= t -4.6e-38)
     (/ x (* y t))
     (if (<= t 4.5e-91)
       (/ (- x) (* y z))
       (if (<= t 1.9e+91)
         t_1
         (if (<= t 1.05e+133)
           t_2
           (if (<= t 3.3e+218)
             t_1
             (if (<= t 1.3e+251) t_2 (/ (/ x y) t)))))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double t_1 = (x / t) / y;
	double t_2 = -x / (z * t);
	double tmp;
	if (t <= -4.6e-38) {
		tmp = x / (y * t);
	} else if (t <= 4.5e-91) {
		tmp = -x / (y * z);
	} else if (t <= 1.9e+91) {
		tmp = t_1;
	} else if (t <= 1.05e+133) {
		tmp = t_2;
	} else if (t <= 3.3e+218) {
		tmp = t_1;
	} else if (t <= 1.3e+251) {
		tmp = t_2;
	} else {
		tmp = (x / y) / 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) :: t_2
    real(8) :: tmp
    t_1 = (x / t) / y
    t_2 = -x / (z * t)
    if (t <= (-4.6d-38)) then
        tmp = x / (y * t)
    else if (t <= 4.5d-91) then
        tmp = -x / (y * z)
    else if (t <= 1.9d+91) then
        tmp = t_1
    else if (t <= 1.05d+133) then
        tmp = t_2
    else if (t <= 3.3d+218) then
        tmp = t_1
    else if (t <= 1.3d+251) then
        tmp = t_2
    else
        tmp = (x / y) / 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 / t) / y;
	double t_2 = -x / (z * t);
	double tmp;
	if (t <= -4.6e-38) {
		tmp = x / (y * t);
	} else if (t <= 4.5e-91) {
		tmp = -x / (y * z);
	} else if (t <= 1.9e+91) {
		tmp = t_1;
	} else if (t <= 1.05e+133) {
		tmp = t_2;
	} else if (t <= 3.3e+218) {
		tmp = t_1;
	} else if (t <= 1.3e+251) {
		tmp = t_2;
	} else {
		tmp = (x / y) / t;
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	t_1 = (x / t) / y
	t_2 = -x / (z * t)
	tmp = 0
	if t <= -4.6e-38:
		tmp = x / (y * t)
	elif t <= 4.5e-91:
		tmp = -x / (y * z)
	elif t <= 1.9e+91:
		tmp = t_1
	elif t <= 1.05e+133:
		tmp = t_2
	elif t <= 3.3e+218:
		tmp = t_1
	elif t <= 1.3e+251:
		tmp = t_2
	else:
		tmp = (x / y) / t
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(x / t) / y)
	t_2 = Float64(Float64(-x) / Float64(z * t))
	tmp = 0.0
	if (t <= -4.6e-38)
		tmp = Float64(x / Float64(y * t));
	elseif (t <= 4.5e-91)
		tmp = Float64(Float64(-x) / Float64(y * z));
	elseif (t <= 1.9e+91)
		tmp = t_1;
	elseif (t <= 1.05e+133)
		tmp = t_2;
	elseif (t <= 3.3e+218)
		tmp = t_1;
	elseif (t <= 1.3e+251)
		tmp = t_2;
	else
		tmp = Float64(Float64(x / y) / 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 / t) / y;
	t_2 = -x / (z * t);
	tmp = 0.0;
	if (t <= -4.6e-38)
		tmp = x / (y * t);
	elseif (t <= 4.5e-91)
		tmp = -x / (y * z);
	elseif (t <= 1.9e+91)
		tmp = t_1;
	elseif (t <= 1.05e+133)
		tmp = t_2;
	elseif (t <= 3.3e+218)
		tmp = t_1;
	elseif (t <= 1.3e+251)
		tmp = t_2;
	else
		tmp = (x / y) / 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[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.6e-38], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e-91], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e+91], t$95$1, If[LessEqual[t, 1.05e+133], t$95$2, If[LessEqual[t, 3.3e+218], t$95$1, If[LessEqual[t, 1.3e+251], t$95$2, N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{t}}{y}\\
t_2 := \frac{-x}{z \cdot t}\\
\mathbf{if}\;t \leq -4.6 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{y \cdot t}\\

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

\mathbf{elif}\;t \leq 1.9 \cdot 10^{+91}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.05 \cdot 10^{+133}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 3.3 \cdot 10^{+218}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.3 \cdot 10^{+251}:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 90.1%

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

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

    if -4.60000000000000003e-38 < t < 4.49999999999999976e-91

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

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

    if 4.49999999999999976e-91 < t < 1.8999999999999999e91 or 1.05e133 < t < 3.29999999999999998e218

    1. Initial program 83.0%

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

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

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

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

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

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

    if 1.8999999999999999e91 < t < 1.05e133 or 3.29999999999999998e218 < t < 1.3000000000000001e251

    1. Initial program 93.4%

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

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

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

        \[\leadsto \frac{x}{t \cdot y + z \cdot \color{blue}{\left(-\left(t + y\right)\right)}} \]
      3. distribute-rgt-neg-in92.9%

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

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

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

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

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

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

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

    if 1.3000000000000001e251 < t

    1. Initial program 80.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.6 \cdot 10^{-38}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-91}:\\ \;\;\;\;\frac{-x}{y \cdot z}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+91}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{+133}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{+218}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{+251}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \end{array} \]

Alternative 7: 51.4% accurate, 0.5× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{\frac{x}{t}}{y}\\ t_2 := \frac{-x}{z \cdot t}\\ \mathbf{if}\;t \leq -9.5 \cdot 10^{-37}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-93}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y}\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+91}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+133}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+213}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+251}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{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 t) y)) (t_2 (/ (- x) (* z t))))
   (if (<= t -9.5e-37)
     (/ x (* y t))
     (if (<= t 3.1e-93)
       (/ (/ (- x) z) y)
       (if (<= t 1.1e+91)
         t_1
         (if (<= t 1.15e+133)
           t_2
           (if (<= t 2.7e+213)
             t_1
             (if (<= t 1.1e+251) t_2 (/ (/ x y) t)))))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double t_1 = (x / t) / y;
	double t_2 = -x / (z * t);
	double tmp;
	if (t <= -9.5e-37) {
		tmp = x / (y * t);
	} else if (t <= 3.1e-93) {
		tmp = (-x / z) / y;
	} else if (t <= 1.1e+91) {
		tmp = t_1;
	} else if (t <= 1.15e+133) {
		tmp = t_2;
	} else if (t <= 2.7e+213) {
		tmp = t_1;
	} else if (t <= 1.1e+251) {
		tmp = t_2;
	} else {
		tmp = (x / y) / 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) :: t_2
    real(8) :: tmp
    t_1 = (x / t) / y
    t_2 = -x / (z * t)
    if (t <= (-9.5d-37)) then
        tmp = x / (y * t)
    else if (t <= 3.1d-93) then
        tmp = (-x / z) / y
    else if (t <= 1.1d+91) then
        tmp = t_1
    else if (t <= 1.15d+133) then
        tmp = t_2
    else if (t <= 2.7d+213) then
        tmp = t_1
    else if (t <= 1.1d+251) then
        tmp = t_2
    else
        tmp = (x / y) / 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 / t) / y;
	double t_2 = -x / (z * t);
	double tmp;
	if (t <= -9.5e-37) {
		tmp = x / (y * t);
	} else if (t <= 3.1e-93) {
		tmp = (-x / z) / y;
	} else if (t <= 1.1e+91) {
		tmp = t_1;
	} else if (t <= 1.15e+133) {
		tmp = t_2;
	} else if (t <= 2.7e+213) {
		tmp = t_1;
	} else if (t <= 1.1e+251) {
		tmp = t_2;
	} else {
		tmp = (x / y) / t;
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	t_1 = (x / t) / y
	t_2 = -x / (z * t)
	tmp = 0
	if t <= -9.5e-37:
		tmp = x / (y * t)
	elif t <= 3.1e-93:
		tmp = (-x / z) / y
	elif t <= 1.1e+91:
		tmp = t_1
	elif t <= 1.15e+133:
		tmp = t_2
	elif t <= 2.7e+213:
		tmp = t_1
	elif t <= 1.1e+251:
		tmp = t_2
	else:
		tmp = (x / y) / t
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(x / t) / y)
	t_2 = Float64(Float64(-x) / Float64(z * t))
	tmp = 0.0
	if (t <= -9.5e-37)
		tmp = Float64(x / Float64(y * t));
	elseif (t <= 3.1e-93)
		tmp = Float64(Float64(Float64(-x) / z) / y);
	elseif (t <= 1.1e+91)
		tmp = t_1;
	elseif (t <= 1.15e+133)
		tmp = t_2;
	elseif (t <= 2.7e+213)
		tmp = t_1;
	elseif (t <= 1.1e+251)
		tmp = t_2;
	else
		tmp = Float64(Float64(x / y) / 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 / t) / y;
	t_2 = -x / (z * t);
	tmp = 0.0;
	if (t <= -9.5e-37)
		tmp = x / (y * t);
	elseif (t <= 3.1e-93)
		tmp = (-x / z) / y;
	elseif (t <= 1.1e+91)
		tmp = t_1;
	elseif (t <= 1.15e+133)
		tmp = t_2;
	elseif (t <= 2.7e+213)
		tmp = t_1;
	elseif (t <= 1.1e+251)
		tmp = t_2;
	else
		tmp = (x / y) / 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[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.5e-37], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.1e-93], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.1e+91], t$95$1, If[LessEqual[t, 1.15e+133], t$95$2, If[LessEqual[t, 2.7e+213], t$95$1, If[LessEqual[t, 1.1e+251], t$95$2, N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{t}}{y}\\
t_2 := \frac{-x}{z \cdot t}\\
\mathbf{if}\;t \leq -9.5 \cdot 10^{-37}:\\
\;\;\;\;\frac{x}{y \cdot t}\\

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

\mathbf{elif}\;t \leq 1.1 \cdot 10^{+91}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.15 \cdot 10^{+133}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 2.7 \cdot 10^{+213}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.1 \cdot 10^{+251}:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 90.1%

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

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

    if -9.49999999999999927e-37 < t < 3.1e-93

    1. Initial program 93.3%

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

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

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

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

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

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

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

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

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

    if 3.1e-93 < t < 1.1e91 or 1.14999999999999995e133 < t < 2.7000000000000001e213

    1. Initial program 83.3%

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

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

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

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

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

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

    if 1.1e91 < t < 1.14999999999999995e133 or 2.7000000000000001e213 < t < 1.1e251

    1. Initial program 93.4%

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

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

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

        \[\leadsto \frac{x}{t \cdot y + z \cdot \color{blue}{\left(-\left(t + y\right)\right)}} \]
      3. distribute-rgt-neg-in92.9%

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

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

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

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

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

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

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

    if 1.1e251 < t

    1. Initial program 80.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.5 \cdot 10^{-37}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-93}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y}\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+91}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+133}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+213}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+251}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \end{array} \]

Alternative 8: 51.6% accurate, 0.5× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{-x}{z \cdot t}\\ \mathbf{if}\;t \leq -1.95 \cdot 10^{-37}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-93}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+91}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{+132}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+218}:\\ \;\;\;\;\frac{x}{t} \cdot \frac{1}{y}\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+251}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{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) (* z t))))
   (if (<= t -1.95e-37)
     (/ x (* y t))
     (if (<= t 1.2e-93)
       (/ (/ (- x) z) y)
       (if (<= t 1.2e+91)
         (/ (/ x t) y)
         (if (<= t 8.2e+132)
           t_1
           (if (<= t 5.5e+218)
             (* (/ x t) (/ 1.0 y))
             (if (<= t 1.1e+251) t_1 (/ (/ x y) t)))))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double t_1 = -x / (z * t);
	double tmp;
	if (t <= -1.95e-37) {
		tmp = x / (y * t);
	} else if (t <= 1.2e-93) {
		tmp = (-x / z) / y;
	} else if (t <= 1.2e+91) {
		tmp = (x / t) / y;
	} else if (t <= 8.2e+132) {
		tmp = t_1;
	} else if (t <= 5.5e+218) {
		tmp = (x / t) * (1.0 / y);
	} else if (t <= 1.1e+251) {
		tmp = t_1;
	} else {
		tmp = (x / y) / 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 / (z * t)
    if (t <= (-1.95d-37)) then
        tmp = x / (y * t)
    else if (t <= 1.2d-93) then
        tmp = (-x / z) / y
    else if (t <= 1.2d+91) then
        tmp = (x / t) / y
    else if (t <= 8.2d+132) then
        tmp = t_1
    else if (t <= 5.5d+218) then
        tmp = (x / t) * (1.0d0 / y)
    else if (t <= 1.1d+251) then
        tmp = t_1
    else
        tmp = (x / y) / 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 / (z * t);
	double tmp;
	if (t <= -1.95e-37) {
		tmp = x / (y * t);
	} else if (t <= 1.2e-93) {
		tmp = (-x / z) / y;
	} else if (t <= 1.2e+91) {
		tmp = (x / t) / y;
	} else if (t <= 8.2e+132) {
		tmp = t_1;
	} else if (t <= 5.5e+218) {
		tmp = (x / t) * (1.0 / y);
	} else if (t <= 1.1e+251) {
		tmp = t_1;
	} else {
		tmp = (x / y) / t;
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	t_1 = -x / (z * t)
	tmp = 0
	if t <= -1.95e-37:
		tmp = x / (y * t)
	elif t <= 1.2e-93:
		tmp = (-x / z) / y
	elif t <= 1.2e+91:
		tmp = (x / t) / y
	elif t <= 8.2e+132:
		tmp = t_1
	elif t <= 5.5e+218:
		tmp = (x / t) * (1.0 / y)
	elif t <= 1.1e+251:
		tmp = t_1
	else:
		tmp = (x / y) / t
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(-x) / Float64(z * t))
	tmp = 0.0
	if (t <= -1.95e-37)
		tmp = Float64(x / Float64(y * t));
	elseif (t <= 1.2e-93)
		tmp = Float64(Float64(Float64(-x) / z) / y);
	elseif (t <= 1.2e+91)
		tmp = Float64(Float64(x / t) / y);
	elseif (t <= 8.2e+132)
		tmp = t_1;
	elseif (t <= 5.5e+218)
		tmp = Float64(Float64(x / t) * Float64(1.0 / y));
	elseif (t <= 1.1e+251)
		tmp = t_1;
	else
		tmp = Float64(Float64(x / y) / 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 / (z * t);
	tmp = 0.0;
	if (t <= -1.95e-37)
		tmp = x / (y * t);
	elseif (t <= 1.2e-93)
		tmp = (-x / z) / y;
	elseif (t <= 1.2e+91)
		tmp = (x / t) / y;
	elseif (t <= 8.2e+132)
		tmp = t_1;
	elseif (t <= 5.5e+218)
		tmp = (x / t) * (1.0 / y);
	elseif (t <= 1.1e+251)
		tmp = t_1;
	else
		tmp = (x / y) / 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[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.95e-37], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e-93], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.2e+91], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 8.2e+132], t$95$1, If[LessEqual[t, 5.5e+218], N[(N[(x / t), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e+251], t$95$1, N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{-x}{z \cdot t}\\
\mathbf{if}\;t \leq -1.95 \cdot 10^{-37}:\\
\;\;\;\;\frac{x}{y \cdot t}\\

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

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

\mathbf{elif}\;t \leq 8.2 \cdot 10^{+132}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 1.1 \cdot 10^{+251}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 90.1%

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

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

    if -1.94999999999999995e-37 < t < 1.2000000000000001e-93

    1. Initial program 93.3%

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

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

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

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

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

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

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

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

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

    if 1.2000000000000001e-93 < t < 1.19999999999999991e91

    1. Initial program 92.7%

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

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

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

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

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

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

    if 1.19999999999999991e91 < t < 8.19999999999999983e132 or 5.5000000000000004e218 < t < 1.1e251

    1. Initial program 93.4%

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

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

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

        \[\leadsto \frac{x}{t \cdot y + z \cdot \color{blue}{\left(-\left(t + y\right)\right)}} \]
      3. distribute-rgt-neg-in92.9%

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

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

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

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

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

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

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

    if 8.19999999999999983e132 < t < 5.5000000000000004e218

    1. Initial program 59.2%

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

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

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

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

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

    if 1.1e251 < t

    1. Initial program 80.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.95 \cdot 10^{-37}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-93}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+91}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{+132}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+218}:\\ \;\;\;\;\frac{x}{t} \cdot \frac{1}{y}\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+251}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \end{array} \]

Alternative 9: 51.6% accurate, 0.5× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{-x}{z \cdot t}\\ \mathbf{if}\;t \leq -4.8 \cdot 10^{-38}:\\ \;\;\;\;x \cdot \frac{\frac{1}{t}}{y}\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{-94}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y}\\ \mathbf{elif}\;t \leq 1.52 \cdot 10^{+90}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{+133}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+218}:\\ \;\;\;\;\frac{x}{t} \cdot \frac{1}{y}\\ \mathbf{elif}\;t \leq 1.06 \cdot 10^{+251}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{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) (* z t))))
   (if (<= t -4.8e-38)
     (* x (/ (/ 1.0 t) y))
     (if (<= t 2.25e-94)
       (/ (/ (- x) z) y)
       (if (<= t 1.52e+90)
         (/ (/ x t) y)
         (if (<= t 2.4e+133)
           t_1
           (if (<= t 1.9e+218)
             (* (/ x t) (/ 1.0 y))
             (if (<= t 1.06e+251) t_1 (/ (/ x y) t)))))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double t_1 = -x / (z * t);
	double tmp;
	if (t <= -4.8e-38) {
		tmp = x * ((1.0 / t) / y);
	} else if (t <= 2.25e-94) {
		tmp = (-x / z) / y;
	} else if (t <= 1.52e+90) {
		tmp = (x / t) / y;
	} else if (t <= 2.4e+133) {
		tmp = t_1;
	} else if (t <= 1.9e+218) {
		tmp = (x / t) * (1.0 / y);
	} else if (t <= 1.06e+251) {
		tmp = t_1;
	} else {
		tmp = (x / y) / 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 / (z * t)
    if (t <= (-4.8d-38)) then
        tmp = x * ((1.0d0 / t) / y)
    else if (t <= 2.25d-94) then
        tmp = (-x / z) / y
    else if (t <= 1.52d+90) then
        tmp = (x / t) / y
    else if (t <= 2.4d+133) then
        tmp = t_1
    else if (t <= 1.9d+218) then
        tmp = (x / t) * (1.0d0 / y)
    else if (t <= 1.06d+251) then
        tmp = t_1
    else
        tmp = (x / y) / 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 / (z * t);
	double tmp;
	if (t <= -4.8e-38) {
		tmp = x * ((1.0 / t) / y);
	} else if (t <= 2.25e-94) {
		tmp = (-x / z) / y;
	} else if (t <= 1.52e+90) {
		tmp = (x / t) / y;
	} else if (t <= 2.4e+133) {
		tmp = t_1;
	} else if (t <= 1.9e+218) {
		tmp = (x / t) * (1.0 / y);
	} else if (t <= 1.06e+251) {
		tmp = t_1;
	} else {
		tmp = (x / y) / t;
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	t_1 = -x / (z * t)
	tmp = 0
	if t <= -4.8e-38:
		tmp = x * ((1.0 / t) / y)
	elif t <= 2.25e-94:
		tmp = (-x / z) / y
	elif t <= 1.52e+90:
		tmp = (x / t) / y
	elif t <= 2.4e+133:
		tmp = t_1
	elif t <= 1.9e+218:
		tmp = (x / t) * (1.0 / y)
	elif t <= 1.06e+251:
		tmp = t_1
	else:
		tmp = (x / y) / t
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(-x) / Float64(z * t))
	tmp = 0.0
	if (t <= -4.8e-38)
		tmp = Float64(x * Float64(Float64(1.0 / t) / y));
	elseif (t <= 2.25e-94)
		tmp = Float64(Float64(Float64(-x) / z) / y);
	elseif (t <= 1.52e+90)
		tmp = Float64(Float64(x / t) / y);
	elseif (t <= 2.4e+133)
		tmp = t_1;
	elseif (t <= 1.9e+218)
		tmp = Float64(Float64(x / t) * Float64(1.0 / y));
	elseif (t <= 1.06e+251)
		tmp = t_1;
	else
		tmp = Float64(Float64(x / y) / 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 / (z * t);
	tmp = 0.0;
	if (t <= -4.8e-38)
		tmp = x * ((1.0 / t) / y);
	elseif (t <= 2.25e-94)
		tmp = (-x / z) / y;
	elseif (t <= 1.52e+90)
		tmp = (x / t) / y;
	elseif (t <= 2.4e+133)
		tmp = t_1;
	elseif (t <= 1.9e+218)
		tmp = (x / t) * (1.0 / y);
	elseif (t <= 1.06e+251)
		tmp = t_1;
	else
		tmp = (x / y) / 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[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.8e-38], N[(x * N[(N[(1.0 / t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.25e-94], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.52e+90], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 2.4e+133], t$95$1, If[LessEqual[t, 1.9e+218], N[(N[(x / t), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.06e+251], t$95$1, N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{-x}{z \cdot t}\\
\mathbf{if}\;t \leq -4.8 \cdot 10^{-38}:\\
\;\;\;\;x \cdot \frac{\frac{1}{t}}{y}\\

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

\mathbf{elif}\;t \leq 1.52 \cdot 10^{+90}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\

\mathbf{elif}\;t \leq 2.4 \cdot 10^{+133}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 1.06 \cdot 10^{+251}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 90.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{1}{t}}{y}} \cdot x \]
    6. Simplified59.0%

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

    if -4.80000000000000044e-38 < t < 2.2500000000000001e-94

    1. Initial program 93.3%

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

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

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

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

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

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

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

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

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

    if 2.2500000000000001e-94 < t < 1.52000000000000009e90

    1. Initial program 92.7%

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

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

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

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

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

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

    if 1.52000000000000009e90 < t < 2.3999999999999999e133 or 1.90000000000000006e218 < t < 1.05999999999999998e251

    1. Initial program 93.4%

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

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

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

        \[\leadsto \frac{x}{t \cdot y + z \cdot \color{blue}{\left(-\left(t + y\right)\right)}} \]
      3. distribute-rgt-neg-in92.9%

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

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

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

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

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

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

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

    if 2.3999999999999999e133 < t < 1.90000000000000006e218

    1. Initial program 59.2%

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

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

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

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

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

    if 1.05999999999999998e251 < t

    1. Initial program 80.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.8 \cdot 10^{-38}:\\ \;\;\;\;x \cdot \frac{\frac{1}{t}}{y}\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{-94}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y}\\ \mathbf{elif}\;t \leq 1.52 \cdot 10^{+90}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{+133}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+218}:\\ \;\;\;\;\frac{x}{t} \cdot \frac{1}{y}\\ \mathbf{elif}\;t \leq 1.06 \cdot 10^{+251}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \end{array} \]

Alternative 10: 51.5% accurate, 0.5× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{-x}{z \cdot t}\\ \mathbf{if}\;t \leq -5.5 \cdot 10^{-37}:\\ \;\;\;\;x \cdot \frac{\frac{1}{t}}{y}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-97}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+89}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+133}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+214}:\\ \;\;\;\;\frac{1}{\frac{y}{\frac{x}{t}}}\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{+251}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{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) (* z t))))
   (if (<= t -5.5e-37)
     (* x (/ (/ 1.0 t) y))
     (if (<= t 3.3e-97)
       (/ (/ (- x) z) y)
       (if (<= t 3e+89)
         (/ (/ x t) y)
         (if (<= t 4e+133)
           t_1
           (if (<= t 3e+214)
             (/ 1.0 (/ y (/ x t)))
             (if (<= t 1.05e+251) t_1 (/ (/ x y) t)))))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double t_1 = -x / (z * t);
	double tmp;
	if (t <= -5.5e-37) {
		tmp = x * ((1.0 / t) / y);
	} else if (t <= 3.3e-97) {
		tmp = (-x / z) / y;
	} else if (t <= 3e+89) {
		tmp = (x / t) / y;
	} else if (t <= 4e+133) {
		tmp = t_1;
	} else if (t <= 3e+214) {
		tmp = 1.0 / (y / (x / t));
	} else if (t <= 1.05e+251) {
		tmp = t_1;
	} else {
		tmp = (x / y) / 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 / (z * t)
    if (t <= (-5.5d-37)) then
        tmp = x * ((1.0d0 / t) / y)
    else if (t <= 3.3d-97) then
        tmp = (-x / z) / y
    else if (t <= 3d+89) then
        tmp = (x / t) / y
    else if (t <= 4d+133) then
        tmp = t_1
    else if (t <= 3d+214) then
        tmp = 1.0d0 / (y / (x / t))
    else if (t <= 1.05d+251) then
        tmp = t_1
    else
        tmp = (x / y) / 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 / (z * t);
	double tmp;
	if (t <= -5.5e-37) {
		tmp = x * ((1.0 / t) / y);
	} else if (t <= 3.3e-97) {
		tmp = (-x / z) / y;
	} else if (t <= 3e+89) {
		tmp = (x / t) / y;
	} else if (t <= 4e+133) {
		tmp = t_1;
	} else if (t <= 3e+214) {
		tmp = 1.0 / (y / (x / t));
	} else if (t <= 1.05e+251) {
		tmp = t_1;
	} else {
		tmp = (x / y) / t;
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	t_1 = -x / (z * t)
	tmp = 0
	if t <= -5.5e-37:
		tmp = x * ((1.0 / t) / y)
	elif t <= 3.3e-97:
		tmp = (-x / z) / y
	elif t <= 3e+89:
		tmp = (x / t) / y
	elif t <= 4e+133:
		tmp = t_1
	elif t <= 3e+214:
		tmp = 1.0 / (y / (x / t))
	elif t <= 1.05e+251:
		tmp = t_1
	else:
		tmp = (x / y) / t
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(-x) / Float64(z * t))
	tmp = 0.0
	if (t <= -5.5e-37)
		tmp = Float64(x * Float64(Float64(1.0 / t) / y));
	elseif (t <= 3.3e-97)
		tmp = Float64(Float64(Float64(-x) / z) / y);
	elseif (t <= 3e+89)
		tmp = Float64(Float64(x / t) / y);
	elseif (t <= 4e+133)
		tmp = t_1;
	elseif (t <= 3e+214)
		tmp = Float64(1.0 / Float64(y / Float64(x / t)));
	elseif (t <= 1.05e+251)
		tmp = t_1;
	else
		tmp = Float64(Float64(x / y) / 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 / (z * t);
	tmp = 0.0;
	if (t <= -5.5e-37)
		tmp = x * ((1.0 / t) / y);
	elseif (t <= 3.3e-97)
		tmp = (-x / z) / y;
	elseif (t <= 3e+89)
		tmp = (x / t) / y;
	elseif (t <= 4e+133)
		tmp = t_1;
	elseif (t <= 3e+214)
		tmp = 1.0 / (y / (x / t));
	elseif (t <= 1.05e+251)
		tmp = t_1;
	else
		tmp = (x / y) / 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[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.5e-37], N[(x * N[(N[(1.0 / t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e-97], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 3e+89], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 4e+133], t$95$1, If[LessEqual[t, 3e+214], N[(1.0 / N[(y / N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e+251], t$95$1, N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{-x}{z \cdot t}\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{-37}:\\
\;\;\;\;x \cdot \frac{\frac{1}{t}}{y}\\

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

\mathbf{elif}\;t \leq 3 \cdot 10^{+89}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\

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

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

\mathbf{elif}\;t \leq 1.05 \cdot 10^{+251}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 90.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{1}{t}}{y}} \cdot x \]
    6. Simplified59.0%

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

    if -5.4999999999999998e-37 < t < 3.3000000000000001e-97

    1. Initial program 93.2%

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

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

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

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

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

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

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

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

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

    if 3.3000000000000001e-97 < t < 3.00000000000000013e89

    1. Initial program 92.9%

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

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

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

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

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

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

    if 3.00000000000000013e89 < t < 4.0000000000000001e133 or 3.0000000000000001e214 < t < 1.05e251

    1. Initial program 93.4%

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

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

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

        \[\leadsto \frac{x}{t \cdot y + z \cdot \color{blue}{\left(-\left(t + y\right)\right)}} \]
      3. distribute-rgt-neg-in92.9%

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

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

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

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

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

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

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

    if 4.0000000000000001e133 < t < 3.0000000000000001e214

    1. Initial program 59.2%

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

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

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

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

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

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

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

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

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

    if 1.05e251 < t

    1. Initial program 80.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{-37}:\\ \;\;\;\;x \cdot \frac{\frac{1}{t}}{y}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-97}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+89}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+133}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+214}:\\ \;\;\;\;\frac{1}{\frac{y}{\frac{x}{t}}}\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{+251}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \end{array} \]

Alternative 11: 78.5% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 83.2%

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

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

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

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

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

    if -4.9999999999999999e-17 < y < 3.3999999999999999e-214

    1. Initial program 91.2%

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

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

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

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

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

    if 3.3999999999999999e-214 < y

    1. Initial program 92.7%

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

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

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

Alternative 12: 81.2% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 83.2%

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

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

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

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

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

    if -2.24999999999999989e-17 < y < 2.30000000000000011e-214

    1. Initial program 91.2%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Step-by-step derivation
      1. add-sqr-sqrt39.7%

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

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

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

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

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

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

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

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

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

    if 2.30000000000000011e-214 < y

    1. Initial program 92.7%

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

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

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

Alternative 13: 66.0% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 90.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{1}{t}}{y}} \cdot x \]
    6. Simplified59.0%

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

    if -4.60000000000000003e-38 < t < 5.49999999999999989e-94

    1. Initial program 93.3%

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

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

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

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

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

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

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

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

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

    if 5.49999999999999989e-94 < t

    1. Initial program 84.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.6 \cdot 10^{-38}:\\ \;\;\;\;x \cdot \frac{\frac{1}{t}}{y}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-94}:\\ \;\;\;\;\frac{\frac{-x}{z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \]

Alternative 14: 51.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 -1.02 \cdot 10^{-52}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{-84}:\\ \;\;\;\;\frac{-x}{z \cdot 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 -1.02e-52)
   (/ (/ x y) t)
   (if (<= y 6.4e-84) (/ (- 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 (y <= -1.02e-52) {
		tmp = (x / y) / t;
	} else if (y <= 6.4e-84) {
		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 (y <= (-1.02d-52)) then
        tmp = (x / y) / t
    else if (y <= 6.4d-84) 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 (y <= -1.02e-52) {
		tmp = (x / y) / t;
	} else if (y <= 6.4e-84) {
		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 y <= -1.02e-52:
		tmp = (x / y) / t
	elif y <= 6.4e-84:
		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 (y <= -1.02e-52)
		tmp = Float64(Float64(x / y) / t);
	elseif (y <= 6.4e-84)
		tmp = Float64(Float64(-x) / Float64(z * 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 <= -1.02e-52)
		tmp = (x / y) / t;
	elseif (y <= 6.4e-84)
		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[LessEqual[y, -1.02e-52], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, 6.4e-84], 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}\;y \leq -1.02 \cdot 10^{-52}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\

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

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


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

    1. Initial program 84.8%

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

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

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

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

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

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

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

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

    if -1.02000000000000009e-52 < y < 6.3999999999999999e-84

    1. Initial program 89.2%

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

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

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

        \[\leadsto \frac{x}{t \cdot y + z \cdot \color{blue}{\left(-\left(t + y\right)\right)}} \]
      3. distribute-rgt-neg-in67.0%

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

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

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

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

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

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

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

    if 6.3999999999999999e-84 < y

    1. Initial program 95.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.02 \cdot 10^{-52}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{-84}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]

Alternative 15: 70.7% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq 8.2 \cdot 10^{-79}:\\ \;\;\;\;\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 8.2e-79) (/ 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 <= 8.2e-79) {
		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 <= 8.2d-79) 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 <= 8.2e-79) {
		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 <= 8.2e-79:
		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 <= 8.2e-79)
		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 <= 8.2e-79)
		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, 8.2e-79], 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 8.2 \cdot 10^{-79}:\\
\;\;\;\;\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 < 8.19999999999999987e-79

    1. Initial program 92.3%

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

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

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

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

    if 8.19999999999999987e-79 < t

    1. Initial program 83.1%

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

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

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

Alternative 16: 72.0% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq 1.85 \cdot 10^{-79}:\\ \;\;\;\;\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.85e-79) (/ 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.85e-79) {
		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.85d-79) 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.85e-79) {
		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.85e-79:
		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.85e-79)
		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.85e-79)
		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.85e-79], 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.85 \cdot 10^{-79}:\\
\;\;\;\;\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.85000000000000009e-79

    1. Initial program 92.3%

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

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

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

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

    if 1.85000000000000009e-79 < t

    1. Initial program 83.1%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\sqrt{x} \cdot \sqrt{x}}{\left(y - z\right) \cdot \left(t - z\right)}} \]
      2. add-sqr-sqrt83.1%

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

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

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

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

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

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

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

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

Alternative 17: 73.4% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq 7.5 \cdot 10^{-79}:\\ \;\;\;\;\frac{\frac{x}{t - 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 7.5e-79) (/ (/ x (- 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.5e-79) {
		tmp = (x / (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.5d-79) then
        tmp = (x / (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.5e-79) {
		tmp = (x / (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.5e-79:
		tmp = (x / (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.5e-79)
		tmp = Float64(Float64(x / Float64(t - 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.5e-79)
		tmp = (x / (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.5e-79], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $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.5 \cdot 10^{-79}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\

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


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

    1. Initial program 92.3%

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

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

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

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

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

    if 7.49999999999999969e-79 < t

    1. Initial program 83.1%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\sqrt{x} \cdot \sqrt{x}}{\left(y - z\right) \cdot \left(t - z\right)}} \]
      2. add-sqr-sqrt83.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 7.5 \cdot 10^{-79}:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y - z}\\ \end{array} \]

Alternative 18: 39.2% 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.5%

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

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

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

Alternative 19: 42.9% 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.5%

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

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

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

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

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

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

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

Developer target: 87.4% accurate, 0.4× speedup?

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

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

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


\end{array}
\end{array}

Reproduce

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