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

Percentage Accurate: 61.2% → 90.7%
Time: 17.9s
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.2% accurate, 1.0× speedup?

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

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

Alternative 1: 90.7% accurate, 0.4× speedup?

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

\mathbf{elif}\;z \leq -3.9 \cdot 10^{-187}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.45 \cdot 10^{-79}:\\
\;\;\;\;y \cdot \left(e^{-0.5 \cdot \left(\log \left(-t\right) - \log \left(\frac{1}{a}\right)\right)} \cdot \left(z \cdot x\right)\right)\\

\mathbf{elif}\;z \leq 1.55 \cdot 10^{+122}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 17.4%

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

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

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

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

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

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

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

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

    if -1.00000000000000006e140 < z < -3.8999999999999999e-187 or 1.45e-79 < z < 1.54999999999999999e122

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\right)\right)} \]
      5. associate-*l/67.3%

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left(z \cdot \color{blue}{\frac{1}{\frac{\sqrt{z \cdot z - t \cdot a}}{x \cdot y}}}\right)} - 1 \]
      9. un-div-inv36.7%

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

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

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

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

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

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

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

    if -3.8999999999999999e-187 < z < 1.45e-79

    1. Initial program 66.7%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(\frac{1}{\color{blue}{{\left(z \cdot z - t \cdot a\right)}^{0.5}}} \cdot \left(x \cdot z\right)\right) \]
      4. pow-flip70.6%

        \[\leadsto y \cdot \left(\color{blue}{{\left(z \cdot z - t \cdot a\right)}^{\left(-0.5\right)}} \cdot \left(x \cdot z\right)\right) \]
      5. metadata-eval70.6%

        \[\leadsto y \cdot \left({\left(z \cdot z - t \cdot a\right)}^{\color{blue}{-0.5}} \cdot \left(x \cdot z\right)\right) \]
      6. *-commutative70.6%

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

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

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

    if 1.54999999999999999e122 < z

    1. Initial program 33.5%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    3. Simplified33.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}{x} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification84.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+140}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq -3.9 \cdot 10^{-187}:\\ \;\;\;\;\frac{z}{\sqrt{z \cdot z - a \cdot t}} \cdot \left(y \cdot x\right)\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-79}:\\ \;\;\;\;y \cdot \left(e^{-0.5 \cdot \left(\log \left(-t\right) - \log \left(\frac{1}{a}\right)\right)} \cdot \left(z \cdot x\right)\right)\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{+122}:\\ \;\;\;\;\frac{z}{\sqrt{z \cdot z - a \cdot t}} \cdot \left(y \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]

Alternative 2: 90.2% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 29.8%

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

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

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

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

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

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

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

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

    if -4.0000000000000002e71 < z < 5.0999999999999996e115

    1. Initial program 81.5%

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

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

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

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

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

    if 5.0999999999999996e115 < z

    1. Initial program 33.5%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    3. Simplified33.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}{x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification89.0%

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

Alternative 3: 89.8% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 33.2%

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

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

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

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

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

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

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

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

    if -2.30000000000000005e51 < z < 9.40000000000000011e117

    1. Initial program 81.5%

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

    if 9.40000000000000011e117 < z

    1. Initial program 33.5%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{x \cdot z}{\sqrt{z \cdot z - t \cdot a}}} \]
    3. Simplified33.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}{x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification90.3%

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

Alternative 4: 81.2% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 39.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{x \cdot z}{\frac{-0.5 \cdot \left(t \cdot a\right)}{\color{blue}{\sqrt{z} \cdot \sqrt{z}}} + -1 \cdot z} \]
      11. add-sqr-sqrt74.3%

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

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

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

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

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

        \[\leadsto y \cdot \frac{x \cdot z}{\left(-0.5 \cdot \color{blue}{\frac{a}{\frac{z}{t}}}\right) + -1 \cdot z} \]
      5. distribute-lft-neg-in78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.3e10 < z < 9.0000000000000001e-77

    1. Initial program 72.7%

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

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

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

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

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

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

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

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

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

    if 9.0000000000000001e-77 < z

    1. Initial program 62.8%

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

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

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

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

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

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

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

Alternative 5: 81.1% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 39.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{x \cdot z}{\frac{-0.5 \cdot \left(t \cdot a\right)}{\color{blue}{\sqrt{z} \cdot \sqrt{z}}} + -1 \cdot z} \]
      11. add-sqr-sqrt74.3%

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

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

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

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

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

        \[\leadsto y \cdot \frac{x \cdot z}{\left(-0.5 \cdot \color{blue}{\frac{a}{\frac{z}{t}}}\right) + -1 \cdot z} \]
      5. distribute-lft-neg-in78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.3e10 < z < 1.4e-77

    1. Initial program 72.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.4e-77 < z

    1. Initial program 62.8%

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

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

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

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

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

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

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

