Statistics.Math.RootFinding:ridders from math-functions-0.1.5.2

Percentage Accurate: 61.3% → 91.1%
Time: 23.5s
Alternatives: 19
Speedup: 18.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 61.3% accurate, 1.0× speedup?

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

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

Alternative 1: 91.1% accurate, 0.5× speedup?

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

\mathbf{elif}\;z \leq 8 \cdot 10^{+116}:\\
\;\;\;\;y \cdot \left(x \cdot \frac{z}{\sqrt{{z}^{2} - a \cdot t}}\right)\\

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


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

    1. Initial program 4.7%

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
      3. *-commutative4.7%

        \[\leadsto x \cdot \frac{\color{blue}{z \cdot y}}{\sqrt{z \cdot z - t \cdot a}} \]
      4. associate-/l*5.6%

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

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

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

        \[\leadsto x \cdot \left(\frac{z}{\sqrt{\color{blue}{{z}^{2}} - t \cdot a}} \cdot y\right) \]
    5. Applied egg-rr5.6%

      \[\leadsto x \cdot \color{blue}{\left(\frac{z}{\sqrt{{z}^{2} - t \cdot a}} \cdot y\right)} \]
    6. Taylor expanded in z around -inf 95.3%

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

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

        \[\leadsto x \cdot \left(\frac{z}{0.5 \cdot \frac{a \cdot t}{z} + \color{blue}{\left(-z\right)}} \cdot y\right) \]
      3. unsub-neg95.3%

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

        \[\leadsto x \cdot \left(\frac{z}{0.5 \cdot \color{blue}{\left(a \cdot \frac{t}{z}\right)} - z} \cdot y\right) \]
    8. Simplified97.8%

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

    if -5.00000000000000004e154 < z < 8.00000000000000012e116

    1. Initial program 84.4%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}} \cdot z \]
      3. associate-*l/79.8%

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

        \[\leadsto \color{blue}{x \cdot \frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}} \]
      5. associate-/r/87.2%

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{\sqrt{z \cdot z - t \cdot a}} \cdot y\right)} \]
      6. associate-*r*88.3%

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

        \[\leadsto \left(x \cdot \frac{z}{\sqrt{\color{blue}{{z}^{2}} - t \cdot a}}\right) \cdot y \]
    3. Applied egg-rr88.3%

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

    if 8.00000000000000012e116 < z

    1. Initial program 27.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{+154}:\\ \;\;\;\;x \cdot \left(\frac{z}{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z} \cdot y\right)\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+116}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{\sqrt{{z}^{2} - a \cdot t}}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 2: 91.3% accurate, 0.5× speedup?

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

\mathbf{elif}\;z \leq 5 \cdot 10^{+117}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{\sqrt{{z}^{2} - a \cdot t}}\right)\\

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


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

    1. Initial program 4.7%

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
      3. *-commutative4.7%

        \[\leadsto x \cdot \frac{\color{blue}{z \cdot y}}{\sqrt{z \cdot z - t \cdot a}} \]
      4. associate-/l*5.6%

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

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

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

        \[\leadsto x \cdot \left(\frac{z}{\sqrt{\color{blue}{{z}^{2}} - t \cdot a}} \cdot y\right) \]
    5. Applied egg-rr5.6%

      \[\leadsto x \cdot \color{blue}{\left(\frac{z}{\sqrt{{z}^{2} - t \cdot a}} \cdot y\right)} \]
    6. Taylor expanded in z around -inf 95.3%

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

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

        \[\leadsto x \cdot \left(\frac{z}{0.5 \cdot \frac{a \cdot t}{z} + \color{blue}{\left(-z\right)}} \cdot y\right) \]
      3. unsub-neg95.3%

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

        \[\leadsto x \cdot \left(\frac{z}{0.5 \cdot \color{blue}{\left(a \cdot \frac{t}{z}\right)} - z} \cdot y\right) \]
    8. Simplified97.8%

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

    if -5.00000000000000004e154 < z < 4.99999999999999983e117

    1. Initial program 84.4%

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
      3. *-commutative82.3%

        \[\leadsto x \cdot \frac{\color{blue}{z \cdot y}}{\sqrt{z \cdot z - t \cdot a}} \]
      4. associate-/l*81.4%

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

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

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

        \[\leadsto x \cdot \left(\frac{z}{\sqrt{\color{blue}{{z}^{2}} - t \cdot a}} \cdot y\right) \]
    5. Applied egg-rr87.2%

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

    if 4.99999999999999983e117 < z

    1. Initial program 27.4%

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

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

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

Alternative 3: 89.7% accurate, 1.0× speedup?

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

