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

Percentage Accurate: 89.2% → 96.2%
Time: 13.6s
Alternatives: 14
Speedup: 0.8×

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 14 alternatives:

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

Initial Program: 89.2% 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.2% 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 1.5 \cdot 10^{+285}:\\ \;\;\;\;\frac{x}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t - 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 1.5e+285) (/ x t_1) (/ (/ x (- t 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 <= 1.5e+285) {
		tmp = x / t_1;
	} else {
		tmp = (x / (t - z)) / (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) :: t_1
    real(8) :: tmp
    t_1 = (y - z) * (t - z)
    if (t_1 <= 1.5d+285) then
        tmp = x / t_1
    else
        tmp = (x / (t - z)) / (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 t_1 = (y - z) * (t - z);
	double tmp;
	if (t_1 <= 1.5e+285) {
		tmp = x / t_1;
	} else {
		tmp = (x / (t - 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 <= 1.5e+285:
		tmp = x / t_1
	else:
		tmp = (x / (t - 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 <= 1.5e+285)
		tmp = Float64(x / t_1);
	else
		tmp = Float64(Float64(x / Float64(t - 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 <= 1.5e+285)
		tmp = x / t_1;
	else
		tmp = (x / (t - 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, 1.5e+285], N[(x / t$95$1), $MachinePrecision], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;t\_1 \leq 1.5 \cdot 10^{+285}:\\
\;\;\;\;\frac{x}{t\_1}\\

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


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

    1. Initial program 95.9%

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

    if 1.5000000000000001e285 < (*.f64 (-.f64 y z) (-.f64 t z))

    1. Initial program 68.2%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{\sqrt{x} \cdot \sqrt{x}}{t - z}}}{y - z} \]
      3. add-sqr-sqrt99.9%

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

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

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

Alternative 2: 48.4% 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 86.2%

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

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

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

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

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

Alternative 3: 51.4% accurate, 0.4× 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^{-137}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-57}:\\ \;\;\;\;\frac{-x}{y \cdot z}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+123}:\\ \;\;\;\;\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 (<= t -8.2e-137)
   (/ (/ x y) t)
   (if (<= t 2.3e-57)
     (/ (- x) (* y z))
     (if (<= t 5.5e+123) (/ (- 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 (t <= -8.2e-137) {
		tmp = (x / y) / t;
	} else if (t <= 2.3e-57) {
		tmp = -x / (y * z);
	} else if (t <= 5.5e+123) {
		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 (t <= (-8.2d-137)) then
        tmp = (x / y) / t
    else if (t <= 2.3d-57) then
        tmp = -x / (y * z)
    else if (t <= 5.5d+123) 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 (t <= -8.2e-137) {
		tmp = (x / y) / t;
	} else if (t <= 2.3e-57) {
		tmp = -x / (y * z);
	} else if (t <= 5.5e+123) {
		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 t <= -8.2e-137:
		tmp = (x / y) / t
	elif t <= 2.3e-57:
		tmp = -x / (y * z)
	elif t <= 5.5e+123:
		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 (t <= -8.2e-137)
		tmp = Float64(Float64(x / y) / t);
	elseif (t <= 2.3e-57)
		tmp = Float64(Float64(-x) / Float64(y * z));
	elseif (t <= 5.5e+123)
		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 (t <= -8.2e-137)
		tmp = (x / y) / t;
	elseif (t <= 2.3e-57)
		tmp = -x / (y * z);
	elseif (t <= 5.5e+123)
		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[t, -8.2e-137], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 2.3e-57], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e+123], 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}\;t \leq -8.2 \cdot 10^{-137}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\

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

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

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


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

    1. Initial program 87.9%

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

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

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

        \[\leadsto \frac{\color{blue}{0 - x}}{-t \cdot y} \]
      3. div-sub53.0%

        \[\leadsto \color{blue}{\frac{0}{-t \cdot y} - \frac{x}{-t \cdot y}} \]
      4. *-commutative53.0%

        \[\leadsto \frac{0}{-\color{blue}{y \cdot t}} - \frac{x}{-t \cdot y} \]
      5. distribute-rgt-neg-in53.0%

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

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

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{\sqrt{x \cdot x}}}{-t \cdot y} \]
      8. sqr-neg46.4%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\sqrt{\color{blue}{\left(-x\right) \cdot \left(-x\right)}}}{-t \cdot y} \]
      9. sqrt-unprod13.3%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{-t \cdot y} \]
      10. add-sqr-sqrt30.5%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{-x}}{-t \cdot y} \]
      11. frac-2neg30.5%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \color{blue}{\frac{x}{t \cdot y}} \]
      12. *-commutative30.5%

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

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

        \[\leadsto \color{blue}{0} - \frac{x}{y \cdot t} \]
      2. neg-sub030.5%

        \[\leadsto \color{blue}{-\frac{x}{y \cdot t}} \]
      3. distribute-neg-frac30.5%

        \[\leadsto \color{blue}{\frac{-x}{y \cdot t}} \]
      4. *-commutative30.5%

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

      \[\leadsto \color{blue}{\frac{-x}{t \cdot y}} \]
    8. Step-by-step derivation
      1. div-inv30.5%

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

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

        \[\leadsto \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot \frac{1}{t \cdot y} \]
      4. sqr-neg46.5%

        \[\leadsto \sqrt{\color{blue}{x \cdot x}} \cdot \frac{1}{t \cdot y} \]
      5. sqrt-unprod28.2%

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{y}}}{t} \]
    11. Simplified52.3%

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

    if -8.1999999999999997e-137 < t < 2.3e-57

    1. Initial program 76.8%

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

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

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

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

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

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

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

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

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

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

    if 2.3e-57 < t < 5.5000000000000002e123

    1. Initial program 91.4%

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

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

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

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

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

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

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

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

    if 5.5000000000000002e123 < t

    1. Initial program 95.4%

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

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

        \[\leadsto \color{blue}{\frac{-x}{-t \cdot y}} \]
      2. neg-sub062.8%

        \[\leadsto \frac{\color{blue}{0 - x}}{-t \cdot y} \]
      3. div-sub62.8%

        \[\leadsto \color{blue}{\frac{0}{-t \cdot y} - \frac{x}{-t \cdot y}} \]
      4. *-commutative62.8%

        \[\leadsto \frac{0}{-\color{blue}{y \cdot t}} - \frac{x}{-t \cdot y} \]
      5. distribute-rgt-neg-in62.8%

        \[\leadsto \frac{0}{\color{blue}{y \cdot \left(-t\right)}} - \frac{x}{-t \cdot y} \]
      6. add-sqr-sqrt23.0%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{-t \cdot y} \]
      7. sqrt-unprod59.7%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{\sqrt{x \cdot x}}}{-t \cdot y} \]
      8. sqr-neg59.7%

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

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

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{-x}}{-t \cdot y} \]
      11. frac-2neg49.2%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \color{blue}{\frac{x}{t \cdot y}} \]
      12. *-commutative49.2%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{x}{\color{blue}{y \cdot t}} \]
    5. Applied egg-rr49.2%

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

        \[\leadsto \color{blue}{0} - \frac{x}{y \cdot t} \]
      2. neg-sub049.2%

        \[\leadsto \color{blue}{-\frac{x}{y \cdot t}} \]
      3. distribute-neg-frac49.2%

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

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

      \[\leadsto \color{blue}{\frac{-x}{t \cdot y}} \]
    8. Step-by-step derivation
      1. *-commutative49.2%

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

        \[\leadsto \color{blue}{\frac{\frac{-x}{y}}{t}} \]
      3. add-sqr-sqrt33.4%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{y}}{t} \]
      4. sqrt-unprod58.8%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{y}}{t} \]
      5. sqr-neg58.8%

        \[\leadsto \frac{\frac{\sqrt{\color{blue}{x \cdot x}}}{y}}{t} \]
      6. sqrt-unprod22.2%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{y}}{t} \]
      7. add-sqr-sqrt60.6%

        \[\leadsto \frac{\frac{\color{blue}{x}}{y}}{t} \]
      8. clear-num60.6%

        \[\leadsto \frac{\color{blue}{\frac{1}{\frac{y}{x}}}}{t} \]
      9. div-inv60.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{x}} \cdot \frac{1}{t}} \]
      10. clear-num60.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.2 \cdot 10^{-137}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-57}:\\ \;\;\;\;\frac{-x}{y \cdot z}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+123}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 51.4% accurate, 0.4× speedup?

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

