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

Percentage Accurate: 61.8% → 90.7%
Time: 26.1s
Alternatives: 23
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 23 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.8% accurate, 1.0× speedup?

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

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

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

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

\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.65e52

    1. Initial program 30.0%

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

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

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

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

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

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

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

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

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

    if -1.65e52 < z < 8.9999999999999998e-89

    1. Initial program 88.6%

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

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

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

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

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

    if 8.9999999999999998e-89 < z

    1. Initial program 62.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.6% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 30.6%

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

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

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

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

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

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

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

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

    if -4.19999999999999983e65 < z < 8.4000000000000007e63

    1. Initial program 90.2%

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

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

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

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

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

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

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

    if 8.4000000000000007e63 < z

    1. Initial program 41.7%

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

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

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

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

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

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

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

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

Alternative 3: 89.9% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 30.0%

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

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

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

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

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

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

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

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

    if -2.45e54 < z < 5.1999999999999997e25

    1. Initial program 91.0%

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

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

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

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

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

    if 5.1999999999999997e25 < z

    1. Initial program 48.1%

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

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

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

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

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

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

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

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

Alternative 4: 90.7% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 30.6%

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

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

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

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

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

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

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

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

    if -4.19999999999999983e65 < z < 8.4000000000000007e63

    1. Initial program 90.2%

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

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

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

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

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

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

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

    if 8.4000000000000007e63 < z

    1. Initial program 41.7%

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

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

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

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

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

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

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

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

