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

Percentage Accurate: 61.3% → 90.1%
Time: 18.1s
Alternatives: 13
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 13 alternatives:

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

Initial Program: 61.3% accurate, 1.0× speedup?

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

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

Alternative 1: 90.1% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;z \leq 2.55 \cdot 10^{+29}:\\
\;\;\;\;y \cdot \frac{z \cdot x}{t_1}\\

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


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

    1. Initial program 37.8%

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

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

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

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

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

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

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

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

    if -1.3e88 < z < -1.4500000000000001e-222

    1. Initial program 83.7%

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

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

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

    if -1.4500000000000001e-222 < z < 3.10000000000000017e-240

    1. Initial program 64.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.10000000000000017e-240 < z < 2.55e29

    1. Initial program 78.2%

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

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

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

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

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

    if 2.55e29 < z

    1. Initial program 52.5%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+88}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq -1.45 \cdot 10^{-222}:\\ \;\;\;\;z \cdot \frac{y \cdot x}{\sqrt{z \cdot z - t \cdot a}}\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-240}:\\ \;\;\;\;\frac{x}{\frac{\sqrt{t \cdot \left(-a\right)}}{z \cdot y}}\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{+29}:\\ \;\;\;\;y \cdot \frac{z \cdot x}{\sqrt{z \cdot z - t \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{1 + -0.5 \cdot \frac{a}{\frac{z \cdot z}{t}}}\\ \end{array} \]

Alternative 2: 89.5% accurate, 0.9× speedup?

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

\mathbf{elif}\;z \leq -9.6 \cdot 10^{-67}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+119}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 37.8%

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

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

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

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

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

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

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

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

    if -1.99999999999999992e88 < z < -9.6e-67 or -1.50000000000000009e-106 < z < 2.6e119

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

    if -9.6e-67 < z < -2.7e-95

    1. Initial program 78.5%

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

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

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

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

    if -2.7e-95 < z < -1.50000000000000009e-106

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.6e119 < z

    1. Initial program 36.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+88}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq -9.6 \cdot 10^{-67}:\\ \;\;\;\;y \cdot \left(z \cdot \frac{x}{\sqrt{z \cdot z - t \cdot a}}\right)\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-95}:\\ \;\;\;\;\frac{y \cdot x}{\frac{0.5 \cdot \frac{t \cdot a}{z} - z}{z}}\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-106}:\\ \;\;\;\;\frac{x}{\frac{\sqrt{t \cdot \left(-a\right)}}{z \cdot y}}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+119}:\\ \;\;\;\;y \cdot \left(z \cdot \frac{x}{\sqrt{z \cdot z - t \cdot a}}\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]

Alternative 3: 90.3% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 33.8%

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

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

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

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

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

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

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

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

    if -3.39999999999999972e98 < z < 2.99999999999999978e30

    1. Initial program 79.7%

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

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

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

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

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

    if 2.99999999999999978e30 < z

    1. Initial program 52.5%

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

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

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

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

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

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

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

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

Alternative 4: 89.9% accurate, 1.0× speedup?

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

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

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


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

    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. *-commutative32.3%

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

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

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

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

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

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

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

    if -2.20000000000000007e105 < z < 2.4999999999999999e30

    1. Initial program 79.8%

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

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

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

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

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

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

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

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

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

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

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

    if 2.4999999999999999e30 < z

    1. Initial program 52.5%

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

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

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

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

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

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

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

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

Alternative 5: 83.2% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 61.8%

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

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

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

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

    if -5.6999999999999999e-148 < z < 5.4999999999999999e-132

    1. Initial program 69.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.4999999999999999e-132 < 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*66.9%

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

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

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

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

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

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

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

Alternative 6: 83.1% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 61.8%

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

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

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

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

    if -9.50000000000000069e-148 < z < 2.9000000000000002e-131

    1. Initial program 69.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.9000000000000002e-131 < 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*66.9%

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

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

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

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

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

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

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

Alternative 7: 77.7% accurate, 5.9× speedup?

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

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

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


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

    1. Initial program 62.4%

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

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

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

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

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

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

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

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

    if -7.79999999999999997e-175 < z < 1.25e30

    1. Initial program 76.8%

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

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

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

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

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

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

    if 1.25e30 < z

    1. Initial program 52.5%

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

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

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

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

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

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

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

Alternative 8: 77.7% accurate, 6.6× speedup?

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

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


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

    1. Initial program 62.4%

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

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

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

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

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

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

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

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

    if -1.05000000000000005e-174 < z

    1. Initial program 65.5%

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

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

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

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

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

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

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

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

Alternative 9: 76.6% accurate, 6.6× speedup?

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

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


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

    1. Initial program 65.4%

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

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

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

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

    if 3.3000000000000001e-237 < z

    1. Initial program 62.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 3.3 \cdot 10^{-237}:\\ \;\;\;\;\frac{y \cdot x}{\frac{0.5 \cdot \frac{t \cdot a}{z} - z}{z}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]

Alternative 10: 75.4% accurate, 9.3× speedup?

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

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

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


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

    1. Initial program 57.5%

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

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

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

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

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

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

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

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

    if -5.00000000000000033e-69 < z < 2.09999999999999997e-254

    1. Initial program 75.7%

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

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

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

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

    if 2.09999999999999997e-254 < 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. *-commutative63.5%

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

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

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

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

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

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

Alternative 11: 75.8% accurate, 10.2× speedup?

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

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

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


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

    1. Initial program 63.6%

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

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

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

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

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

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

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

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

    if -1.7e-186 < z < 4.99999999999999967e-125

    1. Initial program 69.8%

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

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

    if 4.99999999999999967e-125 < z

    1. Initial program 61.4%

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

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

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

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

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

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

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

Alternative 12: 73.3% accurate, 18.6× speedup?

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

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


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

    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. *-commutative64.9%

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

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

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

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

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

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

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

    if -1.999999999999994e-310 < z

    1. Initial program 63.3%

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

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

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

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

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

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

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

Alternative 13: 42.9% accurate, 37.7× speedup?

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

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

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

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

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

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

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

    \[\leadsto y \cdot x \]

Developer target: 89.6% 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 2023230 
(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)))))