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

Percentage Accurate: 61.6% → 91.3%
Time: 27.8s
Alternatives: 22
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 22 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.6% accurate, 1.0× speedup?

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

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

Alternative 1: 91.3% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ [t, a] = \mathsf{sort}([t, a])\\ \\ \begin{array}{l} t_1 := \sqrt{z \cdot z - t \cdot a}\\ \mathbf{if}\;z \leq -6.5 \cdot 10^{+99}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{-206}:\\ \;\;\;\;\frac{z \cdot \left(y \cdot x\right)}{t_1}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-156}:\\ \;\;\;\;\left(x \cdot e^{-0.5 \cdot \left(\log \left(-t\right) - \log \left(\frac{1}{a}\right)\right)}\right) \cdot \left(z \cdot y\right)\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{+137}:\\ \;\;\;\;\frac{y}{\frac{\frac{t_1}{z}}{x}}\\ \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 (sqrt (- (* z z) (* t a)))))
   (if (<= z -6.5e+99)
     (* y (- x))
     (if (<= z -1.9e-206)
       (/ (* z (* y x)) t_1)
       (if (<= z 6e-156)
         (* (* x (exp (* -0.5 (- (log (- t)) (log (/ 1.0 a)))))) (* z y))
         (if (<= z 1.7e+137) (/ y (/ (/ t_1 z) x)) (* y x)))))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a) {
	double t_1 = sqrt(((z * z) - (t * a)));
	double tmp;
	if (z <= -6.5e+99) {
		tmp = y * -x;
	} else if (z <= -1.9e-206) {
		tmp = (z * (y * x)) / t_1;
	} else if (z <= 6e-156) {
		tmp = (x * exp((-0.5 * (log(-t) - log((1.0 / a)))))) * (z * y);
	} else if (z <= 1.7e+137) {
		tmp = y / ((t_1 / z) / 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) :: t_1
    real(8) :: tmp
    t_1 = sqrt(((z * z) - (t * a)))
    if (z <= (-6.5d+99)) then
        tmp = y * -x
    else if (z <= (-1.9d-206)) then
        tmp = (z * (y * x)) / t_1
    else if (z <= 6d-156) then
        tmp = (x * exp(((-0.5d0) * (log(-t) - log((1.0d0 / a)))))) * (z * y)
    else if (z <= 1.7d+137) then
        tmp = y / ((t_1 / z) / 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 t_1 = Math.sqrt(((z * z) - (t * a)));
	double tmp;
	if (z <= -6.5e+99) {
		tmp = y * -x;
	} else if (z <= -1.9e-206) {
		tmp = (z * (y * x)) / t_1;
	} else if (z <= 6e-156) {
		tmp = (x * Math.exp((-0.5 * (Math.log(-t) - Math.log((1.0 / a)))))) * (z * y);
	} else if (z <= 1.7e+137) {
		tmp = y / ((t_1 / z) / x);
	} 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 = math.sqrt(((z * z) - (t * a)))
	tmp = 0
	if z <= -6.5e+99:
		tmp = y * -x
	elif z <= -1.9e-206:
		tmp = (z * (y * x)) / t_1
	elif z <= 6e-156:
		tmp = (x * math.exp((-0.5 * (math.log(-t) - math.log((1.0 / a)))))) * (z * y)
	elif z <= 1.7e+137:
		tmp = y / ((t_1 / z) / x)
	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 = sqrt(Float64(Float64(z * z) - Float64(t * a)))
	tmp = 0.0
	if (z <= -6.5e+99)
		tmp = Float64(y * Float64(-x));
	elseif (z <= -1.9e-206)
		tmp = Float64(Float64(z * Float64(y * x)) / t_1);
	elseif (z <= 6e-156)
		tmp = Float64(Float64(x * exp(Float64(-0.5 * Float64(log(Float64(-t)) - log(Float64(1.0 / a)))))) * Float64(z * y));
	elseif (z <= 1.7e+137)
		tmp = Float64(y / Float64(Float64(t_1 / z) / 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)
	t_1 = sqrt(((z * z) - (t * a)));
	tmp = 0.0;
	if (z <= -6.5e+99)
		tmp = y * -x;
	elseif (z <= -1.9e-206)
		tmp = (z * (y * x)) / t_1;
	elseif (z <= 6e-156)
		tmp = (x * exp((-0.5 * (log(-t) - log((1.0 / a)))))) * (z * y);
	elseif (z <= 1.7e+137)
		tmp = y / ((t_1 / z) / 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_] := Block[{t$95$1 = N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[z, -6.5e+99], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, -1.9e-206], N[(N[(z * N[(y * x), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[z, 6e-156], N[(N[(x * N[Exp[N[(-0.5 * N[(N[Log[(-t)], $MachinePrecision] - N[Log[N[(1.0 / a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e+137], N[(y / N[(N[(t$95$1 / z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot z - t \cdot a}\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{+99}:\\
\;\;\;\;y \cdot \left(-x\right)\\

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

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

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

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


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

    1. Initial program 38.4%

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

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

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

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

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

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

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

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

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

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

    if -6.5000000000000004e99 < z < -1.90000000000000001e-206

    1. Initial program 92.1%

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

    if -1.90000000000000001e-206 < z < 6e-156

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if 6e-156 < z < 1.69999999999999993e137

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.69999999999999993e137 < z

    1. Initial program 21.5%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{+99}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{-206}:\\ \;\;\;\;\frac{z \cdot \left(y \cdot x\right)}{\sqrt{z \cdot z - t \cdot a}}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-156}:\\ \;\;\;\;\left(x \cdot e^{-0.5 \cdot \left(\log \left(-t\right) - \log \left(\frac{1}{a}\right)\right)}\right) \cdot \left(z \cdot y\right)\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{+137}:\\ \;\;\;\;\frac{y}{\frac{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}{x}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \]

Alternative 2: 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 -5 \cdot 10^{+92}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+36}:\\ \;\;\;\;x \cdot \left(z \cdot \frac{y}{\sqrt{z \cdot z - t \cdot 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 -5e+92)
   (* y (- x))
   (if (<= z 1.6e+36) (* x (* z (/ y (sqrt (- (* z z) (* 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 <= -5e+92) {
		tmp = y * -x;
	} else if (z <= 1.6e+36) {
		tmp = x * (z * (y / sqrt(((z * z) - (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 <= (-5d+92)) then
        tmp = y * -x
    else if (z <= 1.6d+36) then
        tmp = x * (z * (y / sqrt(((z * z) - (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 <= -5e+92) {
		tmp = y * -x;
	} else if (z <= 1.6e+36) {
		tmp = x * (z * (y / Math.sqrt(((z * z) - (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 <= -5e+92:
		tmp = y * -x
	elif z <= 1.6e+36:
		tmp = x * (z * (y / math.sqrt(((z * z) - (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 <= -5e+92)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 1.6e+36)
		tmp = Float64(x * Float64(z * Float64(y / sqrt(Float64(Float64(z * z) - Float64(t * 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 <= -5e+92)
		tmp = y * -x;
	elseif (z <= 1.6e+36)
		tmp = x * (z * (y / sqrt(((z * z) - (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, -5e+92], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 1.6e+36], N[(x * N[(z * N[(y / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $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 -5 \cdot 10^{+92}:\\
\;\;\;\;y \cdot \left(-x\right)\\

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

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


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

    1. Initial program 42.2%

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

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

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

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

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

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

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

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

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

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

    if -5.00000000000000022e92 < z < 1.5999999999999999e36

    1. Initial program 83.5%

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

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

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

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

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

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

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

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

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

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

    if 1.5999999999999999e36 < z

    1. Initial program 40.0%

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

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

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

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

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

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

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

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

Alternative 3: 90.0% 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 -1.55 \cdot 10^{+93}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+36}:\\ \;\;\;\;x \cdot \frac{z}{\frac{\sqrt{z \cdot z - t \cdot a}}{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 -1.55e+93)
   (* y (- x))
   (if (<= z 1.6e+36) (* x (/ z (/ (sqrt (- (* z z) (* 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 <= -1.55e+93) {
		tmp = y * -x;
	} else if (z <= 1.6e+36) {
		tmp = x * (z / (sqrt(((z * z) - (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 <= (-1.55d+93)) then
        tmp = y * -x
    else if (z <= 1.6d+36) then
        tmp = x * (z / (sqrt(((z * z) - (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 <= -1.55e+93) {
		tmp = y * -x;
	} else if (z <= 1.6e+36) {
		tmp = x * (z / (Math.sqrt(((z * z) - (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 <= -1.55e+93:
		tmp = y * -x
	elif z <= 1.6e+36:
		tmp = x * (z / (math.sqrt(((z * z) - (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 <= -1.55e+93)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 1.6e+36)
		tmp = Float64(x * Float64(z / Float64(sqrt(Float64(Float64(z * z) - Float64(t * 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 <= -1.55e+93)
		tmp = y * -x;
	elseif (z <= 1.6e+36)
		tmp = x * (z / (sqrt(((z * z) - (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, -1.55e+93], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 1.6e+36], N[(x * N[(z / N[(N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / y), $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.55 \cdot 10^{+93}:\\
\;\;\;\;y \cdot \left(-x\right)\\

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

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


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

    1. Initial program 42.2%

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

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

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

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

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

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

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

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

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

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

    if -1.5500000000000001e93 < z < 1.5999999999999999e36

    1. Initial program 83.5%

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

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

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

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

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

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

    if 1.5999999999999999e36 < z

    1. Initial program 40.0%

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

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

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

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

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

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

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

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

Alternative 4: 90.0% 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 \cdot 10^{+101}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+36}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{\sqrt{z \cdot z - t \cdot 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 -2e+101)
   (* y (- x))
   (if (<= z 1.6e+36) (* x (/ (* z y) (sqrt (- (* z z) (* 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 <= -2e+101) {
		tmp = y * -x;
	} else if (z <= 1.6e+36) {
		tmp = x * ((z * y) / sqrt(((z * z) - (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 <= (-2d+101)) then
        tmp = y * -x
    else if (z <= 1.6d+36) then
        tmp = x * ((z * y) / sqrt(((z * z) - (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 <= -2e+101) {
		tmp = y * -x;
	} else if (z <= 1.6e+36) {
		tmp = x * ((z * y) / Math.sqrt(((z * z) - (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 <= -2e+101:
		tmp = y * -x
	elif z <= 1.6e+36:
		tmp = x * ((z * y) / math.sqrt(((z * z) - (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 <= -2e+101)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 1.6e+36)
		tmp = Float64(x * Float64(Float64(z * y) / sqrt(Float64(Float64(z * z) - Float64(t * 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 <= -2e+101)
		tmp = y * -x;
	elseif (z <= 1.6e+36)
		tmp = x * ((z * y) / sqrt(((z * z) - (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, -2e+101], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 1.6e+36], N[(x * N[(N[(z * y), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $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 \cdot 10^{+101}:\\
\;\;\;\;y \cdot \left(-x\right)\\

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

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


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

    1. Initial program 38.4%

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

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

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

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

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

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

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

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

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

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

    if -2e101 < z < 1.5999999999999999e36

    1. Initial program 83.8%

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

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

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

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

    if 1.5999999999999999e36 < z

    1. Initial program 40.0%

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

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

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

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

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

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

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

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

Alternative 5: 80.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 -1.55 \cdot 10^{+140}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{-169}:\\ \;\;\;\;\frac{z \cdot \left(y \cdot x\right)}{\frac{t \cdot 0.5}{\frac{z}{a}} - z}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-36}:\\ \;\;\;\;x \cdot \left(z \cdot \frac{y}{\sqrt{t \cdot \left(-a\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{\frac{z + -0.5 \cdot \frac{t \cdot a}{z}}{z}}{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.55e+140)
   (* y (- x))
   (if (<= z -1.16e-169)
     (/ (* z (* y x)) (- (/ (* t 0.5) (/ z a)) z))
     (if (<= z 9.5e-36)
       (* x (* z (/ y (sqrt (* t (- a))))))
       (/ y (/ (/ (+ z (* -0.5 (/ (* t a) z))) z) x))))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.55e+140) {
		tmp = y * -x;
	} else if (z <= -1.16e-169) {
		tmp = (z * (y * x)) / (((t * 0.5) / (z / a)) - z);
	} else if (z <= 9.5e-36) {
		tmp = x * (z * (y / sqrt((t * -a))));
	} else {
		tmp = y / (((z + (-0.5 * ((t * a) / z))) / z) / 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.55d+140)) then
        tmp = y * -x
    else if (z <= (-1.16d-169)) then
        tmp = (z * (y * x)) / (((t * 0.5d0) / (z / a)) - z)
    else if (z <= 9.5d-36) then
        tmp = x * (z * (y / sqrt((t * -a))))
    else
        tmp = y / (((z + ((-0.5d0) * ((t * a) / z))) / z) / 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.55e+140) {
		tmp = y * -x;
	} else if (z <= -1.16e-169) {
		tmp = (z * (y * x)) / (((t * 0.5) / (z / a)) - z);
	} else if (z <= 9.5e-36) {
		tmp = x * (z * (y / Math.sqrt((t * -a))));
	} else {
		tmp = y / (((z + (-0.5 * ((t * a) / z))) / z) / 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.55e+140:
		tmp = y * -x
	elif z <= -1.16e-169:
		tmp = (z * (y * x)) / (((t * 0.5) / (z / a)) - z)
	elif z <= 9.5e-36:
		tmp = x * (z * (y / math.sqrt((t * -a))))
	else:
		tmp = y / (((z + (-0.5 * ((t * a) / z))) / z) / 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.55e+140)
		tmp = Float64(y * Float64(-x));
	elseif (z <= -1.16e-169)
		tmp = Float64(Float64(z * Float64(y * x)) / Float64(Float64(Float64(t * 0.5) / Float64(z / a)) - z));
	elseif (z <= 9.5e-36)
		tmp = Float64(x * Float64(z * Float64(y / sqrt(Float64(t * Float64(-a))))));
	else
		tmp = Float64(y / Float64(Float64(Float64(z + Float64(-0.5 * Float64(Float64(t * a) / z))) / z) / 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.55e+140)
		tmp = y * -x;
	elseif (z <= -1.16e-169)
		tmp = (z * (y * x)) / (((t * 0.5) / (z / a)) - z);
	elseif (z <= 9.5e-36)
		tmp = x * (z * (y / sqrt((t * -a))));
	else
		tmp = y / (((z + (-0.5 * ((t * a) / z))) / z) / 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.55e+140], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, -1.16e-169], N[(N[(z * N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(t * 0.5), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e-36], N[(x * N[(z * N[(y / N[Sqrt[N[(t * (-a)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / N[(N[(N[(z + N[(-0.5 * N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+140}:\\
\;\;\;\;y \cdot \left(-x\right)\\

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

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

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


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

    1. Initial program 28.1%

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

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

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

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

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

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

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

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

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

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

    if -1.55e140 < z < -1.16e-169

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.16e-169 < z < 9.5000000000000003e-36

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.5000000000000003e-36 < z

    1. Initial program 51.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{+140}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{-169}:\\ \;\;\;\;\frac{z \cdot \left(y \cdot x\right)}{\frac{t \cdot 0.5}{\frac{z}{a}} - z}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-36}:\\ \;\;\;\;x \cdot \left(z \cdot \frac{y}{\sqrt{t \cdot \left(-a\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{\frac{z + -0.5 \cdot \frac{t \cdot a}{z}}{z}}{x}}\\ \end{array} \]

Alternative 6: 80.3% 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 -1.55 \cdot 10^{+140}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-174}:\\ \;\;\;\;\frac{z \cdot \left(y \cdot x\right)}{\frac{t \cdot 0.5}{\frac{z}{a}} - z}\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{-36}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{\sqrt{t \cdot \left(-a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{\frac{z + -0.5 \cdot \frac{t \cdot a}{z}}{z}}{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.55e+140)
   (* y (- x))
   (if (<= z -3.4e-174)
     (/ (* z (* y x)) (- (/ (* t 0.5) (/ z a)) z))
     (if (<= z 8.8e-36)
       (* x (/ (* z y) (sqrt (* t (- a)))))
       (/ y (/ (/ (+ z (* -0.5 (/ (* t a) z))) z) x))))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.55e+140) {
		tmp = y * -x;
	} else if (z <= -3.4e-174) {
		tmp = (z * (y * x)) / (((t * 0.5) / (z / a)) - z);
	} else if (z <= 8.8e-36) {
		tmp = x * ((z * y) / sqrt((t * -a)));
	} else {
		tmp = y / (((z + (-0.5 * ((t * a) / z))) / z) / 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.55d+140)) then
        tmp = y * -x
    else if (z <= (-3.4d-174)) then
        tmp = (z * (y * x)) / (((t * 0.5d0) / (z / a)) - z)
    else if (z <= 8.8d-36) then
        tmp = x * ((z * y) / sqrt((t * -a)))
    else
        tmp = y / (((z + ((-0.5d0) * ((t * a) / z))) / z) / 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.55e+140) {
		tmp = y * -x;
	} else if (z <= -3.4e-174) {
		tmp = (z * (y * x)) / (((t * 0.5) / (z / a)) - z);
	} else if (z <= 8.8e-36) {
		tmp = x * ((z * y) / Math.sqrt((t * -a)));
	} else {
		tmp = y / (((z + (-0.5 * ((t * a) / z))) / z) / 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.55e+140:
		tmp = y * -x
	elif z <= -3.4e-174:
		tmp = (z * (y * x)) / (((t * 0.5) / (z / a)) - z)
	elif z <= 8.8e-36:
		tmp = x * ((z * y) / math.sqrt((t * -a)))
	else:
		tmp = y / (((z + (-0.5 * ((t * a) / z))) / z) / 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.55e+140)
		tmp = Float64(y * Float64(-x));
	elseif (z <= -3.4e-174)
		tmp = Float64(Float64(z * Float64(y * x)) / Float64(Float64(Float64(t * 0.5) / Float64(z / a)) - z));
	elseif (z <= 8.8e-36)
		tmp = Float64(x * Float64(Float64(z * y) / sqrt(Float64(t * Float64(-a)))));
	else
		tmp = Float64(y / Float64(Float64(Float64(z + Float64(-0.5 * Float64(Float64(t * a) / z))) / z) / 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.55e+140)
		tmp = y * -x;
	elseif (z <= -3.4e-174)
		tmp = (z * (y * x)) / (((t * 0.5) / (z / a)) - z);
	elseif (z <= 8.8e-36)
		tmp = x * ((z * y) / sqrt((t * -a)));
	else
		tmp = y / (((z + (-0.5 * ((t * a) / z))) / z) / 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.55e+140], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, -3.4e-174], N[(N[(z * N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(t * 0.5), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.8e-36], N[(x * N[(N[(z * y), $MachinePrecision] / N[Sqrt[N[(t * (-a)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / N[(N[(N[(z + N[(-0.5 * N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+140}:\\
\;\;\;\;y \cdot \left(-x\right)\\

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

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

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


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

    1. Initial program 28.1%

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

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

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

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

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

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

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

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

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

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

    if -1.55e140 < z < -3.4000000000000002e-174

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.4000000000000002e-174 < z < 8.7999999999999997e-36

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

    if 8.7999999999999997e-36 < z

    1. Initial program 51.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{+140}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-174}:\\ \;\;\;\;\frac{z \cdot \left(y \cdot x\right)}{\frac{t \cdot 0.5}{\frac{z}{a}} - z}\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{-36}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{\sqrt{t \cdot \left(-a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{\frac{z + -0.5 \cdot \frac{t \cdot a}{z}}{z}}{x}}\\ \end{array} \]

Alternative 7: 77.3% accurate, 5.9× 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^{-175}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+36}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{z + -0.5 \cdot \frac{t \cdot a}{z}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
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-175)
   (* y (- x))
   (if (<= z 1.1e+36) (* x (/ (* z y) (+ z (* -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 <= -1.7e-175) {
		tmp = y * -x;
	} else if (z <= 1.1e+36) {
		tmp = x * ((z * y) / (z + (-0.5 * ((t * a) / z))));
	} else {
		tmp = y * x;
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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-175)) then
        tmp = y * -x
    else if (z <= 1.1d+36) then
        tmp = x * ((z * y) / (z + ((-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 <= -1.7e-175) {
		tmp = y * -x;
	} else if (z <= 1.1e+36) {
		tmp = x * ((z * y) / (z + (-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 <= -1.7e-175:
		tmp = y * -x
	elif z <= 1.1e+36:
		tmp = x * ((z * y) / (z + (-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 <= -1.7e-175)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 1.1e+36)
		tmp = Float64(x * Float64(Float64(z * y) / Float64(z + Float64(-0.5 * Float64(Float64(t * a) / z)))));
	else
		tmp = Float64(y * x);
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.7e-175)
		tmp = y * -x;
	elseif (z <= 1.1e+36)
		tmp = x * ((z * y) / (z + (-0.5 * ((t * a) / z))));
	else
		tmp = y * x;
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
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-175], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 1.1e+36], N[(x * N[(N[(z * y), $MachinePrecision] / N[(z + N[(-0.5 * N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{-175}:\\
\;\;\;\;y \cdot \left(-x\right)\\

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

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


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

    1. Initial program 66.5%

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

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

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

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

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

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

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

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

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

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

    if -1.7e-175 < z < 1.1e36

    1. Initial program 79.1%

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

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

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

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

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

    if 1.1e36 < z

    1. Initial program 40.0%

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

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

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

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

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

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

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

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

Alternative 8: 77.5% accurate, 5.9× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ [t, a] = \mathsf{sort}([t, a])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+83}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-291}:\\ \;\;\;\;\frac{z}{\frac{\frac{t \cdot 0.5}{\frac{z}{a}} - z}{y \cdot x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{\frac{z + -0.5 \cdot \frac{t \cdot a}{z}}{z}}{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.8e+83)
   (* y (- x))
   (if (<= z -2.6e-291)
     (/ z (/ (- (/ (* t 0.5) (/ z a)) z) (* y x)))
     (/ y (/ (/ (+ z (* -0.5 (/ (* t a) z))) z) x)))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.8e+83) {
		tmp = y * -x;
	} else if (z <= -2.6e-291) {
		tmp = z / ((((t * 0.5) / (z / a)) - z) / (y * x));
	} else {
		tmp = y / (((z + (-0.5 * ((t * a) / z))) / z) / 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.8d+83)) then
        tmp = y * -x
    else if (z <= (-2.6d-291)) then
        tmp = z / ((((t * 0.5d0) / (z / a)) - z) / (y * x))
    else
        tmp = y / (((z + ((-0.5d0) * ((t * a) / z))) / z) / 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.8e+83) {
		tmp = y * -x;
	} else if (z <= -2.6e-291) {
		tmp = z / ((((t * 0.5) / (z / a)) - z) / (y * x));
	} else {
		tmp = y / (((z + (-0.5 * ((t * a) / z))) / z) / 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.8e+83:
		tmp = y * -x
	elif z <= -2.6e-291:
		tmp = z / ((((t * 0.5) / (z / a)) - z) / (y * x))
	else:
		tmp = y / (((z + (-0.5 * ((t * a) / z))) / z) / 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.8e+83)
		tmp = Float64(y * Float64(-x));
	elseif (z <= -2.6e-291)
		tmp = Float64(z / Float64(Float64(Float64(Float64(t * 0.5) / Float64(z / a)) - z) / Float64(y * x)));
	else
		tmp = Float64(y / Float64(Float64(Float64(z + Float64(-0.5 * Float64(Float64(t * a) / z))) / z) / 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.8e+83)
		tmp = y * -x;
	elseif (z <= -2.6e-291)
		tmp = z / ((((t * 0.5) / (z / a)) - z) / (y * x));
	else
		tmp = y / (((z + (-0.5 * ((t * a) / z))) / z) / 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.8e+83], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, -2.6e-291], N[(z / N[(N[(N[(N[(t * 0.5), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision] / N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / N[(N[(N[(z + N[(-0.5 * N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+83}:\\
\;\;\;\;y \cdot \left(-x\right)\\

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

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


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

    1. Initial program 43.6%

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

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

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

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

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

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

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

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

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

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

    if -2.8e83 < z < -2.5999999999999999e-291

    1. Initial program 89.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{\frac{0.5 \cdot \color{blue}{\frac{a \cdot t}{z}} - z}{\frac{x \cdot y}{1}}} \]
      9. *-commutative73.8%

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

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

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

        \[\leadsto \frac{z}{\frac{\color{blue}{\frac{0.5 \cdot t}{\frac{z}{a}}} - z}{\frac{x \cdot y}{1}}} \]
      13. /-rgt-identity73.7%

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

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

    if -2.5999999999999999e-291 < z

    1. Initial program 59.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 77.3% accurate, 5.9× speedup?

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

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

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


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

    1. Initial program 43.6%

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

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

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

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

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

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

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

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

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

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

    if -4.4999999999999997e82 < z < -1.04999999999999999e-259

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

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

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

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

    if -1.04999999999999999e-259 < z

    1. Initial program 60.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 77.7% accurate, 5.9× speedup?

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

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

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


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

    1. Initial program 47.6%

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

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

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

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

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

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

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

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

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

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

    if -1.7499999999999999e64 < z < -2.0000000000000001e-259

    1. Initial program 88.3%

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

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

    if -2.0000000000000001e-259 < z

    1. Initial program 60.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 77.1% accurate, 5.9× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ [t, a] = \mathsf{sort}([t, a])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{+140}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-286}:\\ \;\;\;\;\frac{z \cdot \left(y \cdot x\right)}{\frac{t \cdot 0.5}{\frac{z}{a}} - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{\frac{z + -0.5 \cdot \frac{t \cdot a}{z}}{z}}{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.55e+140)
   (* y (- x))
   (if (<= z -2.8e-286)
     (/ (* z (* y x)) (- (/ (* t 0.5) (/ z a)) z))
     (/ y (/ (/ (+ z (* -0.5 (/ (* t a) z))) z) x)))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.55e+140) {
		tmp = y * -x;
	} else if (z <= -2.8e-286) {
		tmp = (z * (y * x)) / (((t * 0.5) / (z / a)) - z);
	} else {
		tmp = y / (((z + (-0.5 * ((t * a) / z))) / z) / 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.55d+140)) then
        tmp = y * -x
    else if (z <= (-2.8d-286)) then
        tmp = (z * (y * x)) / (((t * 0.5d0) / (z / a)) - z)
    else
        tmp = y / (((z + ((-0.5d0) * ((t * a) / z))) / z) / 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.55e+140) {
		tmp = y * -x;
	} else if (z <= -2.8e-286) {
		tmp = (z * (y * x)) / (((t * 0.5) / (z / a)) - z);
	} else {
		tmp = y / (((z + (-0.5 * ((t * a) / z))) / z) / 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.55e+140:
		tmp = y * -x
	elif z <= -2.8e-286:
		tmp = (z * (y * x)) / (((t * 0.5) / (z / a)) - z)
	else:
		tmp = y / (((z + (-0.5 * ((t * a) / z))) / z) / 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.55e+140)
		tmp = Float64(y * Float64(-x));
	elseif (z <= -2.8e-286)
		tmp = Float64(Float64(z * Float64(y * x)) / Float64(Float64(Float64(t * 0.5) / Float64(z / a)) - z));
	else
		tmp = Float64(y / Float64(Float64(Float64(z + Float64(-0.5 * Float64(Float64(t * a) / z))) / z) / 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.55e+140)
		tmp = y * -x;
	elseif (z <= -2.8e-286)
		tmp = (z * (y * x)) / (((t * 0.5) / (z / a)) - z);
	else
		tmp = y / (((z + (-0.5 * ((t * a) / z))) / z) / 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.55e+140], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, -2.8e-286], N[(N[(z * N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(t * 0.5), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision], N[(y / N[(N[(N[(z + N[(-0.5 * N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+140}:\\
\;\;\;\;y \cdot \left(-x\right)\\

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

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


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

    1. Initial program 28.1%

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

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

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

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

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

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

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

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

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

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

    if -1.55e140 < z < -2.8e-286

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.8e-286 < z

    1. Initial program 59.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 74.6% 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.9 \cdot 10^{-57}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-183}:\\ \;\;\;\;-2 \cdot \left(\frac{y}{a} \cdot \frac{x \cdot \left(z \cdot z\right)}{t}\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.9e-57)
   (* y (- x))
   (if (<= z 2.9e-183) (* -2.0 (* (/ y a) (/ (* x (* z z)) 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 <= -1.9e-57) {
		tmp = y * -x;
	} else if (z <= 2.9e-183) {
		tmp = -2.0 * ((y / a) * ((x * (z * z)) / 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 <= (-1.9d-57)) then
        tmp = y * -x
    else if (z <= 2.9d-183) then
        tmp = (-2.0d0) * ((y / a) * ((x * (z * z)) / 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 <= -1.9e-57) {
		tmp = y * -x;
	} else if (z <= 2.9e-183) {
		tmp = -2.0 * ((y / a) * ((x * (z * z)) / 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 <= -1.9e-57:
		tmp = y * -x
	elif z <= 2.9e-183:
		tmp = -2.0 * ((y / a) * ((x * (z * z)) / 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 <= -1.9e-57)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 2.9e-183)
		tmp = Float64(-2.0 * Float64(Float64(y / a) * Float64(Float64(x * Float64(z * z)) / 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 <= -1.9e-57)
		tmp = y * -x;
	elseif (z <= 2.9e-183)
		tmp = -2.0 * ((y / a) * ((x * (z * z)) / 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, -1.9e-57], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 2.9e-183], N[(-2.0 * N[(N[(y / a), $MachinePrecision] * N[(N[(x * N[(z * z), $MachinePrecision]), $MachinePrecision] / t), $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.9 \cdot 10^{-57}:\\
\;\;\;\;y \cdot \left(-x\right)\\

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

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


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

    1. Initial program 61.0%

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

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

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

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

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

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

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

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

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

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

    if -1.8999999999999999e-57 < z < 2.9e-183

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.9e-183 < z

    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. associate-*l*52.8%

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

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

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

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

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

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

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

Alternative 13: 74.6% 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.9 \cdot 10^{-57}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-179}:\\ \;\;\;\;-2 \cdot \left(x \cdot \left(\frac{z}{\frac{t}{z}} \cdot \frac{y}{a}\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 -1.9e-57)
   (* y (- x))
   (if (<= z 1.7e-179) (* -2.0 (* x (* (/ z (/ t z)) (/ y 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 <= -1.9e-57) {
		tmp = y * -x;
	} else if (z <= 1.7e-179) {
		tmp = -2.0 * (x * ((z / (t / z)) * (y / 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 <= (-1.9d-57)) then
        tmp = y * -x
    else if (z <= 1.7d-179) then
        tmp = (-2.0d0) * (x * ((z / (t / z)) * (y / 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 <= -1.9e-57) {
		tmp = y * -x;
	} else if (z <= 1.7e-179) {
		tmp = -2.0 * (x * ((z / (t / z)) * (y / 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 <= -1.9e-57:
		tmp = y * -x
	elif z <= 1.7e-179:
		tmp = -2.0 * (x * ((z / (t / z)) * (y / 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 <= -1.9e-57)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 1.7e-179)
		tmp = Float64(-2.0 * Float64(x * Float64(Float64(z / Float64(t / z)) * Float64(y / 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 <= -1.9e-57)
		tmp = y * -x;
	elseif (z <= 1.7e-179)
		tmp = -2.0 * (x * ((z / (t / z)) * (y / 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, -1.9e-57], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 1.7e-179], N[(-2.0 * N[(x * N[(N[(z / N[(t / z), $MachinePrecision]), $MachinePrecision] * N[(y / 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 -1.9 \cdot 10^{-57}:\\
\;\;\;\;y \cdot \left(-x\right)\\

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

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


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

    1. Initial program 61.0%

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

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

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

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

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

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

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

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

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

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

    if -1.8999999999999999e-57 < z < 1.6999999999999999e-179

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.6999999999999999e-179 < z

    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. associate-*l*52.8%

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

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

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

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

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

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

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

Alternative 14: 74.8% 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.9 \cdot 10^{-57}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-175}:\\ \;\;\;\;\frac{-2}{t} \cdot \frac{x \cdot \left(y \cdot \left(z \cdot z\right)\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 -1.9e-57)
   (* y (- x))
   (if (<= z 1.8e-175) (* (/ -2.0 t) (/ (* x (* y (* z z))) 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 <= -1.9e-57) {
		tmp = y * -x;
	} else if (z <= 1.8e-175) {
		tmp = (-2.0 / t) * ((x * (y * (z * z))) / 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 <= (-1.9d-57)) then
        tmp = y * -x
    else if (z <= 1.8d-175) then
        tmp = ((-2.0d0) / t) * ((x * (y * (z * z))) / 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 <= -1.9e-57) {
		tmp = y * -x;
	} else if (z <= 1.8e-175) {
		tmp = (-2.0 / t) * ((x * (y * (z * z))) / 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 <= -1.9e-57:
		tmp = y * -x
	elif z <= 1.8e-175:
		tmp = (-2.0 / t) * ((x * (y * (z * z))) / 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 <= -1.9e-57)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 1.8e-175)
		tmp = Float64(Float64(-2.0 / t) * Float64(Float64(x * Float64(y * Float64(z * z))) / 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 <= -1.9e-57)
		tmp = y * -x;
	elseif (z <= 1.8e-175)
		tmp = (-2.0 / t) * ((x * (y * (z * z))) / 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, -1.9e-57], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 1.8e-175], N[(N[(-2.0 / t), $MachinePrecision] * N[(N[(x * N[(y * N[(z * z), $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 -1.9 \cdot 10^{-57}:\\
\;\;\;\;y \cdot \left(-x\right)\\

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

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


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

    1. Initial program 61.0%

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

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

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

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

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

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

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

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

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

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

    if -1.8999999999999999e-57 < z < 1.8e-175

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8e-175 < z

    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. associate-*l*52.8%

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

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

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

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

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

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

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

Alternative 15: 74.6% 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.9 \cdot 10^{-57}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-184}:\\ \;\;\;\;\frac{y}{\frac{-0.5}{x} \cdot \left(t \cdot \frac{a}{z \cdot 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.9e-57)
   (* y (- x))
   (if (<= z 8e-184) (/ y (* (/ -0.5 x) (* t (/ a (* z 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.9e-57) {
		tmp = y * -x;
	} else if (z <= 8e-184) {
		tmp = y / ((-0.5 / x) * (t * (a / (z * 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.9d-57)) then
        tmp = y * -x
    else if (z <= 8d-184) then
        tmp = y / (((-0.5d0) / x) * (t * (a / (z * 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.9e-57) {
		tmp = y * -x;
	} else if (z <= 8e-184) {
		tmp = y / ((-0.5 / x) * (t * (a / (z * 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.9e-57:
		tmp = y * -x
	elif z <= 8e-184:
		tmp = y / ((-0.5 / x) * (t * (a / (z * 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.9e-57)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 8e-184)
		tmp = Float64(y / Float64(Float64(-0.5 / x) * Float64(t * Float64(a / Float64(z * 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.9e-57)
		tmp = y * -x;
	elseif (z <= 8e-184)
		tmp = y / ((-0.5 / x) * (t * (a / (z * z))));
	else
		tmp = y * x;
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.9e-57], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 8e-184], N[(y / N[(N[(-0.5 / x), $MachinePrecision] * N[(t * N[(a / N[(z * 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 -1.9 \cdot 10^{-57}:\\
\;\;\;\;y \cdot \left(-x\right)\\

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

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


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

    1. Initial program 61.0%

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

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

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

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

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

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

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

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

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

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

    if -1.8999999999999999e-57 < z < 8.0000000000000005e-184

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.0000000000000005e-184 < z

    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. associate-*l*52.8%

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

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

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

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

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

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

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

Alternative 16: 74.9% 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.9 \cdot 10^{-57}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 2.36 \cdot 10^{-141}:\\ \;\;\;\;\frac{y}{\frac{-0.5 \cdot \left(\frac{a}{z} \cdot \frac{t}{z}\right)}{x}}\\ \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.9e-57)
   (* y (- x))
   (if (<= z 2.36e-141) (/ y (/ (* -0.5 (* (/ a z) (/ t z))) 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 <= -1.9e-57) {
		tmp = y * -x;
	} else if (z <= 2.36e-141) {
		tmp = y / ((-0.5 * ((a / z) * (t / z))) / 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 <= (-1.9d-57)) then
        tmp = y * -x
    else if (z <= 2.36d-141) then
        tmp = y / (((-0.5d0) * ((a / z) * (t / z))) / 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 <= -1.9e-57) {
		tmp = y * -x;
	} else if (z <= 2.36e-141) {
		tmp = y / ((-0.5 * ((a / z) * (t / z))) / 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 <= -1.9e-57:
		tmp = y * -x
	elif z <= 2.36e-141:
		tmp = y / ((-0.5 * ((a / z) * (t / z))) / 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 <= -1.9e-57)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 2.36e-141)
		tmp = Float64(y / Float64(Float64(-0.5 * Float64(Float64(a / z) * Float64(t / z))) / 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 <= -1.9e-57)
		tmp = y * -x;
	elseif (z <= 2.36e-141)
		tmp = y / ((-0.5 * ((a / z) * (t / z))) / 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, -1.9e-57], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 2.36e-141], N[(y / N[(N[(-0.5 * N[(N[(a / z), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $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.9 \cdot 10^{-57}:\\
\;\;\;\;y \cdot \left(-x\right)\\

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

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


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

    1. Initial program 61.0%

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

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

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

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

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

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

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

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

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

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

    if -1.8999999999999999e-57 < z < 2.35999999999999986e-141

    1. Initial program 77.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{\frac{-0.5 \cdot \frac{a \cdot t}{\color{blue}{z \cdot z}}}{x}} \]
      2. times-frac51.4%

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

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

    if 2.35999999999999986e-141 < z

    1. Initial program 56.9%

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 66.5%

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

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

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

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

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

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

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

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

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

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

    if -5.19999999999999984e-176 < 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. associate-*l*59.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 76.2% 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 -1.2 \cdot 10^{-50}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-181}:\\ \;\;\;\;\frac{y \cdot \left(z \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 -1.2e-50)
   (* y (- x))
   (if (<= z 2.9e-181) (/ (* 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 <= -1.2e-50) {
		tmp = y * -x;
	} else if (z <= 2.9e-181) {
		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 <= (-1.2d-50)) then
        tmp = y * -x
    else if (z <= 2.9d-181) 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 <= -1.2e-50) {
		tmp = y * -x;
	} else if (z <= 2.9e-181) {
		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 <= -1.2e-50:
		tmp = y * -x
	elif z <= 2.9e-181:
		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 <= -1.2e-50)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 2.9e-181)
		tmp = Float64(Float64(y * Float64(z * 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 <= -1.2e-50)
		tmp = y * -x;
	elseif (z <= 2.9e-181)
		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, -1.2e-50], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 2.9e-181], N[(N[(y * N[(z * 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 -1.2 \cdot 10^{-50}:\\
\;\;\;\;y \cdot \left(-x\right)\\

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

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


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

    1. Initial program 61.0%

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

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

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

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

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

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

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

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

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

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

    if -1.20000000000000001e-50 < z < 2.8999999999999998e-181

    1. Initial program 77.5%

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

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

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

      \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{-z}} \]
    5. Taylor expanded in x around 0 46.9%

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

    if 2.8999999999999998e-181 < z

    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. associate-*l*52.8%

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

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

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

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

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

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

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

Alternative 19: 74.5% 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 -4.2 \cdot 10^{-174}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-208}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{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 -4.2e-174)
   (* y (- x))
   (if (<= z 9.2e-208) (* x (/ (* z y) 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 <= -4.2e-174) {
		tmp = y * -x;
	} else if (z <= 9.2e-208) {
		tmp = x * ((z * y) / 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 <= (-4.2d-174)) then
        tmp = y * -x
    else if (z <= 9.2d-208) then
        tmp = x * ((z * y) / 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 <= -4.2e-174) {
		tmp = y * -x;
	} else if (z <= 9.2e-208) {
		tmp = x * ((z * y) / 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 <= -4.2e-174:
		tmp = y * -x
	elif z <= 9.2e-208:
		tmp = x * ((z * y) / 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 <= -4.2e-174)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 9.2e-208)
		tmp = Float64(x * Float64(Float64(z * y) / 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 <= -4.2e-174)
		tmp = y * -x;
	elseif (z <= 9.2e-208)
		tmp = x * ((z * y) / 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, -4.2e-174], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 9.2e-208], N[(x * N[(N[(z * y), $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 -4.2 \cdot 10^{-174}:\\
\;\;\;\;y \cdot \left(-x\right)\\

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

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


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

    1. Initial program 66.5%

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

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

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

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

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

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

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

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

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

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

    if -4.20000000000000021e-174 < z < 9.19999999999999986e-208

    1. Initial program 72.0%

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

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

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

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

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

    if 9.19999999999999986e-208 < z

    1. Initial program 58.2%

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

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

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

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

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

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

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

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

Alternative 20: 75.8% 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 \cdot 10^{-171}:\\ \;\;\;\;y \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-122}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\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-171)
   (* y (- x))
   (if (<= z 2.3e-122) (/ (* x (* z y)) 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-171) {
		tmp = y * -x;
	} else if (z <= 2.3e-122) {
		tmp = (x * (z * y)) / 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-171)) then
        tmp = y * -x
    else if (z <= 2.3d-122) then
        tmp = (x * (z * y)) / 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-171) {
		tmp = y * -x;
	} else if (z <= 2.3e-122) {
		tmp = (x * (z * y)) / 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-171:
		tmp = y * -x
	elif z <= 2.3e-122:
		tmp = (x * (z * y)) / 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-171)
		tmp = Float64(y * Float64(-x));
	elseif (z <= 2.3e-122)
		tmp = Float64(Float64(x * Float64(z * y)) / 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-171)
		tmp = y * -x;
	elseif (z <= 2.3e-122)
		tmp = (x * (z * y)) / 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-171], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 2.3e-122], N[(N[(x * N[(z * y), $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^{-171}:\\
\;\;\;\;y \cdot \left(-x\right)\\

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

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


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

    1. Initial program 66.5%

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

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

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

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

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

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

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

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

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

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

    if -2e-171 < z < 2.30000000000000007e-122

    1. Initial program 72.4%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{z \cdot \left(x \cdot y\right)}}{z} \]
      3. /-rgt-identity41.9%

        \[\leadsto \frac{z \cdot \color{blue}{\frac{x \cdot y}{1}}}{z} \]
      4. *-commutative41.9%

        \[\leadsto \frac{\color{blue}{\frac{x \cdot y}{1} \cdot z}}{z} \]
      5. /-rgt-identity41.9%

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

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

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

    if 2.30000000000000007e-122 < z

    1. Initial program 56.5%

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

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

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

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

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

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

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

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

Alternative 21: 73.6% 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 -5 \cdot 10^{-293}:\\ \;\;\;\;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 -5e-293) (* 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 <= -5e-293) {
		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 <= (-5d-293)) 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 <= -5e-293) {
		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 <= -5e-293:
		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 <= -5e-293)
		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 <= -5e-293)
		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, -5e-293], 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 -5 \cdot 10^{-293}:\\
\;\;\;\;y \cdot \left(-x\right)\\

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


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

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000003e-293 < z

    1. Initial program 60.3%

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

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

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

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

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

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

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

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

Alternative 22: 43.8% 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 63.8%

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

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

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

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

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

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

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

    \[\leadsto y \cdot x \]

Developer target: 89.3% 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 2023279 
(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)))))