Alternative 5: 89.8% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+65}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+168}:\\ \;\;\;\;\frac{z}{\sqrt{z \cdot z - a \cdot t}} \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.5, \frac{a \cdot \frac{t}{z}}{z}, 1\right) \cdot \left(x \cdot y\right)\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -4.2e+65)
   (* y (- x))
   (if (<= z 1.15e+168)
     (* (/ z (sqrt (- (* z z) (* a t)))) (* x y))
     (* (fma 0.5 (/ (* a (/ t z)) z) 1.0) (* x y)))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.2e+65) {
		tmp = y * -x;
	} else if (z <= 1.15e+168) {
		tmp = (z / sqrt(((z * z) - (a * t)))) * (x * y);
	} else {
		tmp = fma(0.5, ((a * (t / z)) / z), 1.0) * (x * y);
	}
	return tmp;
}
x, y = sort([x, y])
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -4.2e+65)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 1.15e+168)
		tmp = Float64(Float64(z / sqrt(Float64(Float64(z * z) - Float64(a * t)))) * Float64(x * y));
	else
		tmp = Float64(fma(0.5, Float64(Float64(a * Float64(t / z)) / z), 1.0) * Float64(x * y));
	end
	return 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.2e+65], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 1.15e+168], N[(N[(z / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(x * y), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 * N[(N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + 1.0), $MachinePrecision] * N[(x * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+65}:\\
\;\;\;\;y \cdot \left(-x\right)\\

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.5, \frac{a \cdot \frac{t}{z}}{z}, 1\right) \cdot \left(x \cdot y\right)\\


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

    1. Initial program 30.6%

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

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

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

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

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

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

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

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

    if -4.19999999999999983e65 < z < 1.15e168

    1. Initial program 87.6%

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

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

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

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

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

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

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

    if 1.15e168 < z

    1. Initial program 11.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(0.5, \frac{a \cdot \frac{t}{z}}{z}, 1\right)} \cdot \left(x \cdot y\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification91.6%

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

Alternative 6: 90.6% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+52}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-89}:\\ \;\;\;\;y \cdot \frac{z \cdot x}{\sqrt{z \cdot z - a \cdot t}}\\ \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 -7e+52)
   (* y (- x))
   (if (<= z 9e-89)
     (* y (/ (* z x) (sqrt (- (* z z) (* a t)))))
     (/ (* 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 <= -7e+52) {
		tmp = y * -x;
	} else if (z <= 9e-89) {
		tmp = y * ((z * x) / sqrt(((z * z) - (a * t))));
	} 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 <= (-7d+52)) then
        tmp = y * -x
    else if (z <= 9d-89) then
        tmp = y * ((z * x) / sqrt(((z * z) - (a * t))))
    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 <= -7e+52) {
		tmp = y * -x;
	} else if (z <= 9e-89) {
		tmp = y * ((z * x) / Math.sqrt(((z * z) - (a * t))));
	} 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 <= -7e+52:
		tmp = y * -x
	elif z <= 9e-89:
		tmp = y * ((z * x) / math.sqrt(((z * z) - (a * t))))
	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 <= -7e+52)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 9e-89)
		tmp = Float64(y * Float64(Float64(z * x) / sqrt(Float64(Float64(z * z) - Float64(a * t)))));
	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 <= -7e+52)
		tmp = y * -x;
	elseif (z <= 9e-89)
		tmp = y * ((z * x) / sqrt(((z * z) - (a * t))));
	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, -7e+52], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 9e-89], N[(y * N[(N[(z * x), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $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 -7 \cdot 10^{+52}:\\
\;\;\;\;y \cdot \left(-x\right)\\

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

\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 < -7e52

    1. Initial program 30.0%

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

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

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

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

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

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

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

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

    if -7e52 < z < 8.9999999999999998e-89

    1. Initial program 88.6%

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

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

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

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

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

    if 8.9999999999999998e-89 < z

    1. Initial program 62.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 82.3% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 39.0%

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

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

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

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

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

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

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

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

    if -4.19999999999999977e-5 < z < 1.4e-117

    1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

    if 1.4e-117 < z

    1. Initial program 64.9%

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

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

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

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

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

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

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

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

Alternative 8: 82.1% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 39.0%

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

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

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

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

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

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

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

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

    if -2.40000000000000006e-4 < z < 1.69999999999999995e-135

    1. Initial program 86.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.69999999999999995e-135 < z

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

Alternative 9: 82.4% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 39.0%

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

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

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

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

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

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

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

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

    if -6.80000000000000012e-6 < z < 1.59999999999999998e-117

    1. Initial program 87.3%

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{\sqrt{z \cdot z - t \cdot a}}{x \cdot z}}} \]
      2. un-div-inv81.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.59999999999999998e-117 < z

    1. Initial program 64.9%

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

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

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

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

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

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

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

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

Alternative 10: 76.1% accurate, 5.9× speedup?

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

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

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


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

    1. Initial program 51.3%

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

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

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

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

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

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

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

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

    if -5.6e-217 < z < 1.2e-61

    1. Initial program 91.3%

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

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

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

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

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

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

    if 1.2e-61 < z

    1. Initial program 60.4%

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

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

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

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

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

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

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

Alternative 11: 75.1% accurate, 6.6× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{-217}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-140}:\\ \;\;\;\;-2 \cdot \left(\frac{y}{a} \cdot \frac{z}{\frac{\frac{t}{x}}{z}}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -4.8e-217)
   (* y (- x))
   (if (<= z 3.8e-140) (* -2.0 (* (/ y a) (/ z (/ (/ t x) z)))) (* x y))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.8e-217) {
		tmp = y * -x;
	} else if (z <= 3.8e-140) {
		tmp = -2.0 * ((y / a) * (z / ((t / 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 <= (-4.8d-217)) then
        tmp = y * -x
    else if (z <= 3.8d-140) then
        tmp = (-2.0d0) * ((y / a) * (z / ((t / 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 <= -4.8e-217) {
		tmp = y * -x;
	} else if (z <= 3.8e-140) {
		tmp = -2.0 * ((y / a) * (z / ((t / x) / z)));
	} else {
		tmp = x * y;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if z <= -4.8e-217:
		tmp = y * -x
	elif z <= 3.8e-140:
		tmp = -2.0 * ((y / a) * (z / ((t / 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 <= -4.8e-217)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 3.8e-140)
		tmp = Float64(-2.0 * Float64(Float64(y / a) * Float64(z / Float64(Float64(t / 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 <= -4.8e-217)
		tmp = y * -x;
	elseif (z <= 3.8e-140)
		tmp = -2.0 * ((y / a) * (z / ((t / 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, -4.8e-217], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 3.8e-140], N[(-2.0 * N[(N[(y / a), $MachinePrecision] * N[(z / N[(N[(t / x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{-217}:\\
\;\;\;\;y \cdot \left(-x\right)\\

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

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


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

    1. Initial program 51.3%

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

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

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

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

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

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

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

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

    if -4.7999999999999997e-217 < z < 3.79999999999999998e-140

    1. Initial program 88.2%

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

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

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

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

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

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

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

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

    if 3.79999999999999998e-140 < z

    1. Initial program 66.7%

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

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

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

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

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

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

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

Alternative 12: 74.7% accurate, 6.6× speedup?

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

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

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


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

    1. Initial program 49.0%

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

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

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

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

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

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

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

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

    if -7.20000000000000049e-128 < z < 6.49999999999999991e-137

    1. Initial program 86.3%

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

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

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

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

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

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

    if 6.49999999999999991e-137 < z

    1. Initial program 66.7%

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

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

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

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

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

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

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

Alternative 13: 75.3% accurate, 6.6× speedup?

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

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

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


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

    1. Initial program 51.3%

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

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

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

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

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

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

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

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

    if -4.7999999999999997e-217 < z < 2.10000000000000011e-149

    1. Initial program 88.2%

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

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

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

    if 2.10000000000000011e-149 < z

    1. Initial program 66.7%

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

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

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

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

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

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

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

Alternative 14: 75.4% accurate, 6.6× speedup?

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

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

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


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

    1. Initial program 51.3%

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

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

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

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

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

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

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

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

    if -5.6e-217 < z < 1.69999999999999999e-139

    1. Initial program 88.2%

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

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

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

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

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

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

    if 1.69999999999999999e-139 < z

    1. Initial program 66.7%

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

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

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

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

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

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

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

Alternative 15: 76.2% accurate, 6.6× speedup?

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

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


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

    1. Initial program 51.3%

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

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

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

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

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

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

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

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

    if -5.6e-217 < z

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

Alternative 16: 78.1% accurate, 6.6× speedup?

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

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


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

    1. Initial program 54.7%

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

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

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

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

        \[\leadsto \frac{x \cdot y}{\frac{0.5 \cdot \frac{\color{blue}{t \cdot a}}{z} + -1 \cdot z}{z}} \]
      2. *-un-lft-identity71.8%

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

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

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

    if -1.90000000000000007e-264 < z

    1. Initial program 71.6%

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

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

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

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

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

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

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

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

Alternative 17: 75.0% accurate, 8.0× speedup?

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

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

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


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

    1. Initial program 51.3%

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

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

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

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

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

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

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

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

    if -5.6e-217 < z < 4.99999999999999994e-93

    1. Initial program 90.5%

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

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

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

      \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{-z}} \]
    5. Step-by-step derivation
      1. *-un-lft-identity30.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{-z}} \cdot \frac{\left(x \cdot y\right) \cdot z}{-1} \]
      6. metadata-eval30.0%

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

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

        \[\leadsto \frac{-1}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}} \cdot \frac{\left(x \cdot y\right) \cdot z}{-1} \]
      9. sqr-neg16.8%

        \[\leadsto \frac{-1}{\sqrt{\color{blue}{z \cdot z}}} \cdot \frac{\left(x \cdot y\right) \cdot z}{-1} \]
      10. sqrt-prod28.1%

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

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

        \[\leadsto \frac{-1}{z} \cdot \frac{\color{blue}{z \cdot \left(x \cdot y\right)}}{-1} \]
    6. Applied egg-rr39.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{-\color{blue}{\left(z \cdot y\right)} \cdot x}{z}}{-1} \]
      5. distribute-rgt-neg-in41.8%

        \[\leadsto \frac{\frac{\color{blue}{\left(z \cdot y\right) \cdot \left(-x\right)}}{z}}{-1} \]
    12. Simplified41.8%

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

    if 4.99999999999999994e-93 < z

    1. Initial program 62.6%

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

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

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

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

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

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

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

Alternative 18: 72.1% accurate, 8.6× speedup?

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

\mathbf{elif}\;z \leq 4.2 \cdot 10^{+15}:\\
\;\;\;\;y \cdot \frac{z \cdot x}{z}\\

\mathbf{elif}\;z \leq 1.15 \cdot 10^{+168}:\\
\;\;\;\;z \cdot \frac{y}{\frac{z}{x}}\\

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


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

    1. Initial program 53.3%

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

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

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

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

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

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

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

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

    if -7.19999999999999988e-226 < z < 4.2e15

    1. Initial program 92.8%

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

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

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

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

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

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

    if 4.2e15 < z < 1.15e168

    1. Initial program 81.6%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \cdot z \]
    6. Simplified71.4%

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

    if 1.15e168 < z

    1. Initial program 11.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{-226}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+15}:\\ \;\;\;\;y \cdot \frac{z \cdot x}{z}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+168}:\\ \;\;\;\;z \cdot \frac{y}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 19: 75.0% accurate, 8.6× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{-217}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-93}:\\ \;\;\;\;\frac{y \cdot \left(z \cdot \left(-x\right)\right)}{-z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -4e-217)
   (* y (- x))
   (if (<= z 5e-93) (/ (* 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 <= -4e-217) {
		tmp = y * -x;
	} else if (z <= 5e-93) {
		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 <= (-4d-217)) then
        tmp = y * -x
    else if (z <= 5d-93) 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 <= -4e-217) {
		tmp = y * -x;
	} else if (z <= 5e-93) {
		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 <= -4e-217:
		tmp = y * -x
	elif z <= 5e-93:
		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 <= -4e-217)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 5e-93)
		tmp = Float64(Float64(y * Float64(z * Float64(-x))) / Float64(-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 <= -4e-217)
		tmp = y * -x;
	elseif (z <= 5e-93)
		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, -4e-217], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 5e-93], N[(N[(y * N[(z * (-x)), $MachinePrecision]), $MachinePrecision] / (-z)), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{-217}:\\
\;\;\;\;y \cdot \left(-x\right)\\

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

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


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

    1. Initial program 51.3%

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

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

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

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

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

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

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

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

    if -4.00000000000000033e-217 < z < 4.99999999999999994e-93

    1. Initial program 90.5%

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

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

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

      \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{-z}} \]
    5. Step-by-step derivation
      1. *-un-lft-identity30.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1}{-z}} \cdot \frac{\left(x \cdot y\right) \cdot z}{-1} \]
      6. metadata-eval30.0%

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

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

        \[\leadsto \frac{-1}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}} \cdot \frac{\left(x \cdot y\right) \cdot z}{-1} \]
      9. sqr-neg16.8%

        \[\leadsto \frac{-1}{\sqrt{\color{blue}{z \cdot z}}} \cdot \frac{\left(x \cdot y\right) \cdot z}{-1} \]
      10. sqrt-prod28.1%

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

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

        \[\leadsto \frac{-1}{z} \cdot \frac{\color{blue}{z \cdot \left(x \cdot y\right)}}{-1} \]
    6. Applied egg-rr39.9%

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{-1}{z} \cdot \frac{y \cdot \left(z \cdot x\right)}{-1}\right)} - 1} \]
      3. frac-times41.2%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{-1 \cdot \left(y \cdot \left(z \cdot x\right)\right)}{z \cdot -1}}\right)} - 1 \]
      4. *-commutative41.2%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{-1 \cdot \left(y \cdot \left(z \cdot x\right)\right)}{\color{blue}{-1 \cdot z}}\right)} - 1 \]
      5. mul-1-neg41.2%

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

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

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

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

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

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

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

    if 4.99999999999999994e-93 < z

    1. Initial program 62.6%

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

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

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

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

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

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

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