\mathbf{elif}\;z \leq 2.9 \cdot 10^{+34}:\\
\;\;\;\;x \cdot \frac{z}{\frac{\sqrt{z \cdot z - a \cdot t}}{y}}\\

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


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

    1. Initial program 25.9%

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
      3. *-commutative24.1%

        \[\leadsto x \cdot \frac{\color{blue}{z \cdot y}}{\sqrt{z \cdot z - t \cdot a}} \]
      4. associate-/l*22.9%

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

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

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

        \[\leadsto x \cdot \left(\frac{z}{\sqrt{\color{blue}{{z}^{2}} - t \cdot a}} \cdot y\right) \]
    5. Applied egg-rr28.3%

      \[\leadsto x \cdot \color{blue}{\left(\frac{z}{\sqrt{{z}^{2} - t \cdot a}} \cdot y\right)} \]
    6. Taylor expanded in z around -inf 96.4%

      \[\leadsto x \cdot \left(\frac{z}{\color{blue}{-1 \cdot z + 0.5 \cdot \frac{a \cdot t}{z}}} \cdot y\right) \]
    7. Step-by-step derivation
      1. +-commutative96.4%

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

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

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

        \[\leadsto x \cdot \left(\frac{z}{0.5 \cdot \color{blue}{\left(a \cdot \frac{t}{z}\right)} - z} \cdot y\right) \]
    8. Simplified98.3%

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

    if -9.99999999999999966e89 < z < 2.9000000000000001e34

    1. Initial program 81.1%

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
      3. *-commutative81.4%

        \[\leadsto x \cdot \frac{\color{blue}{z \cdot y}}{\sqrt{z \cdot z - t \cdot a}} \]
      4. associate-/l*79.5%

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

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

    if 2.9000000000000001e34 < z

    1. Initial program 51.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+90}:\\ \;\;\;\;x \cdot \left(\frac{z}{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z} \cdot y\right)\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+34}:\\ \;\;\;\;x \cdot \frac{z}{\frac{\sqrt{z \cdot z - a \cdot t}}{y}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 4: 89.5% accurate, 1.0× speedup?

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

\mathbf{elif}\;z \leq 2.5 \cdot 10^{+34}:\\
\;\;\;\;z \cdot \frac{x \cdot y}{\sqrt{z \cdot z - a \cdot t}}\\

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


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

    1. Initial program 27.2%

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{z \cdot y}}{\sqrt{z \cdot z - t \cdot a}} \]
      4. associate-/l*24.3%

        \[\leadsto x \cdot \color{blue}{\frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}} \]
    3. Simplified24.3%

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

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

        \[\leadsto x \cdot \left(\frac{z}{\sqrt{\color{blue}{{z}^{2}} - t \cdot a}} \cdot y\right) \]
    5. Applied egg-rr29.6%

      \[\leadsto x \cdot \color{blue}{\left(\frac{z}{\sqrt{{z}^{2} - t \cdot a}} \cdot y\right)} \]
    6. Taylor expanded in z around -inf 96.5%

      \[\leadsto x \cdot \left(\frac{z}{\color{blue}{-1 \cdot z + 0.5 \cdot \frac{a \cdot t}{z}}} \cdot y\right) \]
    7. Step-by-step derivation
      1. +-commutative96.5%

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

        \[\leadsto x \cdot \left(\frac{z}{0.5 \cdot \frac{a \cdot t}{z} + \color{blue}{\left(-z\right)}} \cdot y\right) \]
      3. unsub-neg96.5%

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

        \[\leadsto x \cdot \left(\frac{z}{0.5 \cdot \color{blue}{\left(a \cdot \frac{t}{z}\right)} - z} \cdot y\right) \]
    8. Simplified98.3%

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

    if -1.75e82 < z < 2.4999999999999999e34

    1. Initial program 80.9%

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

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

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

    if 2.4999999999999999e34 < z

    1. Initial program 51.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+82}:\\ \;\;\;\;x \cdot \left(\frac{z}{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z} \cdot y\right)\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+34}:\\ \;\;\;\;z \cdot \frac{x \cdot y}{\sqrt{z \cdot z - a \cdot t}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 5: 89.1% accurate, 1.0× speedup?

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

\mathbf{elif}\;z \leq 1.4 \cdot 10^{+32}:\\
\;\;\;\;\frac{y \cdot \left(z \cdot x\right)}{\sqrt{z \cdot z - a \cdot t}}\\

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


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

    1. Initial program 35.6%

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{z \cdot y}}{\sqrt{z \cdot z - t \cdot a}} \]
      4. associate-/l*35.9%

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

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

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

        \[\leadsto x \cdot \left(\frac{z}{\sqrt{\color{blue}{{z}^{2}} - t \cdot a}} \cdot y\right) \]
    5. Applied egg-rr40.4%

      \[\leadsto x \cdot \color{blue}{\left(\frac{z}{\sqrt{{z}^{2} - t \cdot a}} \cdot y\right)} \]
    6. Taylor expanded in z around -inf 94.3%

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

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

        \[\leadsto x \cdot \left(\frac{z}{0.5 \cdot \frac{a \cdot t}{z} + \color{blue}{\left(-z\right)}} \cdot y\right) \]
      3. unsub-neg94.3%

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

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

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

    if -3.2e52 < z < 1.4e32

    1. Initial program 80.9%

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      2. *-commutative80.8%

        \[\leadsto \frac{\color{blue}{y \cdot x}}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}} \]
      3. associate-/l*80.9%

        \[\leadsto \color{blue}{\frac{\left(y \cdot x\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
      4. associate-*l*79.6%

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

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

    if 1.4e32 < z

    1. Initial program 51.6%

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

      \[\leadsto \color{blue}{x \cdot y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification88.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+52}:\\ \;\;\;\;x \cdot \left(\frac{z}{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z} \cdot y\right)\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+32}:\\ \;\;\;\;\frac{y \cdot \left(z \cdot x\right)}{\sqrt{z \cdot z - a \cdot t}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 6: 82.6% accurate, 1.0× speedup?

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

\mathbf{elif}\;z \leq 6.4 \cdot 10^{-83}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{\sqrt{a \cdot \left(-t\right)}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.3e-92

    1. Initial program 51.7%

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

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot y\right)} \]
    3. Step-by-step derivation
      1. mul-1-neg86.3%

        \[\leadsto \color{blue}{-x \cdot y} \]
      2. distribute-rgt-neg-out86.3%

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

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

    if -1.3e-92 < z < 6.4000000000000002e-83

    1. Initial program 74.0%

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
      3. *-commutative76.1%

        \[\leadsto x \cdot \frac{\color{blue}{z \cdot y}}{\sqrt{z \cdot z - t \cdot a}} \]
      4. associate-/l*71.3%

        \[\leadsto x \cdot \color{blue}{\frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}} \]
    3. Simplified71.3%

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

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

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{z}{\sqrt{{z}^{2} - t \cdot a}} \cdot y\right)} \]
    6. Taylor expanded in z around 0 66.6%

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

        \[\leadsto x \cdot \left(\frac{z}{\sqrt{\color{blue}{-a \cdot t}}} \cdot y\right) \]
      2. distribute-rgt-neg-out66.6%

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

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

    if 6.4000000000000002e-83 < z

    1. Initial program 60.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{-92}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{-83}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{z}{\sqrt{a \cdot \left(-t\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 7: 82.7% accurate, 1.0× speedup?

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

\mathbf{elif}\;z \leq 9.5 \cdot 10^{-81}:\\
\;\;\;\;\frac{y \cdot \left(z \cdot x\right)}{\sqrt{a \cdot \left(-t\right)}}\\

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


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

    1. Initial program 51.7%

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

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot y\right)} \]
    3. Step-by-step derivation
      1. mul-1-neg86.3%

        \[\leadsto \color{blue}{-x \cdot y} \]
      2. distribute-rgt-neg-out86.3%

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

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

    if -1.7500000000000001e-88 < z < 9.49999999999999917e-81

    1. Initial program 74.0%

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      2. *-commutative73.9%

        \[\leadsto \frac{\color{blue}{y \cdot x}}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}} \]
      3. associate-/l*74.0%

        \[\leadsto \color{blue}{\frac{\left(y \cdot x\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
      4. associate-*l*72.2%

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

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

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

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

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

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

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

    if 9.49999999999999917e-81 < z

    1. Initial program 60.9%

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

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

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

Alternative 8: 75.5% accurate, 6.6× speedup?

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

\mathbf{elif}\;z \leq 9.6 \cdot 10^{-181}:\\
\;\;\;\;2 \cdot \frac{z \cdot x}{\frac{a}{z} \cdot \frac{t}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.29999999999999985e-164

    1. Initial program 55.7%

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

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

        \[\leadsto \color{blue}{-x \cdot y} \]
      2. distribute-rgt-neg-out80.5%

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

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

    if -2.29999999999999985e-164 < z < 9.6000000000000005e-181

    1. Initial program 70.1%

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
      3. *-commutative69.4%

        \[\leadsto x \cdot \frac{\color{blue}{z \cdot y}}{\sqrt{z \cdot z - t \cdot a}} \]
      4. associate-/l*65.0%

        \[\leadsto x \cdot \color{blue}{\frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}} \]
    3. Simplified65.0%

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

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

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

        \[\leadsto x \cdot \frac{z}{\color{blue}{\frac{0.5 \cdot \left(a \cdot t\right)}{y \cdot z}}} \]
      2. *-commutative42.5%

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

        \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{\left(t \cdot a\right) \cdot 0.5}}{y \cdot z}} \]
      4. times-frac39.8%

        \[\leadsto x \cdot \frac{z}{\color{blue}{\frac{t \cdot a}{y} \cdot \frac{0.5}{z}}} \]
      5. *-commutative39.8%

        \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{a \cdot t}}{y} \cdot \frac{0.5}{z}} \]
    7. Simplified39.8%

      \[\leadsto x \cdot \frac{z}{\color{blue}{\frac{a \cdot t}{y} \cdot \frac{0.5}{z}}} \]
    8. Step-by-step derivation
      1. frac-times42.5%

        \[\leadsto x \cdot \frac{z}{\color{blue}{\frac{\left(a \cdot t\right) \cdot 0.5}{y \cdot z}}} \]
      2. *-commutative42.5%

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

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

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

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

        \[\leadsto \frac{-x \cdot z}{-\frac{\color{blue}{0.5 \cdot \left(t \cdot a\right)}}{y \cdot z}} \]
      4. *-un-lft-identity42.4%

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

        \[\leadsto \frac{-x \cdot z}{-\color{blue}{\frac{0.5}{1} \cdot \frac{t \cdot a}{y \cdot z}}} \]
      6. metadata-eval42.4%

        \[\leadsto \frac{-x \cdot z}{-\color{blue}{0.5} \cdot \frac{t \cdot a}{y \cdot z}} \]
      7. *-commutative42.4%

        \[\leadsto \frac{-x \cdot z}{-0.5 \cdot \frac{t \cdot a}{\color{blue}{z \cdot y}}} \]
    11. Applied egg-rr42.4%

      \[\leadsto \color{blue}{\frac{-x \cdot z}{-0.5 \cdot \frac{t \cdot a}{z \cdot y}}} \]
    12. Step-by-step derivation
      1. neg-mul-142.4%

        \[\leadsto \frac{\color{blue}{-1 \cdot \left(x \cdot z\right)}}{-0.5 \cdot \frac{t \cdot a}{z \cdot y}} \]
      2. distribute-lft-neg-in42.4%

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

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

        \[\leadsto \color{blue}{\frac{-1}{-0.5} \cdot \frac{x \cdot z}{\frac{t \cdot a}{z \cdot y}}} \]
      5. metadata-eval42.4%

        \[\leadsto \color{blue}{2} \cdot \frac{x \cdot z}{\frac{t \cdot a}{z \cdot y}} \]
      6. *-commutative42.4%

        \[\leadsto 2 \cdot \frac{x \cdot z}{\frac{t \cdot a}{\color{blue}{y \cdot z}}} \]
      7. times-frac40.3%

        \[\leadsto 2 \cdot \frac{x \cdot z}{\color{blue}{\frac{t}{y} \cdot \frac{a}{z}}} \]
    13. Simplified40.3%

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

    if 9.6000000000000005e-181 < z

    1. Initial program 63.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{-164}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 9.6 \cdot 10^{-181}:\\ \;\;\;\;2 \cdot \frac{z \cdot x}{\frac{a}{z} \cdot \frac{t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 9: 75.5% accurate, 6.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.70000000000000014e-171

    1. Initial program 55.7%

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

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

        \[\leadsto \color{blue}{-x \cdot y} \]
      2. distribute-rgt-neg-out80.5%

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

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

    if -2.70000000000000014e-171 < z < 6.7999999999999994e-176

    1. Initial program 70.1%

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
      3. *-commutative69.4%

        \[\leadsto x \cdot \frac{\color{blue}{z \cdot y}}{\sqrt{z \cdot z - t \cdot a}} \]
      4. associate-/l*65.0%

        \[\leadsto x \cdot \color{blue}{\frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}} \]
    3. Simplified65.0%

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

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

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

        \[\leadsto x \cdot \frac{z}{\color{blue}{\frac{0.5 \cdot \left(a \cdot t\right)}{y \cdot z}}} \]
      2. *-commutative42.5%

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

        \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{\left(t \cdot a\right) \cdot 0.5}}{y \cdot z}} \]
      4. times-frac39.8%

        \[\leadsto x \cdot \frac{z}{\color{blue}{\frac{t \cdot a}{y} \cdot \frac{0.5}{z}}} \]
      5. *-commutative39.8%

        \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{a \cdot t}}{y} \cdot \frac{0.5}{z}} \]
    7. Simplified39.8%

      \[\leadsto x \cdot \frac{z}{\color{blue}{\frac{a \cdot t}{y} \cdot \frac{0.5}{z}}} \]
    8. Step-by-step derivation
      1. add-sqr-sqrt23.1%

        \[\leadsto x \cdot \frac{\color{blue}{\sqrt{z} \cdot \sqrt{z}}}{\frac{a \cdot t}{y} \cdot \frac{0.5}{z}} \]
      2. times-frac23.0%

        \[\leadsto x \cdot \color{blue}{\left(\frac{\sqrt{z}}{\frac{a \cdot t}{y}} \cdot \frac{\sqrt{z}}{\frac{0.5}{z}}\right)} \]
      3. associate-/l*23.2%

        \[\leadsto x \cdot \left(\frac{\sqrt{z}}{\color{blue}{\frac{a}{\frac{y}{t}}}} \cdot \frac{\sqrt{z}}{\frac{0.5}{z}}\right) \]
    9. Applied egg-rr23.2%

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

        \[\leadsto x \cdot \color{blue}{\left(\frac{\sqrt{z}}{\frac{0.5}{z}} \cdot \frac{\sqrt{z}}{\frac{a}{\frac{y}{t}}}\right)} \]
      2. associate-*l/23.2%

        \[\leadsto x \cdot \color{blue}{\frac{\sqrt{z} \cdot \frac{\sqrt{z}}{\frac{a}{\frac{y}{t}}}}{\frac{0.5}{z}}} \]
      3. associate-*r/23.2%

        \[\leadsto x \cdot \frac{\color{blue}{\frac{\sqrt{z} \cdot \sqrt{z}}{\frac{a}{\frac{y}{t}}}}}{\frac{0.5}{z}} \]
      4. rem-square-sqrt40.2%

        \[\leadsto x \cdot \frac{\frac{\color{blue}{z}}{\frac{a}{\frac{y}{t}}}}{\frac{0.5}{z}} \]
      5. *-lft-identity40.2%

        \[\leadsto x \cdot \frac{\color{blue}{1 \cdot \frac{z}{\frac{a}{\frac{y}{t}}}}}{\frac{0.5}{z}} \]
      6. associate-*l/40.2%

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

        \[\leadsto x \cdot \left(\color{blue}{\left(\frac{1}{0.5} \cdot z\right)} \cdot \frac{z}{\frac{a}{\frac{y}{t}}}\right) \]
      8. metadata-eval40.2%

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

        \[\leadsto x \cdot \left(\left(2 \cdot z\right) \cdot \color{blue}{\left(\frac{z}{a} \cdot \frac{y}{t}\right)}\right) \]
    11. Simplified37.6%

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

    if 6.7999999999999994e-176 < z

    1. Initial program 63.1%

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

      \[\leadsto \color{blue}{x \cdot y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification75.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.7 \cdot 10^{-171}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-176}:\\ \;\;\;\;x \cdot \left(\left(z \cdot 2\right) \cdot \left(\frac{z}{a} \cdot \frac{y}{t}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 10: 75.7% accurate, 6.6× speedup?

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

\mathbf{elif}\;z \leq 6.5 \cdot 10^{-178}:\\
\;\;\;\;x \cdot \frac{z}{t \cdot \left(\frac{0.5}{y} \cdot \frac{a}{z}\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.15e-161

    1. Initial program 55.7%

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

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

        \[\leadsto \color{blue}{-x \cdot y} \]
      2. distribute-rgt-neg-out80.5%

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

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

    if -1.15e-161 < z < 6.5000000000000002e-178

    1. Initial program 70.1%

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
      3. *-commutative69.4%

        \[\leadsto x \cdot \frac{\color{blue}{z \cdot y}}{\sqrt{z \cdot z - t \cdot a}} \]
      4. associate-/l*65.0%

        \[\leadsto x \cdot \color{blue}{\frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}} \]
    3. Simplified65.0%

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

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

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

        \[\leadsto x \cdot \frac{z}{\color{blue}{\frac{0.5 \cdot \left(a \cdot t\right)}{y \cdot z}}} \]
      2. *-commutative42.5%

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

        \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{\left(t \cdot a\right) \cdot 0.5}}{y \cdot z}} \]
      4. times-frac39.8%

        \[\leadsto x \cdot \frac{z}{\color{blue}{\frac{t \cdot a}{y} \cdot \frac{0.5}{z}}} \]
      5. *-commutative39.8%

        \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{a \cdot t}}{y} \cdot \frac{0.5}{z}} \]
    7. Simplified39.8%

      \[\leadsto x \cdot \frac{z}{\color{blue}{\frac{a \cdot t}{y} \cdot \frac{0.5}{z}}} \]
    8. Step-by-step derivation
      1. frac-times42.5%

        \[\leadsto x \cdot \frac{z}{\color{blue}{\frac{\left(a \cdot t\right) \cdot 0.5}{y \cdot z}}} \]
      2. *-commutative42.5%

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

      \[\leadsto x \cdot \frac{z}{\color{blue}{\frac{\left(t \cdot a\right) \cdot 0.5}{y \cdot z}}} \]
    10. Taylor expanded in t around 0 42.5%

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

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

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

        \[\leadsto x \cdot \frac{z}{\frac{\color{blue}{\left(a \cdot 0.5\right)} \cdot t}{y \cdot z}} \]
      4. *-commutative42.5%

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

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

        \[\leadsto x \cdot \frac{z}{\color{blue}{t \cdot \frac{a \cdot 0.5}{z \cdot y}}} \]
      7. *-commutative40.8%

        \[\leadsto x \cdot \frac{z}{t \cdot \frac{\color{blue}{0.5 \cdot a}}{z \cdot y}} \]
      8. *-commutative40.8%

        \[\leadsto x \cdot \frac{z}{t \cdot \frac{0.5 \cdot a}{\color{blue}{y \cdot z}}} \]
      9. times-frac40.9%

        \[\leadsto x \cdot \frac{z}{t \cdot \color{blue}{\left(\frac{0.5}{y} \cdot \frac{a}{z}\right)}} \]
    12. Simplified40.9%

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

    if 6.5000000000000002e-178 < z

    1. Initial program 63.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{-161}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-178}:\\ \;\;\;\;x \cdot \frac{z}{t \cdot \left(\frac{0.5}{y} \cdot \frac{a}{z}\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 11: 77.3% accurate, 6.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.94999999999999992e-167

    1. Initial program 55.7%

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

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

        \[\leadsto \color{blue}{-x \cdot y} \]
      2. distribute-rgt-neg-out80.5%

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

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

    if -1.94999999999999992e-167 < z

    1. Initial program 64.8%

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
      3. *-commutative63.3%

        \[\leadsto x \cdot \frac{\color{blue}{z \cdot y}}{\sqrt{z \cdot z - t \cdot a}} \]
      4. associate-/l*62.4%

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\left(\frac{z}{\sqrt{{z}^{2} - t \cdot a}} \cdot y\right)} \]
    6. Taylor expanded in z around inf 71.8%

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

        \[\leadsto x \cdot \left(\frac{z}{z + -0.5 \cdot \color{blue}{\left(a \cdot \frac{t}{z}\right)}} \cdot y\right) \]
    8. Simplified74.5%

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

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

