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

Percentage Accurate: 61.3% → 91.1%
Time: 19.5s
Alternatives: 14
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 14 alternatives:

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

Initial Program: 61.3% accurate, 1.0× speedup?

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

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

Alternative 1: 91.1% accurate, 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 -1.15 \cdot 10^{+103}:\\ \;\;\;\;\frac{x \cdot y}{\mathsf{fma}\left(0.5, t_1, -1\right)}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-14}:\\ \;\;\;\;\frac{x}{\frac{\sqrt{z \cdot z - a \cdot t}}{z \cdot y}}\\ \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 -1.15e+103)
     (/ (* x y) (fma 0.5 t_1 -1.0))
     (if (<= z 2.4e-14)
       (/ x (/ (sqrt (- (* z z) (* a t))) (* z 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 <= -1.15e+103) {
		tmp = (x * y) / fma(0.5, t_1, -1.0);
	} else if (z <= 2.4e-14) {
		tmp = x / (sqrt(((z * z) - (a * t))) / (z * 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 <= -1.15e+103)
		tmp = Float64(Float64(x * y) / fma(0.5, t_1, -1.0));
	elseif (z <= 2.4e-14)
		tmp = Float64(x / Float64(sqrt(Float64(Float64(z * z) - Float64(a * t))) / Float64(z * 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, -1.15e+103], N[(N[(x * y), $MachinePrecision] / N[(0.5 * t$95$1 + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e-14], N[(x / N[(N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(z * y), $MachinePrecision]), $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 -1.15 \cdot 10^{+103}:\\
\;\;\;\;\frac{x \cdot y}{\mathsf{fma}\left(0.5, t_1, -1\right)}\\

\mathbf{elif}\;z \leq 2.4 \cdot 10^{-14}:\\
\;\;\;\;\frac{x}{\frac{\sqrt{z \cdot z - a \cdot t}}{z \cdot y}}\\

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


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

    1. Initial program 40.9%

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

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

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

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

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

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

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

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

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

    if -1.15000000000000004e103 < z < 2.4e-14

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

    if 2.4e-14 < z

    1. Initial program 45.2%

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

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

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

        \[\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-unprod48.5%

        \[\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-times38.7%

        \[\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-sqrt38.7%

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

      \[\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-sub38.7%

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

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

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

        \[\leadsto \frac{x \cdot y}{\sqrt{1 - \color{blue}{\frac{a}{\frac{z \cdot z}{t}}}}} \]
    7. Simplified98.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 simplification90.7%

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

Alternative 2: 91.5% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 14.3%

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

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

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

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

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

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

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

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

    if -5.00000000000000018e153 < z < 1.00000000000000005e96

    1. Initial program 80.3%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    3. Simplified82.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*86.3%

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\left(\frac{{\left(\sqrt[3]{x}\right)}^{2}}{1} \cdot \frac{\sqrt[3]{x}}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\right)} \]
    6. Step-by-step derivation
      1. /-rgt-identity85.3%

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

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

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

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

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

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

    if 1.00000000000000005e96 < z

    1. Initial program 28.7%

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

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

      \[\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}{1 + -0.5 \cdot \frac{a \cdot t}{{z}^{2}}}} \]
    5. Step-by-step derivation
      1. unpow293.9%

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

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

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

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

        \[\leadsto \frac{x \cdot y}{1 + -0.5 \cdot \frac{a}{\frac{\color{blue}{z \cdot z}}{t}}} \]
      2. associate-*r/95.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{+153}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 10^{+96}:\\ \;\;\;\;y \cdot \frac{x}{\frac{\sqrt{z \cdot z - a \cdot t}}{z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{1 + -0.5 \cdot \frac{a}{z \cdot \frac{z}{t}}}\\ \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.5 \cdot 10^{+104}:\\ \;\;\;\;y \cdot \frac{x}{\frac{0.5 \cdot \left(t \cdot \frac{a}{z}\right) - z}{z}}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-14}:\\ \;\;\;\;\frac{x}{\frac{\sqrt{z \cdot z - a \cdot t}}{z \cdot y}}\\ \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 -1.5e+104)
   (* y (/ x (/ (- (* 0.5 (* t (/ a z))) z) z)))
   (if (<= z 2.7e-14)
     (/ x (/ (sqrt (- (* z z) (* a t))) (* z 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 <= -1.5e+104) {
		tmp = y * (x / (((0.5 * (t * (a / z))) - z) / z));
	} else if (z <= 2.7e-14) {
		tmp = x / (sqrt(((z * z) - (a * t))) / (z * 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 <= (-1.5d+104)) then
        tmp = y * (x / (((0.5d0 * (t * (a / z))) - z) / z))
    else if (z <= 2.7d-14) then
        tmp = x / (sqrt(((z * z) - (a * t))) / (z * 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 <= -1.5e+104) {
		tmp = y * (x / (((0.5 * (t * (a / z))) - z) / z));
	} else if (z <= 2.7e-14) {
		tmp = x / (Math.sqrt(((z * z) - (a * t))) / (z * 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 <= -1.5e+104:
		tmp = y * (x / (((0.5 * (t * (a / z))) - z) / z))
	elif z <= 2.7e-14:
		tmp = x / (math.sqrt(((z * z) - (a * t))) / (z * 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 <= -1.5e+104)
		tmp = Float64(y * Float64(x / Float64(Float64(Float64(0.5 * Float64(t * Float64(a / z))) - z) / z)));
	elseif (z <= 2.7e-14)
		tmp = Float64(x / Float64(sqrt(Float64(Float64(z * z) - Float64(a * t))) / Float64(z * 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 <= -1.5e+104)
		tmp = y * (x / (((0.5 * (t * (a / z))) - z) / z));
	elseif (z <= 2.7e-14)
		tmp = x / (sqrt(((z * z) - (a * t))) / (z * 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, -1.5e+104], N[(y * N[(x / N[(N[(N[(0.5 * N[(t * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e-14], N[(x / N[(N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(z * y), $MachinePrecision]), $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 -1.5 \cdot 10^{+104}:\\
\;\;\;\;y \cdot \frac{x}{\frac{0.5 \cdot \left(t \cdot \frac{a}{z}\right) - z}{z}}\\

\mathbf{elif}\;z \leq 2.7 \cdot 10^{-14}:\\
\;\;\;\;\frac{x}{\frac{\sqrt{z \cdot z - a \cdot t}}{z \cdot y}}\\

\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 < -1.49999999999999984e104

    1. Initial program 40.9%

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

        \[\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.0%

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

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\left(\frac{{\left(\sqrt[3]{x}\right)}^{2}}{1} \cdot \frac{\sqrt[3]{x}}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\right)} \]
    6. Step-by-step derivation
      1. /-rgt-identity41.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.49999999999999984e104 < z < 2.6999999999999999e-14

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

    if 2.6999999999999999e-14 < z

    1. Initial program 45.2%

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

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

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

        \[\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-unprod48.5%

        \[\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-times38.7%

        \[\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-sqrt38.7%

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

      \[\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-sub38.7%

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

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

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

        \[\leadsto \frac{x \cdot y}{\sqrt{1 - \color{blue}{\frac{a}{\frac{z \cdot z}{t}}}}} \]
    7. Simplified98.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 simplification90.7%

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

Alternative 4: 84.1% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 64.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\left(\frac{{\left(\sqrt[3]{x}\right)}^{2}}{1} \cdot \frac{\sqrt[3]{x}}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\right)} \]
    6. Step-by-step derivation
      1. /-rgt-identity66.1%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{x}{\frac{0.5 \cdot \color{blue}{\frac{a}{\frac{z}{t}}} + -1 \cdot z}{z}} \]
      2. mul-1-neg87.7%

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

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

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

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

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

    if -3.59999999999999997e-97 < z < 5.5000000000000002e-134

    1. Initial program 61.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.5000000000000002e-134 < z

    1. Initial program 51.6%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot y}{1 + -0.5 \cdot \frac{a}{\frac{\color{blue}{z \cdot z}}{t}}} \]
      2. associate-*r/88.2%

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

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

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

Alternative 5: 84.1% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 64.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\left(\frac{{\left(\sqrt[3]{x}\right)}^{2}}{1} \cdot \frac{\sqrt[3]{x}}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\right)} \]
    6. Step-by-step derivation
      1. /-rgt-identity66.1%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{x}{\frac{0.5 \cdot \color{blue}{\frac{a}{\frac{z}{t}}} + -1 \cdot z}{z}} \]
      2. mul-1-neg87.7%

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

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

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

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

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

    if -9.9999999999999991e-97 < z < 9.19999999999999978e-100

    1. Initial program 61.9%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\left(\frac{{\left(\sqrt[3]{x}\right)}^{2}}{1} \cdot \frac{\sqrt[3]{x}}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\right)} \]
    6. Step-by-step derivation
      1. /-rgt-identity73.5%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{x}{\frac{\sqrt{\color{blue}{-a \cdot t}}}{z}} \]
      2. distribute-lft-neg-in70.7%

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

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

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

    if 9.19999999999999978e-100 < z

    1. Initial program 51.1%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot y}{1 + -0.5 \cdot \frac{a}{\frac{\color{blue}{z \cdot z}}{t}}} \]
      2. associate-*r/90.4%

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

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

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

Alternative 6: 84.0% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 64.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\left(\frac{{\left(\sqrt[3]{x}\right)}^{2}}{1} \cdot \frac{\sqrt[3]{x}}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\right)} \]
    6. Step-by-step derivation
      1. /-rgt-identity66.1%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{x}{\frac{0.5 \cdot \color{blue}{\frac{a}{\frac{z}{t}}} + -1 \cdot z}{z}} \]
      2. mul-1-neg87.7%

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

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

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

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

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

    if -4.8e-97 < z < 1.15e-133

    1. Initial program 61.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{x}{\frac{\sqrt{\left(-a\right) \cdot t}}{z \cdot y}}\right)} - 1} \]
      3. associate-/r/36.8%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{x}{\sqrt{\left(-a\right) \cdot t}} \cdot \left(z \cdot y\right)}\right)} - 1 \]
      4. *-commutative36.8%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{x}{\sqrt{\color{blue}{t \cdot \left(-a\right)}}} \cdot \left(z \cdot y\right)\right)} - 1 \]
    10. Applied egg-rr36.8%

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

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

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

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

    if 1.15e-133 < z

    1. Initial program 51.6%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot y}{1 + -0.5 \cdot \frac{a}{\frac{\color{blue}{z \cdot z}}{t}}} \]
      2. associate-*r/88.2%

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

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

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

Alternative 7: 84.1% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 65.1%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\left(\frac{{\left(\sqrt[3]{x}\right)}^{2}}{1} \cdot \frac{\sqrt[3]{x}}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\right)} \]
    6. Step-by-step derivation
      1. /-rgt-identity66.1%

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

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

        \[\leadsto y \cdot \frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)} \cdot \sqrt[3]{x}}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}} \]
      4. rem-3cbrt-lft66.9%

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

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

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

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

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

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

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

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

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

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

    if -8.79999999999999957e-100 < z < 1.1e-133

    1. Initial program 61.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.1e-133 < z

    1. Initial program 51.6%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot y}{1 + -0.5 \cdot \frac{a}{\frac{\color{blue}{z \cdot z}}{t}}} \]
      2. associate-*r/88.2%

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

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

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

Alternative 8: 75.5% accurate, 6.6× speedup?

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

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

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


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

    1. Initial program 65.0%

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

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

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

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

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

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

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

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

    if -3.3000000000000001e-236 < z < 6.89999999999999974e-217

    1. Initial program 48.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.89999999999999974e-217 < z

    1. Initial program 54.8%

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

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

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

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

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

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

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

Alternative 9: 77.2% accurate, 6.6× speedup?

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

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


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

    1. Initial program 65.0%

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

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

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

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

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

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

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

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

    if -1.40000000000000006e-239 < z

    1. Initial program 53.9%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\left(\frac{{\left(\sqrt[3]{x}\right)}^{2}}{1} \cdot \frac{\sqrt[3]{x}}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\right)} \]
    6. Step-by-step derivation
      1. /-rgt-identity59.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 79.0% accurate, 6.6× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_1 := t \cdot \frac{a}{z}\\ \mathbf{if}\;z \leq 2 \cdot 10^{-297}:\\ \;\;\;\;y \cdot \frac{x}{\frac{0.5 \cdot t_1 - z}{z}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{\frac{z + t_1 \cdot -0.5}{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
 (let* ((t_1 (* t (/ a z))))
   (if (<= z 2e-297)
     (* y (/ x (/ (- (* 0.5 t_1) z) z)))
     (* y (/ x (/ (+ z (* t_1 -0.5)) z))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (a / z);
	double tmp;
	if (z <= 2e-297) {
		tmp = y * (x / (((0.5 * t_1) - z) / z));
	} else {
		tmp = y * (x / ((z + (t_1 * -0.5)) / 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) :: t_1
    real(8) :: tmp
    t_1 = t * (a / z)
    if (z <= 2d-297) then
        tmp = y * (x / (((0.5d0 * t_1) - z) / z))
    else
        tmp = y * (x / ((z + (t_1 * (-0.5d0))) / 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 t_1 = t * (a / z);
	double tmp;
	if (z <= 2e-297) {
		tmp = y * (x / (((0.5 * t_1) - z) / z));
	} else {
		tmp = y * (x / ((z + (t_1 * -0.5)) / z));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	t_1 = t * (a / z)
	tmp = 0
	if z <= 2e-297:
		tmp = y * (x / (((0.5 * t_1) - z) / z))
	else:
		tmp = y * (x / ((z + (t_1 * -0.5)) / z))
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(a / z))
	tmp = 0.0
	if (z <= 2e-297)
		tmp = Float64(y * Float64(x / Float64(Float64(Float64(0.5 * t_1) - z) / z)));
	else
		tmp = Float64(y * Float64(x / Float64(Float64(z + Float64(t_1 * -0.5)) / z)));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (a / z);
	tmp = 0.0;
	if (z <= 2e-297)
		tmp = y * (x / (((0.5 * t_1) - z) / z));
	else
		tmp = y * (x / ((z + (t_1 * -0.5)) / 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_] := Block[{t$95$1 = N[(t * N[(a / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 2e-297], N[(y * N[(x / N[(N[(N[(0.5 * t$95$1), $MachinePrecision] - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(x / N[(N[(z + N[(t$95$1 * -0.5), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{a}{z}\\
\mathbf{if}\;z \leq 2 \cdot 10^{-297}:\\
\;\;\;\;y \cdot \frac{x}{\frac{0.5 \cdot t_1 - z}{z}}\\

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


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

    1. Initial program 64.2%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\left(\frac{{\left(\sqrt[3]{x}\right)}^{2}}{1} \cdot \frac{\sqrt[3]{x}}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\right)} \]
    6. Step-by-step derivation
      1. /-rgt-identity67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000008e-297 < z

    1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\left(\frac{{\left(\sqrt[3]{x}\right)}^{2}}{1} \cdot \frac{\sqrt[3]{x}}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\right)} \]
    6. Step-by-step derivation
      1. /-rgt-identity58.1%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 79.2% accurate, 6.6× speedup?

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

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


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

    1. Initial program 63.7%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    3. Simplified65.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*68.6%

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\left(\frac{{\left(\sqrt[3]{x}\right)}^{2}}{1} \cdot \frac{\sqrt[3]{x}}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\right)} \]
    6. Step-by-step derivation
      1. /-rgt-identity67.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.99999999999999951e-284 < z

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot y}{1 + -0.5 \cdot \frac{a}{\frac{\color{blue}{z \cdot z}}{t}}} \]
      2. associate-*r/78.8%

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

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

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

Alternative 12: 74.4% accurate, 10.2× speedup?

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

\mathbf{elif}\;z \leq 6.6 \cdot 10^{-193}:\\
\;\;\;\;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 < -1.45e-241

    1. Initial program 65.0%

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

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

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

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

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

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

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

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

    if -1.45e-241 < z < 6.5999999999999998e-193

    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*59.8%

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

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

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

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

    if 6.5999999999999998e-193 < z

    1. Initial program 54.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{-241}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{-193}:\\ \;\;\;\;y \cdot \frac{z \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 13: 72.9% accurate, 18.6× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{-310}:\\ \;\;\;\;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 -5e-310) (* x (- y)) (* x y)))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -5e-310) {
		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 <= (-5d-310)) 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 <= -5e-310) {
		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 <= -5e-310:
		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 <= -5e-310)
		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 <= -5e-310)
		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, -5e-310], N[(x * (-y)), $MachinePrecision], N[(x * y), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-310}:\\
\;\;\;\;x \cdot \left(-y\right)\\

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


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

    1. Initial program 63.7%

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

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

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

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

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

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

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

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

    if -4.999999999999985e-310 < z

    1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto x \cdot y \]

Developer target: 89.9% 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 2023192 
(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)))))