Alternative 20: 73.9% accurate, 10.2× speedup?

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

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

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


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

    1. Initial program 51.3%

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

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

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

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

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

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

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

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

    if -2.59999999999999993e-217 < z < 4.99999999999999994e-93

    1. Initial program 90.5%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{z}{\sqrt{z \cdot z - t \cdot a}} \cdot \left(x \cdot y\right)\right)} - 1} \]
      3. cancel-sign-sub-inv50.0%

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

        \[\leadsto e^{\mathsf{log1p}\left(\frac{z}{\sqrt{\color{blue}{\mathsf{fma}\left(z, z, \left(-t\right) \cdot a\right)}}} \cdot \left(x \cdot y\right)\right)} - 1 \]
    7. Applied egg-rr50.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\sqrt{\mathsf{fma}\left(z, z, \left(-t\right) \cdot a\right)}} \cdot \left(z \cdot x\right)} \]
      7. associate-*r*84.8%

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

        \[\leadsto \color{blue}{\frac{y \cdot z}{\sqrt{\mathsf{fma}\left(z, z, \left(-t\right) \cdot a\right)}}} \cdot x \]
      9. distribute-lft-neg-out86.4%

        \[\leadsto \frac{y \cdot z}{\sqrt{\mathsf{fma}\left(z, z, \color{blue}{-t \cdot a}\right)}} \cdot x \]
      10. fma-neg86.4%

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

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

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

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

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

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

    if 4.99999999999999994e-93 < z

    1. Initial program 62.6%

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

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

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

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

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

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

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

Alternative 21: 74.5% accurate, 10.2× speedup?

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

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

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


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

    1. Initial program 51.3%

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

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

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

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

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

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

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

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

    if -1.64999999999999996e-217 < z < 1.6e15

    1. Initial program 93.3%

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

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

    if 1.6e15 < z

    1. Initial program 50.4%

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

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

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

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

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

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

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

Alternative 22: 72.5% accurate, 18.6× speedup?

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

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


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

    1. Initial program 56.4%

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

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

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

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

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

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

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

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

    if -1.999999999999994e-310 < z

    1. Initial program 70.8%

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

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

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

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

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

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

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

Alternative 23: 41.9% 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 63.3%

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

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

      \[\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. Taylor expanded in z around inf 42.1%

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

    \[\leadsto x \cdot y \]

Developer target: 89.2% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

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