Alternative 12: 78.9% accurate, 6.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 1.0000000000000001e-253

    1. Initial program 58.4%

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
      3. *-commutative59.7%

        \[\leadsto x \cdot \frac{\color{blue}{z \cdot y}}{\sqrt{z \cdot z - t \cdot a}} \]
      4. associate-/l*57.9%

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

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

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

        \[\leadsto x \cdot \left(\frac{z}{\sqrt{\color{blue}{{z}^{2}} - t \cdot a}} \cdot y\right) \]
    5. Applied egg-rr62.3%

      \[\leadsto x \cdot \color{blue}{\left(\frac{z}{\sqrt{{z}^{2} - t \cdot a}} \cdot y\right)} \]
    6. Taylor expanded in z around -inf 75.5%

      \[\leadsto x \cdot \left(\frac{z}{\color{blue}{-1 \cdot z + 0.5 \cdot \frac{a \cdot t}{z}}} \cdot y\right) \]
    7. Step-by-step derivation
      1. +-commutative75.5%

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

        \[\leadsto x \cdot \left(\frac{z}{0.5 \cdot \frac{a \cdot t}{z} + \color{blue}{\left(-z\right)}} \cdot y\right) \]
      3. unsub-neg75.5%

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

        \[\leadsto x \cdot \left(\frac{z}{0.5 \cdot \color{blue}{\left(a \cdot \frac{t}{z}\right)} - z} \cdot y\right) \]
    8. Simplified75.6%

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

    if 1.0000000000000001e-253 < z

    1. Initial program 63.6%

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
      3. *-commutative61.0%

        \[\leadsto x \cdot \frac{\color{blue}{z \cdot y}}{\sqrt{z \cdot z - t \cdot a}} \]
      4. associate-/l*61.4%

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

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

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

        \[\leadsto x \cdot \left(\frac{z}{\sqrt{\color{blue}{{z}^{2}} - t \cdot a}} \cdot y\right) \]
    5. Applied egg-rr65.4%

      \[\leadsto x \cdot \color{blue}{\left(\frac{z}{\sqrt{{z}^{2} - t \cdot a}} \cdot y\right)} \]
    6. Taylor expanded in z around inf 76.4%

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

        \[\leadsto x \cdot \left(\frac{z}{z + -0.5 \cdot \color{blue}{\left(a \cdot \frac{t}{z}\right)}} \cdot y\right) \]
    8. Simplified79.6%

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

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