\mathbf{elif}\;t \leq 4.3 \cdot 10^{-60}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{-1}{z}\\

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

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


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

    1. Initial program 87.9%

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

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

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

        \[\leadsto \frac{\color{blue}{0 - x}}{-t \cdot y} \]
      3. div-sub53.0%

        \[\leadsto \color{blue}{\frac{0}{-t \cdot y} - \frac{x}{-t \cdot y}} \]
      4. *-commutative53.0%

        \[\leadsto \frac{0}{-\color{blue}{y \cdot t}} - \frac{x}{-t \cdot y} \]
      5. distribute-rgt-neg-in53.0%

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

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

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{\sqrt{x \cdot x}}}{-t \cdot y} \]
      8. sqr-neg46.4%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\sqrt{\color{blue}{\left(-x\right) \cdot \left(-x\right)}}}{-t \cdot y} \]
      9. sqrt-unprod13.3%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{-t \cdot y} \]
      10. add-sqr-sqrt30.5%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{-x}}{-t \cdot y} \]
      11. frac-2neg30.5%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \color{blue}{\frac{x}{t \cdot y}} \]
      12. *-commutative30.5%

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

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

        \[\leadsto \color{blue}{0} - \frac{x}{y \cdot t} \]
      2. neg-sub030.5%

        \[\leadsto \color{blue}{-\frac{x}{y \cdot t}} \]
      3. distribute-neg-frac30.5%

        \[\leadsto \color{blue}{\frac{-x}{y \cdot t}} \]
      4. *-commutative30.5%

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

      \[\leadsto \color{blue}{\frac{-x}{t \cdot y}} \]
    8. Step-by-step derivation
      1. div-inv30.5%

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

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

        \[\leadsto \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot \frac{1}{t \cdot y} \]
      4. sqr-neg46.5%

        \[\leadsto \sqrt{\color{blue}{x \cdot x}} \cdot \frac{1}{t \cdot y} \]
      5. sqrt-unprod28.2%

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{y}}}{t} \]
    11. Simplified52.3%

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

    if -2.69999999999999999e-135 < t < 4.3000000000000001e-60

    1. Initial program 76.8%

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

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

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

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

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

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

    if 4.3000000000000001e-60 < t < 4.59999999999999981e123

    1. Initial program 91.4%

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

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

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

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

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

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

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

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

    if 4.59999999999999981e123 < t

    1. Initial program 95.4%

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

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

        \[\leadsto \color{blue}{\frac{-x}{-t \cdot y}} \]
      2. neg-sub062.8%

        \[\leadsto \frac{\color{blue}{0 - x}}{-t \cdot y} \]
      3. div-sub62.8%

        \[\leadsto \color{blue}{\frac{0}{-t \cdot y} - \frac{x}{-t \cdot y}} \]
      4. *-commutative62.8%

        \[\leadsto \frac{0}{-\color{blue}{y \cdot t}} - \frac{x}{-t \cdot y} \]
      5. distribute-rgt-neg-in62.8%

        \[\leadsto \frac{0}{\color{blue}{y \cdot \left(-t\right)}} - \frac{x}{-t \cdot y} \]
      6. add-sqr-sqrt23.0%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{-t \cdot y} \]
      7. sqrt-unprod59.7%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{\sqrt{x \cdot x}}}{-t \cdot y} \]
      8. sqr-neg59.7%

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

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

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{-x}}{-t \cdot y} \]
      11. frac-2neg49.2%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \color{blue}{\frac{x}{t \cdot y}} \]
      12. *-commutative49.2%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{x}{\color{blue}{y \cdot t}} \]
    5. Applied egg-rr49.2%

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

        \[\leadsto \color{blue}{0} - \frac{x}{y \cdot t} \]
      2. neg-sub049.2%

        \[\leadsto \color{blue}{-\frac{x}{y \cdot t}} \]
      3. distribute-neg-frac49.2%

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

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

      \[\leadsto \color{blue}{\frac{-x}{t \cdot y}} \]
    8. Step-by-step derivation
      1. *-commutative49.2%

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

        \[\leadsto \color{blue}{\frac{\frac{-x}{y}}{t}} \]
      3. add-sqr-sqrt33.4%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{y}}{t} \]
      4. sqrt-unprod58.8%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{y}}{t} \]
      5. sqr-neg58.8%

        \[\leadsto \frac{\frac{\sqrt{\color{blue}{x \cdot x}}}{y}}{t} \]
      6. sqrt-unprod22.2%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{y}}{t} \]
      7. add-sqr-sqrt60.6%

        \[\leadsto \frac{\frac{\color{blue}{x}}{y}}{t} \]
      8. clear-num60.6%

        \[\leadsto \frac{\color{blue}{\frac{1}{\frac{y}{x}}}}{t} \]
      9. div-inv60.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{x}} \cdot \frac{1}{t}} \]
      10. clear-num60.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.7 \cdot 10^{-135}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{-60}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{-1}{z}\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+123}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 91.5% 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 2 \cdot 10^{+286}:\\ \;\;\;\;\frac{x}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-x}{y - z}}{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 2e+286) (/ x t_1) (/ (/ (- x) (- y z)) 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 <= 2e+286) {
		tmp = x / t_1;
	} else {
		tmp = (-x / (y - z)) / z;
	}
	return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y - z) * (t - z)
    if (t_1 <= 2d+286) then
        tmp = x / t_1
    else
        tmp = (-x / (y - z)) / z
    end if
    code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (t - z);
	double tmp;
	if (t_1 <= 2e+286) {
		tmp = x / t_1;
	} else {
		tmp = (-x / (y - z)) / 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 <= 2e+286:
		tmp = x / t_1
	else:
		tmp = (-x / (y - z)) / 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 <= 2e+286)
		tmp = Float64(x / t_1);
	else
		tmp = Float64(Float64(Float64(-x) / Float64(y - z)) / 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 <= 2e+286)
		tmp = x / t_1;
	else
		tmp = (-x / (y - z)) / 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, 2e+286], N[(x / t$95$1), $MachinePrecision], N[(N[((-x) / N[(y - z), $MachinePrecision]), $MachinePrecision] / z), $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 2 \cdot 10^{+286}:\\
\;\;\;\;\frac{x}{t\_1}\\

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


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

    1. Initial program 95.9%

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

    if 2.00000000000000007e286 < (*.f64 (-.f64 y z) (-.f64 t z))

    1. Initial program 67.4%

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

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

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

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

      \[\leadsto \color{blue}{\frac{-x}{z \cdot \left(y - z\right)}} \]
    6. Step-by-step derivation
      1. distribute-frac-neg63.0%

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

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{y - z}}{z}} \]
    7. Applied egg-rr93.2%

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

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

