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

Percentage Accurate: 61.4% → 91.2%
Time: 17.6s
Alternatives: 16
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 16 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.4% accurate, 1.0× speedup?

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

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

Alternative 1: 91.2% accurate, 0.9× speedup?

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

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

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

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

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


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

    1. Initial program 32.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2499999999999999e104 < z < 9.9999999999999996e-303

    1. Initial program 82.0%

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

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

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

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

    if 9.9999999999999996e-303 < z < 1.1000000000000001e-127

    1. Initial program 69.9%

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

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

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

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

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

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

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

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

    if 1.1000000000000001e-127 < z < 1.99999999999999993e118

    1. Initial program 94.3%

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

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

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

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

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

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

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

    if 1.99999999999999993e118 < z

    1. Initial program 17.4%

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

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

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

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

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

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

Alternative 2: 89.7% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_1 := x \cdot \frac{z}{\frac{\sqrt{z \cdot z - a \cdot t}}{y}}\\ \mathbf{if}\;z \leq -1.05 \cdot 10^{+117}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq -1.18 \cdot 10^{-116}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-305}:\\ \;\;\;\;\frac{z}{\frac{\sqrt{a \cdot \left(-t\right)}}{x \cdot y}}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+71}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{z + \frac{a}{\frac{z}{t}} \cdot -0.5}\right)\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ z (/ (sqrt (- (* z z) (* a t))) y)))))
   (if (<= z -1.05e+117)
     (* x (- y))
     (if (<= z -1.18e-116)
       t_1
       (if (<= z 1.35e-305)
         (/ z (/ (sqrt (* a (- t))) (* x y)))
         (if (<= z 2e+71)
           t_1
           (* y (* x (/ z (+ z (* (/ a (/ z t)) -0.5)))))))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (z / (sqrt(((z * z) - (a * t))) / y));
	double tmp;
	if (z <= -1.05e+117) {
		tmp = x * -y;
	} else if (z <= -1.18e-116) {
		tmp = t_1;
	} else if (z <= 1.35e-305) {
		tmp = z / (sqrt((a * -t)) / (x * y));
	} else if (z <= 2e+71) {
		tmp = t_1;
	} else {
		tmp = y * (x * (z / (z + ((a / (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) :: t_1
    real(8) :: tmp
    t_1 = x * (z / (sqrt(((z * z) - (a * t))) / y))
    if (z <= (-1.05d+117)) then
        tmp = x * -y
    else if (z <= (-1.18d-116)) then
        tmp = t_1
    else if (z <= 1.35d-305) then
        tmp = z / (sqrt((a * -t)) / (x * y))
    else if (z <= 2d+71) then
        tmp = t_1
    else
        tmp = y * (x * (z / (z + ((a / (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 t_1 = x * (z / (Math.sqrt(((z * z) - (a * t))) / y));
	double tmp;
	if (z <= -1.05e+117) {
		tmp = x * -y;
	} else if (z <= -1.18e-116) {
		tmp = t_1;
	} else if (z <= 1.35e-305) {
		tmp = z / (Math.sqrt((a * -t)) / (x * y));
	} else if (z <= 2e+71) {
		tmp = t_1;
	} else {
		tmp = y * (x * (z / (z + ((a / (z / t)) * -0.5))));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	t_1 = x * (z / (math.sqrt(((z * z) - (a * t))) / y))
	tmp = 0
	if z <= -1.05e+117:
		tmp = x * -y
	elif z <= -1.18e-116:
		tmp = t_1
	elif z <= 1.35e-305:
		tmp = z / (math.sqrt((a * -t)) / (x * y))
	elif z <= 2e+71:
		tmp = t_1
	else:
		tmp = y * (x * (z / (z + ((a / (z / t)) * -0.5))))
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(z / Float64(sqrt(Float64(Float64(z * z) - Float64(a * t))) / y)))
	tmp = 0.0
	if (z <= -1.05e+117)
		tmp = Float64(x * Float64(-y));
	elseif (z <= -1.18e-116)
		tmp = t_1;
	elseif (z <= 1.35e-305)
		tmp = Float64(z / Float64(sqrt(Float64(a * Float64(-t))) / Float64(x * y)));
	elseif (z <= 2e+71)
		tmp = t_1;
	else
		tmp = Float64(y * Float64(x * Float64(z / Float64(z + Float64(Float64(a / Float64(z / t)) * -0.5)))));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (z / (sqrt(((z * z) - (a * t))) / y));
	tmp = 0.0;
	if (z <= -1.05e+117)
		tmp = x * -y;
	elseif (z <= -1.18e-116)
		tmp = t_1;
	elseif (z <= 1.35e-305)
		tmp = z / (sqrt((a * -t)) / (x * y));
	elseif (z <= 2e+71)
		tmp = t_1;
	else
		tmp = y * (x * (z / (z + ((a / (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_] := Block[{t$95$1 = N[(x * N[(z / N[(N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.05e+117], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, -1.18e-116], t$95$1, If[LessEqual[z, 1.35e-305], N[(z / N[(N[Sqrt[N[(a * (-t)), $MachinePrecision]], $MachinePrecision] / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+71], t$95$1, N[(y * N[(x * N[(z / N[(z + N[(N[(a / N[(z / t), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := x \cdot \frac{z}{\frac{\sqrt{z \cdot z - a \cdot t}}{y}}\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+117}:\\
\;\;\;\;x \cdot \left(-y\right)\\

\mathbf{elif}\;z \leq -1.18 \cdot 10^{-116}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 2 \cdot 10^{+71}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 26.9%

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

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

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

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

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

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

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

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

    if -1.0500000000000001e117 < z < -1.1800000000000001e-116 or 1.35e-305 < z < 2.0000000000000001e71

    1. Initial program 85.6%

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

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

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

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

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

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

    if -1.1800000000000001e-116 < z < 1.35e-305

    1. Initial program 77.7%

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e71 < z

    1. Initial program 33.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 90.1% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_1 := x \cdot \frac{z \cdot y}{\sqrt{z \cdot z - a \cdot t}}\\ \mathbf{if}\;z \leq -2.05 \cdot 10^{+123}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-125}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-305}:\\ \;\;\;\;\frac{z}{\frac{\sqrt{a \cdot \left(-t\right)}}{x \cdot y}}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+71}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{z + \frac{a}{\frac{z}{t}} \cdot -0.5}\right)\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ (* z y) (sqrt (- (* z z) (* a t)))))))
   (if (<= z -2.05e+123)
     (* x (- y))
     (if (<= z -2.4e-125)
       t_1
       (if (<= z 4e-305)
         (/ z (/ (sqrt (* a (- t))) (* x y)))
         (if (<= z 4e+71)
           t_1
           (* y (* x (/ z (+ z (* (/ a (/ z t)) -0.5)))))))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((z * y) / sqrt(((z * z) - (a * t))));
	double tmp;
	if (z <= -2.05e+123) {
		tmp = x * -y;
	} else if (z <= -2.4e-125) {
		tmp = t_1;
	} else if (z <= 4e-305) {
		tmp = z / (sqrt((a * -t)) / (x * y));
	} else if (z <= 4e+71) {
		tmp = t_1;
	} else {
		tmp = y * (x * (z / (z + ((a / (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) :: t_1
    real(8) :: tmp
    t_1 = x * ((z * y) / sqrt(((z * z) - (a * t))))
    if (z <= (-2.05d+123)) then
        tmp = x * -y
    else if (z <= (-2.4d-125)) then
        tmp = t_1
    else if (z <= 4d-305) then
        tmp = z / (sqrt((a * -t)) / (x * y))
    else if (z <= 4d+71) then
        tmp = t_1
    else
        tmp = y * (x * (z / (z + ((a / (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 t_1 = x * ((z * y) / Math.sqrt(((z * z) - (a * t))));
	double tmp;
	if (z <= -2.05e+123) {
		tmp = x * -y;
	} else if (z <= -2.4e-125) {
		tmp = t_1;
	} else if (z <= 4e-305) {
		tmp = z / (Math.sqrt((a * -t)) / (x * y));
	} else if (z <= 4e+71) {
		tmp = t_1;
	} else {
		tmp = y * (x * (z / (z + ((a / (z / t)) * -0.5))));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	t_1 = x * ((z * y) / math.sqrt(((z * z) - (a * t))))
	tmp = 0
	if z <= -2.05e+123:
		tmp = x * -y
	elif z <= -2.4e-125:
		tmp = t_1
	elif z <= 4e-305:
		tmp = z / (math.sqrt((a * -t)) / (x * y))
	elif z <= 4e+71:
		tmp = t_1
	else:
		tmp = y * (x * (z / (z + ((a / (z / t)) * -0.5))))
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(z * y) / sqrt(Float64(Float64(z * z) - Float64(a * t)))))
	tmp = 0.0
	if (z <= -2.05e+123)
		tmp = Float64(x * Float64(-y));
	elseif (z <= -2.4e-125)
		tmp = t_1;
	elseif (z <= 4e-305)
		tmp = Float64(z / Float64(sqrt(Float64(a * Float64(-t))) / Float64(x * y)));
	elseif (z <= 4e+71)
		tmp = t_1;
	else
		tmp = Float64(y * Float64(x * Float64(z / Float64(z + Float64(Float64(a / Float64(z / t)) * -0.5)))));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * ((z * y) / sqrt(((z * z) - (a * t))));
	tmp = 0.0;
	if (z <= -2.05e+123)
		tmp = x * -y;
	elseif (z <= -2.4e-125)
		tmp = t_1;
	elseif (z <= 4e-305)
		tmp = z / (sqrt((a * -t)) / (x * y));
	elseif (z <= 4e+71)
		tmp = t_1;
	else
		tmp = y * (x * (z / (z + ((a / (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_] := Block[{t$95$1 = N[(x * N[(N[(z * y), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.05e+123], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, -2.4e-125], t$95$1, If[LessEqual[z, 4e-305], N[(z / N[(N[Sqrt[N[(a * (-t)), $MachinePrecision]], $MachinePrecision] / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e+71], t$95$1, N[(y * N[(x * N[(z / N[(z + N[(N[(a / N[(z / t), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := x \cdot \frac{z \cdot y}{\sqrt{z \cdot z - a \cdot t}}\\
\mathbf{if}\;z \leq -2.05 \cdot 10^{+123}:\\
\;\;\;\;x \cdot \left(-y\right)\\

\mathbf{elif}\;z \leq -2.4 \cdot 10^{-125}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 4 \cdot 10^{+71}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 25.5%

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

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

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

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

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

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

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

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

    if -2.04999999999999995e123 < z < -2.4000000000000001e-125 or 3.99999999999999999e-305 < z < 4.0000000000000002e71

    1. Initial program 85.8%

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

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

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

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

    if -2.4000000000000001e-125 < z < 3.99999999999999999e-305

    1. Initial program 77.0%

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

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

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

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

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

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

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

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

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

    if 4.0000000000000002e71 < z

    1. Initial program 33.7%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.05 \cdot 10^{+123}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-125}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{\sqrt{z \cdot z - a \cdot t}}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-305}:\\ \;\;\;\;\frac{z}{\frac{\sqrt{a \cdot \left(-t\right)}}{x \cdot y}}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+71}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{\sqrt{z \cdot z - a \cdot t}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{z + \frac{a}{\frac{z}{t}} \cdot -0.5}\right)\\ \end{array} \]

Alternative 4: 91.1% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_1 := \sqrt{z \cdot z - a \cdot t}\\ \mathbf{if}\;z \leq -4.5 \cdot 10^{+104}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-306}:\\ \;\;\;\;z \cdot \frac{x \cdot y}{t_1}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-127}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{\sqrt{a \cdot \left(-t\right)}}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+118}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{t_1}\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
 (let* ((t_1 (sqrt (- (* z z) (* a t)))))
   (if (<= z -4.5e+104)
     (* x (- y))
     (if (<= z 2.7e-306)
       (* z (/ (* x y) t_1))
       (if (<= z 1.1e-127)
         (/ (* x (* z y)) (sqrt (* a (- t))))
         (if (<= z 2e+118) (* y (* x (/ z t_1))) (* x y)))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double t_1 = sqrt(((z * z) - (a * t)));
	double tmp;
	if (z <= -4.5e+104) {
		tmp = x * -y;
	} else if (z <= 2.7e-306) {
		tmp = z * ((x * y) / t_1);
	} else if (z <= 1.1e-127) {
		tmp = (x * (z * y)) / sqrt((a * -t));
	} else if (z <= 2e+118) {
		tmp = y * (x * (z / t_1));
	} 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) :: t_1
    real(8) :: tmp
    t_1 = sqrt(((z * z) - (a * t)))
    if (z <= (-4.5d+104)) then
        tmp = x * -y
    else if (z <= 2.7d-306) then
        tmp = z * ((x * y) / t_1)
    else if (z <= 1.1d-127) then
        tmp = (x * (z * y)) / sqrt((a * -t))
    else if (z <= 2d+118) then
        tmp = y * (x * (z / t_1))
    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 t_1 = Math.sqrt(((z * z) - (a * t)));
	double tmp;
	if (z <= -4.5e+104) {
		tmp = x * -y;
	} else if (z <= 2.7e-306) {
		tmp = z * ((x * y) / t_1);
	} else if (z <= 1.1e-127) {
		tmp = (x * (z * y)) / Math.sqrt((a * -t));
	} else if (z <= 2e+118) {
		tmp = y * (x * (z / t_1));
	} else {
		tmp = x * y;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	t_1 = math.sqrt(((z * z) - (a * t)))
	tmp = 0
	if z <= -4.5e+104:
		tmp = x * -y
	elif z <= 2.7e-306:
		tmp = z * ((x * y) / t_1)
	elif z <= 1.1e-127:
		tmp = (x * (z * y)) / math.sqrt((a * -t))
	elif z <= 2e+118:
		tmp = y * (x * (z / t_1))
	else:
		tmp = x * y
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	t_1 = sqrt(Float64(Float64(z * z) - Float64(a * t)))
	tmp = 0.0
	if (z <= -4.5e+104)
		tmp = Float64(x * Float64(-y));
	elseif (z <= 2.7e-306)
		tmp = Float64(z * Float64(Float64(x * y) / t_1));
	elseif (z <= 1.1e-127)
		tmp = Float64(Float64(x * Float64(z * y)) / sqrt(Float64(a * Float64(-t))));
	elseif (z <= 2e+118)
		tmp = Float64(y * Float64(x * Float64(z / t_1)));
	else
		tmp = Float64(x * y);
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	t_1 = sqrt(((z * z) - (a * t)));
	tmp = 0.0;
	if (z <= -4.5e+104)
		tmp = x * -y;
	elseif (z <= 2.7e-306)
		tmp = z * ((x * y) / t_1);
	elseif (z <= 1.1e-127)
		tmp = (x * (z * y)) / sqrt((a * -t));
	elseif (z <= 2e+118)
		tmp = y * (x * (z / t_1));
	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_] := Block[{t$95$1 = N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[z, -4.5e+104], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 2.7e-306], N[(z * N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e-127], N[(N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(a * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+118], N[(y * N[(x * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot z - a \cdot t}\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+104}:\\
\;\;\;\;x \cdot \left(-y\right)\\

\mathbf{elif}\;z \leq 2.7 \cdot 10^{-306}:\\
\;\;\;\;z \cdot \frac{x \cdot y}{t_1}\\

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

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

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


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

    1. Initial program 32.1%

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

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

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

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

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

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

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

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

    if -4.4999999999999998e104 < z < 2.70000000000000009e-306

    1. Initial program 82.0%

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

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

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

    if 2.70000000000000009e-306 < z < 1.1000000000000001e-127

    1. Initial program 69.9%

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

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

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

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

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

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

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

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

    if 1.1000000000000001e-127 < z < 1.99999999999999993e118

    1. Initial program 94.3%

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

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

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

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

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

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

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

    if 1.99999999999999993e118 < z

    1. Initial program 17.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+104}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-306}:\\ \;\;\;\;z \cdot \frac{x \cdot y}{\sqrt{z \cdot z - a \cdot t}}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-127}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{\sqrt{a \cdot \left(-t\right)}}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+118}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{\sqrt{z \cdot z - a \cdot t}}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 5: 91.1% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_1 := \sqrt{z \cdot z - a \cdot t}\\ \mathbf{if}\;z \leq -1.25 \cdot 10^{+104}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-307}:\\ \;\;\;\;\frac{z}{\frac{t_1}{x \cdot y}}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-127}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{\sqrt{a \cdot \left(-t\right)}}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+118}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{t_1}\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
 (let* ((t_1 (sqrt (- (* z z) (* a t)))))
   (if (<= z -1.25e+104)
     (* x (- y))
     (if (<= z 9e-307)
       (/ z (/ t_1 (* x y)))
       (if (<= z 1.1e-127)
         (/ (* x (* z y)) (sqrt (* a (- t))))
         (if (<= z 2e+118) (* y (* x (/ z t_1))) (* x y)))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double t_1 = sqrt(((z * z) - (a * t)));
	double tmp;
	if (z <= -1.25e+104) {
		tmp = x * -y;
	} else if (z <= 9e-307) {
		tmp = z / (t_1 / (x * y));
	} else if (z <= 1.1e-127) {
		tmp = (x * (z * y)) / sqrt((a * -t));
	} else if (z <= 2e+118) {
		tmp = y * (x * (z / t_1));
	} 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) :: t_1
    real(8) :: tmp
    t_1 = sqrt(((z * z) - (a * t)))
    if (z <= (-1.25d+104)) then
        tmp = x * -y
    else if (z <= 9d-307) then
        tmp = z / (t_1 / (x * y))
    else if (z <= 1.1d-127) then
        tmp = (x * (z * y)) / sqrt((a * -t))
    else if (z <= 2d+118) then
        tmp = y * (x * (z / t_1))
    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 t_1 = Math.sqrt(((z * z) - (a * t)));
	double tmp;
	if (z <= -1.25e+104) {
		tmp = x * -y;
	} else if (z <= 9e-307) {
		tmp = z / (t_1 / (x * y));
	} else if (z <= 1.1e-127) {
		tmp = (x * (z * y)) / Math.sqrt((a * -t));
	} else if (z <= 2e+118) {
		tmp = y * (x * (z / t_1));
	} else {
		tmp = x * y;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	t_1 = math.sqrt(((z * z) - (a * t)))
	tmp = 0
	if z <= -1.25e+104:
		tmp = x * -y
	elif z <= 9e-307:
		tmp = z / (t_1 / (x * y))
	elif z <= 1.1e-127:
		tmp = (x * (z * y)) / math.sqrt((a * -t))
	elif z <= 2e+118:
		tmp = y * (x * (z / t_1))
	else:
		tmp = x * y
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	t_1 = sqrt(Float64(Float64(z * z) - Float64(a * t)))
	tmp = 0.0
	if (z <= -1.25e+104)
		tmp = Float64(x * Float64(-y));
	elseif (z <= 9e-307)
		tmp = Float64(z / Float64(t_1 / Float64(x * y)));
	elseif (z <= 1.1e-127)
		tmp = Float64(Float64(x * Float64(z * y)) / sqrt(Float64(a * Float64(-t))));
	elseif (z <= 2e+118)
		tmp = Float64(y * Float64(x * Float64(z / t_1)));
	else
		tmp = Float64(x * y);
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	t_1 = sqrt(((z * z) - (a * t)));
	tmp = 0.0;
	if (z <= -1.25e+104)
		tmp = x * -y;
	elseif (z <= 9e-307)
		tmp = z / (t_1 / (x * y));
	elseif (z <= 1.1e-127)
		tmp = (x * (z * y)) / sqrt((a * -t));
	elseif (z <= 2e+118)
		tmp = y * (x * (z / t_1));
	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_] := Block[{t$95$1 = N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[z, -1.25e+104], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 9e-307], N[(z / N[(t$95$1 / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e-127], N[(N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(a * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+118], N[(y * N[(x * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot z - a \cdot t}\\
\mathbf{if}\;z \leq -1.25 \cdot 10^{+104}:\\
\;\;\;\;x \cdot \left(-y\right)\\

\mathbf{elif}\;z \leq 9 \cdot 10^{-307}:\\
\;\;\;\;\frac{z}{\frac{t_1}{x \cdot y}}\\

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

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

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


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

    1. Initial program 32.1%

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

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

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

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

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

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

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

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

    if -1.2499999999999999e104 < z < 8.99999999999999978e-307

    1. Initial program 82.0%

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

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

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

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

    if 8.99999999999999978e-307 < z < 1.1000000000000001e-127

    1. Initial program 69.9%

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

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

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

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

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

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

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

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

    if 1.1000000000000001e-127 < z < 1.99999999999999993e118

    1. Initial program 94.3%

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

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

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

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

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

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

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

    if 1.99999999999999993e118 < z

    1. Initial program 17.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{+104}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-307}:\\ \;\;\;\;\frac{z}{\frac{\sqrt{z \cdot z - a \cdot t}}{x \cdot y}}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-127}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{\sqrt{a \cdot \left(-t\right)}}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+118}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{\sqrt{z \cdot z - a \cdot t}}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 6: 91.2% accurate, 0.9× speedup?

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

\mathbf{elif}\;z \leq 2.9 \cdot 10^{-305}:\\
\;\;\;\;\frac{z}{\frac{t_1}{x \cdot y}}\\

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

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

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


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

    1. Initial program 32.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.99999999999999937e104 < z < 2.89999999999999988e-305

    1. Initial program 82.0%

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

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

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

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

    if 2.89999999999999988e-305 < z < 1.1000000000000001e-127

    1. Initial program 69.9%

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

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

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

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

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

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

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

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

    if 1.1000000000000001e-127 < z < 9.99999999999999978e122

    1. Initial program 94.3%

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

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

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

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

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

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

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

    if 9.99999999999999978e122 < z

    1. Initial program 17.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+104}:\\ \;\;\;\;\frac{x \cdot y}{\mathsf{fma}\left(0.5, \frac{a}{\frac{z \cdot z}{t}}, -1\right)}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-305}:\\ \;\;\;\;\frac{z}{\frac{\sqrt{z \cdot z - a \cdot t}}{x \cdot y}}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-127}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{\sqrt{a \cdot \left(-t\right)}}\\ \mathbf{elif}\;z \leq 10^{+123}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{\sqrt{z \cdot z - a \cdot t}}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 7: 91.7% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 25.5%

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

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

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

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

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

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

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

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

    if -4e129 < z < 1.99999999999999993e118

    1. Initial program 84.2%

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

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

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

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

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

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

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

    if 1.99999999999999993e118 < z

    1. Initial program 17.4%

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

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

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

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

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

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

Alternative 8: 83.4% accurate, 1.0× speedup?

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

\mathbf{elif}\;z \leq 3.35 \cdot 10^{-304}:\\
\;\;\;\;\frac{z}{\frac{t_1}{x \cdot y}}\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{-123}:\\
\;\;\;\;x \cdot \frac{z \cdot y}{t_1}\\

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


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

    1. Initial program 50.7%

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

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

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

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

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

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

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

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

    if -1.3e-28 < z < 3.3500000000000002e-304

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

    if 3.3500000000000002e-304 < z < 2.7999999999999999e-123

    1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

    if 2.7999999999999999e-123 < z

    1. Initial program 59.0%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{-28}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 3.35 \cdot 10^{-304}:\\ \;\;\;\;\frac{z}{\frac{\sqrt{a \cdot \left(-t\right)}}{x \cdot y}}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-123}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{\sqrt{a \cdot \left(-t\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z + \frac{a}{\frac{z}{t}} \cdot -0.5}{z}}\\ \end{array} \]

Alternative 9: 83.6% accurate, 1.0× speedup?

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

\mathbf{elif}\;z \leq 3.3 \cdot 10^{-302}:\\
\;\;\;\;\frac{z}{\frac{t_1}{x \cdot y}}\\

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

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


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

    1. Initial program 50.7%

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

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

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

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

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

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

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

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

    if -6.99999999999999971e-31 < z < 3.3000000000000002e-302

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

    if 3.3000000000000002e-302 < z < 1.1e-122

    1. Initial program 69.9%

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

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

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

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

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

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

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

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

    if 1.1e-122 < z

    1. Initial program 59.0%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{-31}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-302}:\\ \;\;\;\;\frac{z}{\frac{\sqrt{a \cdot \left(-t\right)}}{x \cdot y}}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-122}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{\sqrt{a \cdot \left(-t\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{z + \frac{a}{\frac{z}{t}} \cdot -0.5}{z}}\\ \end{array} \]

Alternative 10: 83.2% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 50.7%

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

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

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

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

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

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

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

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

    if -7.49999999999999975e-31 < z < 6.39999999999999957e-123

    1. Initial program 74.2%

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

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

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

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

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

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

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

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

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

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

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

    if 6.39999999999999957e-123 < z

    1. Initial program 59.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 83.2% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 50.7%

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

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

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

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

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

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

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

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

    if -1.02000000000000002e-27 < z < 2.90000000000000004e-123

    1. Initial program 74.2%

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

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

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

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

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

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

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

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

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

    if 2.90000000000000004e-123 < z

    1. Initial program 59.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 78.1% accurate, 6.6× speedup?

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

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


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

    1. Initial program 56.7%

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

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

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

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

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

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

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

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

    if -6.7000000000000001e-158 < z

    1. Initial program 63.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 78.3% accurate, 6.6× speedup?

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

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


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

    1. Initial program 56.7%

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

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

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

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

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

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

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

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

    if -1.13999999999999996e-157 < z

    1. Initial program 63.4%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 76.2% accurate, 10.2× speedup?

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

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

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


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

    1. Initial program 56.7%

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

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

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

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

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

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

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

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

    if -2.8999999999999998e-158 < z < 3.60000000000000007e-68

    1. Initial program 74.4%

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

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

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

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

    if 3.60000000000000007e-68 < z

    1. Initial program 55.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{-158}:\\ \;\;\;\;x \cdot \left(-y\right)\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-68}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 15: 73.4% accurate, 18.6× speedup?

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

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


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

    1. Initial program 59.5%

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

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

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

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

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

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

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

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

    if -1.999999999999994e-310 < z

    1. Initial program 61.9%

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

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

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

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

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

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

Alternative 16: 43.8% accurate, 37.7× speedup?

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

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

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

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

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

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

    \[\leadsto x \cdot y \]

Developer target: 89.5% 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 2023268 
(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)))))