Alternative 13: 79.0% accurate, 6.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 1.84999999999999996e-281

    1. Initial program 57.9%

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
      3. *-commutative59.2%

        \[\leadsto x \cdot \frac{\color{blue}{z \cdot y}}{\sqrt{z \cdot z - t \cdot a}} \]
      4. associate-/l*57.3%

        \[\leadsto x \cdot \color{blue}{\frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}} \]
    3. Simplified57.3%

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

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

        \[\leadsto x \cdot \left(\frac{z}{\sqrt{\color{blue}{{z}^{2}} - t \cdot a}} \cdot y\right) \]
    5. Applied egg-rr61.9%

      \[\leadsto x \cdot \color{blue}{\left(\frac{z}{\sqrt{{z}^{2} - t \cdot a}} \cdot y\right)} \]
    6. Taylor expanded in z around -inf 76.2%

      \[\leadsto x \cdot \left(\frac{z}{\color{blue}{-1 \cdot z + 0.5 \cdot \frac{a \cdot t}{z}}} \cdot y\right) \]
    7. Step-by-step derivation
      1. +-commutative76.2%

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

        \[\leadsto x \cdot \left(\frac{z}{0.5 \cdot \frac{a \cdot t}{z} + \color{blue}{\left(-z\right)}} \cdot y\right) \]
      3. unsub-neg76.2%

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

        \[\leadsto x \cdot \left(\frac{z}{0.5 \cdot \color{blue}{\left(a \cdot \frac{t}{z}\right)} - z} \cdot y\right) \]
    8. Simplified76.4%

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

    if 1.84999999999999996e-281 < z

    1. Initial program 63.9%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}} \cdot z \]
      3. associate-*l/59.6%

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

        \[\leadsto \color{blue}{x \cdot \frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}} \]
      5. associate-/r/65.7%

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{\sqrt{z \cdot z - t \cdot a}} \cdot y\right)} \]
      6. associate-*r*67.9%

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

        \[\leadsto \left(x \cdot \frac{z}{\sqrt{\color{blue}{{z}^{2}} - t \cdot a}}\right) \cdot y \]
    3. Applied egg-rr67.9%

      \[\leadsto \color{blue}{\left(x \cdot \frac{z}{\sqrt{{z}^{2} - t \cdot a}}\right) \cdot y} \]
    4. Taylor expanded in z around inf 75.7%

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

        \[\leadsto x \cdot \left(\frac{z}{z + -0.5 \cdot \color{blue}{\left(a \cdot \frac{t}{z}\right)}} \cdot y\right) \]
    6. Simplified78.7%

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

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