Alternative 6: 79.8% accurate, 0.5× 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^{-135}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{+72}:\\ \;\;\;\;\frac{\frac{-x}{y - z}}{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 (<= t -7.5e-135)
   (/ (/ x y) (- t z))
   (if (<= t 6.8e+72) (/ (/ (- x) (- y z)) 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 <= -7.5e-135) {
		tmp = (x / y) / (t - z);
	} else if (t <= 6.8e+72) {
		tmp = (-x / (y - z)) / 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 <= (-7.5d-135)) then
        tmp = (x / y) / (t - z)
    else if (t <= 6.8d+72) then
        tmp = (-x / (y - z)) / 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 <= -7.5e-135) {
		tmp = (x / y) / (t - z);
	} else if (t <= 6.8e+72) {
		tmp = (-x / (y - z)) / 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 <= -7.5e-135:
		tmp = (x / y) / (t - z)
	elif t <= 6.8e+72:
		tmp = (-x / (y - z)) / 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 <= -7.5e-135)
		tmp = Float64(Float64(x / y) / Float64(t - z));
	elseif (t <= 6.8e+72)
		tmp = Float64(Float64(Float64(-x) / Float64(y - z)) / 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 <= -7.5e-135)
		tmp = (x / y) / (t - z);
	elseif (t <= 6.8e+72)
		tmp = (-x / (y - z)) / 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, -7.5e-135], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.8e+72], N[(N[((-x) / N[(y - z), $MachinePrecision]), $MachinePrecision] / z), $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 -7.5 \cdot 10^{-135}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\

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

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


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

    1. Initial program 87.8%

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

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

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

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

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

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

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

    if -7.5e-135 < t < 6.7999999999999997e72

    1. Initial program 80.5%

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

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

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

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

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

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

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

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

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

    if 6.7999999999999997e72 < t

    1. Initial program 95.0%

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

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

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

Alternative 7: 64.9% accurate, 0.5× speedup?

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

\mathbf{elif}\;t \leq 5.2 \cdot 10^{-61}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{-1}{z}\\

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


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

    1. Initial program 87.3%

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

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

        \[\leadsto \color{blue}{\frac{-x}{-t \cdot y}} \]
      2. neg-sub052.9%

        \[\leadsto \frac{\color{blue}{0 - x}}{-t \cdot y} \]
      3. div-sub52.8%

        \[\leadsto \color{blue}{\frac{0}{-t \cdot y} - \frac{x}{-t \cdot y}} \]
      4. *-commutative52.8%

        \[\leadsto \frac{0}{-\color{blue}{y \cdot t}} - \frac{x}{-t \cdot y} \]
      5. distribute-rgt-neg-in52.8%

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

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{-t \cdot y} \]
      7. sqrt-unprod45.9%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{\sqrt{x \cdot x}}}{-t \cdot y} \]
      8. sqr-neg45.9%

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

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

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{-x}}{-t \cdot y} \]
      11. frac-2neg30.2%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \color{blue}{\frac{x}{t \cdot y}} \]
      12. *-commutative30.2%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{x}{\color{blue}{y \cdot t}} \]
    5. Applied egg-rr30.2%

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

        \[\leadsto \color{blue}{0} - \frac{x}{y \cdot t} \]
      2. neg-sub030.2%

        \[\leadsto \color{blue}{-\frac{x}{y \cdot t}} \]
      3. distribute-neg-frac30.2%

        \[\leadsto \color{blue}{\frac{-x}{y \cdot t}} \]
      4. *-commutative30.2%

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

      \[\leadsto \color{blue}{\frac{-x}{t \cdot y}} \]
    8. Step-by-step derivation
      1. div-inv30.2%

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

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

        \[\leadsto \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot \frac{1}{t \cdot y} \]
      4. sqr-neg45.9%

        \[\leadsto \sqrt{\color{blue}{x \cdot x}} \cdot \frac{1}{t \cdot y} \]
      5. sqrt-unprod27.9%

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

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

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

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

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

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

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

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

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

    if -3.40000000000000014e-137 < t < 5.20000000000000021e-61

    1. Initial program 77.3%

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

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

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

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

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

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

    if 5.20000000000000021e-61 < t

    1. Initial program 93.3%

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

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

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

