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

Percentage Accurate: 61.0% → 90.7%
Time: 18.6s
Alternatives: 19
Speedup: 18.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 61.0% accurate, 1.0× speedup?

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

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

Alternative 1: 90.7% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 19.0%

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

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

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

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

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

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

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

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

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

    if -1.16000000000000001e154 < z < 4.19999999999999972e54

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

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

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

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

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

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

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

    if 4.19999999999999972e54 < z

    1. Initial program 53.2%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative97.1%

        \[\leadsto \color{blue}{y \cdot x} \]
    6. Simplified97.1%

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

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

Alternative 2: 80.9% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_1 := y \cdot \left(x \cdot \frac{z}{0.5 \cdot \frac{a}{\frac{z}{t}} - z}\right)\\ t_2 := \sqrt{a \cdot \left(-t\right)}\\ t_3 := \frac{z \cdot x}{\frac{t_2}{y}}\\ \mathbf{if}\;z \leq -1.15 \cdot 10^{-24}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.52 \cdot 10^{-75}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-138}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.15 \cdot 10^{-279}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{t_2}\right)\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-57}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{z + -0.5 \cdot \frac{t \cdot a}{z}}\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 (* y (* x (/ z (- (* 0.5 (/ a (/ z t))) z)))))
        (t_2 (sqrt (* a (- t))))
        (t_3 (/ (* z x) (/ t_2 y))))
   (if (<= z -1.15e-24)
     t_1
     (if (<= z -1.52e-75)
       t_3
       (if (<= z -4.5e-138)
         t_1
         (if (<= z 3.15e-279)
           (* y (* x (/ z t_2)))
           (if (<= z 1.1e-57)
             t_3
             (* y (* x (/ z (+ z (* -0.5 (/ (* t a) z)))))))))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (x * (z / ((0.5 * (a / (z / t))) - z)));
	double t_2 = sqrt((a * -t));
	double t_3 = (z * x) / (t_2 / y);
	double tmp;
	if (z <= -1.15e-24) {
		tmp = t_1;
	} else if (z <= -1.52e-75) {
		tmp = t_3;
	} else if (z <= -4.5e-138) {
		tmp = t_1;
	} else if (z <= 3.15e-279) {
		tmp = y * (x * (z / t_2));
	} else if (z <= 1.1e-57) {
		tmp = t_3;
	} else {
		tmp = y * (x * (z / (z + (-0.5 * ((t * a) / 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) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = y * (x * (z / ((0.5d0 * (a / (z / t))) - z)))
    t_2 = sqrt((a * -t))
    t_3 = (z * x) / (t_2 / y)
    if (z <= (-1.15d-24)) then
        tmp = t_1
    else if (z <= (-1.52d-75)) then
        tmp = t_3
    else if (z <= (-4.5d-138)) then
        tmp = t_1
    else if (z <= 3.15d-279) then
        tmp = y * (x * (z / t_2))
    else if (z <= 1.1d-57) then
        tmp = t_3
    else
        tmp = y * (x * (z / (z + ((-0.5d0) * ((t * a) / 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 = y * (x * (z / ((0.5 * (a / (z / t))) - z)));
	double t_2 = Math.sqrt((a * -t));
	double t_3 = (z * x) / (t_2 / y);
	double tmp;
	if (z <= -1.15e-24) {
		tmp = t_1;
	} else if (z <= -1.52e-75) {
		tmp = t_3;
	} else if (z <= -4.5e-138) {
		tmp = t_1;
	} else if (z <= 3.15e-279) {
		tmp = y * (x * (z / t_2));
	} else if (z <= 1.1e-57) {
		tmp = t_3;
	} else {
		tmp = y * (x * (z / (z + (-0.5 * ((t * a) / z)))));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	t_1 = y * (x * (z / ((0.5 * (a / (z / t))) - z)))
	t_2 = math.sqrt((a * -t))
	t_3 = (z * x) / (t_2 / y)
	tmp = 0
	if z <= -1.15e-24:
		tmp = t_1
	elif z <= -1.52e-75:
		tmp = t_3
	elif z <= -4.5e-138:
		tmp = t_1
	elif z <= 3.15e-279:
		tmp = y * (x * (z / t_2))
	elif z <= 1.1e-57:
		tmp = t_3
	else:
		tmp = y * (x * (z / (z + (-0.5 * ((t * a) / z)))))
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(x * Float64(z / Float64(Float64(0.5 * Float64(a / Float64(z / t))) - z))))
	t_2 = sqrt(Float64(a * Float64(-t)))
	t_3 = Float64(Float64(z * x) / Float64(t_2 / y))
	tmp = 0.0
	if (z <= -1.15e-24)
		tmp = t_1;
	elseif (z <= -1.52e-75)
		tmp = t_3;
	elseif (z <= -4.5e-138)
		tmp = t_1;
	elseif (z <= 3.15e-279)
		tmp = Float64(y * Float64(x * Float64(z / t_2)));
	elseif (z <= 1.1e-57)
		tmp = t_3;
	else
		tmp = Float64(y * Float64(x * Float64(z / Float64(z + Float64(-0.5 * Float64(Float64(t * a) / z))))));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (x * (z / ((0.5 * (a / (z / t))) - z)));
	t_2 = sqrt((a * -t));
	t_3 = (z * x) / (t_2 / y);
	tmp = 0.0;
	if (z <= -1.15e-24)
		tmp = t_1;
	elseif (z <= -1.52e-75)
		tmp = t_3;
	elseif (z <= -4.5e-138)
		tmp = t_1;
	elseif (z <= 3.15e-279)
		tmp = y * (x * (z / t_2));
	elseif (z <= 1.1e-57)
		tmp = t_3;
	else
		tmp = y * (x * (z / (z + (-0.5 * ((t * a) / 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[(y * N[(x * N[(z / N[(N[(0.5 * N[(a / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(a * (-t)), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(z * x), $MachinePrecision] / N[(t$95$2 / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.15e-24], t$95$1, If[LessEqual[z, -1.52e-75], t$95$3, If[LessEqual[z, -4.5e-138], t$95$1, If[LessEqual[z, 3.15e-279], N[(y * N[(x * N[(z / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e-57], t$95$3, N[(y * N[(x * N[(z / N[(z + N[(-0.5 * N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := y \cdot \left(x \cdot \frac{z}{0.5 \cdot \frac{a}{\frac{z}{t}} - z}\right)\\
t_2 := \sqrt{a \cdot \left(-t\right)}\\
t_3 := \frac{z \cdot x}{\frac{t_2}{y}}\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{-24}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.52 \cdot 10^{-75}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;z \leq -4.5 \cdot 10^{-138}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.1 \cdot 10^{-57}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.1500000000000001e-24 or -1.5200000000000001e-75 < z < -4.50000000000000008e-138

    1. Initial program 52.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.1500000000000001e-24 < z < -1.5200000000000001e-75 or 3.1499999999999999e-279 < z < 1.09999999999999999e-57

    1. Initial program 82.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.50000000000000008e-138 < z < 3.1499999999999999e-279

    1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.09999999999999999e-57 < z

    1. Initial program 63.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{-24}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{0.5 \cdot \frac{a}{\frac{z}{t}} - z}\right)\\ \mathbf{elif}\;z \leq -1.52 \cdot 10^{-75}:\\ \;\;\;\;\frac{z \cdot x}{\frac{\sqrt{a \cdot \left(-t\right)}}{y}}\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-138}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{0.5 \cdot \frac{a}{\frac{z}{t}} - z}\right)\\ \mathbf{elif}\;z \leq 3.15 \cdot 10^{-279}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{\sqrt{a \cdot \left(-t\right)}}\right)\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-57}:\\ \;\;\;\;\frac{z \cdot x}{\frac{\sqrt{a \cdot \left(-t\right)}}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{z + -0.5 \cdot \frac{t \cdot a}{z}}\right)\\ \end{array} \]

Alternative 3: 81.0% accurate, 1.0× speedup?

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

\mathbf{elif}\;z \leq -1.15 \cdot 10^{-75}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -2.8 \cdot 10^{-138}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 1.08 \cdot 10^{-57}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.1500000000000001e-24 or -1.15e-75 < z < -2.80000000000000001e-138

    1. Initial program 52.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.1500000000000001e-24 < z < -1.15e-75 or -2.80000000000000001e-138 < z < 1.08e-57

    1. Initial program 83.8%

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{z}{\frac{\sqrt{\color{blue}{-a \cdot t}}}{y}} \]
      2. distribute-rgt-neg-out79.8%

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

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

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

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

    if 1.08e-57 < z

    1. Initial program 63.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{-24}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{0.5 \cdot \frac{a}{\frac{z}{t}} - z}\right)\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-75}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{z}{\sqrt{a \cdot \left(-t\right)}}\right)\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-138}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{0.5 \cdot \frac{a}{\frac{z}{t}} - z}\right)\\ \mathbf{elif}\;z \leq 1.08 \cdot 10^{-57}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{z}{\sqrt{a \cdot \left(-t\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{z + -0.5 \cdot \frac{t \cdot a}{z}}\right)\\ \end{array} \]

Alternative 4: 81.1% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_1 := y \cdot \left(x \cdot \frac{z}{0.5 \cdot \frac{a}{\frac{z}{t}} - z}\right)\\ t_2 := \sqrt{a \cdot \left(-t\right)}\\ \mathbf{if}\;z \leq -1.75 \cdot 10^{-24}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -5.8 \cdot 10^{-76}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{z}{t_2}\right)\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-138}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-57}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{t_2}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{z + -0.5 \cdot \frac{t \cdot a}{z}}\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 (* y (* x (/ z (- (* 0.5 (/ a (/ z t))) z)))))
        (t_2 (sqrt (* a (- t)))))
   (if (<= z -1.75e-24)
     t_1
     (if (<= z -5.8e-76)
       (* x (* y (/ z t_2)))
       (if (<= z -1.5e-138)
         t_1
         (if (<= z 7.5e-57)
           (* x (/ (* z y) t_2))
           (* y (* x (/ z (+ z (* -0.5 (/ (* t a) z))))))))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (x * (z / ((0.5 * (a / (z / t))) - z)));
	double t_2 = sqrt((a * -t));
	double tmp;
	if (z <= -1.75e-24) {
		tmp = t_1;
	} else if (z <= -5.8e-76) {
		tmp = x * (y * (z / t_2));
	} else if (z <= -1.5e-138) {
		tmp = t_1;
	} else if (z <= 7.5e-57) {
		tmp = x * ((z * y) / t_2);
	} else {
		tmp = y * (x * (z / (z + (-0.5 * ((t * a) / 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) :: t_2
    real(8) :: tmp
    t_1 = y * (x * (z / ((0.5d0 * (a / (z / t))) - z)))
    t_2 = sqrt((a * -t))
    if (z <= (-1.75d-24)) then
        tmp = t_1
    else if (z <= (-5.8d-76)) then
        tmp = x * (y * (z / t_2))
    else if (z <= (-1.5d-138)) then
        tmp = t_1
    else if (z <= 7.5d-57) then
        tmp = x * ((z * y) / t_2)
    else
        tmp = y * (x * (z / (z + ((-0.5d0) * ((t * a) / 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 = y * (x * (z / ((0.5 * (a / (z / t))) - z)));
	double t_2 = Math.sqrt((a * -t));
	double tmp;
	if (z <= -1.75e-24) {
		tmp = t_1;
	} else if (z <= -5.8e-76) {
		tmp = x * (y * (z / t_2));
	} else if (z <= -1.5e-138) {
		tmp = t_1;
	} else if (z <= 7.5e-57) {
		tmp = x * ((z * y) / t_2);
	} else {
		tmp = y * (x * (z / (z + (-0.5 * ((t * a) / z)))));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	t_1 = y * (x * (z / ((0.5 * (a / (z / t))) - z)))
	t_2 = math.sqrt((a * -t))
	tmp = 0
	if z <= -1.75e-24:
		tmp = t_1
	elif z <= -5.8e-76:
		tmp = x * (y * (z / t_2))
	elif z <= -1.5e-138:
		tmp = t_1
	elif z <= 7.5e-57:
		tmp = x * ((z * y) / t_2)
	else:
		tmp = y * (x * (z / (z + (-0.5 * ((t * a) / z)))))
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(x * Float64(z / Float64(Float64(0.5 * Float64(a / Float64(z / t))) - z))))
	t_2 = sqrt(Float64(a * Float64(-t)))
	tmp = 0.0
	if (z <= -1.75e-24)
		tmp = t_1;
	elseif (z <= -5.8e-76)
		tmp = Float64(x * Float64(y * Float64(z / t_2)));
	elseif (z <= -1.5e-138)
		tmp = t_1;
	elseif (z <= 7.5e-57)
		tmp = Float64(x * Float64(Float64(z * y) / t_2));
	else
		tmp = Float64(y * Float64(x * Float64(z / Float64(z + Float64(-0.5 * Float64(Float64(t * a) / z))))));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (x * (z / ((0.5 * (a / (z / t))) - z)));
	t_2 = sqrt((a * -t));
	tmp = 0.0;
	if (z <= -1.75e-24)
		tmp = t_1;
	elseif (z <= -5.8e-76)
		tmp = x * (y * (z / t_2));
	elseif (z <= -1.5e-138)
		tmp = t_1;
	elseif (z <= 7.5e-57)
		tmp = x * ((z * y) / t_2);
	else
		tmp = y * (x * (z / (z + (-0.5 * ((t * a) / 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[(y * N[(x * N[(z / N[(N[(0.5 * N[(a / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(a * (-t)), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[z, -1.75e-24], t$95$1, If[LessEqual[z, -5.8e-76], N[(x * N[(y * N[(z / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.5e-138], t$95$1, If[LessEqual[z, 7.5e-57], N[(x * N[(N[(z * y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], N[(y * N[(x * N[(z / N[(z + N[(-0.5 * N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := y \cdot \left(x \cdot \frac{z}{0.5 \cdot \frac{a}{\frac{z}{t}} - z}\right)\\
t_2 := \sqrt{a \cdot \left(-t\right)}\\
\mathbf{if}\;z \leq -1.75 \cdot 10^{-24}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq -1.5 \cdot 10^{-138}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.7499999999999998e-24 or -5.8000000000000003e-76 < z < -1.5e-138

    1. Initial program 52.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7499999999999998e-24 < z < -5.8000000000000003e-76

    1. Initial program 89.3%

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{z}{\frac{\sqrt{\color{blue}{-a \cdot t}}}{y}} \]
      2. distribute-rgt-neg-out82.4%

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

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

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

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

    if -1.5e-138 < z < 7.49999999999999973e-57

    1. Initial program 83.0%

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

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

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

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

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

        \[\leadsto x \cdot \frac{z}{\frac{\sqrt{\color{blue}{-a \cdot t}}}{y}} \]
      2. distribute-rgt-neg-out79.4%

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

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

    if 7.49999999999999973e-57 < z

    1. Initial program 63.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{-24}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{0.5 \cdot \frac{a}{\frac{z}{t}} - z}\right)\\ \mathbf{elif}\;z \leq -5.8 \cdot 10^{-76}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{z}{\sqrt{a \cdot \left(-t\right)}}\right)\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-138}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{0.5 \cdot \frac{a}{\frac{z}{t}} - z}\right)\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-57}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{\sqrt{a \cdot \left(-t\right)}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{z + -0.5 \cdot \frac{t \cdot a}{z}}\right)\\ \end{array} \]

Alternative 5: 80.9% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_1 := y \cdot \left(x \cdot \frac{z}{0.5 \cdot \frac{a}{\frac{z}{t}} - z}\right)\\ t_2 := \frac{z}{\sqrt{a \cdot \left(-t\right)}}\\ \mathbf{if}\;z \leq -1.58 \cdot 10^{-24}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-76}:\\ \;\;\;\;x \cdot \left(y \cdot t_2\right)\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{-138}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-58}:\\ \;\;\;\;y \cdot \left(x \cdot t_2\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{z + -0.5 \cdot \frac{t \cdot a}{z}}\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 (* y (* x (/ z (- (* 0.5 (/ a (/ z t))) z)))))
        (t_2 (/ z (sqrt (* a (- t))))))
   (if (<= z -1.58e-24)
     t_1
     (if (<= z -3.8e-76)
       (* x (* y t_2))
       (if (<= z -3.7e-138)
         t_1
         (if (<= z 2.4e-58)
           (* y (* x t_2))
           (* y (* x (/ z (+ z (* -0.5 (/ (* t a) z))))))))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (x * (z / ((0.5 * (a / (z / t))) - z)));
	double t_2 = z / sqrt((a * -t));
	double tmp;
	if (z <= -1.58e-24) {
		tmp = t_1;
	} else if (z <= -3.8e-76) {
		tmp = x * (y * t_2);
	} else if (z <= -3.7e-138) {
		tmp = t_1;
	} else if (z <= 2.4e-58) {
		tmp = y * (x * t_2);
	} else {
		tmp = y * (x * (z / (z + (-0.5 * ((t * a) / 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) :: t_2
    real(8) :: tmp
    t_1 = y * (x * (z / ((0.5d0 * (a / (z / t))) - z)))
    t_2 = z / sqrt((a * -t))
    if (z <= (-1.58d-24)) then
        tmp = t_1
    else if (z <= (-3.8d-76)) then
        tmp = x * (y * t_2)
    else if (z <= (-3.7d-138)) then
        tmp = t_1
    else if (z <= 2.4d-58) then
        tmp = y * (x * t_2)
    else
        tmp = y * (x * (z / (z + ((-0.5d0) * ((t * a) / 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 = y * (x * (z / ((0.5 * (a / (z / t))) - z)));
	double t_2 = z / Math.sqrt((a * -t));
	double tmp;
	if (z <= -1.58e-24) {
		tmp = t_1;
	} else if (z <= -3.8e-76) {
		tmp = x * (y * t_2);
	} else if (z <= -3.7e-138) {
		tmp = t_1;
	} else if (z <= 2.4e-58) {
		tmp = y * (x * t_2);
	} else {
		tmp = y * (x * (z / (z + (-0.5 * ((t * a) / z)))));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	t_1 = y * (x * (z / ((0.5 * (a / (z / t))) - z)))
	t_2 = z / math.sqrt((a * -t))
	tmp = 0
	if z <= -1.58e-24:
		tmp = t_1
	elif z <= -3.8e-76:
		tmp = x * (y * t_2)
	elif z <= -3.7e-138:
		tmp = t_1
	elif z <= 2.4e-58:
		tmp = y * (x * t_2)
	else:
		tmp = y * (x * (z / (z + (-0.5 * ((t * a) / z)))))
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(x * Float64(z / Float64(Float64(0.5 * Float64(a / Float64(z / t))) - z))))
	t_2 = Float64(z / sqrt(Float64(a * Float64(-t))))
	tmp = 0.0
	if (z <= -1.58e-24)
		tmp = t_1;
	elseif (z <= -3.8e-76)
		tmp = Float64(x * Float64(y * t_2));
	elseif (z <= -3.7e-138)
		tmp = t_1;
	elseif (z <= 2.4e-58)
		tmp = Float64(y * Float64(x * t_2));
	else
		tmp = Float64(y * Float64(x * Float64(z / Float64(z + Float64(-0.5 * Float64(Float64(t * a) / z))))));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (x * (z / ((0.5 * (a / (z / t))) - z)));
	t_2 = z / sqrt((a * -t));
	tmp = 0.0;
	if (z <= -1.58e-24)
		tmp = t_1;
	elseif (z <= -3.8e-76)
		tmp = x * (y * t_2);
	elseif (z <= -3.7e-138)
		tmp = t_1;
	elseif (z <= 2.4e-58)
		tmp = y * (x * t_2);
	else
		tmp = y * (x * (z / (z + (-0.5 * ((t * a) / 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[(y * N[(x * N[(z / N[(N[(0.5 * N[(a / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z / N[Sqrt[N[(a * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.58e-24], t$95$1, If[LessEqual[z, -3.8e-76], N[(x * N[(y * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.7e-138], t$95$1, If[LessEqual[z, 2.4e-58], N[(y * N[(x * t$95$2), $MachinePrecision]), $MachinePrecision], N[(y * N[(x * N[(z / N[(z + N[(-0.5 * N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := y \cdot \left(x \cdot \frac{z}{0.5 \cdot \frac{a}{\frac{z}{t}} - z}\right)\\
t_2 := \frac{z}{\sqrt{a \cdot \left(-t\right)}}\\
\mathbf{if}\;z \leq -1.58 \cdot 10^{-24}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq -3.7 \cdot 10^{-138}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.5799999999999999e-24 or -3.8000000000000002e-76 < z < -3.69999999999999991e-138

    1. Initial program 52.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.5799999999999999e-24 < z < -3.8000000000000002e-76

    1. Initial program 89.3%

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{z}{\frac{\sqrt{\color{blue}{-a \cdot t}}}{y}} \]
      2. distribute-rgt-neg-out82.4%

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

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

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

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

    if -3.69999999999999991e-138 < z < 2.4000000000000001e-58

    1. Initial program 83.0%

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{z}{\frac{\sqrt{\color{blue}{-a \cdot t}}}{y}} \]
      2. distribute-rgt-neg-out79.4%

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

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

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

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

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

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

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

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

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

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

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

    if 2.4000000000000001e-58 < z

    1. Initial program 63.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.58 \cdot 10^{-24}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{0.5 \cdot \frac{a}{\frac{z}{t}} - z}\right)\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-76}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{z}{\sqrt{a \cdot \left(-t\right)}}\right)\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{-138}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{0.5 \cdot \frac{a}{\frac{z}{t}} - z}\right)\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-58}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{\sqrt{a \cdot \left(-t\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{z + -0.5 \cdot \frac{t \cdot a}{z}}\right)\\ \end{array} \]

Alternative 6: 81.1% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_1 := y \cdot \left(x \cdot \frac{z}{0.5 \cdot \frac{a}{\frac{z}{t}} - z}\right)\\ t_2 := \sqrt{a \cdot \left(-t\right)}\\ \mathbf{if}\;z \leq -1.15 \cdot 10^{-24}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{-76}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{z}{t_2}\right)\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-140}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-58}:\\ \;\;\;\;z \cdot \frac{x \cdot y}{t_2}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{z + -0.5 \cdot \frac{t \cdot a}{z}}\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 (* y (* x (/ z (- (* 0.5 (/ a (/ z t))) z)))))
        (t_2 (sqrt (* a (- t)))))
   (if (<= z -1.15e-24)
     t_1
     (if (<= z -1.35e-76)
       (* x (* y (/ z t_2)))
       (if (<= z -1.65e-140)
         t_1
         (if (<= z 3.7e-58)
           (* z (/ (* x y) t_2))
           (* y (* x (/ z (+ z (* -0.5 (/ (* t a) z))))))))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (x * (z / ((0.5 * (a / (z / t))) - z)));
	double t_2 = sqrt((a * -t));
	double tmp;
	if (z <= -1.15e-24) {
		tmp = t_1;
	} else if (z <= -1.35e-76) {
		tmp = x * (y * (z / t_2));
	} else if (z <= -1.65e-140) {
		tmp = t_1;
	} else if (z <= 3.7e-58) {
		tmp = z * ((x * y) / t_2);
	} else {
		tmp = y * (x * (z / (z + (-0.5 * ((t * a) / 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) :: t_2
    real(8) :: tmp
    t_1 = y * (x * (z / ((0.5d0 * (a / (z / t))) - z)))
    t_2 = sqrt((a * -t))
    if (z <= (-1.15d-24)) then
        tmp = t_1
    else if (z <= (-1.35d-76)) then
        tmp = x * (y * (z / t_2))
    else if (z <= (-1.65d-140)) then
        tmp = t_1
    else if (z <= 3.7d-58) then
        tmp = z * ((x * y) / t_2)
    else
        tmp = y * (x * (z / (z + ((-0.5d0) * ((t * a) / 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 = y * (x * (z / ((0.5 * (a / (z / t))) - z)));
	double t_2 = Math.sqrt((a * -t));
	double tmp;
	if (z <= -1.15e-24) {
		tmp = t_1;
	} else if (z <= -1.35e-76) {
		tmp = x * (y * (z / t_2));
	} else if (z <= -1.65e-140) {
		tmp = t_1;
	} else if (z <= 3.7e-58) {
		tmp = z * ((x * y) / t_2);
	} else {
		tmp = y * (x * (z / (z + (-0.5 * ((t * a) / z)))));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	t_1 = y * (x * (z / ((0.5 * (a / (z / t))) - z)))
	t_2 = math.sqrt((a * -t))
	tmp = 0
	if z <= -1.15e-24:
		tmp = t_1
	elif z <= -1.35e-76:
		tmp = x * (y * (z / t_2))
	elif z <= -1.65e-140:
		tmp = t_1
	elif z <= 3.7e-58:
		tmp = z * ((x * y) / t_2)
	else:
		tmp = y * (x * (z / (z + (-0.5 * ((t * a) / z)))))
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(x * Float64(z / Float64(Float64(0.5 * Float64(a / Float64(z / t))) - z))))
	t_2 = sqrt(Float64(a * Float64(-t)))
	tmp = 0.0
	if (z <= -1.15e-24)
		tmp = t_1;
	elseif (z <= -1.35e-76)
		tmp = Float64(x * Float64(y * Float64(z / t_2)));
	elseif (z <= -1.65e-140)
		tmp = t_1;
	elseif (z <= 3.7e-58)
		tmp = Float64(z * Float64(Float64(x * y) / t_2));
	else
		tmp = Float64(y * Float64(x * Float64(z / Float64(z + Float64(-0.5 * Float64(Float64(t * a) / z))))));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (x * (z / ((0.5 * (a / (z / t))) - z)));
	t_2 = sqrt((a * -t));
	tmp = 0.0;
	if (z <= -1.15e-24)
		tmp = t_1;
	elseif (z <= -1.35e-76)
		tmp = x * (y * (z / t_2));
	elseif (z <= -1.65e-140)
		tmp = t_1;
	elseif (z <= 3.7e-58)
		tmp = z * ((x * y) / t_2);
	else
		tmp = y * (x * (z / (z + (-0.5 * ((t * a) / 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[(y * N[(x * N[(z / N[(N[(0.5 * N[(a / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(a * (-t)), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[z, -1.15e-24], t$95$1, If[LessEqual[z, -1.35e-76], N[(x * N[(y * N[(z / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.65e-140], t$95$1, If[LessEqual[z, 3.7e-58], N[(z * N[(N[(x * y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], N[(y * N[(x * N[(z / N[(z + N[(-0.5 * N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := y \cdot \left(x \cdot \frac{z}{0.5 \cdot \frac{a}{\frac{z}{t}} - z}\right)\\
t_2 := \sqrt{a \cdot \left(-t\right)}\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{-24}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq -1.65 \cdot 10^{-140}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.1500000000000001e-24 or -1.35e-76 < z < -1.64999999999999994e-140

    1. Initial program 52.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.1500000000000001e-24 < z < -1.35e-76

    1. Initial program 89.3%

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{z}{\frac{\sqrt{\color{blue}{-a \cdot t}}}{y}} \]
      2. distribute-rgt-neg-out82.4%

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

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

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

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

    if -1.64999999999999994e-140 < z < 3.7000000000000003e-58

    1. Initial program 82.8%

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

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

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

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

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

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

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

    if 3.7000000000000003e-58 < z

    1. Initial program 63.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{-24}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{0.5 \cdot \frac{a}{\frac{z}{t}} - z}\right)\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{-76}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{z}{\sqrt{a \cdot \left(-t\right)}}\right)\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-140}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{0.5 \cdot \frac{a}{\frac{z}{t}} - z}\right)\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-58}:\\ \;\;\;\;z \cdot \frac{x \cdot y}{\sqrt{a \cdot \left(-t\right)}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{z + -0.5 \cdot \frac{t \cdot a}{z}}\right)\\ \end{array} \]

Alternative 7: 89.5% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 32.3%

      \[\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/31.9%

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

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

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

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

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

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

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

    if -2e115 < z < 4.0000000000000003e54

    1. Initial program 85.4%

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

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

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

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

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

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

    if 4.0000000000000003e54 < z

    1. Initial program 53.2%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative97.1%

        \[\leadsto \color{blue}{y \cdot x} \]
    6. Simplified97.1%

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

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

Alternative 8: 89.7% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 37.5%

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

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

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

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

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

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

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

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

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

    if -1.9000000000000001e67 < z < 3.0999999999999999e54

    1. Initial program 84.8%

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

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

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

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

    if 3.0999999999999999e54 < z

    1. Initial program 53.2%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative97.1%

        \[\leadsto \color{blue}{y \cdot x} \]
    6. Simplified97.1%

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

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

Alternative 9: 76.6% accurate, 5.9× speedup?

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

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

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


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

    1. Initial program 57.9%

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

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

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

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

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

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

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

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

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

    if -2.30000000000000016e-183 < z < 0.047

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

    if 0.047 < z

    1. Initial program 57.4%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative92.6%

        \[\leadsto \color{blue}{y \cdot x} \]
    6. Simplified92.6%

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

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

Alternative 10: 76.6% accurate, 5.9× speedup?

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

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

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


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

    1. Initial program 57.9%

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

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

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

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

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

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

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

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

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

    if -2.5999999999999999e-183 < z < 0.0519999999999999976

    1. Initial program 86.4%

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

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

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

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

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

    if 0.0519999999999999976 < z

    1. Initial program 57.4%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative92.6%

        \[\leadsto \color{blue}{y \cdot x} \]
    6. Simplified92.6%

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

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

Alternative 11: 75.1% accurate, 6.6× speedup?

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

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

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


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

    1. Initial program 57.9%

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

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

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

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

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

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

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

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

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

    if -3.6000000000000001e-183 < z < 2.40000000000000003e-121

    1. Initial program 84.4%

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

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

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

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

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

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

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

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

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

    if 2.40000000000000003e-121 < z

    1. Initial program 64.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative84.4%

        \[\leadsto \color{blue}{y \cdot x} \]
    6. Simplified84.4%

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

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

Alternative 12: 75.2% accurate, 6.6× speedup?

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

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

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


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

    1. Initial program 57.9%

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

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

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

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

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

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

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

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

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

    if -3.6999999999999999e-183 < z < 2.4999999999999999e-122

    1. Initial program 84.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -2 \cdot \frac{x}{\frac{t}{\color{blue}{\frac{y}{\frac{a}{{z}^{2}}}}}} \]
      9. unpow255.5%

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

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

    if 2.4999999999999999e-122 < z

    1. Initial program 64.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative84.4%

        \[\leadsto \color{blue}{y \cdot x} \]
    6. Simplified84.4%

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

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

Alternative 13: 75.4% accurate, 6.6× speedup?

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

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

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


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

    1. Initial program 57.9%

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

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

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

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

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

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

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

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

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

    if -3.3e-183 < z < 1.15000000000000003e-122

    1. Initial program 84.4%

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

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

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

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

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

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

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

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

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

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

    if 1.15000000000000003e-122 < z

    1. Initial program 64.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative84.4%

        \[\leadsto \color{blue}{y \cdot x} \]
    6. Simplified84.4%

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

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

Alternative 14: 75.9% accurate, 6.6× speedup?

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

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


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

    1. Initial program 57.9%

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

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

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

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

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

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

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

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

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

    if -2.70000000000000008e-183 < z

    1. Initial program 70.7%

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

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

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

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

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

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

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

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

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

Alternative 15: 77.2% accurate, 6.6× speedup?

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

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


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

    1. Initial program 59.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.45000000000000006e-207 < z

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

Alternative 16: 77.2% accurate, 6.6× speedup?

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

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


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

    1. Initial program 59.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.45000000000000006e-207 < z

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

Alternative 17: 74.2% accurate, 10.2× speedup?

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

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

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


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

    1. Initial program 59.8%

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

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

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

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

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

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

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

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

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

    if -5.7999999999999999e-212 < z < 9.99999999999999927e-105

    1. Initial program 82.5%

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

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

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

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

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

    if 9.99999999999999927e-105 < z

    1. Initial program 64.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative85.9%

        \[\leadsto \color{blue}{y \cdot x} \]
    6. Simplified85.9%

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

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

Alternative 18: 73.1% accurate, 18.6× speedup?

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

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


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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999931e-304 < z

    1. Initial program 66.7%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot y} \]
    5. Step-by-step derivation
      1. *-commutative73.1%

        \[\leadsto \color{blue}{y \cdot x} \]
    6. Simplified73.1%

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

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

Alternative 19: 43.6% 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 64.9%

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

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

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

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

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

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

    \[\leadsto \color{blue}{x \cdot y} \]
  5. Step-by-step derivation
    1. *-commutative43.4%

      \[\leadsto \color{blue}{y \cdot x} \]
  6. Simplified43.4%

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

    \[\leadsto x \cdot y \]

Developer target: 89.2% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

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