Alternative 14: 79.0% accurate, 6.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 1.84999999999999996e-281

    1. Initial program 57.9%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}} \cdot z \]
      3. associate-*l/56.8%

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

        \[\leadsto \color{blue}{x \cdot \frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}} \]
      5. associate-/r/61.9%

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{\sqrt{z \cdot z - t \cdot a}} \cdot y\right)} \]
      6. associate-*r*61.2%

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

        \[\leadsto \left(x \cdot \frac{z}{\sqrt{\color{blue}{{z}^{2}} - t \cdot a}}\right) \cdot y \]
    3. Applied egg-rr61.2%

      \[\leadsto \color{blue}{\left(x \cdot \frac{z}{\sqrt{{z}^{2} - t \cdot a}}\right) \cdot y} \]
    4. Taylor expanded in z around -inf 76.2%

      \[\leadsto \left(x \cdot \frac{z}{\color{blue}{-1 \cdot z + 0.5 \cdot \frac{a \cdot t}{z}}}\right) \cdot y \]
    5. Step-by-step derivation
      1. +-commutative76.2%

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

        \[\leadsto x \cdot \left(\frac{z}{0.5 \cdot \frac{a \cdot t}{z} + \color{blue}{\left(-z\right)}} \cdot y\right) \]
      3. unsub-neg76.2%

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

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

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

    if 1.84999999999999996e-281 < z

    1. Initial program 63.9%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}} \cdot z \]
      3. associate-*l/59.6%

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

        \[\leadsto \color{blue}{x \cdot \frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{y}}} \]
      5. associate-/r/65.7%

        \[\leadsto x \cdot \color{blue}{\left(\frac{z}{\sqrt{z \cdot z - t \cdot a}} \cdot y\right)} \]
      6. associate-*r*67.9%

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

        \[\leadsto \left(x \cdot \frac{z}{\sqrt{\color{blue}{{z}^{2}} - t \cdot a}}\right) \cdot y \]
    3. Applied egg-rr67.9%

      \[\leadsto \color{blue}{\left(x \cdot \frac{z}{\sqrt{{z}^{2} - t \cdot a}}\right) \cdot y} \]
    4. Taylor expanded in z around inf 75.7%

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

        \[\leadsto x \cdot \left(\frac{z}{z + -0.5 \cdot \color{blue}{\left(a \cdot \frac{t}{z}\right)}} \cdot y\right) \]
    6. Simplified78.7%

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

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