Alternative 8: 51.6% accurate, 0.6× speedup?

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

\mathbf{elif}\;y \leq 3.2 \cdot 10^{-121}:\\
\;\;\;\;\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 < -8.50000000000000021e-141

    1. Initial program 85.9%

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

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

        \[\leadsto \color{blue}{\frac{-x}{-t \cdot y}} \]
      2. neg-sub048.2%

        \[\leadsto \frac{\color{blue}{0 - x}}{-t \cdot y} \]
      3. div-sub48.1%

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

        \[\leadsto \frac{0}{-\color{blue}{y \cdot t}} - \frac{x}{-t \cdot y} \]
      5. distribute-rgt-neg-in48.1%

        \[\leadsto \frac{0}{\color{blue}{y \cdot \left(-t\right)}} - \frac{x}{-t \cdot y} \]
      6. add-sqr-sqrt24.0%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{-t \cdot y} \]
      7. sqrt-unprod36.6%

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

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\sqrt{\color{blue}{\left(-x\right) \cdot \left(-x\right)}}}{-t \cdot y} \]
      9. sqrt-unprod15.3%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{-t \cdot y} \]
      10. add-sqr-sqrt29.4%

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

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

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{x}{\color{blue}{y \cdot t}} \]
    5. Applied egg-rr29.4%

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

        \[\leadsto \color{blue}{0} - \frac{x}{y \cdot t} \]
      2. neg-sub029.6%

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

        \[\leadsto \color{blue}{\frac{-x}{y \cdot t}} \]
      4. *-commutative29.6%

        \[\leadsto \frac{-x}{\color{blue}{t \cdot y}} \]
    7. Simplified29.6%

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

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

        \[\leadsto \color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)} \cdot \frac{1}{t \cdot y} \]
      3. sqrt-unprod36.8%

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

        \[\leadsto \sqrt{\color{blue}{x \cdot x}} \cdot \frac{1}{t \cdot y} \]
      5. sqrt-unprod24.1%

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{y}}}{t} \]
    11. Simplified51.1%

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

    if -8.50000000000000021e-141 < y < 3.20000000000000019e-121

    1. Initial program 90.0%

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

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

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

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

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

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

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

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

    if 3.20000000000000019e-121 < y

    1. Initial program 82.6%

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

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

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

        \[\leadsto \frac{\color{blue}{0 - x}}{-t \cdot y} \]
      3. div-sub49.1%

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

        \[\leadsto \frac{0}{-\color{blue}{y \cdot t}} - \frac{x}{-t \cdot y} \]
      5. distribute-rgt-neg-in49.1%

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

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{-t \cdot y} \]
      7. sqrt-unprod40.7%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{\sqrt{x \cdot x}}}{-t \cdot y} \]
      8. sqr-neg40.7%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\sqrt{\color{blue}{\left(-x\right) \cdot \left(-x\right)}}}{-t \cdot y} \]
      9. sqrt-unprod15.3%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{-t \cdot y} \]
      10. add-sqr-sqrt28.5%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{-x}}{-t \cdot y} \]
      11. frac-2neg28.5%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \color{blue}{\frac{x}{t \cdot y}} \]
      12. *-commutative28.5%

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

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

        \[\leadsto \color{blue}{0} - \frac{x}{y \cdot t} \]
      2. neg-sub028.5%

        \[\leadsto \color{blue}{-\frac{x}{y \cdot t}} \]
      3. distribute-neg-frac28.5%

        \[\leadsto \color{blue}{\frac{-x}{y \cdot t}} \]
      4. *-commutative28.5%

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{-x}{y}}{t}} \]
      3. add-sqr-sqrt18.5%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{y}}{t} \]
      4. sqrt-unprod42.7%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{y}}{t} \]
      5. sqr-neg42.7%

        \[\leadsto \frac{\frac{\sqrt{\color{blue}{x \cdot x}}}{y}}{t} \]
      6. sqrt-unprod24.4%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{y}}{t} \]
      7. add-sqr-sqrt50.6%

        \[\leadsto \frac{\frac{\color{blue}{x}}{y}}{t} \]
      8. clear-num50.6%

        \[\leadsto \frac{\color{blue}{\frac{1}{\frac{y}{x}}}}{t} \]
      9. div-inv50.5%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{x}} \cdot \frac{1}{t}} \]
      10. clear-num50.5%

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

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

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

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

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

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

