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

Percentage Accurate: 61.1% → 90.5%
Time: 22.7s
Alternatives: 21
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 21 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.1% 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: 90.5% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_1 := z \cdot z - a \cdot t\\ t_2 := \sqrt{t_1}\\ t_3 := \frac{a}{\frac{z \cdot z}{t}}\\ \mathbf{if}\;z \leq -4 \cdot 10^{+110}:\\ \;\;\;\;\frac{x \cdot y}{\mathsf{fma}\left(0.5, t_3, -1\right)}\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-150}:\\ \;\;\;\;\frac{z}{\frac{t_2}{x \cdot y}}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-193}:\\ \;\;\;\;\left(x \cdot \left(z \cdot y\right)\right) \cdot {t_1}^{-0.5}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-90}:\\ \;\;\;\;y \cdot \left(z \cdot \frac{x}{t_2}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\sqrt{1 - t_3}}\\ \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 (- (* z z) (* a t))) (t_2 (sqrt t_1)) (t_3 (/ a (/ (* z z) t))))
   (if (<= z -4e+110)
     (/ (* x y) (fma 0.5 t_3 -1.0))
     (if (<= z -1.8e-150)
       (/ z (/ t_2 (* x y)))
       (if (<= z 5.8e-193)
         (* (* x (* z y)) (pow t_1 -0.5))
         (if (<= z 1.6e-90)
           (* y (* z (/ x t_2)))
           (/ (* x y) (sqrt (- 1.0 t_3)))))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double t_1 = (z * z) - (a * t);
	double t_2 = sqrt(t_1);
	double t_3 = a / ((z * z) / t);
	double tmp;
	if (z <= -4e+110) {
		tmp = (x * y) / fma(0.5, t_3, -1.0);
	} else if (z <= -1.8e-150) {
		tmp = z / (t_2 / (x * y));
	} else if (z <= 5.8e-193) {
		tmp = (x * (z * y)) * pow(t_1, -0.5);
	} else if (z <= 1.6e-90) {
		tmp = y * (z * (x / t_2));
	} else {
		tmp = (x * y) / sqrt((1.0 - t_3));
	}
	return tmp;
}
x, y = sort([x, y])
function code(x, y, z, t, a)
	t_1 = Float64(Float64(z * z) - Float64(a * t))
	t_2 = sqrt(t_1)
	t_3 = Float64(a / Float64(Float64(z * z) / t))
	tmp = 0.0
	if (z <= -4e+110)
		tmp = Float64(Float64(x * y) / fma(0.5, t_3, -1.0));
	elseif (z <= -1.8e-150)
		tmp = Float64(z / Float64(t_2 / Float64(x * y)));
	elseif (z <= 5.8e-193)
		tmp = Float64(Float64(x * Float64(z * y)) * (t_1 ^ -0.5));
	elseif (z <= 1.6e-90)
		tmp = Float64(y * Float64(z * Float64(x / t_2)));
	else
		tmp = Float64(Float64(x * y) / sqrt(Float64(1.0 - t_3)));
	end
	return 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[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[(a / N[(N[(z * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4e+110], N[(N[(x * y), $MachinePrecision] / N[(0.5 * t$95$3 + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.8e-150], N[(z / N[(t$95$2 / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e-193], N[(N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision] * N[Power[t$95$1, -0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e-90], N[(y * N[(z * N[(x / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / N[Sqrt[N[(1.0 - t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := z \cdot z - a \cdot t\\
t_2 := \sqrt{t_1}\\
t_3 := \frac{a}{\frac{z \cdot z}{t}}\\
\mathbf{if}\;z \leq -4 \cdot 10^{+110}:\\
\;\;\;\;\frac{x \cdot y}{\mathsf{fma}\left(0.5, t_3, -1\right)}\\

\mathbf{elif}\;z \leq -1.8 \cdot 10^{-150}:\\
\;\;\;\;\frac{z}{\frac{t_2}{x \cdot y}}\\

\mathbf{elif}\;z \leq 5.8 \cdot 10^{-193}:\\
\;\;\;\;\left(x \cdot \left(z \cdot y\right)\right) \cdot {t_1}^{-0.5}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -4.0000000000000001e110

    1. Initial program 29.3%

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

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

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

      \[\leadsto \frac{x \cdot y}{\color{blue}{0.5 \cdot \frac{a \cdot t}{{z}^{2}} - 1}} \]
    5. Step-by-step derivation
      1. fma-neg93.9%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\mathsf{fma}\left(0.5, \frac{a \cdot t}{{z}^{2}}, -1\right)}} \]
      2. unpow293.9%

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

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

        \[\leadsto \frac{x \cdot y}{\mathsf{fma}\left(0.5, \frac{a}{\frac{z \cdot z}{t}}, \color{blue}{-1}\right)} \]
    6. Simplified94.3%

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

    if -4.0000000000000001e110 < z < -1.8000000000000001e-150

    1. Initial program 89.4%

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

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

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

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

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

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

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

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

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

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

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

    if -1.8000000000000001e-150 < z < 5.80000000000000013e-193

    1. Initial program 72.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.80000000000000013e-193 < z < 1.60000000000000004e-90

    1. Initial program 88.0%

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

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

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

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

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

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

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

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

    if 1.60000000000000004e-90 < z

    1. Initial program 53.8%

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
    4. Step-by-step derivation
      1. add-sqr-sqrt61.0%

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

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

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

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

      \[\leadsto \frac{x \cdot y}{\color{blue}{\sqrt{\frac{z \cdot z - t \cdot a}{z \cdot z}}}} \]
    6. Step-by-step derivation
      1. div-sub55.3%

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

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

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

        \[\leadsto \frac{x \cdot y}{\sqrt{1 - \color{blue}{\frac{a}{\frac{z \cdot z}{t}}}}} \]
    7. Simplified98.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+110}:\\ \;\;\;\;\frac{x \cdot y}{\mathsf{fma}\left(0.5, \frac{a}{\frac{z \cdot z}{t}}, -1\right)}\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-150}:\\ \;\;\;\;\frac{z}{\frac{\sqrt{z \cdot z - a \cdot t}}{x \cdot y}}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-193}:\\ \;\;\;\;\left(x \cdot \left(z \cdot y\right)\right) \cdot {\left(z \cdot z - a \cdot t\right)}^{-0.5}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-90}:\\ \;\;\;\;y \cdot \left(z \cdot \frac{x}{\sqrt{z \cdot z - a \cdot t}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\sqrt{1 - \frac{a}{\frac{z \cdot z}{t}}}}\\ \end{array} \]

Alternative 2: 88.2% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -3.15 \cdot 10^{+71}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-91}:\\ \;\;\;\;y \cdot \left(z \cdot \frac{x}{\sqrt{z \cdot z - a \cdot t}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z + -0.5 \cdot \frac{a}{\frac{z}{t}}}{z}}\\ \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.15e+71)
   (* x (- y))
   (if (<= z 2e-91)
     (* y (* z (/ x (sqrt (- (* z z) (* a t))))))
     (/ (* x y) (/ (+ z (* -0.5 (/ a (/ z t)))) z)))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.15e+71) {
		tmp = x * -y;
	} else if (z <= 2e-91) {
		tmp = y * (z * (x / sqrt(((z * z) - (a * t)))));
	} else {
		tmp = (x * y) / ((z + (-0.5 * (a / (z / t)))) / z);
	}
	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.15d+71)) then
        tmp = x * -y
    else if (z <= 2d-91) then
        tmp = y * (z * (x / sqrt(((z * z) - (a * t)))))
    else
        tmp = (x * y) / ((z + ((-0.5d0) * (a / (z / t)))) / z)
    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.15e+71) {
		tmp = x * -y;
	} else if (z <= 2e-91) {
		tmp = y * (z * (x / Math.sqrt(((z * z) - (a * t)))));
	} else {
		tmp = (x * y) / ((z + (-0.5 * (a / (z / t)))) / z);
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if z <= -3.15e+71:
		tmp = x * -y
	elif z <= 2e-91:
		tmp = y * (z * (x / math.sqrt(((z * z) - (a * t)))))
	else:
		tmp = (x * y) / ((z + (-0.5 * (a / (z / t)))) / z)
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -3.15e+71)
		tmp = Float64(x * Float64(-y));
	elseif (z <= 2e-91)
		tmp = Float64(y * Float64(z * Float64(x / sqrt(Float64(Float64(z * z) - Float64(a * t))))));
	else
		tmp = Float64(Float64(x * y) / Float64(Float64(z + Float64(-0.5 * Float64(a / Float64(z / t)))) / z));
	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.15e+71)
		tmp = x * -y;
	elseif (z <= 2e-91)
		tmp = y * (z * (x / sqrt(((z * z) - (a * t)))));
	else
		tmp = (x * y) / ((z + (-0.5 * (a / (z / t)))) / z);
	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.15e+71], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 2e-91], N[(y * N[(z * N[(x / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / N[(N[(z + N[(-0.5 * N[(a / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.15 \cdot 10^{+71}:\\
\;\;\;\;x \cdot \left(-y\right)\\

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

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


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

    1. Initial program 36.6%

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

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

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

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

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

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

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

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

    if -3.15e71 < z < 2.00000000000000004e-91

    1. Initial program 82.9%

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

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

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

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

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

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

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

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

    if 2.00000000000000004e-91 < z

    1. Initial program 53.8%

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

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

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

        \[\leadsto \frac{x \cdot y}{\frac{\color{blue}{{\left(z \cdot z - t \cdot a\right)}^{0.5}}}{z}} \]
      2. pow-to-exp57.9%

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

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

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

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

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

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

Alternative 3: 91.1% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+135}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+142}:\\ \;\;\;\;\frac{z}{\sqrt{z \cdot z - a \cdot t}} \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z + -0.5 \cdot \frac{a}{\frac{z}{t}}}{z}}\\ \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+135)
   (* x (- y))
   (if (<= z 4e+142)
     (* (/ z (sqrt (- (* z z) (* a t)))) (* x y))
     (/ (* x y) (/ (+ z (* -0.5 (/ a (/ z t)))) z)))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1e+135) {
		tmp = x * -y;
	} else if (z <= 4e+142) {
		tmp = (z / sqrt(((z * z) - (a * t)))) * (x * y);
	} else {
		tmp = (x * y) / ((z + (-0.5 * (a / (z / t)))) / z);
	}
	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+135)) then
        tmp = x * -y
    else if (z <= 4d+142) then
        tmp = (z / sqrt(((z * z) - (a * t)))) * (x * y)
    else
        tmp = (x * y) / ((z + ((-0.5d0) * (a / (z / t)))) / z)
    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+135) {
		tmp = x * -y;
	} else if (z <= 4e+142) {
		tmp = (z / Math.sqrt(((z * z) - (a * t)))) * (x * y);
	} else {
		tmp = (x * y) / ((z + (-0.5 * (a / (z / t)))) / z);
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1e+135:
		tmp = x * -y
	elif z <= 4e+142:
		tmp = (z / math.sqrt(((z * z) - (a * t)))) * (x * y)
	else:
		tmp = (x * y) / ((z + (-0.5 * (a / (z / t)))) / z)
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1e+135)
		tmp = Float64(x * Float64(-y));
	elseif (z <= 4e+142)
		tmp = Float64(Float64(z / sqrt(Float64(Float64(z * z) - Float64(a * t)))) * Float64(x * y));
	else
		tmp = Float64(Float64(x * y) / Float64(Float64(z + Float64(-0.5 * Float64(a / Float64(z / t)))) / z));
	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+135)
		tmp = x * -y;
	elseif (z <= 4e+142)
		tmp = (z / sqrt(((z * z) - (a * t)))) * (x * y);
	else
		tmp = (x * y) / ((z + (-0.5 * (a / (z / t)))) / z);
	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+135], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 4e+142], N[(N[(z / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(x * y), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / N[(N[(z + N[(-0.5 * N[(a / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+135}:\\
\;\;\;\;x \cdot \left(-y\right)\\

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

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


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

    1. Initial program 19.7%

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

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

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

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

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

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

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

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

    if -9.99999999999999962e134 < z < 4.0000000000000002e142

    1. Initial program 84.6%

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

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

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

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

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

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

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

    if 4.0000000000000002e142 < z

    1. Initial program 15.8%

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

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

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

        \[\leadsto \frac{x \cdot y}{\frac{\color{blue}{{\left(z \cdot z - t \cdot a\right)}^{0.5}}}{z}} \]
      2. pow-to-exp20.0%

        \[\leadsto \frac{x \cdot y}{\frac{\color{blue}{e^{\log \left(z \cdot z - t \cdot a\right) \cdot 0.5}}}{z}} \]
    5. Applied egg-rr20.0%

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

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

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

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

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

Alternative 4: 91.6% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+142}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+29}:\\ \;\;\;\;\frac{z}{\sqrt{z \cdot z - a \cdot t}} \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\sqrt{1 - \frac{a}{\frac{z \cdot z}{t}}}}\\ \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 -2e+142)
   (* x (- y))
   (if (<= z 4e+29)
     (* (/ z (sqrt (- (* z z) (* a t)))) (* x y))
     (/ (* x y) (sqrt (- 1.0 (/ a (/ (* z z) t))))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2e+142) {
		tmp = x * -y;
	} else if (z <= 4e+29) {
		tmp = (z / sqrt(((z * z) - (a * t)))) * (x * y);
	} else {
		tmp = (x * y) / sqrt((1.0 - (a / ((z * z) / t))));
	}
	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 <= (-2d+142)) then
        tmp = x * -y
    else if (z <= 4d+29) then
        tmp = (z / sqrt(((z * z) - (a * t)))) * (x * y)
    else
        tmp = (x * y) / sqrt((1.0d0 - (a / ((z * z) / t))))
    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 <= -2e+142) {
		tmp = x * -y;
	} else if (z <= 4e+29) {
		tmp = (z / Math.sqrt(((z * z) - (a * t)))) * (x * y);
	} else {
		tmp = (x * y) / Math.sqrt((1.0 - (a / ((z * z) / t))));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if z <= -2e+142:
		tmp = x * -y
	elif z <= 4e+29:
		tmp = (z / math.sqrt(((z * z) - (a * t)))) * (x * y)
	else:
		tmp = (x * y) / math.sqrt((1.0 - (a / ((z * z) / t))))
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -2e+142)
		tmp = Float64(x * Float64(-y));
	elseif (z <= 4e+29)
		tmp = Float64(Float64(z / sqrt(Float64(Float64(z * z) - Float64(a * t)))) * Float64(x * y));
	else
		tmp = Float64(Float64(x * y) / sqrt(Float64(1.0 - Float64(a / Float64(Float64(z * z) / t)))));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -2e+142)
		tmp = x * -y;
	elseif (z <= 4e+29)
		tmp = (z / sqrt(((z * z) - (a * t)))) * (x * y);
	else
		tmp = (x * y) / sqrt((1.0 - (a / ((z * z) / t))));
	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, -2e+142], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 4e+29], N[(N[(z / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(x * y), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / N[Sqrt[N[(1.0 - N[(a / N[(N[(z * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+142}:\\
\;\;\;\;x \cdot \left(-y\right)\\

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

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


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

    1. Initial program 19.7%

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

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

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

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

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

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

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

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

    if -2.0000000000000001e142 < z < 3.99999999999999966e29

    1. Initial program 84.8%

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

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

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

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

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

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

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

    if 3.99999999999999966e29 < z

    1. Initial program 44.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 91.6% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_1 := \frac{a}{\frac{z \cdot z}{t}}\\ \mathbf{if}\;z \leq -2 \cdot 10^{+142}:\\ \;\;\;\;\frac{x \cdot y}{\mathsf{fma}\left(0.5, t_1, -1\right)}\\ \mathbf{elif}\;z \leq 10^{+30}:\\ \;\;\;\;\frac{z}{\sqrt{z \cdot z - a \cdot t}} \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\sqrt{1 - t_1}}\\ \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 (/ (* z z) t))))
   (if (<= z -2e+142)
     (/ (* x y) (fma 0.5 t_1 -1.0))
     (if (<= z 1e+30)
       (* (/ z (sqrt (- (* z z) (* a t)))) (* x y))
       (/ (* x y) (sqrt (- 1.0 t_1)))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double t_1 = a / ((z * z) / t);
	double tmp;
	if (z <= -2e+142) {
		tmp = (x * y) / fma(0.5, t_1, -1.0);
	} else if (z <= 1e+30) {
		tmp = (z / sqrt(((z * z) - (a * t)))) * (x * y);
	} else {
		tmp = (x * y) / sqrt((1.0 - t_1));
	}
	return tmp;
}
x, y = sort([x, y])
function code(x, y, z, t, a)
	t_1 = Float64(a / Float64(Float64(z * z) / t))
	tmp = 0.0
	if (z <= -2e+142)
		tmp = Float64(Float64(x * y) / fma(0.5, t_1, -1.0));
	elseif (z <= 1e+30)
		tmp = Float64(Float64(z / sqrt(Float64(Float64(z * z) - Float64(a * t)))) * Float64(x * y));
	else
		tmp = Float64(Float64(x * y) / sqrt(Float64(1.0 - t_1)));
	end
	return 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[(N[(z * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2e+142], N[(N[(x * y), $MachinePrecision] / N[(0.5 * t$95$1 + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e+30], N[(N[(z / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(x * y), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / N[Sqrt[N[(1.0 - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := \frac{a}{\frac{z \cdot z}{t}}\\
\mathbf{if}\;z \leq -2 \cdot 10^{+142}:\\
\;\;\;\;\frac{x \cdot y}{\mathsf{fma}\left(0.5, t_1, -1\right)}\\

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

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


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

    1. Initial program 19.7%

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

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

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

      \[\leadsto \frac{x \cdot y}{\color{blue}{0.5 \cdot \frac{a \cdot t}{{z}^{2}} - 1}} \]
    5. Step-by-step derivation
      1. fma-neg92.6%

        \[\leadsto \frac{x \cdot y}{\color{blue}{\mathsf{fma}\left(0.5, \frac{a \cdot t}{{z}^{2}}, -1\right)}} \]
      2. unpow292.6%

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

        \[\leadsto \frac{x \cdot y}{\mathsf{fma}\left(0.5, \color{blue}{\frac{a}{\frac{z \cdot z}{t}}}, -1\right)} \]
      4. metadata-eval93.2%

        \[\leadsto \frac{x \cdot y}{\mathsf{fma}\left(0.5, \frac{a}{\frac{z \cdot z}{t}}, \color{blue}{-1}\right)} \]
    6. Simplified93.2%

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

    if -2.0000000000000001e142 < z < 1e30

    1. Initial program 84.8%

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

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

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

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

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

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

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

    if 1e30 < z

    1. Initial program 44.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+142}:\\ \;\;\;\;\frac{x \cdot y}{\mathsf{fma}\left(0.5, \frac{a}{\frac{z \cdot z}{t}}, -1\right)}\\ \mathbf{elif}\;z \leq 10^{+30}:\\ \;\;\;\;\frac{z}{\sqrt{z \cdot z - a \cdot t}} \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\sqrt{1 - \frac{a}{\frac{z \cdot z}{t}}}}\\ \end{array} \]

Alternative 6: 82.2% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.18 \cdot 10^{-15}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 2.65 \cdot 10^{-127}:\\ \;\;\;\;y \cdot \left(z \cdot \frac{x}{\sqrt{a \cdot \left(-t\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z + -0.5 \cdot \frac{a}{\frac{z}{t}}}{z}}\\ \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.18e-15)
   (* x (- y))
   (if (<= z 2.65e-127)
     (* y (* z (/ x (sqrt (* a (- t))))))
     (/ (* x y) (/ (+ z (* -0.5 (/ a (/ z t)))) z)))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.18e-15) {
		tmp = x * -y;
	} else if (z <= 2.65e-127) {
		tmp = y * (z * (x / sqrt((a * -t))));
	} else {
		tmp = (x * y) / ((z + (-0.5 * (a / (z / t)))) / z);
	}
	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.18d-15)) then
        tmp = x * -y
    else if (z <= 2.65d-127) then
        tmp = y * (z * (x / sqrt((a * -t))))
    else
        tmp = (x * y) / ((z + ((-0.5d0) * (a / (z / t)))) / z)
    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.18e-15) {
		tmp = x * -y;
	} else if (z <= 2.65e-127) {
		tmp = y * (z * (x / Math.sqrt((a * -t))));
	} else {
		tmp = (x * y) / ((z + (-0.5 * (a / (z / t)))) / z);
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.18e-15:
		tmp = x * -y
	elif z <= 2.65e-127:
		tmp = y * (z * (x / math.sqrt((a * -t))))
	else:
		tmp = (x * y) / ((z + (-0.5 * (a / (z / t)))) / z)
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.18e-15)
		tmp = Float64(x * Float64(-y));
	elseif (z <= 2.65e-127)
		tmp = Float64(y * Float64(z * Float64(x / sqrt(Float64(a * Float64(-t))))));
	else
		tmp = Float64(Float64(x * y) / Float64(Float64(z + Float64(-0.5 * Float64(a / Float64(z / t)))) / z));
	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.18e-15)
		tmp = x * -y;
	elseif (z <= 2.65e-127)
		tmp = y * (z * (x / sqrt((a * -t))));
	else
		tmp = (x * y) / ((z + (-0.5 * (a / (z / t)))) / z);
	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.18e-15], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 2.65e-127], N[(y * N[(z * N[(x / N[Sqrt[N[(a * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / N[(N[(z + N[(-0.5 * N[(a / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.18 \cdot 10^{-15}:\\
\;\;\;\;x \cdot \left(-y\right)\\

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

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


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

    1. Initial program 53.4%

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

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

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

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

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

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

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

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

    if -1.18000000000000004e-15 < z < 2.6500000000000001e-127

    1. Initial program 80.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.6500000000000001e-127 < z

    1. Initial program 55.6%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 82.5% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{-16}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 1.32 \cdot 10^{-127}:\\ \;\;\;\;\frac{y \cdot \left(z \cdot x\right)}{\sqrt{a \cdot \left(-t\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z + -0.5 \cdot \frac{a}{\frac{z}{t}}}{z}}\\ \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 -5.5e-16)
   (* x (- y))
   (if (<= z 1.32e-127)
     (/ (* y (* z x)) (sqrt (* a (- t))))
     (/ (* x y) (/ (+ z (* -0.5 (/ a (/ z t)))) z)))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -5.5e-16) {
		tmp = x * -y;
	} else if (z <= 1.32e-127) {
		tmp = (y * (z * x)) / sqrt((a * -t));
	} else {
		tmp = (x * y) / ((z + (-0.5 * (a / (z / t)))) / z);
	}
	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 <= (-5.5d-16)) then
        tmp = x * -y
    else if (z <= 1.32d-127) then
        tmp = (y * (z * x)) / sqrt((a * -t))
    else
        tmp = (x * y) / ((z + ((-0.5d0) * (a / (z / t)))) / z)
    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 <= -5.5e-16) {
		tmp = x * -y;
	} else if (z <= 1.32e-127) {
		tmp = (y * (z * x)) / Math.sqrt((a * -t));
	} else {
		tmp = (x * y) / ((z + (-0.5 * (a / (z / t)))) / z);
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if z <= -5.5e-16:
		tmp = x * -y
	elif z <= 1.32e-127:
		tmp = (y * (z * x)) / math.sqrt((a * -t))
	else:
		tmp = (x * y) / ((z + (-0.5 * (a / (z / t)))) / z)
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -5.5e-16)
		tmp = Float64(x * Float64(-y));
	elseif (z <= 1.32e-127)
		tmp = Float64(Float64(y * Float64(z * x)) / sqrt(Float64(a * Float64(-t))));
	else
		tmp = Float64(Float64(x * y) / Float64(Float64(z + Float64(-0.5 * Float64(a / Float64(z / t)))) / z));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -5.5e-16)
		tmp = x * -y;
	elseif (z <= 1.32e-127)
		tmp = (y * (z * x)) / sqrt((a * -t));
	else
		tmp = (x * y) / ((z + (-0.5 * (a / (z / t)))) / z);
	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, -5.5e-16], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 1.32e-127], N[(N[(y * N[(z * x), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(a * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / N[(N[(z + N[(-0.5 * N[(a / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{-16}:\\
\;\;\;\;x \cdot \left(-y\right)\\

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

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


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

    1. Initial program 53.4%

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

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

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

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

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

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

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

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

    if -5.49999999999999964e-16 < z < 1.32e-127

    1. Initial program 80.1%

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

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

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

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

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

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

    if 1.32e-127 < z

    1. Initial program 55.6%

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

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

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

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

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

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

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

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

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

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

Alternative 8: 76.6% accurate, 4.9× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -0.002:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-81}:\\ \;\;\;\;z \cdot \frac{x \cdot y}{\frac{-0.5}{\frac{\frac{z}{t}}{a}} - z}\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{-220}:\\ \;\;\;\;\frac{z \cdot \left(x \cdot y\right)}{-z}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-136}:\\ \;\;\;\;z \cdot \frac{x \cdot y}{z + -0.5 \cdot \frac{a \cdot t}{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 -0.002)
   (* x (- y))
   (if (<= z -6.2e-81)
     (* z (/ (* x y) (- (/ -0.5 (/ (/ z t) a)) z)))
     (if (<= z -3.6e-220)
       (/ (* z (* x y)) (- z))
       (if (<= z 2.1e-136)
         (* z (/ (* x y) (+ z (* -0.5 (/ (* a t) z)))))
         (* x y))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -0.002) {
		tmp = x * -y;
	} else if (z <= -6.2e-81) {
		tmp = z * ((x * y) / ((-0.5 / ((z / t) / a)) - z));
	} else if (z <= -3.6e-220) {
		tmp = (z * (x * y)) / -z;
	} else if (z <= 2.1e-136) {
		tmp = z * ((x * y) / (z + (-0.5 * ((a * t) / 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 <= (-0.002d0)) then
        tmp = x * -y
    else if (z <= (-6.2d-81)) then
        tmp = z * ((x * y) / (((-0.5d0) / ((z / t) / a)) - z))
    else if (z <= (-3.6d-220)) then
        tmp = (z * (x * y)) / -z
    else if (z <= 2.1d-136) then
        tmp = z * ((x * y) / (z + ((-0.5d0) * ((a * t) / 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 <= -0.002) {
		tmp = x * -y;
	} else if (z <= -6.2e-81) {
		tmp = z * ((x * y) / ((-0.5 / ((z / t) / a)) - z));
	} else if (z <= -3.6e-220) {
		tmp = (z * (x * y)) / -z;
	} else if (z <= 2.1e-136) {
		tmp = z * ((x * y) / (z + (-0.5 * ((a * t) / z))));
	} else {
		tmp = x * y;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if z <= -0.002:
		tmp = x * -y
	elif z <= -6.2e-81:
		tmp = z * ((x * y) / ((-0.5 / ((z / t) / a)) - z))
	elif z <= -3.6e-220:
		tmp = (z * (x * y)) / -z
	elif z <= 2.1e-136:
		tmp = z * ((x * y) / (z + (-0.5 * ((a * t) / z))))
	else:
		tmp = x * y
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -0.002)
		tmp = Float64(x * Float64(-y));
	elseif (z <= -6.2e-81)
		tmp = Float64(z * Float64(Float64(x * y) / Float64(Float64(-0.5 / Float64(Float64(z / t) / a)) - z)));
	elseif (z <= -3.6e-220)
		tmp = Float64(Float64(z * Float64(x * y)) / Float64(-z));
	elseif (z <= 2.1e-136)
		tmp = Float64(z * Float64(Float64(x * y) / Float64(z + Float64(-0.5 * Float64(Float64(a * t) / 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 <= -0.002)
		tmp = x * -y;
	elseif (z <= -6.2e-81)
		tmp = z * ((x * y) / ((-0.5 / ((z / t) / a)) - z));
	elseif (z <= -3.6e-220)
		tmp = (z * (x * y)) / -z;
	elseif (z <= 2.1e-136)
		tmp = z * ((x * y) / (z + (-0.5 * ((a * t) / 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, -0.002], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, -6.2e-81], N[(z * N[(N[(x * y), $MachinePrecision] / N[(N[(-0.5 / N[(N[(z / t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.6e-220], N[(N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision] / (-z)), $MachinePrecision], If[LessEqual[z, 2.1e-136], N[(z * N[(N[(x * y), $MachinePrecision] / N[(z + N[(-0.5 * N[(N[(a * t), $MachinePrecision] / 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 -0.002:\\
\;\;\;\;x \cdot \left(-y\right)\\

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

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

\mathbf{elif}\;z \leq 2.1 \cdot 10^{-136}:\\
\;\;\;\;z \cdot \frac{x \cdot y}{z + -0.5 \cdot \frac{a \cdot t}{z}}\\

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


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

    1. Initial program 49.5%

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(-x\right)} \]
    6. Simplified89.7%

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

    if -2e-3 < z < -6.19999999999999976e-81

    1. Initial program 79.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(x \cdot \color{blue}{\left(\sqrt{y} \cdot \sqrt{y}\right)}\right) \cdot \frac{1}{-\left(0.5 \cdot \frac{a \cdot t}{z} + -1 \cdot z\right)}\right) \cdot z \]
      8. add-sqr-sqrt40.3%

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

        \[\leadsto \left(\left(x \cdot y\right) \cdot \frac{1}{-\color{blue}{\mathsf{fma}\left(0.5, \frac{a \cdot t}{z}, -1 \cdot z\right)}}\right) \cdot z \]
      10. mul-1-neg40.3%

        \[\leadsto \left(\left(x \cdot y\right) \cdot \frac{1}{-\mathsf{fma}\left(0.5, \frac{a \cdot t}{z}, \color{blue}{-z}\right)}\right) \cdot z \]
      11. add-sqr-sqrt0.0%

        \[\leadsto \left(\left(x \cdot y\right) \cdot \frac{1}{-\mathsf{fma}\left(0.5, \frac{a \cdot t}{z}, -\color{blue}{\sqrt{z} \cdot \sqrt{z}}\right)}\right) \cdot z \]
      12. sqrt-prod78.0%

        \[\leadsto \left(\left(x \cdot y\right) \cdot \frac{1}{-\mathsf{fma}\left(0.5, \frac{a \cdot t}{z}, -\color{blue}{\sqrt{z \cdot z}}\right)}\right) \cdot z \]
      13. sqr-neg78.0%

        \[\leadsto \left(\left(x \cdot y\right) \cdot \frac{1}{-\mathsf{fma}\left(0.5, \frac{a \cdot t}{z}, -\sqrt{\color{blue}{\left(-z\right) \cdot \left(-z\right)}}\right)}\right) \cdot z \]
      14. mul-1-neg78.0%

        \[\leadsto \left(\left(x \cdot y\right) \cdot \frac{1}{-\mathsf{fma}\left(0.5, \frac{a \cdot t}{z}, -\sqrt{\color{blue}{\left(-1 \cdot z\right)} \cdot \left(-z\right)}\right)}\right) \cdot z \]
      15. mul-1-neg78.0%

        \[\leadsto \left(\left(x \cdot y\right) \cdot \frac{1}{-\mathsf{fma}\left(0.5, \frac{a \cdot t}{z}, -\sqrt{\left(-1 \cdot z\right) \cdot \color{blue}{\left(-1 \cdot z\right)}}\right)}\right) \cdot z \]
      16. sqrt-unprod78.0%

        \[\leadsto \left(\left(x \cdot y\right) \cdot \frac{1}{-\mathsf{fma}\left(0.5, \frac{a \cdot t}{z}, -\color{blue}{\sqrt{-1 \cdot z} \cdot \sqrt{-1 \cdot z}}\right)}\right) \cdot z \]
      17. add-sqr-sqrt78.0%

        \[\leadsto \left(\left(x \cdot y\right) \cdot \frac{1}{-\mathsf{fma}\left(0.5, \frac{a \cdot t}{z}, -\color{blue}{-1 \cdot z}\right)}\right) \cdot z \]
      18. fma-neg78.0%

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

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

        \[\leadsto \color{blue}{\frac{\left(x \cdot y\right) \cdot 1}{-\mathsf{fma}\left(0.5, \frac{a}{\frac{z}{t}}, z\right)}} \cdot z \]
      2. *-rgt-identity78.1%

        \[\leadsto \frac{\color{blue}{x \cdot y}}{-\mathsf{fma}\left(0.5, \frac{a}{\frac{z}{t}}, z\right)} \cdot z \]
      3. *-commutative78.1%

        \[\leadsto \frac{\color{blue}{y \cdot x}}{-\mathsf{fma}\left(0.5, \frac{a}{\frac{z}{t}}, z\right)} \cdot z \]
      4. neg-sub078.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{0 - \mathsf{fma}\left(0.5, \frac{a}{\frac{z}{t}}, z\right)}} \cdot z \]
      5. fma-udef78.1%

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

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

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

        \[\leadsto \frac{y \cdot x}{0 - \left(\frac{0.5 \cdot \color{blue}{\left(t \cdot a\right)}}{z} + z\right)} \cdot z \]
      9. associate--r+78.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(0 - \frac{0.5 \cdot \left(t \cdot a\right)}{z}\right) - z}} \cdot z \]
      10. neg-sub078.1%

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

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

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

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

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

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

    if -6.19999999999999976e-81 < z < -3.60000000000000021e-220

    1. Initial program 79.8%

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

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

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

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

    if -3.60000000000000021e-220 < z < 2.0999999999999999e-136

    1. Initial program 84.3%

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

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

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

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

    if 2.0999999999999999e-136 < z

    1. Initial program 55.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.002:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-81}:\\ \;\;\;\;z \cdot \frac{x \cdot y}{\frac{-0.5}{\frac{\frac{z}{t}}{a}} - z}\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{-220}:\\ \;\;\;\;\frac{z \cdot \left(x \cdot y\right)}{-z}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-136}:\\ \;\;\;\;z \cdot \frac{x \cdot y}{z + -0.5 \cdot \frac{a \cdot t}{z}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 9: 77.6% accurate, 5.3× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -0.058:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-79}:\\ \;\;\;\;z \cdot \frac{x \cdot y}{\frac{-0.5}{\frac{\frac{z}{t}}{a}} - z}\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-224}:\\ \;\;\;\;\frac{z \cdot \left(x \cdot y\right)}{-z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z + -0.5 \cdot \frac{a}{\frac{z}{t}}}{z}}\\ \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 -0.058)
   (* x (- y))
   (if (<= z -5e-79)
     (* z (/ (* x y) (- (/ -0.5 (/ (/ z t) a)) z)))
     (if (<= z -2.7e-224)
       (/ (* z (* x y)) (- z))
       (/ (* x y) (/ (+ z (* -0.5 (/ a (/ z t)))) z))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -0.058) {
		tmp = x * -y;
	} else if (z <= -5e-79) {
		tmp = z * ((x * y) / ((-0.5 / ((z / t) / a)) - z));
	} else if (z <= -2.7e-224) {
		tmp = (z * (x * y)) / -z;
	} else {
		tmp = (x * y) / ((z + (-0.5 * (a / (z / t)))) / z);
	}
	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 <= (-0.058d0)) then
        tmp = x * -y
    else if (z <= (-5d-79)) then
        tmp = z * ((x * y) / (((-0.5d0) / ((z / t) / a)) - z))
    else if (z <= (-2.7d-224)) then
        tmp = (z * (x * y)) / -z
    else
        tmp = (x * y) / ((z + ((-0.5d0) * (a / (z / t)))) / z)
    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 <= -0.058) {
		tmp = x * -y;
	} else if (z <= -5e-79) {
		tmp = z * ((x * y) / ((-0.5 / ((z / t) / a)) - z));
	} else if (z <= -2.7e-224) {
		tmp = (z * (x * y)) / -z;
	} else {
		tmp = (x * y) / ((z + (-0.5 * (a / (z / t)))) / z);
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if z <= -0.058:
		tmp = x * -y
	elif z <= -5e-79:
		tmp = z * ((x * y) / ((-0.5 / ((z / t) / a)) - z))
	elif z <= -2.7e-224:
		tmp = (z * (x * y)) / -z
	else:
		tmp = (x * y) / ((z + (-0.5 * (a / (z / t)))) / z)
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -0.058)
		tmp = Float64(x * Float64(-y));
	elseif (z <= -5e-79)
		tmp = Float64(z * Float64(Float64(x * y) / Float64(Float64(-0.5 / Float64(Float64(z / t) / a)) - z)));
	elseif (z <= -2.7e-224)
		tmp = Float64(Float64(z * Float64(x * y)) / Float64(-z));
	else
		tmp = Float64(Float64(x * y) / Float64(Float64(z + Float64(-0.5 * Float64(a / Float64(z / t)))) / z));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -0.058)
		tmp = x * -y;
	elseif (z <= -5e-79)
		tmp = z * ((x * y) / ((-0.5 / ((z / t) / a)) - z));
	elseif (z <= -2.7e-224)
		tmp = (z * (x * y)) / -z;
	else
		tmp = (x * y) / ((z + (-0.5 * (a / (z / t)))) / z);
	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, -0.058], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, -5e-79], N[(z * N[(N[(x * y), $MachinePrecision] / N[(N[(-0.5 / N[(N[(z / t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.7e-224], N[(N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision] / (-z)), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / N[(N[(z + N[(-0.5 * N[(a / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.058:\\
\;\;\;\;x \cdot \left(-y\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -0.0580000000000000029

    1. Initial program 49.5%

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(-x\right)} \]
    6. Simplified89.7%

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

    if -0.0580000000000000029 < z < -4.99999999999999999e-79

    1. Initial program 79.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(x \cdot \color{blue}{\left(\sqrt{y} \cdot \sqrt{y}\right)}\right) \cdot \frac{1}{-\left(0.5 \cdot \frac{a \cdot t}{z} + -1 \cdot z\right)}\right) \cdot z \]
      8. add-sqr-sqrt40.3%

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

        \[\leadsto \left(\left(x \cdot y\right) \cdot \frac{1}{-\color{blue}{\mathsf{fma}\left(0.5, \frac{a \cdot t}{z}, -1 \cdot z\right)}}\right) \cdot z \]
      10. mul-1-neg40.3%

        \[\leadsto \left(\left(x \cdot y\right) \cdot \frac{1}{-\mathsf{fma}\left(0.5, \frac{a \cdot t}{z}, \color{blue}{-z}\right)}\right) \cdot z \]
      11. add-sqr-sqrt0.0%

        \[\leadsto \left(\left(x \cdot y\right) \cdot \frac{1}{-\mathsf{fma}\left(0.5, \frac{a \cdot t}{z}, -\color{blue}{\sqrt{z} \cdot \sqrt{z}}\right)}\right) \cdot z \]
      12. sqrt-prod78.0%

        \[\leadsto \left(\left(x \cdot y\right) \cdot \frac{1}{-\mathsf{fma}\left(0.5, \frac{a \cdot t}{z}, -\color{blue}{\sqrt{z \cdot z}}\right)}\right) \cdot z \]
      13. sqr-neg78.0%

        \[\leadsto \left(\left(x \cdot y\right) \cdot \frac{1}{-\mathsf{fma}\left(0.5, \frac{a \cdot t}{z}, -\sqrt{\color{blue}{\left(-z\right) \cdot \left(-z\right)}}\right)}\right) \cdot z \]
      14. mul-1-neg78.0%

        \[\leadsto \left(\left(x \cdot y\right) \cdot \frac{1}{-\mathsf{fma}\left(0.5, \frac{a \cdot t}{z}, -\sqrt{\color{blue}{\left(-1 \cdot z\right)} \cdot \left(-z\right)}\right)}\right) \cdot z \]
      15. mul-1-neg78.0%

        \[\leadsto \left(\left(x \cdot y\right) \cdot \frac{1}{-\mathsf{fma}\left(0.5, \frac{a \cdot t}{z}, -\sqrt{\left(-1 \cdot z\right) \cdot \color{blue}{\left(-1 \cdot z\right)}}\right)}\right) \cdot z \]
      16. sqrt-unprod78.0%

        \[\leadsto \left(\left(x \cdot y\right) \cdot \frac{1}{-\mathsf{fma}\left(0.5, \frac{a \cdot t}{z}, -\color{blue}{\sqrt{-1 \cdot z} \cdot \sqrt{-1 \cdot z}}\right)}\right) \cdot z \]
      17. add-sqr-sqrt78.0%

        \[\leadsto \left(\left(x \cdot y\right) \cdot \frac{1}{-\mathsf{fma}\left(0.5, \frac{a \cdot t}{z}, -\color{blue}{-1 \cdot z}\right)}\right) \cdot z \]
      18. fma-neg78.0%

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

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

        \[\leadsto \color{blue}{\frac{\left(x \cdot y\right) \cdot 1}{-\mathsf{fma}\left(0.5, \frac{a}{\frac{z}{t}}, z\right)}} \cdot z \]
      2. *-rgt-identity78.1%

        \[\leadsto \frac{\color{blue}{x \cdot y}}{-\mathsf{fma}\left(0.5, \frac{a}{\frac{z}{t}}, z\right)} \cdot z \]
      3. *-commutative78.1%

        \[\leadsto \frac{\color{blue}{y \cdot x}}{-\mathsf{fma}\left(0.5, \frac{a}{\frac{z}{t}}, z\right)} \cdot z \]
      4. neg-sub078.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{0 - \mathsf{fma}\left(0.5, \frac{a}{\frac{z}{t}}, z\right)}} \cdot z \]
      5. fma-udef78.1%

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

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

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

        \[\leadsto \frac{y \cdot x}{0 - \left(\frac{0.5 \cdot \color{blue}{\left(t \cdot a\right)}}{z} + z\right)} \cdot z \]
      9. associate--r+78.1%

        \[\leadsto \frac{y \cdot x}{\color{blue}{\left(0 - \frac{0.5 \cdot \left(t \cdot a\right)}{z}\right) - z}} \cdot z \]
      10. neg-sub078.1%

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

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

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

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

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

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

    if -4.99999999999999999e-79 < z < -2.69999999999999998e-224

    1. Initial program 79.8%

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

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

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

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

    if -2.69999999999999998e-224 < z

    1. Initial program 63.1%

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

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

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

        \[\leadsto \frac{x \cdot y}{\frac{\color{blue}{{\left(z \cdot z - t \cdot a\right)}^{0.5}}}{z}} \]
      2. pow-to-exp64.3%

        \[\leadsto \frac{x \cdot y}{\frac{\color{blue}{e^{\log \left(z \cdot z - t \cdot a\right) \cdot 0.5}}}{z}} \]
    5. Applied egg-rr64.3%

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

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

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

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

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

Alternative 10: 77.9% accurate, 5.3× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -26500:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq -9.6 \cdot 10^{-94}:\\ \;\;\;\;y \cdot \left(z \cdot \frac{x}{0.5 \cdot \frac{a \cdot t}{z} - z}\right)\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-222}:\\ \;\;\;\;\frac{z \cdot \left(x \cdot y\right)}{-z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z + -0.5 \cdot \frac{a}{\frac{z}{t}}}{z}}\\ \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 -26500.0)
   (* x (- y))
   (if (<= z -9.6e-94)
     (* y (* z (/ x (- (* 0.5 (/ (* a t) z)) z))))
     (if (<= z -3e-222)
       (/ (* z (* x y)) (- z))
       (/ (* x y) (/ (+ z (* -0.5 (/ a (/ z t)))) z))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -26500.0) {
		tmp = x * -y;
	} else if (z <= -9.6e-94) {
		tmp = y * (z * (x / ((0.5 * ((a * t) / z)) - z)));
	} else if (z <= -3e-222) {
		tmp = (z * (x * y)) / -z;
	} else {
		tmp = (x * y) / ((z + (-0.5 * (a / (z / t)))) / z);
	}
	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 <= (-26500.0d0)) then
        tmp = x * -y
    else if (z <= (-9.6d-94)) then
        tmp = y * (z * (x / ((0.5d0 * ((a * t) / z)) - z)))
    else if (z <= (-3d-222)) then
        tmp = (z * (x * y)) / -z
    else
        tmp = (x * y) / ((z + ((-0.5d0) * (a / (z / t)))) / z)
    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 <= -26500.0) {
		tmp = x * -y;
	} else if (z <= -9.6e-94) {
		tmp = y * (z * (x / ((0.5 * ((a * t) / z)) - z)));
	} else if (z <= -3e-222) {
		tmp = (z * (x * y)) / -z;
	} else {
		tmp = (x * y) / ((z + (-0.5 * (a / (z / t)))) / z);
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if z <= -26500.0:
		tmp = x * -y
	elif z <= -9.6e-94:
		tmp = y * (z * (x / ((0.5 * ((a * t) / z)) - z)))
	elif z <= -3e-222:
		tmp = (z * (x * y)) / -z
	else:
		tmp = (x * y) / ((z + (-0.5 * (a / (z / t)))) / z)
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -26500.0)
		tmp = Float64(x * Float64(-y));
	elseif (z <= -9.6e-94)
		tmp = Float64(y * Float64(z * Float64(x / Float64(Float64(0.5 * Float64(Float64(a * t) / z)) - z))));
	elseif (z <= -3e-222)
		tmp = Float64(Float64(z * Float64(x * y)) / Float64(-z));
	else
		tmp = Float64(Float64(x * y) / Float64(Float64(z + Float64(-0.5 * Float64(a / Float64(z / t)))) / z));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -26500.0)
		tmp = x * -y;
	elseif (z <= -9.6e-94)
		tmp = y * (z * (x / ((0.5 * ((a * t) / z)) - z)));
	elseif (z <= -3e-222)
		tmp = (z * (x * y)) / -z;
	else
		tmp = (x * y) / ((z + (-0.5 * (a / (z / t)))) / z);
	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, -26500.0], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, -9.6e-94], N[(y * N[(z * N[(x / N[(N[(0.5 * N[(N[(a * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3e-222], N[(N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision] / (-z)), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / N[(N[(z + N[(-0.5 * N[(a / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -26500:\\
\;\;\;\;x \cdot \left(-y\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -26500

    1. Initial program 48.8%

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

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

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

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

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

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

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

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

    if -26500 < z < -9.6e-94

    1. Initial program 82.7%

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

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

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

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

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

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

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

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

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

    if -9.6e-94 < z < -3.0000000000000003e-222

    1. Initial program 77.2%

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

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

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

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

    if -3.0000000000000003e-222 < z

    1. Initial program 63.1%

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

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

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

        \[\leadsto \frac{x \cdot y}{\frac{\color{blue}{{\left(z \cdot z - t \cdot a\right)}^{0.5}}}{z}} \]
      2. pow-to-exp64.3%

        \[\leadsto \frac{x \cdot y}{\frac{\color{blue}{e^{\log \left(z \cdot z - t \cdot a\right) \cdot 0.5}}}{z}} \]
    5. Applied egg-rr64.3%

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

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

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

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

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

Alternative 11: 75.9% accurate, 5.9× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{-218}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{-191}:\\ \;\;\;\;y \cdot \frac{z \cdot x}{z + -0.5 \cdot \frac{a \cdot t}{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 -1.75e-218)
   (* x (- y))
   (if (<= z 2.55e-191)
     (* y (/ (* z x) (+ z (* -0.5 (/ (* a t) z)))))
     (* x y))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.75e-218) {
		tmp = x * -y;
	} else if (z <= 2.55e-191) {
		tmp = y * ((z * x) / (z + (-0.5 * ((a * t) / 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.75d-218)) then
        tmp = x * -y
    else if (z <= 2.55d-191) then
        tmp = y * ((z * x) / (z + ((-0.5d0) * ((a * t) / 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.75e-218) {
		tmp = x * -y;
	} else if (z <= 2.55e-191) {
		tmp = y * ((z * x) / (z + (-0.5 * ((a * t) / z))));
	} else {
		tmp = x * y;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.75e-218:
		tmp = x * -y
	elif z <= 2.55e-191:
		tmp = y * ((z * x) / (z + (-0.5 * ((a * t) / 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.75e-218)
		tmp = Float64(x * Float64(-y));
	elseif (z <= 2.55e-191)
		tmp = Float64(y * Float64(Float64(z * x) / Float64(z + Float64(-0.5 * Float64(Float64(a * t) / 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.75e-218)
		tmp = x * -y;
	elseif (z <= 2.55e-191)
		tmp = y * ((z * x) / (z + (-0.5 * ((a * t) / 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.75e-218], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 2.55e-191], N[(y * N[(N[(z * x), $MachinePrecision] / N[(z + N[(-0.5 * N[(N[(a * t), $MachinePrecision] / 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.75 \cdot 10^{-218}:\\
\;\;\;\;x \cdot \left(-y\right)\\

\mathbf{elif}\;z \leq 2.55 \cdot 10^{-191}:\\
\;\;\;\;y \cdot \frac{z \cdot x}{z + -0.5 \cdot \frac{a \cdot t}{z}}\\

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


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

    1. Initial program 60.8%

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

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

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

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

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

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

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

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

    if -1.75e-218 < z < 2.5500000000000001e-191

    1. Initial program 79.3%

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

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

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

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

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

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

    if 2.5500000000000001e-191 < z

    1. Initial program 59.1%

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

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

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

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

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

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

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

Alternative 12: 76.3% accurate, 5.9× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{-216}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-135}:\\ \;\;\;\;z \cdot \frac{x \cdot y}{z + -0.5 \cdot \frac{a \cdot t}{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.9e-216)
   (* x (- y))
   (if (<= z 6.2e-135)
     (* z (/ (* x y) (+ z (* -0.5 (/ (* a t) z)))))
     (* x y))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.9e-216) {
		tmp = x * -y;
	} else if (z <= 6.2e-135) {
		tmp = z * ((x * y) / (z + (-0.5 * ((a * t) / 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.9d-216)) then
        tmp = x * -y
    else if (z <= 6.2d-135) then
        tmp = z * ((x * y) / (z + ((-0.5d0) * ((a * t) / 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.9e-216) {
		tmp = x * -y;
	} else if (z <= 6.2e-135) {
		tmp = z * ((x * y) / (z + (-0.5 * ((a * t) / z))));
	} else {
		tmp = x * y;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if z <= -2.9e-216:
		tmp = x * -y
	elif z <= 6.2e-135:
		tmp = z * ((x * y) / (z + (-0.5 * ((a * t) / 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.9e-216)
		tmp = Float64(x * Float64(-y));
	elseif (z <= 6.2e-135)
		tmp = Float64(z * Float64(Float64(x * y) / Float64(z + Float64(-0.5 * Float64(Float64(a * t) / 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.9e-216)
		tmp = x * -y;
	elseif (z <= 6.2e-135)
		tmp = z * ((x * y) / (z + (-0.5 * ((a * t) / 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.9e-216], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 6.2e-135], N[(z * N[(N[(x * y), $MachinePrecision] / N[(z + N[(-0.5 * N[(N[(a * t), $MachinePrecision] / 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 -2.9 \cdot 10^{-216}:\\
\;\;\;\;x \cdot \left(-y\right)\\

\mathbf{elif}\;z \leq 6.2 \cdot 10^{-135}:\\
\;\;\;\;z \cdot \frac{x \cdot y}{z + -0.5 \cdot \frac{a \cdot t}{z}}\\

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


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

    1. Initial program 60.8%

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

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

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

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

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

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

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

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

    if -2.9000000000000001e-216 < z < 6.2000000000000001e-135

    1. Initial program 84.3%

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

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

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

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

    if 6.2000000000000001e-135 < z

    1. Initial program 55.1%

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

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

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

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

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

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

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

Alternative 13: 76.9% accurate, 5.9× speedup?

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

\mathbf{elif}\;z \leq 2.55 \cdot 10^{-192}:\\
\;\;\;\;y \cdot \frac{z \cdot x}{0.5 \cdot \frac{a \cdot t}{z} - z}\\

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


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

    1. Initial program 48.8%

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

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

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

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

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

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

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

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

    if -3.8e5 < z < 2.5500000000000001e-192

    1. Initial program 79.7%

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

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

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

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

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

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

    if 2.5500000000000001e-192 < z

    1. Initial program 59.1%

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

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

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

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

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

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

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

Alternative 14: 75.5% accurate, 6.6× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{-217}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-192}:\\ \;\;\;\;2 \cdot \left(\frac{y}{a} \cdot \frac{x \cdot \left(z \cdot z\right)}{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.5e-217)
   (* x (- y))
   (if (<= z 2.1e-192) (* 2.0 (* (/ y a) (/ (* x (* z z)) t))) (* x y))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.5e-217) {
		tmp = x * -y;
	} else if (z <= 2.1e-192) {
		tmp = 2.0 * ((y / a) * ((x * (z * z)) / 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.5d-217)) then
        tmp = x * -y
    else if (z <= 2.1d-192) then
        tmp = 2.0d0 * ((y / a) * ((x * (z * z)) / 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.5e-217) {
		tmp = x * -y;
	} else if (z <= 2.1e-192) {
		tmp = 2.0 * ((y / a) * ((x * (z * z)) / t));
	} else {
		tmp = x * y;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.5e-217:
		tmp = x * -y
	elif z <= 2.1e-192:
		tmp = 2.0 * ((y / a) * ((x * (z * z)) / 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.5e-217)
		tmp = Float64(x * Float64(-y));
	elseif (z <= 2.1e-192)
		tmp = Float64(2.0 * Float64(Float64(y / a) * Float64(Float64(x * Float64(z * z)) / 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.5e-217)
		tmp = x * -y;
	elseif (z <= 2.1e-192)
		tmp = 2.0 * ((y / a) * ((x * (z * z)) / 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.5e-217], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 2.1e-192], N[(2.0 * N[(N[(y / a), $MachinePrecision] * N[(N[(x * N[(z * z), $MachinePrecision]), $MachinePrecision] / 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.5 \cdot 10^{-217}:\\
\;\;\;\;x \cdot \left(-y\right)\\

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

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


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

    1. Initial program 60.8%

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

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

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

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

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

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

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

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

    if -1.50000000000000002e-217 < z < 2.09999999999999993e-192

    1. Initial program 79.3%

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\frac{y}{a} \cdot \frac{\color{blue}{x \cdot {z}^{2}}}{t}\right) \]
      3. unpow243.7%

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

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

    if 2.09999999999999993e-192 < z

    1. Initial program 59.1%

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

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

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

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

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

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

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

Alternative 15: 75.8% accurate, 6.6× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{-216}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 6.9 \cdot 10^{-192}:\\ \;\;\;\;z \cdot \left(2 \cdot \left(\frac{z}{t} \cdot \frac{x \cdot y}{a}\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.9e-216)
   (* x (- y))
   (if (<= z 6.9e-192) (* z (* 2.0 (* (/ z t) (/ (* x y) a)))) (* x y))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.9e-216) {
		tmp = x * -y;
	} else if (z <= 6.9e-192) {
		tmp = z * (2.0 * ((z / t) * ((x * y) / a)));
	} 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.9d-216)) then
        tmp = x * -y
    else if (z <= 6.9d-192) then
        tmp = z * (2.0d0 * ((z / t) * ((x * y) / a)))
    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.9e-216) {
		tmp = x * -y;
	} else if (z <= 6.9e-192) {
		tmp = z * (2.0 * ((z / t) * ((x * y) / a)));
	} else {
		tmp = x * y;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if z <= -2.9e-216:
		tmp = x * -y
	elif z <= 6.9e-192:
		tmp = z * (2.0 * ((z / t) * ((x * y) / a)))
	else:
		tmp = x * y
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -2.9e-216)
		tmp = Float64(x * Float64(-y));
	elseif (z <= 6.9e-192)
		tmp = Float64(z * Float64(2.0 * Float64(Float64(z / t) * Float64(Float64(x * y) / a))));
	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.9e-216)
		tmp = x * -y;
	elseif (z <= 6.9e-192)
		tmp = z * (2.0 * ((z / t) * ((x * y) / a)));
	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.9e-216], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 6.9e-192], N[(z * N[(2.0 * N[(N[(z / t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] / a), $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.9 \cdot 10^{-216}:\\
\;\;\;\;x \cdot \left(-y\right)\\

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

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


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

    1. Initial program 60.8%

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

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

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

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

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

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

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

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

    if -2.9000000000000001e-216 < z < 6.90000000000000016e-192

    1. Initial program 79.3%

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

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

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

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

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

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

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

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

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

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

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

    if 6.90000000000000016e-192 < z

    1. Initial program 59.1%

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

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

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

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

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

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

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

Alternative 16: 75.6% accurate, 6.6× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{-217}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-192}:\\ \;\;\;\;z \cdot \left(2 \cdot \frac{x \cdot \left(z \cdot y\right)}{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 -2.3e-217)
   (* x (- y))
   (if (<= z 5.8e-192) (* z (* 2.0 (/ (* x (* z y)) (* a t)))) (* x y))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.3e-217) {
		tmp = x * -y;
	} else if (z <= 5.8e-192) {
		tmp = z * (2.0 * ((x * (z * y)) / (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 <= (-2.3d-217)) then
        tmp = x * -y
    else if (z <= 5.8d-192) then
        tmp = z * (2.0d0 * ((x * (z * y)) / (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 <= -2.3e-217) {
		tmp = x * -y;
	} else if (z <= 5.8e-192) {
		tmp = z * (2.0 * ((x * (z * y)) / (a * t)));
	} else {
		tmp = x * y;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if z <= -2.3e-217:
		tmp = x * -y
	elif z <= 5.8e-192:
		tmp = z * (2.0 * ((x * (z * y)) / (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 <= -2.3e-217)
		tmp = Float64(x * Float64(-y));
	elseif (z <= 5.8e-192)
		tmp = Float64(z * Float64(2.0 * Float64(Float64(x * Float64(z * y)) / 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 <= -2.3e-217)
		tmp = x * -y;
	elseif (z <= 5.8e-192)
		tmp = z * (2.0 * ((x * (z * y)) / (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, -2.3e-217], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 5.8e-192], N[(z * N[(2.0 * N[(N[(x * N[(z * y), $MachinePrecision]), $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 -2.3 \cdot 10^{-217}:\\
\;\;\;\;x \cdot \left(-y\right)\\

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

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


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

    1. Initial program 60.8%

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

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

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

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

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

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

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

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

    if -2.30000000000000005e-217 < z < 5.80000000000000033e-192

    1. Initial program 79.3%

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

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

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

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

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

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

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

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

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

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

    if 5.80000000000000033e-192 < z

    1. Initial program 59.1%

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

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

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

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

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

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

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

Alternative 17: 75.4% accurate, 6.6× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{-216}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-192}:\\ \;\;\;\;\frac{-2 \cdot \left(y \cdot \left(x \cdot \left(z \cdot z\right)\right)\right)}{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 -2.2e-216)
   (* x (- y))
   (if (<= z 2.6e-192) (/ (* -2.0 (* y (* x (* 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 <= -2.2e-216) {
		tmp = x * -y;
	} else if (z <= 2.6e-192) {
		tmp = (-2.0 * (y * (x * (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 <= (-2.2d-216)) then
        tmp = x * -y
    else if (z <= 2.6d-192) then
        tmp = ((-2.0d0) * (y * (x * (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 <= -2.2e-216) {
		tmp = x * -y;
	} else if (z <= 2.6e-192) {
		tmp = (-2.0 * (y * (x * (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 <= -2.2e-216:
		tmp = x * -y
	elif z <= 2.6e-192:
		tmp = (-2.0 * (y * (x * (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 <= -2.2e-216)
		tmp = Float64(x * Float64(-y));
	elseif (z <= 2.6e-192)
		tmp = Float64(Float64(-2.0 * Float64(y * Float64(x * 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 <= -2.2e-216)
		tmp = x * -y;
	elseif (z <= 2.6e-192)
		tmp = (-2.0 * (y * (x * (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, -2.2e-216], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 2.6e-192], N[(N[(-2.0 * N[(y * N[(x * N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * t), $MachinePrecision]), $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^{-216}:\\
\;\;\;\;x \cdot \left(-y\right)\\

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

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


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

    1. Initial program 60.8%

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

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

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

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

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

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

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

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

    if -2.1999999999999999e-216 < z < 2.6000000000000002e-192

    1. Initial program 79.3%

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

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

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

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

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

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

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

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

    if 2.6000000000000002e-192 < z

    1. Initial program 59.1%

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

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

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

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

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

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

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

Alternative 18: 75.4% accurate, 6.6× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{-219}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-192}:\\ \;\;\;\;\frac{\left(y \cdot -2\right) \cdot \left(z \cdot \left(z \cdot x\right)\right)}{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 -9e-219)
   (* x (- y))
   (if (<= z 1.6e-192) (/ (* (* y -2.0) (* z (* z x))) (* a t)) (* x y))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -9e-219) {
		tmp = x * -y;
	} else if (z <= 1.6e-192) {
		tmp = ((y * -2.0) * (z * (z * x))) / (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 <= (-9d-219)) then
        tmp = x * -y
    else if (z <= 1.6d-192) then
        tmp = ((y * (-2.0d0)) * (z * (z * x))) / (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 <= -9e-219) {
		tmp = x * -y;
	} else if (z <= 1.6e-192) {
		tmp = ((y * -2.0) * (z * (z * x))) / (a * t);
	} else {
		tmp = x * y;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if z <= -9e-219:
		tmp = x * -y
	elif z <= 1.6e-192:
		tmp = ((y * -2.0) * (z * (z * x))) / (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 <= -9e-219)
		tmp = Float64(x * Float64(-y));
	elseif (z <= 1.6e-192)
		tmp = Float64(Float64(Float64(y * -2.0) * Float64(z * Float64(z * x))) / 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 <= -9e-219)
		tmp = x * -y;
	elseif (z <= 1.6e-192)
		tmp = ((y * -2.0) * (z * (z * x))) / (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, -9e-219], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 1.6e-192], N[(N[(N[(y * -2.0), $MachinePrecision] * N[(z * N[(z * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * t), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{-219}:\\
\;\;\;\;x \cdot \left(-y\right)\\

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

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


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

    1. Initial program 60.8%

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

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

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

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

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

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

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

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

    if -9.00000000000000029e-219 < z < 1.6000000000000001e-192

    1. Initial program 79.3%

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

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

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

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

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

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

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

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

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

    if 1.6000000000000001e-192 < z

    1. Initial program 59.1%

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

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

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

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

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

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

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

Alternative 19: 74.4% accurate, 10.2× speedup?

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

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

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


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

    1. Initial program 61.8%

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

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

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

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

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

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

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

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

    if -2.99999999999999991e-240 < z < 5.00000000000000007e-156

    1. Initial program 80.5%

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

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

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

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

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

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

    if 5.00000000000000007e-156 < z

    1. Initial program 57.1%

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

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

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

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

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

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

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

Alternative 20: 72.8% accurate, 18.6× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.22 \cdot 10^{-294}:\\ \;\;\;\;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.22e-294) (* x (- y)) (* x y)))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.22e-294) {
		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.22d-294)) 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.22e-294) {
		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.22e-294:
		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.22e-294)
		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.22e-294)
		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.22e-294], 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.22 \cdot 10^{-294}:\\
\;\;\;\;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.21999999999999995e-294

    1. Initial program 62.1%

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(-x\right)} \]
    6. Simplified70.1%

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

    if -1.21999999999999995e-294 < z

    1. Initial program 62.1%

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

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

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

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

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

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

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

Alternative 21: 43.0% 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 62.1%

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

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

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

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

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

    \[\leadsto y \cdot \color{blue}{x} \]
  5. Final simplification46.2%

    \[\leadsto x \cdot y \]

Developer target: 89.1% 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 2023257 
(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)))))