Alternative 6: 75.5% accurate, 6.6× speedup?

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

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

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


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

    1. Initial program 47.8%

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

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

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

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

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

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

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

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

    if -2.3999999999999998e-288 < z < 1.45e-170

    1. Initial program 80.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.45e-170 < z

    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.1%

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

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

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

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

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

Alternative 7: 75.5% accurate, 6.6× speedup?

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

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

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


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

    1. Initial program 47.8%

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

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

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

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

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

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

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

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

    if -2.3999999999999998e-288 < z < 1.28e-169

    1. Initial program 80.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.28e-169 < z

    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.1%

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

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

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

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

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

Alternative 8: 75.5% accurate, 6.6× speedup?

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

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

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


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

    1. Initial program 47.8%

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

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

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

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

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

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

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

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

    if -2.3999999999999998e-288 < z < 3.5000000000000003e-169

    1. Initial program 80.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{x \cdot z}{\frac{-0.5 \cdot \left(t \cdot a\right)}{\color{blue}{-1 \cdot z}} + -1 \cdot z} \]
      5. add-sqr-sqrt9.6%

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

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

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

        \[\leadsto y \cdot \frac{x \cdot z}{\frac{-0.5 \cdot \left(t \cdot a\right)}{\sqrt{\left(-z\right) \cdot \color{blue}{\left(-z\right)}}} + -1 \cdot z} \]
      9. sqr-neg55.7%

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{x \cdot z}{\left(-0.5 \cdot \color{blue}{\frac{a}{\frac{z}{t}}}\right) + -1 \cdot z} \]
      5. distribute-lft-neg-in56.4%

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

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

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

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

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

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

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

    if 3.5000000000000003e-169 < z

    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.1%

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

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

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

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

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

Alternative 9: 77.4% accurate, 6.6× speedup?

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

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


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

    1. Initial program 53.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{x \cdot z}{\frac{-0.5 \cdot \left(t \cdot a\right)}{\color{blue}{-1 \cdot z}} + -1 \cdot z} \]
      5. add-sqr-sqrt55.6%

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

        \[\leadsto y \cdot \frac{x \cdot z}{\frac{-0.5 \cdot \left(t \cdot a\right)}{\color{blue}{\sqrt{\left(-1 \cdot z\right) \cdot \left(-1 \cdot z\right)}}} + -1 \cdot z} \]
      7. mul-1-neg61.9%

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

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

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

        \[\leadsto y \cdot \frac{x \cdot z}{\frac{-0.5 \cdot \left(t \cdot a\right)}{\color{blue}{\sqrt{z} \cdot \sqrt{z}}} + -1 \cdot z} \]
      11. add-sqr-sqrt63.3%

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

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

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

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

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

        \[\leadsto y \cdot \frac{x \cdot z}{\left(-0.5 \cdot \color{blue}{\frac{a}{\frac{z}{t}}}\right) + -1 \cdot z} \]
      5. distribute-lft-neg-in66.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.70000000000000006e-170 < z

    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.1%

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

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

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

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

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

Alternative 10: 75.6% accurate, 9.3× speedup?

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

\mathbf{elif}\;z \leq 1.48 \cdot 10^{-192}:\\
\;\;\;\;\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.9999999999999999e-47

    1. Initial program 44.3%

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

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

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

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

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

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

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

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

    if -1.9999999999999999e-47 < z < 1.4800000000000001e-192

    1. Initial program 73.1%

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

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

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

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

    if 1.4800000000000001e-192 < z

    1. Initial program 62.3%

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

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

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

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

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

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

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

Alternative 11: 74.4% accurate, 10.2× speedup?

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

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

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


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

    1. Initial program 47.8%

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

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

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

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

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

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

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

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

    if -2.3999999999999998e-288 < z < 3.70000000000000021e-236

    1. Initial program 91.9%

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

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

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

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

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

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

    if 3.70000000000000021e-236 < z

    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/61.7%

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

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

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

Alternative 12: 73.4% accurate, 18.6× speedup?

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

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


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

    1. Initial program 48.3%

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

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

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

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

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

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

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

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

    if -6.19999999999999995e-306 < z

    1. Initial program 65.8%

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

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

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

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

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

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

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

Alternative 13: 44.2% accurate, 37.7× speedup?

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

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

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

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

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

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

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

    \[\leadsto y \cdot x \]

Developer target: 89.2% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

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