Alternative 9: 71.2% accurate, 0.7× speedup?

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

    1. Initial program 82.5%

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

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

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

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

    if 1.15e-57 < t

    1. Initial program 93.3%

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

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

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

Alternative 10: 71.3% accurate, 0.7× speedup?

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

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


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

    1. Initial program 82.5%

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

        \[\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}} \]
    4. Applied egg-rr43.9%

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

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

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

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

    if 1.20000000000000003e-57 < t

    1. Initial program 93.3%

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

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

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

Alternative 11: 96.7% accurate, 0.8× speedup?

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

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

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

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

    \[\leadsto \color{blue}{\frac{x}{y - z} \cdot \frac{1}{t - z}} \]
  5. Final simplification94.3%

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.99999999999999933e-103

    1. Initial program 87.9%

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

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

        \[\leadsto \color{blue}{\frac{-x}{-t \cdot y}} \]
      2. neg-sub048.5%

        \[\leadsto \frac{\color{blue}{0 - x}}{-t \cdot y} \]
      3. div-sub48.5%

        \[\leadsto \color{blue}{\frac{0}{-t \cdot y} - \frac{x}{-t \cdot y}} \]
      4. *-commutative48.5%

        \[\leadsto \frac{0}{-\color{blue}{y \cdot t}} - \frac{x}{-t \cdot y} \]
      5. distribute-rgt-neg-in48.5%

        \[\leadsto \frac{0}{\color{blue}{y \cdot \left(-t\right)}} - \frac{x}{-t \cdot y} \]
      6. add-sqr-sqrt24.8%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{-t \cdot y} \]
      7. sqrt-unprod38.3%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{\sqrt{x \cdot x}}}{-t \cdot y} \]
      8. sqr-neg38.3%

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

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

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{-x}}{-t \cdot y} \]
      11. frac-2neg31.6%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \color{blue}{\frac{x}{t \cdot y}} \]
      12. *-commutative31.6%

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

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

        \[\leadsto \color{blue}{0} - \frac{x}{y \cdot t} \]
      2. neg-sub031.7%

        \[\leadsto \color{blue}{-\frac{x}{y \cdot t}} \]
      3. distribute-neg-frac31.7%

        \[\leadsto \color{blue}{\frac{-x}{y \cdot t}} \]
      4. *-commutative31.7%

        \[\leadsto \frac{-x}{\color{blue}{t \cdot y}} \]
    7. Simplified31.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y} \cdot 1}{t}} \]
      4. *-rgt-identity50.6%

        \[\leadsto \frac{\color{blue}{\frac{x}{y}}}{t} \]
    11. Simplified50.6%

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

    if -9.99999999999999933e-103 < y

    1. Initial program 85.3%

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

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

        \[\leadsto \color{blue}{\frac{-x}{-t \cdot y}} \]
      2. neg-sub032.5%

        \[\leadsto \frac{\color{blue}{0 - x}}{-t \cdot y} \]
      3. div-sub31.0%

        \[\leadsto \color{blue}{\frac{0}{-t \cdot y} - \frac{x}{-t \cdot y}} \]
      4. *-commutative31.0%

        \[\leadsto \frac{0}{-\color{blue}{y \cdot t}} - \frac{x}{-t \cdot y} \]
      5. distribute-rgt-neg-in31.0%

        \[\leadsto \frac{0}{\color{blue}{y \cdot \left(-t\right)}} - \frac{x}{-t \cdot y} \]
      6. add-sqr-sqrt14.7%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{-t \cdot y} \]
      7. sqrt-unprod29.3%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{\sqrt{x \cdot x}}}{-t \cdot y} \]
      8. sqr-neg29.3%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\sqrt{\color{blue}{\left(-x\right) \cdot \left(-x\right)}}}{-t \cdot y} \]
      9. sqrt-unprod8.6%

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

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{-x}}{-t \cdot y} \]
      11. frac-2neg15.2%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \color{blue}{\frac{x}{t \cdot y}} \]
      12. *-commutative15.2%

        \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{x}{\color{blue}{y \cdot t}} \]
    5. Applied egg-rr15.2%

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

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

        \[\leadsto \color{blue}{-\frac{x}{y \cdot t}} \]
      3. distribute-neg-frac16.1%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{-x}{y}}{t}} \]
      3. add-sqr-sqrt10.8%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{y}}{t} \]
      4. sqrt-unprod32.1%

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

        \[\leadsto \frac{\frac{\sqrt{\color{blue}{x \cdot x}}}{y}}{t} \]
      6. sqrt-unprod14.7%

        \[\leadsto \frac{\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{y}}{t} \]
      7. add-sqr-sqrt33.5%

        \[\leadsto \frac{\frac{\color{blue}{x}}{y}}{t} \]
      8. clear-num33.6%

        \[\leadsto \frac{\color{blue}{\frac{1}{\frac{y}{x}}}}{t} \]
      9. div-inv33.5%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{x}} \cdot \frac{1}{t}} \]
      10. clear-num33.6%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{t}}}{y} \]
    11. Applied egg-rr38.9%

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

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