Alternative 15: 73.2% accurate, 10.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.99999999999999982e-200

    1. Initial program 56.7%

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

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot y\right)} \]
    3. Step-by-step derivation
      1. mul-1-neg79.3%

        \[\leadsto \color{blue}{-x \cdot y} \]
      2. distribute-rgt-neg-out79.3%

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

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

    if -9.99999999999999982e-200 < z < 1.4e-175

    1. Initial program 68.1%

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

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

        \[\leadsto \frac{x \cdot \color{blue}{\left(z \cdot y\right)}}{\sqrt{z \cdot z - t \cdot a}} \]
      3. associate-*l*64.9%

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

        \[\leadsto \color{blue}{\left(x \cdot z\right) \cdot \frac{y}{\sqrt{z \cdot z - t \cdot a}}} \]
      5. *-commutative61.8%

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

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

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

    if 1.4e-175 < z

    1. Initial program 63.1%

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

      \[\leadsto \color{blue}{x \cdot y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification73.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{-199}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-175}:\\ \;\;\;\;\left(z \cdot x\right) \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 16: 75.2% accurate, 10.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.7000000000000002e-198

    1. Initial program 56.7%

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

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot y\right)} \]
    3. Step-by-step derivation
      1. mul-1-neg79.3%

        \[\leadsto \color{blue}{-x \cdot y} \]
      2. distribute-rgt-neg-out79.3%

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

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

    if -2.7000000000000002e-198 < z < 1.6e-174

    1. Initial program 68.1%

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

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

        \[\leadsto \frac{x \cdot \color{blue}{\left(z \cdot y\right)}}{\sqrt{z \cdot z - t \cdot a}} \]
      3. associate-*l*64.9%

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

        \[\leadsto \color{blue}{\left(x \cdot z\right) \cdot \frac{y}{\sqrt{z \cdot z - t \cdot a}}} \]
      5. *-commutative61.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.6e-174 < z

    1. Initial program 63.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.7 \cdot 10^{-198}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-174}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 17: 75.4% accurate, 10.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.2e-197

    1. Initial program 56.7%

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

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot y\right)} \]
    3. Step-by-step derivation
      1. mul-1-neg79.3%

        \[\leadsto \color{blue}{-x \cdot y} \]
      2. distribute-rgt-neg-out79.3%

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

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

    if -2.2e-197 < z < 2.7999999999999999e-95

    1. Initial program 69.5%

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      2. *-commutative69.6%

        \[\leadsto \frac{\color{blue}{y \cdot x}}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}} \]
      3. associate-/l*69.5%

        \[\leadsto \color{blue}{\frac{\left(y \cdot x\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
      4. associate-*l*65.1%

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

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

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

    if 2.7999999999999999e-95 < z

    1. Initial program 61.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{-197}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-95}:\\ \;\;\;\;\frac{y \cdot \left(z \cdot x\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 18: 72.7% accurate, 18.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 1.70000000000000009e-292

    1. Initial program 57.6%

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

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

        \[\leadsto \color{blue}{-x \cdot y} \]
      2. distribute-rgt-neg-out71.9%

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

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

    if 1.70000000000000009e-292 < z

    1. Initial program 64.2%

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

      \[\leadsto \color{blue}{x \cdot y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification72.9%

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

Alternative 19: 42.8% accurate, 37.7× speedup?

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

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

    \[\leadsto \color{blue}{x \cdot y} \]
  3. Final simplification41.9%

    \[\leadsto x \cdot y \]

Developer target: 89.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z < -3.1921305903852764 \cdot 10^{+46}:\\ \;\;\;\;-y \cdot x\\ \mathbf{elif}\;z < 5.976268120920894 \cdot 10^{+90}:\\ \;\;\;\;\frac{x \cdot z}{\frac{\sqrt{z \cdot z - a \cdot t}}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (< z -3.1921305903852764e+46)
   (- (* y x))
   (if (< z 5.976268120920894e+90)
     (/ (* x z) (/ (sqrt (- (* z z) (* a t))) y))
     (* y x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z < -3.1921305903852764e+46) {
		tmp = -(y * x);
	} else if (z < 5.976268120920894e+90) {
		tmp = (x * z) / (sqrt(((z * z) - (a * t))) / y);
	} else {
		tmp = y * x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z < (-3.1921305903852764d+46)) then
        tmp = -(y * x)
    else if (z < 5.976268120920894d+90) then
        tmp = (x * z) / (sqrt(((z * z) - (a * t))) / y)
    else
        tmp = y * x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z < -3.1921305903852764e+46) {
		tmp = -(y * x);
	} else if (z < 5.976268120920894e+90) {
		tmp = (x * z) / (Math.sqrt(((z * z) - (a * t))) / y);
	} else {
		tmp = y * x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z < -3.1921305903852764e+46:
		tmp = -(y * x)
	elif z < 5.976268120920894e+90:
		tmp = (x * z) / (math.sqrt(((z * z) - (a * t))) / y)
	else:
		tmp = y * x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z < -3.1921305903852764e+46)
		tmp = Float64(-Float64(y * x));
	elseif (z < 5.976268120920894e+90)
		tmp = Float64(Float64(x * z) / Float64(sqrt(Float64(Float64(z * z) - Float64(a * t))) / y));
	else
		tmp = Float64(y * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z < -3.1921305903852764e+46)
		tmp = -(y * x);
	elseif (z < 5.976268120920894e+90)
		tmp = (x * z) / (sqrt(((z * z) - (a * t))) / y);
	else
		tmp = y * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Less[z, -3.1921305903852764e+46], (-N[(y * x), $MachinePrecision]), If[Less[z, 5.976268120920894e+90], N[(N[(x * z), $MachinePrecision] / N[(N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z < -3.1921305903852764 \cdot 10^{+46}:\\
\;\;\;\;-y \cdot x\\

\mathbf{elif}\;z < 5.976268120920894 \cdot 10^{+90}:\\
\;\;\;\;\frac{x \cdot z}{\frac{\sqrt{z \cdot z - a \cdot t}}{y}}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023320 
(FPCore (x y z t a)
  :name "Statistics.Math.RootFinding:ridders from math-functions-0.1.5.2"
  :precision binary64

  :herbie-target
  (if (< z -3.1921305903852764e+46) (- (* y x)) (if (< z 5.976268120920894e+90) (/ (* x z) (/ (sqrt (- (* z z) (* a t))) y)) (* y x)))

  (/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))