Alternative 13: 39.7% 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 86.2%

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

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

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

Alternative 14: 43.1% 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 86.2%

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

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

      \[\leadsto \color{blue}{\frac{-x}{-t \cdot y}} \]
    2. neg-sub038.3%

      \[\leadsto \frac{\color{blue}{0 - x}}{-t \cdot y} \]
    3. div-sub37.3%

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

      \[\leadsto \frac{0}{-\color{blue}{y \cdot t}} - \frac{x}{-t \cdot y} \]
    5. distribute-rgt-neg-in37.3%

      \[\leadsto \frac{0}{\color{blue}{y \cdot \left(-t\right)}} - \frac{x}{-t \cdot y} \]
    6. add-sqr-sqrt18.3%

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

      \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{\sqrt{x \cdot x}}}{-t \cdot y} \]
    8. sqr-neg32.5%

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

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

      \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \frac{\color{blue}{-x}}{-t \cdot y} \]
    11. frac-2neg21.1%

      \[\leadsto \frac{0}{y \cdot \left(-t\right)} - \color{blue}{\frac{x}{t \cdot y}} \]
    12. *-commutative21.1%

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

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

      \[\leadsto \color{blue}{0} - \frac{x}{y \cdot t} \]
    2. neg-sub021.7%

      \[\leadsto \color{blue}{-\frac{x}{y \cdot t}} \]
    3. distribute-neg-frac21.7%

      \[\leadsto \color{blue}{\frac{-x}{y \cdot t}} \]
    4. *-commutative21.7%

      \[\leadsto \frac{-x}{\color{blue}{t \cdot y}} \]
  7. Simplified21.7%

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

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

      \[\leadsto \color{blue}{\frac{\frac{-x}{y}}{t}} \]
    3. add-sqr-sqrt13.2%

      \[\leadsto \frac{\frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{y}}{t} \]
    4. sqrt-unprod35.4%

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

      \[\leadsto \frac{\frac{\sqrt{\color{blue}{x \cdot x}}}{y}}{t} \]
    6. sqrt-unprod19.5%

      \[\leadsto \frac{\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{y}}{t} \]
    7. add-sqr-sqrt39.7%

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

      \[\leadsto \frac{\color{blue}{\frac{1}{\frac{y}{x}}}}{t} \]
    9. div-inv39.3%

      \[\leadsto \color{blue}{\frac{1}{\frac{y}{x}} \cdot \frac{1}{t}} \]
    10. clear-num39.7%

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

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

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

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

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

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

Developer target: 88.0% 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 2024096 
(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))))