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

Percentage Accurate: 61.2% → 92.2%
Time: 15.4s
Alternatives: 18
Speedup: 37.7×

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 18 alternatives:

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

Initial Program: 61.2% accurate, 1.0× speedup?

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

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

Alternative 1: 92.2% accurate, 0.9× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 3.3 \cdot 10^{+15}:\\ \;\;\;\;\frac{x\_m}{-1} \cdot \frac{0 - z\_m \cdot y\_m}{\sqrt{z\_m \cdot z\_m - t \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{1 + \frac{a \cdot -0.5}{\frac{z\_m}{\frac{t}{z\_m}}}}\\ \end{array}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s y_s x_s x_m y_m z_m t a)
 :precision binary64
 (*
  z_s
  (*
   y_s
   (*
    x_s
    (if (<= z_m 3.3e+15)
      (* (/ x_m -1.0) (/ (- 0.0 (* z_m y_m)) (sqrt (- (* z_m z_m) (* t a)))))
      (/ (* x_m y_m) (+ 1.0 (/ (* a -0.5) (/ z_m (/ t z_m))))))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 3.3e+15) {
		tmp = (x_m / -1.0) * ((0.0 - (z_m * y_m)) / sqrt(((z_m * z_m) - (t * a))));
	} else {
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))));
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z_m <= 3.3d+15) then
        tmp = (x_m / (-1.0d0)) * ((0.0d0 - (z_m * y_m)) / sqrt(((z_m * z_m) - (t * a))))
    else
        tmp = (x_m * y_m) / (1.0d0 + ((a * (-0.5d0)) / (z_m / (t / z_m))))
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
assert x_m < y_m && y_m < z_m && z_m < t && t < a;
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 3.3e+15) {
		tmp = (x_m / -1.0) * ((0.0 - (z_m * y_m)) / Math.sqrt(((z_m * z_m) - (t * a))));
	} else {
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))));
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
[x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
	tmp = 0
	if z_m <= 3.3e+15:
		tmp = (x_m / -1.0) * ((0.0 - (z_m * y_m)) / math.sqrt(((z_m * z_m) - (t * a))))
	else:
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))))
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0
	if (z_m <= 3.3e+15)
		tmp = Float64(Float64(x_m / -1.0) * Float64(Float64(0.0 - Float64(z_m * y_m)) / sqrt(Float64(Float64(z_m * z_m) - Float64(t * a)))));
	else
		tmp = Float64(Float64(x_m * y_m) / Float64(1.0 + Float64(Float64(a * -0.5) / Float64(z_m / Float64(t / z_m)))));
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0;
	if (z_m <= 3.3e+15)
		tmp = (x_m / -1.0) * ((0.0 - (z_m * y_m)) / sqrt(((z_m * z_m) - (t * a))));
	else
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))));
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[z$95$m, 3.3e+15], N[(N[(x$95$m / -1.0), $MachinePrecision] * N[(N[(0.0 - N[(z$95$m * y$95$m), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m * y$95$m), $MachinePrecision] / N[(1.0 + N[(N[(a * -0.5), $MachinePrecision] / N[(z$95$m / N[(t / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 3.3 \cdot 10^{+15}:\\
\;\;\;\;\frac{x\_m}{-1} \cdot \frac{0 - z\_m \cdot y\_m}{\sqrt{z\_m \cdot z\_m - t \cdot a}}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 3.3e15

    1. Initial program 71.2%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. frac-2negN/A

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

        \[\leadsto \frac{\mathsf{neg}\left(x \cdot \left(y \cdot z\right)\right)}{\mathsf{neg}\left(\sqrt{\color{blue}{z \cdot z - t \cdot a}}\right)} \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \frac{x \cdot \left(\mathsf{neg}\left(y \cdot z\right)\right)}{\mathsf{neg}\left(\color{blue}{\sqrt{z \cdot z - t \cdot a}}\right)} \]
      4. neg-mul-1N/A

        \[\leadsto \frac{x \cdot \left(\mathsf{neg}\left(y \cdot z\right)\right)}{-1 \cdot \color{blue}{\sqrt{z \cdot z - t \cdot a}}} \]
      5. times-fracN/A

        \[\leadsto \frac{x}{-1} \cdot \color{blue}{\frac{\mathsf{neg}\left(y \cdot z\right)}{\sqrt{z \cdot z - t \cdot a}}} \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{x}{-1}\right), \color{blue}{\left(\frac{\mathsf{neg}\left(y \cdot z\right)}{\sqrt{z \cdot z - t \cdot a}}\right)}\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, -1\right), \left(\frac{\color{blue}{\mathsf{neg}\left(y \cdot z\right)}}{\sqrt{z \cdot z - t \cdot a}}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, -1\right), \mathsf{/.f64}\left(\left(\mathsf{neg}\left(y \cdot z\right)\right), \color{blue}{\left(\sqrt{z \cdot z - t \cdot a}\right)}\right)\right) \]
      9. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, -1\right), \mathsf{/.f64}\left(\left(0 - y \cdot z\right), \left(\sqrt{\color{blue}{z \cdot z - t \cdot a}}\right)\right)\right) \]
      10. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, -1\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \left(y \cdot z\right)\right), \left(\sqrt{\color{blue}{z \cdot z - t \cdot a}}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, -1\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y, z\right)\right), \left(\sqrt{z \cdot z - \color{blue}{t \cdot a}}\right)\right)\right) \]
      12. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, -1\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{sqrt.f64}\left(\left(z \cdot z - t \cdot a\right)\right)\right)\right) \]
      13. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, -1\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\left(z \cdot z\right), \left(t \cdot a\right)\right)\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, -1\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, z\right), \left(t \cdot a\right)\right)\right)\right)\right) \]
      15. *-lowering-*.f6472.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, -1\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, z\right), \mathsf{*.f64}\left(t, a\right)\right)\right)\right)\right) \]
    4. Applied egg-rr72.7%

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

    if 3.3e15 < z

    1. Initial program 46.9%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \color{blue}{\left(z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right)\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \left(a \cdot \color{blue}{\frac{t}{{z}^{2}}}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \color{blue}{\left(\frac{t}{{z}^{2}}\right)}\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \color{blue}{\left({z}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \left(z \cdot \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f6486.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
    5. Simplified86.6%

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

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

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

        \[\leadsto \left(x \cdot y\right) \cdot \frac{1}{\color{blue}{1} + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)} \]
      4. div-invN/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)}\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{1} + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)}\right)\right) \]
      8. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \left(\left(\frac{-1}{2} \cdot a\right) \cdot \color{blue}{\frac{t}{z \cdot z}}\right)\right)\right) \]
      9. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \left(\left(\frac{-1}{2} \cdot a\right) \cdot \frac{1}{\color{blue}{\frac{z \cdot z}{t}}}\right)\right)\right) \]
      10. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \left(\frac{\frac{-1}{2} \cdot a}{\color{blue}{\frac{z \cdot z}{t}}}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot a\right), \color{blue}{\left(\frac{z \cdot z}{t}\right)}\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{\color{blue}{z \cdot z}}{t}\right)\right)\right)\right) \]
      13. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{1}{\color{blue}{\frac{t}{z \cdot z}}}\right)\right)\right)\right) \]
      14. associate-/r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{1}{\frac{\frac{t}{z}}{\color{blue}{z}}}\right)\right)\right)\right) \]
      15. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{z}{\color{blue}{\frac{t}{z}}}\right)\right)\right)\right) \]
      16. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \mathsf{/.f64}\left(z, \color{blue}{\left(\frac{t}{z}\right)}\right)\right)\right)\right) \]
      17. /-lowering-/.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \mathsf{/.f64}\left(z, \mathsf{/.f64}\left(t, \color{blue}{z}\right)\right)\right)\right)\right) \]
    7. Applied egg-rr100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 3.3 \cdot 10^{+15}:\\ \;\;\;\;\frac{x}{-1} \cdot \frac{0 - z \cdot y}{\sqrt{z \cdot z - t \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{1 + \frac{a \cdot -0.5}{\frac{z}{\frac{t}{z}}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 89.4% accurate, 0.9× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 7.4 \cdot 10^{-73}:\\ \;\;\;\;x\_m \cdot \frac{z\_m \cdot y\_m}{{\left(0 - t \cdot a\right)}^{0.5}}\\ \mathbf{elif}\;z\_m \leq 1.4 \cdot 10^{+105}:\\ \;\;\;\;\frac{y\_m}{\sqrt{z\_m \cdot z\_m - t \cdot a}} \cdot \left(z\_m \cdot x\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{1 + \frac{a \cdot -0.5}{\frac{z\_m}{\frac{t}{z\_m}}}}\\ \end{array}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s y_s x_s x_m y_m z_m t a)
 :precision binary64
 (*
  z_s
  (*
   y_s
   (*
    x_s
    (if (<= z_m 7.4e-73)
      (* x_m (/ (* z_m y_m) (pow (- 0.0 (* t a)) 0.5)))
      (if (<= z_m 1.4e+105)
        (* (/ y_m (sqrt (- (* z_m z_m) (* t a)))) (* z_m x_m))
        (/ (* x_m y_m) (+ 1.0 (/ (* a -0.5) (/ z_m (/ t z_m)))))))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 7.4e-73) {
		tmp = x_m * ((z_m * y_m) / pow((0.0 - (t * a)), 0.5));
	} else if (z_m <= 1.4e+105) {
		tmp = (y_m / sqrt(((z_m * z_m) - (t * a)))) * (z_m * x_m);
	} else {
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))));
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z_m <= 7.4d-73) then
        tmp = x_m * ((z_m * y_m) / ((0.0d0 - (t * a)) ** 0.5d0))
    else if (z_m <= 1.4d+105) then
        tmp = (y_m / sqrt(((z_m * z_m) - (t * a)))) * (z_m * x_m)
    else
        tmp = (x_m * y_m) / (1.0d0 + ((a * (-0.5d0)) / (z_m / (t / z_m))))
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
assert x_m < y_m && y_m < z_m && z_m < t && t < a;
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 7.4e-73) {
		tmp = x_m * ((z_m * y_m) / Math.pow((0.0 - (t * a)), 0.5));
	} else if (z_m <= 1.4e+105) {
		tmp = (y_m / Math.sqrt(((z_m * z_m) - (t * a)))) * (z_m * x_m);
	} else {
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))));
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
[x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
	tmp = 0
	if z_m <= 7.4e-73:
		tmp = x_m * ((z_m * y_m) / math.pow((0.0 - (t * a)), 0.5))
	elif z_m <= 1.4e+105:
		tmp = (y_m / math.sqrt(((z_m * z_m) - (t * a)))) * (z_m * x_m)
	else:
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))))
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0
	if (z_m <= 7.4e-73)
		tmp = Float64(x_m * Float64(Float64(z_m * y_m) / (Float64(0.0 - Float64(t * a)) ^ 0.5)));
	elseif (z_m <= 1.4e+105)
		tmp = Float64(Float64(y_m / sqrt(Float64(Float64(z_m * z_m) - Float64(t * a)))) * Float64(z_m * x_m));
	else
		tmp = Float64(Float64(x_m * y_m) / Float64(1.0 + Float64(Float64(a * -0.5) / Float64(z_m / Float64(t / z_m)))));
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0;
	if (z_m <= 7.4e-73)
		tmp = x_m * ((z_m * y_m) / ((0.0 - (t * a)) ^ 0.5));
	elseif (z_m <= 1.4e+105)
		tmp = (y_m / sqrt(((z_m * z_m) - (t * a)))) * (z_m * x_m);
	else
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))));
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[z$95$m, 7.4e-73], N[(x$95$m * N[(N[(z$95$m * y$95$m), $MachinePrecision] / N[Power[N[(0.0 - N[(t * a), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z$95$m, 1.4e+105], N[(N[(y$95$m / N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(z$95$m * x$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m * y$95$m), $MachinePrecision] / N[(1.0 + N[(N[(a * -0.5), $MachinePrecision] / N[(z$95$m / N[(t / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 7.4 \cdot 10^{-73}:\\
\;\;\;\;x\_m \cdot \frac{z\_m \cdot y\_m}{{\left(0 - t \cdot a\right)}^{0.5}}\\

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

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < 7.4000000000000002e-73

    1. Initial program 66.3%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot t\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{sqrt.f64}\left(\left(\mathsf{neg}\left(a \cdot t\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{sqrt.f64}\left(\left(0 - a \cdot t\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot t\right)\right)\right)\right) \]
      4. *-lowering-*.f6443.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, t\right)\right)\right)\right) \]
    5. Simplified43.6%

      \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\sqrt{\color{blue}{0 - a \cdot t}}} \]
    6. Step-by-step derivation
      1. associate-*l*N/A

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

        \[\leadsto x \cdot \color{blue}{\frac{y \cdot z}{\sqrt{0 - a \cdot t}}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y \cdot z}{\sqrt{0 - a \cdot t}}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot z\right), \color{blue}{\left(\sqrt{0 - a \cdot t}\right)}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), \left(\sqrt{\color{blue}{0 - a \cdot t}}\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), \left({\left(0 - a \cdot t\right)}^{\color{blue}{\frac{1}{2}}}\right)\right)\right) \]
      7. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), \mathsf{pow.f64}\left(\left(0 - a \cdot t\right), \color{blue}{\frac{1}{2}}\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), \mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot t\right)\right), \frac{1}{2}\right)\right)\right) \]
      9. *-lowering-*.f6443.7%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), \mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, t\right)\right), \frac{1}{2}\right)\right)\right) \]
    7. Applied egg-rr43.7%

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

    if 7.4000000000000002e-73 < z < 1.4000000000000001e105

    1. Initial program 99.8%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto \left(z \cdot x\right) \cdot \color{blue}{\frac{y}{\sqrt{z \cdot z - t \cdot a}}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(z \cdot x\right), \color{blue}{\left(\frac{y}{\sqrt{z \cdot z - t \cdot a}}\right)}\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(x \cdot z\right), \left(\frac{\color{blue}{y}}{\sqrt{z \cdot z - t \cdot a}}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, z\right), \left(\frac{\color{blue}{y}}{\sqrt{z \cdot z - t \cdot a}}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, z\right), \mathsf{/.f64}\left(y, \color{blue}{\left(\sqrt{z \cdot z - t \cdot a}\right)}\right)\right) \]
      8. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, z\right), \mathsf{/.f64}\left(y, \mathsf{sqrt.f64}\left(\left(z \cdot z - t \cdot a\right)\right)\right)\right) \]
      9. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, z\right), \mathsf{/.f64}\left(y, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\left(z \cdot z\right), \left(t \cdot a\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, z\right), \mathsf{/.f64}\left(y, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, z\right), \left(t \cdot a\right)\right)\right)\right)\right) \]
      11. *-lowering-*.f6497.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, z\right), \mathsf{/.f64}\left(y, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, z\right), \mathsf{*.f64}\left(t, a\right)\right)\right)\right)\right) \]
    4. Applied egg-rr97.5%

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

    if 1.4000000000000001e105 < z

    1. Initial program 29.6%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \color{blue}{\left(z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right)\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \left(a \cdot \color{blue}{\frac{t}{{z}^{2}}}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \color{blue}{\left(\frac{t}{{z}^{2}}\right)}\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \color{blue}{\left({z}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \left(z \cdot \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f6482.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
    5. Simplified82.3%

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

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

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

        \[\leadsto \left(x \cdot y\right) \cdot \frac{1}{\color{blue}{1} + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)} \]
      4. div-invN/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)}\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{1} + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)}\right)\right) \]
      8. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \left(\left(\frac{-1}{2} \cdot a\right) \cdot \color{blue}{\frac{t}{z \cdot z}}\right)\right)\right) \]
      9. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \left(\left(\frac{-1}{2} \cdot a\right) \cdot \frac{1}{\color{blue}{\frac{z \cdot z}{t}}}\right)\right)\right) \]
      10. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \left(\frac{\frac{-1}{2} \cdot a}{\color{blue}{\frac{z \cdot z}{t}}}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot a\right), \color{blue}{\left(\frac{z \cdot z}{t}\right)}\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{\color{blue}{z \cdot z}}{t}\right)\right)\right)\right) \]
      13. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{1}{\color{blue}{\frac{t}{z \cdot z}}}\right)\right)\right)\right) \]
      14. associate-/r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{1}{\frac{\frac{t}{z}}{\color{blue}{z}}}\right)\right)\right)\right) \]
      15. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{z}{\color{blue}{\frac{t}{z}}}\right)\right)\right)\right) \]
      16. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \mathsf{/.f64}\left(z, \color{blue}{\left(\frac{t}{z}\right)}\right)\right)\right)\right) \]
      17. /-lowering-/.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \mathsf{/.f64}\left(z, \mathsf{/.f64}\left(t, \color{blue}{z}\right)\right)\right)\right)\right) \]
    7. Applied egg-rr100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 7.4 \cdot 10^{-73}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{{\left(0 - t \cdot a\right)}^{0.5}}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+105}:\\ \;\;\;\;\frac{y}{\sqrt{z \cdot z - t \cdot a}} \cdot \left(z \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{1 + \frac{a \cdot -0.5}{\frac{z}{\frac{t}{z}}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 92.1% accurate, 1.0× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 3.7 \cdot 10^{+15}:\\ \;\;\;\;\frac{x\_m}{\frac{\sqrt{z\_m \cdot z\_m - t \cdot a}}{z\_m \cdot y\_m}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{1 + \frac{a \cdot -0.5}{\frac{z\_m}{\frac{t}{z\_m}}}}\\ \end{array}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s y_s x_s x_m y_m z_m t a)
 :precision binary64
 (*
  z_s
  (*
   y_s
   (*
    x_s
    (if (<= z_m 3.7e+15)
      (/ x_m (/ (sqrt (- (* z_m z_m) (* t a))) (* z_m y_m)))
      (/ (* x_m y_m) (+ 1.0 (/ (* a -0.5) (/ z_m (/ t z_m))))))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 3.7e+15) {
		tmp = x_m / (sqrt(((z_m * z_m) - (t * a))) / (z_m * y_m));
	} else {
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))));
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z_m <= 3.7d+15) then
        tmp = x_m / (sqrt(((z_m * z_m) - (t * a))) / (z_m * y_m))
    else
        tmp = (x_m * y_m) / (1.0d0 + ((a * (-0.5d0)) / (z_m / (t / z_m))))
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
assert x_m < y_m && y_m < z_m && z_m < t && t < a;
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 3.7e+15) {
		tmp = x_m / (Math.sqrt(((z_m * z_m) - (t * a))) / (z_m * y_m));
	} else {
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))));
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
[x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
	tmp = 0
	if z_m <= 3.7e+15:
		tmp = x_m / (math.sqrt(((z_m * z_m) - (t * a))) / (z_m * y_m))
	else:
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))))
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0
	if (z_m <= 3.7e+15)
		tmp = Float64(x_m / Float64(sqrt(Float64(Float64(z_m * z_m) - Float64(t * a))) / Float64(z_m * y_m)));
	else
		tmp = Float64(Float64(x_m * y_m) / Float64(1.0 + Float64(Float64(a * -0.5) / Float64(z_m / Float64(t / z_m)))));
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0;
	if (z_m <= 3.7e+15)
		tmp = x_m / (sqrt(((z_m * z_m) - (t * a))) / (z_m * y_m));
	else
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))));
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[z$95$m, 3.7e+15], N[(x$95$m / N[(N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(z$95$m * y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m * y$95$m), $MachinePrecision] / N[(1.0 + N[(N[(a * -0.5), $MachinePrecision] / N[(z$95$m / N[(t / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 3.7 \cdot 10^{+15}:\\
\;\;\;\;\frac{x\_m}{\frac{\sqrt{z\_m \cdot z\_m - t \cdot a}}{z\_m \cdot y\_m}}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 3.7e15

    1. Initial program 71.2%

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

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

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

        \[\leadsto \frac{y \cdot z}{\sqrt{z \cdot z - t \cdot a}} \cdot \color{blue}{x} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{y \cdot z}{\sqrt{z \cdot z - t \cdot a}}\right), \color{blue}{x}\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\left(y \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\right), x\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\left(y \cdot \frac{1}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\right), x\right) \]
      7. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\right), x\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, \left(\frac{\sqrt{z \cdot z - t \cdot a}}{z}\right)\right), x\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\left(\sqrt{z \cdot z - t \cdot a}\right), z\right)\right), x\right) \]
      10. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(z \cdot z - t \cdot a\right)\right), z\right)\right), x\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\left(z \cdot z\right), \left(t \cdot a\right)\right)\right), z\right)\right), x\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, z\right), \left(t \cdot a\right)\right)\right), z\right)\right), x\right) \]
      13. *-lowering-*.f6472.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, z\right), \mathsf{*.f64}\left(t, a\right)\right)\right), z\right)\right), x\right) \]
    4. Applied egg-rr72.9%

      \[\leadsto \color{blue}{\frac{y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}} \cdot x} \]
    5. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\frac{y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}} \]
      2. clear-numN/A

        \[\leadsto x \cdot \frac{1}{\color{blue}{\frac{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}{y}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{x}{\color{blue}{\frac{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}{y}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(\frac{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}{y}\right)}\right) \]
      5. associate-/l/N/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(\frac{\sqrt{z \cdot z - t \cdot a}}{\color{blue}{y \cdot z}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(\left(\sqrt{z \cdot z - t \cdot a}\right), \color{blue}{\left(y \cdot z\right)}\right)\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(z \cdot z - t \cdot a\right)\right), \left(\color{blue}{y} \cdot z\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(z \cdot z - a \cdot t\right)\right), \left(y \cdot z\right)\right)\right) \]
      9. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\left(z \cdot z\right), \left(a \cdot t\right)\right)\right), \left(y \cdot z\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, z\right), \left(a \cdot t\right)\right)\right), \left(y \cdot z\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, z\right), \mathsf{*.f64}\left(a, t\right)\right)\right), \left(y \cdot z\right)\right)\right) \]
      12. *-lowering-*.f6472.6%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, z\right), \mathsf{*.f64}\left(a, t\right)\right)\right), \mathsf{*.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
    6. Applied egg-rr72.6%

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

    if 3.7e15 < z

    1. Initial program 46.9%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \color{blue}{\left(z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right)\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \left(a \cdot \color{blue}{\frac{t}{{z}^{2}}}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \color{blue}{\left(\frac{t}{{z}^{2}}\right)}\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \color{blue}{\left({z}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \left(z \cdot \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f6486.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
    5. Simplified86.6%

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

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

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

        \[\leadsto \left(x \cdot y\right) \cdot \frac{1}{\color{blue}{1} + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)} \]
      4. div-invN/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)}\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{1} + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)}\right)\right) \]
      8. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \left(\left(\frac{-1}{2} \cdot a\right) \cdot \color{blue}{\frac{t}{z \cdot z}}\right)\right)\right) \]
      9. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \left(\left(\frac{-1}{2} \cdot a\right) \cdot \frac{1}{\color{blue}{\frac{z \cdot z}{t}}}\right)\right)\right) \]
      10. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \left(\frac{\frac{-1}{2} \cdot a}{\color{blue}{\frac{z \cdot z}{t}}}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot a\right), \color{blue}{\left(\frac{z \cdot z}{t}\right)}\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{\color{blue}{z \cdot z}}{t}\right)\right)\right)\right) \]
      13. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{1}{\color{blue}{\frac{t}{z \cdot z}}}\right)\right)\right)\right) \]
      14. associate-/r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{1}{\frac{\frac{t}{z}}{\color{blue}{z}}}\right)\right)\right)\right) \]
      15. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{z}{\color{blue}{\frac{t}{z}}}\right)\right)\right)\right) \]
      16. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \mathsf{/.f64}\left(z, \color{blue}{\left(\frac{t}{z}\right)}\right)\right)\right)\right) \]
      17. /-lowering-/.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \mathsf{/.f64}\left(z, \mathsf{/.f64}\left(t, \color{blue}{z}\right)\right)\right)\right)\right) \]
    7. Applied egg-rr100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 3.7 \cdot 10^{+15}:\\ \;\;\;\;\frac{x}{\frac{\sqrt{z \cdot z - t \cdot a}}{z \cdot y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{1 + \frac{a \cdot -0.5}{\frac{z}{\frac{t}{z}}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 92.3% accurate, 1.0× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 5 \cdot 10^{+105}:\\ \;\;\;\;x\_m \cdot \frac{y\_m}{\frac{\sqrt{z\_m \cdot z\_m - t \cdot a}}{z\_m}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{1 + \frac{a \cdot -0.5}{\frac{z\_m}{\frac{t}{z\_m}}}}\\ \end{array}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s y_s x_s x_m y_m z_m t a)
 :precision binary64
 (*
  z_s
  (*
   y_s
   (*
    x_s
    (if (<= z_m 5e+105)
      (* x_m (/ y_m (/ (sqrt (- (* z_m z_m) (* t a))) z_m)))
      (/ (* x_m y_m) (+ 1.0 (/ (* a -0.5) (/ z_m (/ t z_m))))))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 5e+105) {
		tmp = x_m * (y_m / (sqrt(((z_m * z_m) - (t * a))) / z_m));
	} else {
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))));
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z_m <= 5d+105) then
        tmp = x_m * (y_m / (sqrt(((z_m * z_m) - (t * a))) / z_m))
    else
        tmp = (x_m * y_m) / (1.0d0 + ((a * (-0.5d0)) / (z_m / (t / z_m))))
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
assert x_m < y_m && y_m < z_m && z_m < t && t < a;
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 5e+105) {
		tmp = x_m * (y_m / (Math.sqrt(((z_m * z_m) - (t * a))) / z_m));
	} else {
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))));
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
[x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
	tmp = 0
	if z_m <= 5e+105:
		tmp = x_m * (y_m / (math.sqrt(((z_m * z_m) - (t * a))) / z_m))
	else:
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))))
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0
	if (z_m <= 5e+105)
		tmp = Float64(x_m * Float64(y_m / Float64(sqrt(Float64(Float64(z_m * z_m) - Float64(t * a))) / z_m)));
	else
		tmp = Float64(Float64(x_m * y_m) / Float64(1.0 + Float64(Float64(a * -0.5) / Float64(z_m / Float64(t / z_m)))));
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0;
	if (z_m <= 5e+105)
		tmp = x_m * (y_m / (sqrt(((z_m * z_m) - (t * a))) / z_m));
	else
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))));
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[z$95$m, 5e+105], N[(x$95$m * N[(y$95$m / N[(N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m * y$95$m), $MachinePrecision] / N[(1.0 + N[(N[(a * -0.5), $MachinePrecision] / N[(z$95$m / N[(t / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 5 \cdot 10^{+105}:\\
\;\;\;\;x\_m \cdot \frac{y\_m}{\frac{\sqrt{z\_m \cdot z\_m - t \cdot a}}{z\_m}}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 5.00000000000000046e105

    1. Initial program 73.9%

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

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

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

        \[\leadsto \frac{y \cdot z}{\sqrt{z \cdot z - t \cdot a}} \cdot \color{blue}{x} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{y \cdot z}{\sqrt{z \cdot z - t \cdot a}}\right), \color{blue}{x}\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\left(y \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\right), x\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\left(y \cdot \frac{1}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\right), x\right) \]
      7. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\right), x\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, \left(\frac{\sqrt{z \cdot z - t \cdot a}}{z}\right)\right), x\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\left(\sqrt{z \cdot z - t \cdot a}\right), z\right)\right), x\right) \]
      10. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(z \cdot z - t \cdot a\right)\right), z\right)\right), x\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\left(z \cdot z\right), \left(t \cdot a\right)\right)\right), z\right)\right), x\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, z\right), \left(t \cdot a\right)\right)\right), z\right)\right), x\right) \]
      13. *-lowering-*.f6475.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, z\right), \mathsf{*.f64}\left(t, a\right)\right)\right), z\right)\right), x\right) \]
    4. Applied egg-rr75.5%

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

    if 5.00000000000000046e105 < z

    1. Initial program 29.6%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \color{blue}{\left(z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right)\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \left(a \cdot \color{blue}{\frac{t}{{z}^{2}}}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \color{blue}{\left(\frac{t}{{z}^{2}}\right)}\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \color{blue}{\left({z}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \left(z \cdot \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f6482.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
    5. Simplified82.3%

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

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

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

        \[\leadsto \left(x \cdot y\right) \cdot \frac{1}{\color{blue}{1} + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)} \]
      4. div-invN/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)}\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{1} + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)}\right)\right) \]
      8. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \left(\left(\frac{-1}{2} \cdot a\right) \cdot \color{blue}{\frac{t}{z \cdot z}}\right)\right)\right) \]
      9. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \left(\left(\frac{-1}{2} \cdot a\right) \cdot \frac{1}{\color{blue}{\frac{z \cdot z}{t}}}\right)\right)\right) \]
      10. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \left(\frac{\frac{-1}{2} \cdot a}{\color{blue}{\frac{z \cdot z}{t}}}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot a\right), \color{blue}{\left(\frac{z \cdot z}{t}\right)}\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{\color{blue}{z \cdot z}}{t}\right)\right)\right)\right) \]
      13. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{1}{\color{blue}{\frac{t}{z \cdot z}}}\right)\right)\right)\right) \]
      14. associate-/r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{1}{\frac{\frac{t}{z}}{\color{blue}{z}}}\right)\right)\right)\right) \]
      15. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{z}{\color{blue}{\frac{t}{z}}}\right)\right)\right)\right) \]
      16. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \mathsf{/.f64}\left(z, \color{blue}{\left(\frac{t}{z}\right)}\right)\right)\right)\right) \]
      17. /-lowering-/.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \mathsf{/.f64}\left(z, \mathsf{/.f64}\left(t, \color{blue}{z}\right)\right)\right)\right)\right) \]
    7. Applied egg-rr100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 5 \cdot 10^{+105}:\\ \;\;\;\;x \cdot \frac{y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{1 + \frac{a \cdot -0.5}{\frac{z}{\frac{t}{z}}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 91.7% accurate, 1.0× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 3.7 \cdot 10^{+15}:\\ \;\;\;\;\left(z\_m \cdot y\_m\right) \cdot \frac{x\_m}{\sqrt{z\_m \cdot z\_m - t \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{1 + \frac{a \cdot -0.5}{\frac{z\_m}{\frac{t}{z\_m}}}}\\ \end{array}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s y_s x_s x_m y_m z_m t a)
 :precision binary64
 (*
  z_s
  (*
   y_s
   (*
    x_s
    (if (<= z_m 3.7e+15)
      (* (* z_m y_m) (/ x_m (sqrt (- (* z_m z_m) (* t a)))))
      (/ (* x_m y_m) (+ 1.0 (/ (* a -0.5) (/ z_m (/ t z_m))))))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 3.7e+15) {
		tmp = (z_m * y_m) * (x_m / sqrt(((z_m * z_m) - (t * a))));
	} else {
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))));
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z_m <= 3.7d+15) then
        tmp = (z_m * y_m) * (x_m / sqrt(((z_m * z_m) - (t * a))))
    else
        tmp = (x_m * y_m) / (1.0d0 + ((a * (-0.5d0)) / (z_m / (t / z_m))))
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
assert x_m < y_m && y_m < z_m && z_m < t && t < a;
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 3.7e+15) {
		tmp = (z_m * y_m) * (x_m / Math.sqrt(((z_m * z_m) - (t * a))));
	} else {
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))));
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
[x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
	tmp = 0
	if z_m <= 3.7e+15:
		tmp = (z_m * y_m) * (x_m / math.sqrt(((z_m * z_m) - (t * a))))
	else:
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))))
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0
	if (z_m <= 3.7e+15)
		tmp = Float64(Float64(z_m * y_m) * Float64(x_m / sqrt(Float64(Float64(z_m * z_m) - Float64(t * a)))));
	else
		tmp = Float64(Float64(x_m * y_m) / Float64(1.0 + Float64(Float64(a * -0.5) / Float64(z_m / Float64(t / z_m)))));
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0;
	if (z_m <= 3.7e+15)
		tmp = (z_m * y_m) * (x_m / sqrt(((z_m * z_m) - (t * a))));
	else
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))));
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[z$95$m, 3.7e+15], N[(N[(z$95$m * y$95$m), $MachinePrecision] * N[(x$95$m / N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m * y$95$m), $MachinePrecision] / N[(1.0 + N[(N[(a * -0.5), $MachinePrecision] / N[(z$95$m / N[(t / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 3.7 \cdot 10^{+15}:\\
\;\;\;\;\left(z\_m \cdot y\_m\right) \cdot \frac{x\_m}{\sqrt{z\_m \cdot z\_m - t \cdot a}}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 3.7e15

    1. Initial program 71.2%

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

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

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

        \[\leadsto \left(y \cdot z\right) \cdot \color{blue}{\frac{x}{\sqrt{z \cdot z - t \cdot a}}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(y \cdot z\right), \color{blue}{\left(\frac{x}{\sqrt{z \cdot z - t \cdot a}}\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), \left(\frac{\color{blue}{x}}{\sqrt{z \cdot z - t \cdot a}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), \mathsf{/.f64}\left(x, \color{blue}{\left(\sqrt{z \cdot z - t \cdot a}\right)}\right)\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\left(z \cdot z - t \cdot a\right)\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\left(z \cdot z\right), \left(t \cdot a\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, z\right), \left(t \cdot a\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f6468.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), \mathsf{/.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, z\right), \mathsf{*.f64}\left(t, a\right)\right)\right)\right)\right) \]
    4. Applied egg-rr68.6%

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

    if 3.7e15 < z

    1. Initial program 46.9%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \color{blue}{\left(z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right)\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \left(a \cdot \color{blue}{\frac{t}{{z}^{2}}}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \color{blue}{\left(\frac{t}{{z}^{2}}\right)}\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \color{blue}{\left({z}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \left(z \cdot \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f6486.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
    5. Simplified86.6%

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

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

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

        \[\leadsto \left(x \cdot y\right) \cdot \frac{1}{\color{blue}{1} + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)} \]
      4. div-invN/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)}\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{1} + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)}\right)\right) \]
      8. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \left(\left(\frac{-1}{2} \cdot a\right) \cdot \color{blue}{\frac{t}{z \cdot z}}\right)\right)\right) \]
      9. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \left(\left(\frac{-1}{2} \cdot a\right) \cdot \frac{1}{\color{blue}{\frac{z \cdot z}{t}}}\right)\right)\right) \]
      10. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \left(\frac{\frac{-1}{2} \cdot a}{\color{blue}{\frac{z \cdot z}{t}}}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot a\right), \color{blue}{\left(\frac{z \cdot z}{t}\right)}\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{\color{blue}{z \cdot z}}{t}\right)\right)\right)\right) \]
      13. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{1}{\color{blue}{\frac{t}{z \cdot z}}}\right)\right)\right)\right) \]
      14. associate-/r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{1}{\frac{\frac{t}{z}}{\color{blue}{z}}}\right)\right)\right)\right) \]
      15. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{z}{\color{blue}{\frac{t}{z}}}\right)\right)\right)\right) \]
      16. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \mathsf{/.f64}\left(z, \color{blue}{\left(\frac{t}{z}\right)}\right)\right)\right)\right) \]
      17. /-lowering-/.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \mathsf{/.f64}\left(z, \mathsf{/.f64}\left(t, \color{blue}{z}\right)\right)\right)\right)\right) \]
    7. Applied egg-rr100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 3.7 \cdot 10^{+15}:\\ \;\;\;\;\left(z \cdot y\right) \cdot \frac{x}{\sqrt{z \cdot z - t \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{1 + \frac{a \cdot -0.5}{\frac{z}{\frac{t}{z}}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 86.0% accurate, 1.0× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 9 \cdot 10^{-73}:\\ \;\;\;\;x\_m \cdot \frac{z\_m \cdot y\_m}{{\left(0 - t \cdot a\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{1 + \frac{a \cdot -0.5}{\frac{z\_m}{\frac{t}{z\_m}}}}\\ \end{array}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s y_s x_s x_m y_m z_m t a)
 :precision binary64
 (*
  z_s
  (*
   y_s
   (*
    x_s
    (if (<= z_m 9e-73)
      (* x_m (/ (* z_m y_m) (pow (- 0.0 (* t a)) 0.5)))
      (/ (* x_m y_m) (+ 1.0 (/ (* a -0.5) (/ z_m (/ t z_m))))))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 9e-73) {
		tmp = x_m * ((z_m * y_m) / pow((0.0 - (t * a)), 0.5));
	} else {
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))));
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z_m <= 9d-73) then
        tmp = x_m * ((z_m * y_m) / ((0.0d0 - (t * a)) ** 0.5d0))
    else
        tmp = (x_m * y_m) / (1.0d0 + ((a * (-0.5d0)) / (z_m / (t / z_m))))
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
assert x_m < y_m && y_m < z_m && z_m < t && t < a;
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 9e-73) {
		tmp = x_m * ((z_m * y_m) / Math.pow((0.0 - (t * a)), 0.5));
	} else {
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))));
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
[x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
	tmp = 0
	if z_m <= 9e-73:
		tmp = x_m * ((z_m * y_m) / math.pow((0.0 - (t * a)), 0.5))
	else:
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))))
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0
	if (z_m <= 9e-73)
		tmp = Float64(x_m * Float64(Float64(z_m * y_m) / (Float64(0.0 - Float64(t * a)) ^ 0.5)));
	else
		tmp = Float64(Float64(x_m * y_m) / Float64(1.0 + Float64(Float64(a * -0.5) / Float64(z_m / Float64(t / z_m)))));
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0;
	if (z_m <= 9e-73)
		tmp = x_m * ((z_m * y_m) / ((0.0 - (t * a)) ^ 0.5));
	else
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))));
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[z$95$m, 9e-73], N[(x$95$m * N[(N[(z$95$m * y$95$m), $MachinePrecision] / N[Power[N[(0.0 - N[(t * a), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m * y$95$m), $MachinePrecision] / N[(1.0 + N[(N[(a * -0.5), $MachinePrecision] / N[(z$95$m / N[(t / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 9 \cdot 10^{-73}:\\
\;\;\;\;x\_m \cdot \frac{z\_m \cdot y\_m}{{\left(0 - t \cdot a\right)}^{0.5}}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 9e-73

    1. Initial program 66.3%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot t\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{sqrt.f64}\left(\left(\mathsf{neg}\left(a \cdot t\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{sqrt.f64}\left(\left(0 - a \cdot t\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot t\right)\right)\right)\right) \]
      4. *-lowering-*.f6443.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, t\right)\right)\right)\right) \]
    5. Simplified43.6%

      \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\sqrt{\color{blue}{0 - a \cdot t}}} \]
    6. Step-by-step derivation
      1. associate-*l*N/A

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

        \[\leadsto x \cdot \color{blue}{\frac{y \cdot z}{\sqrt{0 - a \cdot t}}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y \cdot z}{\sqrt{0 - a \cdot t}}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot z\right), \color{blue}{\left(\sqrt{0 - a \cdot t}\right)}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), \left(\sqrt{\color{blue}{0 - a \cdot t}}\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), \left({\left(0 - a \cdot t\right)}^{\color{blue}{\frac{1}{2}}}\right)\right)\right) \]
      7. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), \mathsf{pow.f64}\left(\left(0 - a \cdot t\right), \color{blue}{\frac{1}{2}}\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), \mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot t\right)\right), \frac{1}{2}\right)\right)\right) \]
      9. *-lowering-*.f6443.7%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), \mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, t\right)\right), \frac{1}{2}\right)\right)\right) \]
    7. Applied egg-rr43.7%

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

    if 9e-73 < z

    1. Initial program 60.2%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \color{blue}{\left(z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right)\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \left(a \cdot \color{blue}{\frac{t}{{z}^{2}}}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \color{blue}{\left(\frac{t}{{z}^{2}}\right)}\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \color{blue}{\left({z}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \left(z \cdot \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f6484.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
    5. Simplified84.5%

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

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

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

        \[\leadsto \left(x \cdot y\right) \cdot \frac{1}{\color{blue}{1} + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)} \]
      4. div-invN/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)}\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{1} + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)}\right)\right) \]
      8. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \left(\left(\frac{-1}{2} \cdot a\right) \cdot \color{blue}{\frac{t}{z \cdot z}}\right)\right)\right) \]
      9. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \left(\left(\frac{-1}{2} \cdot a\right) \cdot \frac{1}{\color{blue}{\frac{z \cdot z}{t}}}\right)\right)\right) \]
      10. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \left(\frac{\frac{-1}{2} \cdot a}{\color{blue}{\frac{z \cdot z}{t}}}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot a\right), \color{blue}{\left(\frac{z \cdot z}{t}\right)}\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{\color{blue}{z \cdot z}}{t}\right)\right)\right)\right) \]
      13. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{1}{\color{blue}{\frac{t}{z \cdot z}}}\right)\right)\right)\right) \]
      14. associate-/r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{1}{\frac{\frac{t}{z}}{\color{blue}{z}}}\right)\right)\right)\right) \]
      15. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{z}{\color{blue}{\frac{t}{z}}}\right)\right)\right)\right) \]
      16. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \mathsf{/.f64}\left(z, \color{blue}{\left(\frac{t}{z}\right)}\right)\right)\right)\right) \]
      17. /-lowering-/.f6494.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \mathsf{/.f64}\left(z, \mathsf{/.f64}\left(t, \color{blue}{z}\right)\right)\right)\right)\right) \]
    7. Applied egg-rr94.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 9 \cdot 10^{-73}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{{\left(0 - t \cdot a\right)}^{0.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{1 + \frac{a \cdot -0.5}{\frac{z}{\frac{t}{z}}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 86.0% accurate, 1.0× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 7.4 \cdot 10^{-73}:\\ \;\;\;\;x\_m \cdot \frac{z\_m \cdot y\_m}{\sqrt{0 - t \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{1 + \frac{a \cdot -0.5}{\frac{z\_m}{\frac{t}{z\_m}}}}\\ \end{array}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s y_s x_s x_m y_m z_m t a)
 :precision binary64
 (*
  z_s
  (*
   y_s
   (*
    x_s
    (if (<= z_m 7.4e-73)
      (* x_m (/ (* z_m y_m) (sqrt (- 0.0 (* t a)))))
      (/ (* x_m y_m) (+ 1.0 (/ (* a -0.5) (/ z_m (/ t z_m))))))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 7.4e-73) {
		tmp = x_m * ((z_m * y_m) / sqrt((0.0 - (t * a))));
	} else {
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))));
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z_m <= 7.4d-73) then
        tmp = x_m * ((z_m * y_m) / sqrt((0.0d0 - (t * a))))
    else
        tmp = (x_m * y_m) / (1.0d0 + ((a * (-0.5d0)) / (z_m / (t / z_m))))
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
assert x_m < y_m && y_m < z_m && z_m < t && t < a;
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 7.4e-73) {
		tmp = x_m * ((z_m * y_m) / Math.sqrt((0.0 - (t * a))));
	} else {
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))));
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
[x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
	tmp = 0
	if z_m <= 7.4e-73:
		tmp = x_m * ((z_m * y_m) / math.sqrt((0.0 - (t * a))))
	else:
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))))
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0
	if (z_m <= 7.4e-73)
		tmp = Float64(x_m * Float64(Float64(z_m * y_m) / sqrt(Float64(0.0 - Float64(t * a)))));
	else
		tmp = Float64(Float64(x_m * y_m) / Float64(1.0 + Float64(Float64(a * -0.5) / Float64(z_m / Float64(t / z_m)))));
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0;
	if (z_m <= 7.4e-73)
		tmp = x_m * ((z_m * y_m) / sqrt((0.0 - (t * a))));
	else
		tmp = (x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m))));
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[z$95$m, 7.4e-73], N[(x$95$m * N[(N[(z$95$m * y$95$m), $MachinePrecision] / N[Sqrt[N[(0.0 - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m * y$95$m), $MachinePrecision] / N[(1.0 + N[(N[(a * -0.5), $MachinePrecision] / N[(z$95$m / N[(t / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 7.4 \cdot 10^{-73}:\\
\;\;\;\;x\_m \cdot \frac{z\_m \cdot y\_m}{\sqrt{0 - t \cdot a}}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 7.4000000000000002e-73

    1. Initial program 66.3%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot t\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{sqrt.f64}\left(\left(\mathsf{neg}\left(a \cdot t\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{sqrt.f64}\left(\left(0 - a \cdot t\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot t\right)\right)\right)\right) \]
      4. *-lowering-*.f6443.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, t\right)\right)\right)\right) \]
    5. Simplified43.6%

      \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\sqrt{\color{blue}{0 - a \cdot t}}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(z \cdot \left(x \cdot y\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, t\right)\right)}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(z \cdot x\right) \cdot y\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, t\right)\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(z \cdot x\right), y\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, t\right)\right)}\right)\right) \]
      4. *-lowering-*.f6442.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, x\right), y\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\color{blue}{0}, \mathsf{*.f64}\left(a, t\right)\right)\right)\right) \]
    7. Applied egg-rr42.3%

      \[\leadsto \frac{\color{blue}{\left(z \cdot x\right) \cdot y}}{\sqrt{0 - a \cdot t}} \]
    8. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \frac{z \cdot \left(x \cdot y\right)}{\sqrt{\color{blue}{0 - a \cdot t}}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\sqrt{\color{blue}{0 - a \cdot t}}} \]
      3. associate-*l*N/A

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

        \[\leadsto x \cdot \color{blue}{\frac{y \cdot z}{\sqrt{0 - a \cdot t}}} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y \cdot z}{\sqrt{0 - a \cdot t}}\right)}\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot z\right), \color{blue}{\left(\sqrt{0 - a \cdot t}\right)}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\left(z \cdot y\right), \left(\sqrt{\color{blue}{0 - a \cdot t}}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, y\right), \left(\sqrt{\color{blue}{0 - a \cdot t}}\right)\right)\right) \]
      9. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, y\right), \mathsf{sqrt.f64}\left(\left(0 - a \cdot t\right)\right)\right)\right) \]
      10. sub0-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, y\right), \mathsf{sqrt.f64}\left(\left(\mathsf{neg}\left(a \cdot t\right)\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, y\right), \mathsf{sqrt.f64}\left(\left(\mathsf{neg}\left(t \cdot a\right)\right)\right)\right)\right) \]
      12. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, y\right), \mathsf{sqrt.f64}\left(\left(t \cdot \left(\mathsf{neg}\left(a\right)\right)\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(t, \left(\mathsf{neg}\left(a\right)\right)\right)\right)\right)\right) \]
      14. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(t, \left(0 - a\right)\right)\right)\right)\right) \]
      15. --lowering--.f6443.5%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, y\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(t, \mathsf{\_.f64}\left(0, a\right)\right)\right)\right)\right) \]
    9. Applied egg-rr43.5%

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

    if 7.4000000000000002e-73 < z

    1. Initial program 60.2%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \color{blue}{\left(z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right)\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \left(a \cdot \color{blue}{\frac{t}{{z}^{2}}}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \color{blue}{\left(\frac{t}{{z}^{2}}\right)}\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \color{blue}{\left({z}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \left(z \cdot \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f6484.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
    5. Simplified84.5%

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

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

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

        \[\leadsto \left(x \cdot y\right) \cdot \frac{1}{\color{blue}{1} + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)} \]
      4. div-invN/A

        \[\leadsto \frac{x \cdot y}{\color{blue}{1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)}\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{1} + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)}\right)\right) \]
      8. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \left(\left(\frac{-1}{2} \cdot a\right) \cdot \color{blue}{\frac{t}{z \cdot z}}\right)\right)\right) \]
      9. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \left(\left(\frac{-1}{2} \cdot a\right) \cdot \frac{1}{\color{blue}{\frac{z \cdot z}{t}}}\right)\right)\right) \]
      10. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \left(\frac{\frac{-1}{2} \cdot a}{\color{blue}{\frac{z \cdot z}{t}}}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot a\right), \color{blue}{\left(\frac{z \cdot z}{t}\right)}\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{\color{blue}{z \cdot z}}{t}\right)\right)\right)\right) \]
      13. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{1}{\color{blue}{\frac{t}{z \cdot z}}}\right)\right)\right)\right) \]
      14. associate-/r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{1}{\frac{\frac{t}{z}}{\color{blue}{z}}}\right)\right)\right)\right) \]
      15. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{z}{\color{blue}{\frac{t}{z}}}\right)\right)\right)\right) \]
      16. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \mathsf{/.f64}\left(z, \color{blue}{\left(\frac{t}{z}\right)}\right)\right)\right)\right) \]
      17. /-lowering-/.f6494.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \mathsf{/.f64}\left(z, \mathsf{/.f64}\left(t, \color{blue}{z}\right)\right)\right)\right)\right) \]
    7. Applied egg-rr94.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 7.4 \cdot 10^{-73}:\\ \;\;\;\;x \cdot \frac{z \cdot y}{\sqrt{0 - t \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{1 + \frac{a \cdot -0.5}{\frac{z}{\frac{t}{z}}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 76.0% accurate, 6.3× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 1.15 \cdot 10^{-125}:\\ \;\;\;\;\frac{z\_m \cdot \left(x\_m \cdot y\_m\right)}{t \cdot \frac{a \cdot -0.5}{z\_m}}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot y\_m\\ \end{array}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s y_s x_s x_m y_m z_m t a)
 :precision binary64
 (*
  z_s
  (*
   y_s
   (*
    x_s
    (if (<= z_m 1.15e-125)
      (/ (* z_m (* x_m y_m)) (* t (/ (* a -0.5) z_m)))
      (* x_m y_m))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 1.15e-125) {
		tmp = (z_m * (x_m * y_m)) / (t * ((a * -0.5) / z_m));
	} else {
		tmp = x_m * y_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z_m <= 1.15d-125) then
        tmp = (z_m * (x_m * y_m)) / (t * ((a * (-0.5d0)) / z_m))
    else
        tmp = x_m * y_m
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
assert x_m < y_m && y_m < z_m && z_m < t && t < a;
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 1.15e-125) {
		tmp = (z_m * (x_m * y_m)) / (t * ((a * -0.5) / z_m));
	} else {
		tmp = x_m * y_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
[x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
	tmp = 0
	if z_m <= 1.15e-125:
		tmp = (z_m * (x_m * y_m)) / (t * ((a * -0.5) / z_m))
	else:
		tmp = x_m * y_m
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0
	if (z_m <= 1.15e-125)
		tmp = Float64(Float64(z_m * Float64(x_m * y_m)) / Float64(t * Float64(Float64(a * -0.5) / z_m)));
	else
		tmp = Float64(x_m * y_m);
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0;
	if (z_m <= 1.15e-125)
		tmp = (z_m * (x_m * y_m)) / (t * ((a * -0.5) / z_m));
	else
		tmp = x_m * y_m;
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[z$95$m, 1.15e-125], N[(N[(z$95$m * N[(x$95$m * y$95$m), $MachinePrecision]), $MachinePrecision] / N[(t * N[(N[(a * -0.5), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$95$m * y$95$m), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 1.15 \cdot 10^{-125}:\\
\;\;\;\;\frac{z\_m \cdot \left(x\_m \cdot y\_m\right)}{t \cdot \frac{a \cdot -0.5}{z\_m}}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 1.15e-125

    1. Initial program 66.6%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \color{blue}{\left(z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right)\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \left(a \cdot \color{blue}{\frac{t}{{z}^{2}}}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \color{blue}{\left(\frac{t}{{z}^{2}}\right)}\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \color{blue}{\left({z}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \left(z \cdot \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f6424.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
    5. Simplified24.4%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{a \cdot t}{z}\right)}\right) \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \left(\frac{\frac{-1}{2} \cdot \left(a \cdot t\right)}{\color{blue}{z}}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \left(\frac{\left(\frac{-1}{2} \cdot a\right) \cdot t}{z}\right)\right) \]
      3. associate-*l/N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \left(\left(\frac{-1}{2} \cdot \frac{a}{z}\right) \cdot t\right)\right) \]
      5. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(\left(\frac{\frac{-1}{2} \cdot a}{z}\right), t\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot a\right), z\right), t\right)\right) \]
      8. *-lowering-*.f6426.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), z\right), t\right)\right) \]
    8. Simplified26.3%

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

    if 1.15e-125 < z

    1. Initial program 60.0%

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

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

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{y}\right) \]
    5. Simplified93.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 1.15 \cdot 10^{-125}:\\ \;\;\;\;\frac{z \cdot \left(x \cdot y\right)}{t \cdot \frac{a \cdot -0.5}{z}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 76.1% accurate, 6.3× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 8 \cdot 10^{-124}:\\ \;\;\;\;\left(z\_m \cdot \left(x\_m \cdot y\_m\right)\right) \cdot \frac{\frac{z\_m}{a \cdot -0.5}}{t}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot y\_m\\ \end{array}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s y_s x_s x_m y_m z_m t a)
 :precision binary64
 (*
  z_s
  (*
   y_s
   (*
    x_s
    (if (<= z_m 8e-124)
      (* (* z_m (* x_m y_m)) (/ (/ z_m (* a -0.5)) t))
      (* x_m y_m))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 8e-124) {
		tmp = (z_m * (x_m * y_m)) * ((z_m / (a * -0.5)) / t);
	} else {
		tmp = x_m * y_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z_m <= 8d-124) then
        tmp = (z_m * (x_m * y_m)) * ((z_m / (a * (-0.5d0))) / t)
    else
        tmp = x_m * y_m
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
assert x_m < y_m && y_m < z_m && z_m < t && t < a;
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 8e-124) {
		tmp = (z_m * (x_m * y_m)) * ((z_m / (a * -0.5)) / t);
	} else {
		tmp = x_m * y_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
[x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
	tmp = 0
	if z_m <= 8e-124:
		tmp = (z_m * (x_m * y_m)) * ((z_m / (a * -0.5)) / t)
	else:
		tmp = x_m * y_m
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0
	if (z_m <= 8e-124)
		tmp = Float64(Float64(z_m * Float64(x_m * y_m)) * Float64(Float64(z_m / Float64(a * -0.5)) / t));
	else
		tmp = Float64(x_m * y_m);
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0;
	if (z_m <= 8e-124)
		tmp = (z_m * (x_m * y_m)) * ((z_m / (a * -0.5)) / t);
	else
		tmp = x_m * y_m;
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[z$95$m, 8e-124], N[(N[(z$95$m * N[(x$95$m * y$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(z$95$m / N[(a * -0.5), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x$95$m * y$95$m), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 8 \cdot 10^{-124}:\\
\;\;\;\;\left(z\_m \cdot \left(x\_m \cdot y\_m\right)\right) \cdot \frac{\frac{z\_m}{a \cdot -0.5}}{t}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 7.99999999999999947e-124

    1. Initial program 66.6%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \color{blue}{\left(z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right)\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \left(a \cdot \color{blue}{\frac{t}{{z}^{2}}}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \color{blue}{\left(\frac{t}{{z}^{2}}\right)}\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \color{blue}{\left({z}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \left(z \cdot \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f6424.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
    5. Simplified24.4%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{a \cdot t}{z}\right)}\right) \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \left(\frac{\frac{-1}{2} \cdot \left(a \cdot t\right)}{\color{blue}{z}}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \left(\frac{\left(\frac{-1}{2} \cdot a\right) \cdot t}{z}\right)\right) \]
      3. associate-*l/N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \left(\left(\frac{-1}{2} \cdot \frac{a}{z}\right) \cdot t\right)\right) \]
      5. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(\left(\frac{\frac{-1}{2} \cdot a}{z}\right), t\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot a\right), z\right), t\right)\right) \]
      8. *-lowering-*.f6426.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), z\right), t\right)\right) \]
    8. Simplified26.3%

      \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{\frac{-0.5 \cdot a}{z} \cdot t}} \]
    9. Step-by-step derivation
      1. clear-numN/A

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

        \[\leadsto \frac{1}{\frac{\frac{-1}{2} \cdot a}{z} \cdot t} \cdot \color{blue}{\left(\left(x \cdot y\right) \cdot z\right)} \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{1}{\frac{\frac{-1}{2} \cdot a}{z}}}{t}\right), \left(\color{blue}{\left(x \cdot y\right)} \cdot z\right)\right) \]
      5. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{z}{\frac{-1}{2} \cdot a}}{t}\right), \left(\left(\color{blue}{x} \cdot y\right) \cdot z\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{z}{\frac{-1}{2} \cdot a}\right), t\right), \left(\color{blue}{\left(x \cdot y\right)} \cdot z\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(z, \left(\frac{-1}{2} \cdot a\right)\right), t\right), \left(\left(\color{blue}{x} \cdot y\right) \cdot z\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(z, \mathsf{*.f64}\left(\frac{-1}{2}, a\right)\right), t\right), \left(\left(x \cdot y\right) \cdot z\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(z, \mathsf{*.f64}\left(\frac{-1}{2}, a\right)\right), t\right), \left(z \cdot \color{blue}{\left(x \cdot y\right)}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(z, \mathsf{*.f64}\left(\frac{-1}{2}, a\right)\right), t\right), \mathsf{*.f64}\left(z, \color{blue}{\left(x \cdot y\right)}\right)\right) \]
      11. *-lowering-*.f6426.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(z, \mathsf{*.f64}\left(\frac{-1}{2}, a\right)\right), t\right), \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(x, \color{blue}{y}\right)\right)\right) \]
    10. Applied egg-rr26.2%

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

    if 7.99999999999999947e-124 < z

    1. Initial program 60.0%

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

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

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{y}\right) \]
    5. Simplified93.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 8 \cdot 10^{-124}:\\ \;\;\;\;\left(z \cdot \left(x \cdot y\right)\right) \cdot \frac{\frac{z}{a \cdot -0.5}}{t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 76.1% accurate, 6.3× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 1.25 \cdot 10^{-126}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{\frac{a \cdot -0.5}{z\_m}} \cdot \frac{z\_m}{t}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot y\_m\\ \end{array}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s y_s x_s x_m y_m z_m t a)
 :precision binary64
 (*
  z_s
  (*
   y_s
   (*
    x_s
    (if (<= z_m 1.25e-126)
      (* (/ (* x_m y_m) (/ (* a -0.5) z_m)) (/ z_m t))
      (* x_m y_m))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 1.25e-126) {
		tmp = ((x_m * y_m) / ((a * -0.5) / z_m)) * (z_m / t);
	} else {
		tmp = x_m * y_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z_m <= 1.25d-126) then
        tmp = ((x_m * y_m) / ((a * (-0.5d0)) / z_m)) * (z_m / t)
    else
        tmp = x_m * y_m
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
assert x_m < y_m && y_m < z_m && z_m < t && t < a;
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 1.25e-126) {
		tmp = ((x_m * y_m) / ((a * -0.5) / z_m)) * (z_m / t);
	} else {
		tmp = x_m * y_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
[x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
	tmp = 0
	if z_m <= 1.25e-126:
		tmp = ((x_m * y_m) / ((a * -0.5) / z_m)) * (z_m / t)
	else:
		tmp = x_m * y_m
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0
	if (z_m <= 1.25e-126)
		tmp = Float64(Float64(Float64(x_m * y_m) / Float64(Float64(a * -0.5) / z_m)) * Float64(z_m / t));
	else
		tmp = Float64(x_m * y_m);
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0;
	if (z_m <= 1.25e-126)
		tmp = ((x_m * y_m) / ((a * -0.5) / z_m)) * (z_m / t);
	else
		tmp = x_m * y_m;
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[z$95$m, 1.25e-126], N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] / N[(N[(a * -0.5), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision] * N[(z$95$m / t), $MachinePrecision]), $MachinePrecision], N[(x$95$m * y$95$m), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 1.25 \cdot 10^{-126}:\\
\;\;\;\;\frac{x\_m \cdot y\_m}{\frac{a \cdot -0.5}{z\_m}} \cdot \frac{z\_m}{t}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 1.25000000000000001e-126

    1. Initial program 66.6%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \color{blue}{\left(z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right)\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \left(a \cdot \color{blue}{\frac{t}{{z}^{2}}}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \color{blue}{\left(\frac{t}{{z}^{2}}\right)}\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \color{blue}{\left({z}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \left(z \cdot \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f6424.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
    5. Simplified24.4%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{a \cdot t}{z}\right)}\right) \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \left(\frac{\frac{-1}{2} \cdot \left(a \cdot t\right)}{\color{blue}{z}}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \left(\frac{\left(\frac{-1}{2} \cdot a\right) \cdot t}{z}\right)\right) \]
      3. associate-*l/N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \left(\left(\frac{-1}{2} \cdot \frac{a}{z}\right) \cdot t\right)\right) \]
      5. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(\left(\frac{\frac{-1}{2} \cdot a}{z}\right), t\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot a\right), z\right), t\right)\right) \]
      8. *-lowering-*.f6426.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), z\right), t\right)\right) \]
    8. Simplified26.3%

      \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{\frac{-0.5 \cdot a}{z} \cdot t}} \]
    9. Step-by-step derivation
      1. times-fracN/A

        \[\leadsto \frac{x \cdot y}{\frac{\frac{-1}{2} \cdot a}{z}} \cdot \color{blue}{\frac{z}{t}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{x \cdot y}{\frac{\frac{-1}{2} \cdot a}{z}}\right), \color{blue}{\left(\frac{z}{t}\right)}\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(x \cdot y\right), \left(\frac{\frac{-1}{2} \cdot a}{z}\right)\right), \left(\frac{\color{blue}{z}}{t}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\frac{\frac{-1}{2} \cdot a}{z}\right)\right), \left(\frac{z}{t}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot a\right), z\right)\right), \left(\frac{z}{t}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), z\right)\right), \left(\frac{z}{t}\right)\right) \]
      7. /-lowering-/.f6425.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), z\right)\right), \mathsf{/.f64}\left(z, \color{blue}{t}\right)\right) \]
    10. Applied egg-rr25.7%

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

    if 1.25000000000000001e-126 < z

    1. Initial program 60.0%

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

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

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{y}\right) \]
    5. Simplified93.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 1.25 \cdot 10^{-126}:\\ \;\;\;\;\frac{x \cdot y}{\frac{a \cdot -0.5}{z}} \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 76.0% accurate, 6.3× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 2.6 \cdot 10^{-128}:\\ \;\;\;\;\frac{x\_m}{a \cdot -0.5} \cdot \left(z\_m \cdot \left(y\_m \cdot \frac{z\_m}{t}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot y\_m\\ \end{array}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s y_s x_s x_m y_m z_m t a)
 :precision binary64
 (*
  z_s
  (*
   y_s
   (*
    x_s
    (if (<= z_m 2.6e-128)
      (* (/ x_m (* a -0.5)) (* z_m (* y_m (/ z_m t))))
      (* x_m y_m))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 2.6e-128) {
		tmp = (x_m / (a * -0.5)) * (z_m * (y_m * (z_m / t)));
	} else {
		tmp = x_m * y_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z_m <= 2.6d-128) then
        tmp = (x_m / (a * (-0.5d0))) * (z_m * (y_m * (z_m / t)))
    else
        tmp = x_m * y_m
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
assert x_m < y_m && y_m < z_m && z_m < t && t < a;
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 2.6e-128) {
		tmp = (x_m / (a * -0.5)) * (z_m * (y_m * (z_m / t)));
	} else {
		tmp = x_m * y_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
[x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
	tmp = 0
	if z_m <= 2.6e-128:
		tmp = (x_m / (a * -0.5)) * (z_m * (y_m * (z_m / t)))
	else:
		tmp = x_m * y_m
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0
	if (z_m <= 2.6e-128)
		tmp = Float64(Float64(x_m / Float64(a * -0.5)) * Float64(z_m * Float64(y_m * Float64(z_m / t))));
	else
		tmp = Float64(x_m * y_m);
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0;
	if (z_m <= 2.6e-128)
		tmp = (x_m / (a * -0.5)) * (z_m * (y_m * (z_m / t)));
	else
		tmp = x_m * y_m;
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[z$95$m, 2.6e-128], N[(N[(x$95$m / N[(a * -0.5), $MachinePrecision]), $MachinePrecision] * N[(z$95$m * N[(y$95$m * N[(z$95$m / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$95$m * y$95$m), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 2.6 \cdot 10^{-128}:\\
\;\;\;\;\frac{x\_m}{a \cdot -0.5} \cdot \left(z\_m \cdot \left(y\_m \cdot \frac{z\_m}{t}\right)\right)\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 2.59999999999999981e-128

    1. Initial program 66.6%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \color{blue}{\left(z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right)\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \left(a \cdot \color{blue}{\frac{t}{{z}^{2}}}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \color{blue}{\left(\frac{t}{{z}^{2}}\right)}\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \color{blue}{\left({z}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \left(z \cdot \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f6424.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
    5. Simplified24.4%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{a \cdot t}{z}\right)}\right) \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \left(\frac{\frac{-1}{2} \cdot \left(a \cdot t\right)}{\color{blue}{z}}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \left(\frac{\left(\frac{-1}{2} \cdot a\right) \cdot t}{z}\right)\right) \]
      3. associate-*l/N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \left(\left(\frac{-1}{2} \cdot \frac{a}{z}\right) \cdot t\right)\right) \]
      5. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(\left(\frac{\frac{-1}{2} \cdot a}{z}\right), t\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot a\right), z\right), t\right)\right) \]
      8. *-lowering-*.f6426.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), z\right), t\right)\right) \]
    8. Simplified26.3%

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

        \[\leadsto \frac{x \cdot \left(y \cdot z\right)}{\color{blue}{\frac{\frac{-1}{2} \cdot a}{z}} \cdot t} \]
      2. times-fracN/A

        \[\leadsto \frac{x}{\frac{\frac{-1}{2} \cdot a}{z}} \cdot \color{blue}{\frac{y \cdot z}{t}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{x}{\frac{\frac{-1}{2} \cdot a}{z}}\right), \color{blue}{\left(\frac{y \cdot z}{t}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \left(\frac{\frac{-1}{2} \cdot a}{z}\right)\right), \left(\frac{\color{blue}{y \cdot z}}{t}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot a\right), z\right)\right), \left(\frac{y \cdot \color{blue}{z}}{t}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), z\right)\right), \left(\frac{y \cdot z}{t}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), z\right)\right), \mathsf{/.f64}\left(\left(y \cdot z\right), \color{blue}{t}\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), z\right)\right), \mathsf{/.f64}\left(\left(z \cdot y\right), t\right)\right) \]
      9. *-lowering-*.f6424.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), z\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, y\right), t\right)\right) \]
    10. Applied egg-rr24.4%

      \[\leadsto \color{blue}{\frac{x}{\frac{-0.5 \cdot a}{z}} \cdot \frac{z \cdot y}{t}} \]
    11. Step-by-step derivation
      1. associate-/r/N/A

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

        \[\leadsto \frac{x}{\frac{-1}{2} \cdot a} \cdot \color{blue}{\left(z \cdot \frac{z \cdot y}{t}\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{x}{\frac{-1}{2} \cdot a}\right), \color{blue}{\left(z \cdot \frac{z \cdot y}{t}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \left(\frac{-1}{2} \cdot a\right)\right), \left(\color{blue}{z} \cdot \frac{z \cdot y}{t}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\frac{-1}{2}, a\right)\right), \left(z \cdot \frac{z \cdot y}{t}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\frac{-1}{2}, a\right)\right), \mathsf{*.f64}\left(z, \color{blue}{\left(\frac{z \cdot y}{t}\right)}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\frac{-1}{2}, a\right)\right), \mathsf{*.f64}\left(z, \left(\frac{y \cdot z}{t}\right)\right)\right) \]
      8. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\frac{-1}{2}, a\right)\right), \mathsf{*.f64}\left(z, \left(y \cdot \color{blue}{\frac{z}{t}}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\frac{-1}{2}, a\right)\right), \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{z}{t}\right)}\right)\right)\right) \]
      10. /-lowering-/.f6425.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(\frac{-1}{2}, a\right)\right), \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(z, \color{blue}{t}\right)\right)\right)\right) \]
    12. Applied egg-rr25.1%

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

    if 2.59999999999999981e-128 < z

    1. Initial program 60.0%

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

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

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{y}\right) \]
    5. Simplified93.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 2.6 \cdot 10^{-128}:\\ \;\;\;\;\frac{x}{a \cdot -0.5} \cdot \left(z \cdot \left(y \cdot \frac{z}{t}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 75.9% accurate, 6.3× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 2.9 \cdot 10^{-123}:\\ \;\;\;\;\left(z\_m \cdot x\_m\right) \cdot \frac{y\_m}{\frac{t}{\frac{z\_m}{a \cdot -0.5}}}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot y\_m\\ \end{array}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s y_s x_s x_m y_m z_m t a)
 :precision binary64
 (*
  z_s
  (*
   y_s
   (*
    x_s
    (if (<= z_m 2.9e-123)
      (* (* z_m x_m) (/ y_m (/ t (/ z_m (* a -0.5)))))
      (* x_m y_m))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 2.9e-123) {
		tmp = (z_m * x_m) * (y_m / (t / (z_m / (a * -0.5))));
	} else {
		tmp = x_m * y_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z_m <= 2.9d-123) then
        tmp = (z_m * x_m) * (y_m / (t / (z_m / (a * (-0.5d0)))))
    else
        tmp = x_m * y_m
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
assert x_m < y_m && y_m < z_m && z_m < t && t < a;
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 2.9e-123) {
		tmp = (z_m * x_m) * (y_m / (t / (z_m / (a * -0.5))));
	} else {
		tmp = x_m * y_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
[x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
	tmp = 0
	if z_m <= 2.9e-123:
		tmp = (z_m * x_m) * (y_m / (t / (z_m / (a * -0.5))))
	else:
		tmp = x_m * y_m
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0
	if (z_m <= 2.9e-123)
		tmp = Float64(Float64(z_m * x_m) * Float64(y_m / Float64(t / Float64(z_m / Float64(a * -0.5)))));
	else
		tmp = Float64(x_m * y_m);
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0;
	if (z_m <= 2.9e-123)
		tmp = (z_m * x_m) * (y_m / (t / (z_m / (a * -0.5))));
	else
		tmp = x_m * y_m;
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[z$95$m, 2.9e-123], N[(N[(z$95$m * x$95$m), $MachinePrecision] * N[(y$95$m / N[(t / N[(z$95$m / N[(a * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$95$m * y$95$m), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 2.9 \cdot 10^{-123}:\\
\;\;\;\;\left(z\_m \cdot x\_m\right) \cdot \frac{y\_m}{\frac{t}{\frac{z\_m}{a \cdot -0.5}}}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 2.90000000000000004e-123

    1. Initial program 66.6%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \color{blue}{\left(z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right)\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \left(a \cdot \color{blue}{\frac{t}{{z}^{2}}}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \color{blue}{\left(\frac{t}{{z}^{2}}\right)}\right)\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \color{blue}{\left({z}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \left(z \cdot \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f6424.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
    5. Simplified24.4%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \color{blue}{\left(\frac{-1}{2} \cdot \frac{a \cdot t}{z}\right)}\right) \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \left(\frac{\frac{-1}{2} \cdot \left(a \cdot t\right)}{\color{blue}{z}}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \left(\frac{\left(\frac{-1}{2} \cdot a\right) \cdot t}{z}\right)\right) \]
      3. associate-*l/N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \left(\left(\frac{-1}{2} \cdot \frac{a}{z}\right) \cdot t\right)\right) \]
      5. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(\left(\frac{\frac{-1}{2} \cdot a}{z}\right), t\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot a\right), z\right), t\right)\right) \]
      8. *-lowering-*.f6426.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), z\right), t\right)\right) \]
    8. Simplified26.3%

      \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{\frac{-0.5 \cdot a}{z} \cdot t}} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto \left(z \cdot x\right) \cdot \color{blue}{\frac{y}{\frac{\frac{-1}{2} \cdot a}{z} \cdot t}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(z \cdot x\right), \color{blue}{\left(\frac{y}{\frac{\frac{-1}{2} \cdot a}{z} \cdot t}\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, x\right), \left(\frac{\color{blue}{y}}{\frac{\frac{-1}{2} \cdot a}{z} \cdot t}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, x\right), \mathsf{/.f64}\left(y, \color{blue}{\left(\frac{\frac{-1}{2} \cdot a}{z} \cdot t\right)}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, x\right), \mathsf{/.f64}\left(y, \left(t \cdot \color{blue}{\frac{\frac{-1}{2} \cdot a}{z}}\right)\right)\right) \]
      8. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, x\right), \mathsf{/.f64}\left(y, \left(t \cdot \frac{1}{\color{blue}{\frac{z}{\frac{-1}{2} \cdot a}}}\right)\right)\right) \]
      9. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, x\right), \mathsf{/.f64}\left(y, \left(\frac{t}{\color{blue}{\frac{z}{\frac{-1}{2} \cdot a}}}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, x\right), \mathsf{/.f64}\left(y, \mathsf{/.f64}\left(t, \color{blue}{\left(\frac{z}{\frac{-1}{2} \cdot a}\right)}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, x\right), \mathsf{/.f64}\left(y, \mathsf{/.f64}\left(t, \mathsf{/.f64}\left(z, \color{blue}{\left(\frac{-1}{2} \cdot a\right)}\right)\right)\right)\right) \]
      12. *-lowering-*.f6424.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, x\right), \mathsf{/.f64}\left(y, \mathsf{/.f64}\left(t, \mathsf{/.f64}\left(z, \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{a}\right)\right)\right)\right)\right) \]
    10. Applied egg-rr24.3%

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

    if 2.90000000000000004e-123 < z

    1. Initial program 60.0%

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

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

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{y}\right) \]
    5. Simplified93.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 2.9 \cdot 10^{-123}:\\ \;\;\;\;\left(z \cdot x\right) \cdot \frac{y}{\frac{t}{\frac{z}{a \cdot -0.5}}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 79.7% accurate, 6.6× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \left(\left(x\_m \cdot y\_m\right) \cdot \frac{1}{1 + \frac{\frac{t}{z\_m}}{\frac{z\_m}{a \cdot -0.5}}}\right)\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s y_s x_s x_m y_m z_m t a)
 :precision binary64
 (*
  z_s
  (*
   y_s
   (* x_s (* (* x_m y_m) (/ 1.0 (+ 1.0 (/ (/ t z_m) (/ z_m (* a -0.5))))))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	return z_s * (y_s * (x_s * ((x_m * y_m) * (1.0 / (1.0 + ((t / z_m) / (z_m / (a * -0.5))))))));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = z_s * (y_s * (x_s * ((x_m * y_m) * (1.0d0 / (1.0d0 + ((t / z_m) / (z_m / (a * (-0.5d0)))))))))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
assert x_m < y_m && y_m < z_m && z_m < t && t < a;
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	return z_s * (y_s * (x_s * ((x_m * y_m) * (1.0 / (1.0 + ((t / z_m) / (z_m / (a * -0.5))))))));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
[x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
	return z_s * (y_s * (x_s * ((x_m * y_m) * (1.0 / (1.0 + ((t / z_m) / (z_m / (a * -0.5))))))))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	return Float64(z_s * Float64(y_s * Float64(x_s * Float64(Float64(x_m * y_m) * Float64(1.0 / Float64(1.0 + Float64(Float64(t / z_m) / Float64(z_m / Float64(a * -0.5)))))))))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
function tmp = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = z_s * (y_s * (x_s * ((x_m * y_m) * (1.0 / (1.0 + ((t / z_m) / (z_m / (a * -0.5))))))));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * N[(N[(x$95$m * y$95$m), $MachinePrecision] * N[(1.0 / N[(1.0 + N[(N[(t / z$95$m), $MachinePrecision] / N[(z$95$m / N[(a * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \left(\left(x\_m \cdot y\_m\right) \cdot \frac{1}{1 + \frac{\frac{t}{z\_m}}{\frac{z\_m}{a \cdot -0.5}}}\right)\right)\right)
\end{array}
Derivation
  1. Initial program 63.9%

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

    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \color{blue}{\left(z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)\right)}\right) \]
  4. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right) \]
    2. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right)\right) \]
    4. associate-/l*N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \left(a \cdot \color{blue}{\frac{t}{{z}^{2}}}\right)\right)\right)\right)\right) \]
    5. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \color{blue}{\left(\frac{t}{{z}^{2}}\right)}\right)\right)\right)\right)\right) \]
    6. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \color{blue}{\left({z}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
    7. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \left(z \cdot \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
    8. *-lowering-*.f6448.8%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
  5. Simplified48.8%

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

      \[\leadsto \left(x \cdot y\right) \cdot \color{blue}{\frac{z}{z \cdot \left(1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)}} \]
    2. *-commutativeN/A

      \[\leadsto \frac{z}{z \cdot \left(1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)} \cdot \color{blue}{\left(x \cdot y\right)} \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{z}{z \cdot \left(1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)}\right), \color{blue}{\left(x \cdot y\right)}\right) \]
    4. associate-/r*N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{z}{z}}{1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)}\right), \left(\color{blue}{x} \cdot y\right)\right) \]
    5. *-inversesN/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)}\right), \left(x \cdot y\right)\right) \]
    6. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)\right), \left(\color{blue}{x} \cdot y\right)\right) \]
    7. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)\right)\right), \left(x \cdot y\right)\right) \]
    8. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\left(\frac{-1}{2} \cdot a\right) \cdot \frac{t}{z \cdot z}\right)\right)\right), \left(x \cdot y\right)\right) \]
    9. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\left(\frac{-1}{2} \cdot a\right) \cdot \frac{1}{\frac{z \cdot z}{t}}\right)\right)\right), \left(x \cdot y\right)\right) \]
    10. un-div-invN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\frac{\frac{-1}{2} \cdot a}{\frac{z \cdot z}{t}}\right)\right)\right), \left(x \cdot y\right)\right) \]
    11. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot a\right), \left(\frac{z \cdot z}{t}\right)\right)\right)\right), \left(x \cdot y\right)\right) \]
    12. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{z \cdot z}{t}\right)\right)\right)\right), \left(x \cdot y\right)\right) \]
    13. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{1}{\frac{t}{z \cdot z}}\right)\right)\right)\right), \left(x \cdot y\right)\right) \]
    14. associate-/r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{1}{\frac{\frac{t}{z}}{z}}\right)\right)\right)\right), \left(x \cdot y\right)\right) \]
    15. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{z}{\frac{t}{z}}\right)\right)\right)\right), \left(x \cdot y\right)\right) \]
    16. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \mathsf{/.f64}\left(z, \left(\frac{t}{z}\right)\right)\right)\right)\right), \left(x \cdot y\right)\right) \]
    17. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \mathsf{/.f64}\left(z, \mathsf{/.f64}\left(t, z\right)\right)\right)\right)\right), \left(x \cdot y\right)\right) \]
    18. *-lowering-*.f6453.6%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \mathsf{/.f64}\left(z, \mathsf{/.f64}\left(t, z\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x, \color{blue}{y}\right)\right) \]
  7. Applied egg-rr53.6%

    \[\leadsto \color{blue}{\frac{1}{1 + \frac{-0.5 \cdot a}{\frac{z}{\frac{t}{z}}}} \cdot \left(x \cdot y\right)} \]
  8. Step-by-step derivation
    1. associate-/r/N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\frac{\frac{-1}{2} \cdot a}{z} \cdot \frac{t}{z}\right)\right)\right), \mathsf{*.f64}\left(x, y\right)\right) \]
    2. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\frac{1}{\frac{z}{\frac{-1}{2} \cdot a}} \cdot \frac{t}{z}\right)\right)\right), \mathsf{*.f64}\left(x, y\right)\right) \]
    3. associate-*l/N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\frac{1 \cdot \frac{t}{z}}{\frac{z}{\frac{-1}{2} \cdot a}}\right)\right)\right), \mathsf{*.f64}\left(x, y\right)\right) \]
    4. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\frac{1 \cdot \frac{1}{\frac{z}{t}}}{\frac{z}{\frac{-1}{2} \cdot a}}\right)\right)\right), \mathsf{*.f64}\left(x, y\right)\right) \]
    5. div-invN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\frac{\frac{1}{\frac{z}{t}}}{\frac{z}{\frac{-1}{2} \cdot a}}\right)\right)\right), \mathsf{*.f64}\left(x, y\right)\right) \]
    6. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \left(\frac{\frac{t}{z}}{\frac{z}{\frac{-1}{2} \cdot a}}\right)\right)\right), \mathsf{*.f64}\left(x, y\right)\right) \]
    7. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{t}{z}\right), \left(\frac{z}{\frac{-1}{2} \cdot a}\right)\right)\right)\right), \mathsf{*.f64}\left(x, y\right)\right) \]
    8. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(t, z\right), \left(\frac{z}{\frac{-1}{2} \cdot a}\right)\right)\right)\right), \mathsf{*.f64}\left(x, y\right)\right) \]
    9. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(t, z\right), \mathsf{/.f64}\left(z, \left(\frac{-1}{2} \cdot a\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x, y\right)\right) \]
    10. *-lowering-*.f6453.6%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(t, z\right), \mathsf{/.f64}\left(z, \mathsf{*.f64}\left(\frac{-1}{2}, a\right)\right)\right)\right)\right), \mathsf{*.f64}\left(x, y\right)\right) \]
  9. Applied egg-rr53.6%

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

    \[\leadsto \left(x \cdot y\right) \cdot \frac{1}{1 + \frac{\frac{t}{z}}{\frac{z}{a \cdot -0.5}}} \]
  11. Add Preprocessing

Alternative 14: 79.6% accurate, 7.5× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \frac{x\_m \cdot y\_m}{1 + \frac{a \cdot -0.5}{\frac{z\_m}{\frac{t}{z\_m}}}}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s y_s x_s x_m y_m z_m t a)
 :precision binary64
 (*
  z_s
  (* y_s (* x_s (/ (* x_m y_m) (+ 1.0 (/ (* a -0.5) (/ z_m (/ t z_m)))))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	return z_s * (y_s * (x_s * ((x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m)))))));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = z_s * (y_s * (x_s * ((x_m * y_m) / (1.0d0 + ((a * (-0.5d0)) / (z_m / (t / z_m)))))))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
assert x_m < y_m && y_m < z_m && z_m < t && t < a;
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	return z_s * (y_s * (x_s * ((x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m)))))));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
[x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
	return z_s * (y_s * (x_s * ((x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m)))))))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	return Float64(z_s * Float64(y_s * Float64(x_s * Float64(Float64(x_m * y_m) / Float64(1.0 + Float64(Float64(a * -0.5) / Float64(z_m / Float64(t / z_m))))))))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
function tmp = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = z_s * (y_s * (x_s * ((x_m * y_m) / (1.0 + ((a * -0.5) / (z_m / (t / z_m)))))));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * N[(N[(x$95$m * y$95$m), $MachinePrecision] / N[(1.0 + N[(N[(a * -0.5), $MachinePrecision] / N[(z$95$m / N[(t / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \frac{x\_m \cdot y\_m}{1 + \frac{a \cdot -0.5}{\frac{z\_m}{\frac{t}{z\_m}}}}\right)\right)
\end{array}
Derivation
  1. Initial program 63.9%

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

    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \color{blue}{\left(z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)\right)}\right) \]
  4. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right) \]
    2. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right)\right) \]
    4. associate-/l*N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \left(a \cdot \color{blue}{\frac{t}{{z}^{2}}}\right)\right)\right)\right)\right) \]
    5. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \color{blue}{\left(\frac{t}{{z}^{2}}\right)}\right)\right)\right)\right)\right) \]
    6. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \color{blue}{\left({z}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
    7. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \left(z \cdot \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
    8. *-lowering-*.f6448.8%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
  5. Simplified48.8%

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

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

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

      \[\leadsto \left(x \cdot y\right) \cdot \frac{1}{\color{blue}{1} + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)} \]
    4. div-invN/A

      \[\leadsto \frac{x \cdot y}{\color{blue}{1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)}} \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(x \cdot y\right), \color{blue}{\left(1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)}\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \left(\color{blue}{1} + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)\right) \]
    7. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)}\right)\right) \]
    8. associate-*r*N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \left(\left(\frac{-1}{2} \cdot a\right) \cdot \color{blue}{\frac{t}{z \cdot z}}\right)\right)\right) \]
    9. clear-numN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \left(\left(\frac{-1}{2} \cdot a\right) \cdot \frac{1}{\color{blue}{\frac{z \cdot z}{t}}}\right)\right)\right) \]
    10. un-div-invN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \left(\frac{\frac{-1}{2} \cdot a}{\color{blue}{\frac{z \cdot z}{t}}}\right)\right)\right) \]
    11. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot a\right), \color{blue}{\left(\frac{z \cdot z}{t}\right)}\right)\right)\right) \]
    12. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{\color{blue}{z \cdot z}}{t}\right)\right)\right)\right) \]
    13. clear-numN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{1}{\color{blue}{\frac{t}{z \cdot z}}}\right)\right)\right)\right) \]
    14. associate-/r*N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{1}{\frac{\frac{t}{z}}{\color{blue}{z}}}\right)\right)\right)\right) \]
    15. clear-numN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{z}{\color{blue}{\frac{t}{z}}}\right)\right)\right)\right) \]
    16. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \mathsf{/.f64}\left(z, \color{blue}{\left(\frac{t}{z}\right)}\right)\right)\right)\right) \]
    17. /-lowering-/.f6453.6%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \mathsf{/.f64}\left(z, \mathsf{/.f64}\left(t, \color{blue}{z}\right)\right)\right)\right)\right) \]
  7. Applied egg-rr53.6%

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

    \[\leadsto \frac{x \cdot y}{1 + \frac{a \cdot -0.5}{\frac{z}{\frac{t}{z}}}} \]
  9. Add Preprocessing

Alternative 15: 79.2% accurate, 7.5× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \left(y\_m \cdot \frac{x\_m}{1 + \frac{a \cdot -0.5}{\frac{z\_m}{\frac{t}{z\_m}}}}\right)\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s y_s x_s x_m y_m z_m t a)
 :precision binary64
 (*
  z_s
  (* y_s (* x_s (* y_m (/ x_m (+ 1.0 (/ (* a -0.5) (/ z_m (/ t z_m))))))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	return z_s * (y_s * (x_s * (y_m * (x_m / (1.0 + ((a * -0.5) / (z_m / (t / z_m))))))));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = z_s * (y_s * (x_s * (y_m * (x_m / (1.0d0 + ((a * (-0.5d0)) / (z_m / (t / z_m))))))))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
assert x_m < y_m && y_m < z_m && z_m < t && t < a;
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	return z_s * (y_s * (x_s * (y_m * (x_m / (1.0 + ((a * -0.5) / (z_m / (t / z_m))))))));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
[x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
	return z_s * (y_s * (x_s * (y_m * (x_m / (1.0 + ((a * -0.5) / (z_m / (t / z_m))))))))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	return Float64(z_s * Float64(y_s * Float64(x_s * Float64(y_m * Float64(x_m / Float64(1.0 + Float64(Float64(a * -0.5) / Float64(z_m / Float64(t / z_m)))))))))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
function tmp = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = z_s * (y_s * (x_s * (y_m * (x_m / (1.0 + ((a * -0.5) / (z_m / (t / z_m))))))));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * N[(y$95$m * N[(x$95$m / N[(1.0 + N[(N[(a * -0.5), $MachinePrecision] / N[(z$95$m / N[(t / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \left(y\_m \cdot \frac{x\_m}{1 + \frac{a \cdot -0.5}{\frac{z\_m}{\frac{t}{z\_m}}}}\right)\right)\right)
\end{array}
Derivation
  1. Initial program 63.9%

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

    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \color{blue}{\left(z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)\right)}\right) \]
  4. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \color{blue}{\left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right) \]
    2. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \color{blue}{\left(\frac{a \cdot t}{{z}^{2}}\right)}\right)\right)\right)\right) \]
    4. associate-/l*N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \left(a \cdot \color{blue}{\frac{t}{{z}^{2}}}\right)\right)\right)\right)\right) \]
    5. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \color{blue}{\left(\frac{t}{{z}^{2}}\right)}\right)\right)\right)\right)\right) \]
    6. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \color{blue}{\left({z}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
    7. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \left(z \cdot \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
    8. *-lowering-*.f6448.8%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{z}\right)\right)\right)\right)\right)\right)\right) \]
  5. Simplified48.8%

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

      \[\leadsto \left(x \cdot y\right) \cdot \color{blue}{\frac{z}{z \cdot \left(1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)}} \]
    2. *-commutativeN/A

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

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

      \[\leadsto y \cdot \left(x \cdot \frac{\frac{z}{z}}{\color{blue}{1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)}}\right) \]
    5. *-inversesN/A

      \[\leadsto y \cdot \left(x \cdot \frac{1}{\color{blue}{1} + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)}\right) \]
    6. div-invN/A

      \[\leadsto y \cdot \frac{x}{\color{blue}{1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)}} \]
    7. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{x}{1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)}\right)}\right) \]
    8. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(x, \color{blue}{\left(1 + \frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)}\right)\right) \]
    9. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{2} \cdot \left(a \cdot \frac{t}{z \cdot z}\right)\right)}\right)\right)\right) \]
    10. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \left(\left(\frac{-1}{2} \cdot a\right) \cdot \color{blue}{\frac{t}{z \cdot z}}\right)\right)\right)\right) \]
    11. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \left(\left(\frac{-1}{2} \cdot a\right) \cdot \frac{1}{\color{blue}{\frac{z \cdot z}{t}}}\right)\right)\right)\right) \]
    12. un-div-invN/A

      \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\frac{-1}{2} \cdot a}{\color{blue}{\frac{z \cdot z}{t}}}\right)\right)\right)\right) \]
    13. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot a\right), \color{blue}{\left(\frac{z \cdot z}{t}\right)}\right)\right)\right)\right) \]
    14. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{\color{blue}{z \cdot z}}{t}\right)\right)\right)\right)\right) \]
    15. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{1}{\color{blue}{\frac{t}{z \cdot z}}}\right)\right)\right)\right)\right) \]
    16. associate-/r*N/A

      \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{1}{\frac{\frac{t}{z}}{\color{blue}{z}}}\right)\right)\right)\right)\right) \]
    17. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \left(\frac{z}{\color{blue}{\frac{t}{z}}}\right)\right)\right)\right)\right) \]
    18. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \mathsf{/.f64}\left(z, \color{blue}{\left(\frac{t}{z}\right)}\right)\right)\right)\right)\right) \]
    19. /-lowering-/.f6453.7%

      \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, a\right), \mathsf{/.f64}\left(z, \mathsf{/.f64}\left(t, \color{blue}{z}\right)\right)\right)\right)\right)\right) \]
  7. Applied egg-rr53.7%

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

    \[\leadsto y \cdot \frac{x}{1 + \frac{a \cdot -0.5}{\frac{z}{\frac{t}{z}}}} \]
  9. Add Preprocessing

Alternative 16: 76.8% accurate, 9.4× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 4.2 \cdot 10^{-82}:\\ \;\;\;\;\frac{y\_m \cdot \left(z\_m \cdot x\_m\right)}{z\_m}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot y\_m\\ \end{array}\right)\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s y_s x_s x_m y_m z_m t a)
 :precision binary64
 (*
  z_s
  (*
   y_s
   (* x_s (if (<= z_m 4.2e-82) (/ (* y_m (* z_m x_m)) z_m) (* x_m y_m))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 4.2e-82) {
		tmp = (y_m * (z_m * x_m)) / z_m;
	} else {
		tmp = x_m * y_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z_m <= 4.2d-82) then
        tmp = (y_m * (z_m * x_m)) / z_m
    else
        tmp = x_m * y_m
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
assert x_m < y_m && y_m < z_m && z_m < t && t < a;
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 4.2e-82) {
		tmp = (y_m * (z_m * x_m)) / z_m;
	} else {
		tmp = x_m * y_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
[x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
	tmp = 0
	if z_m <= 4.2e-82:
		tmp = (y_m * (z_m * x_m)) / z_m
	else:
		tmp = x_m * y_m
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0
	if (z_m <= 4.2e-82)
		tmp = Float64(Float64(y_m * Float64(z_m * x_m)) / z_m);
	else
		tmp = Float64(x_m * y_m);
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0;
	if (z_m <= 4.2e-82)
		tmp = (y_m * (z_m * x_m)) / z_m;
	else
		tmp = x_m * y_m;
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[z$95$m, 4.2e-82], N[(N[(y$95$m * N[(z$95$m * x$95$m), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision], N[(x$95$m * y$95$m), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 4.2 \cdot 10^{-82}:\\
\;\;\;\;\frac{y\_m \cdot \left(z\_m \cdot x\_m\right)}{z\_m}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 4.2000000000000001e-82

    1. Initial program 66.3%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \color{blue}{z}\right) \]
    4. Step-by-step derivation
      1. Simplified20.2%

        \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{z}} \]
      2. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\left(z \cdot \left(x \cdot y\right)\right), z\right) \]
        2. associate-*r*N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\left(z \cdot x\right) \cdot y\right), z\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(z \cdot x\right), y\right), z\right) \]
        4. *-lowering-*.f6422.8%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, x\right), y\right), z\right) \]
      3. Applied egg-rr22.8%

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

      if 4.2000000000000001e-82 < z

      1. Initial program 60.2%

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

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

          \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{y}\right) \]
      5. Simplified94.4%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 4.2 \cdot 10^{-82}:\\ \;\;\;\;\frac{y \cdot \left(z \cdot x\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
    7. Add Preprocessing

    Alternative 17: 76.1% accurate, 9.4× speedup?

    \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 6.8 \cdot 10^{-131}:\\ \;\;\;\;\frac{z\_m \cdot \left(x\_m \cdot y\_m\right)}{z\_m}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot y\_m\\ \end{array}\right)\right) \end{array} \]
    x\_m = (fabs.f64 x)
    x\_s = (copysign.f64 #s(literal 1 binary64) x)
    y\_m = (fabs.f64 y)
    y\_s = (copysign.f64 #s(literal 1 binary64) y)
    z\_m = (fabs.f64 z)
    z\_s = (copysign.f64 #s(literal 1 binary64) z)
    NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
    (FPCore (z_s y_s x_s x_m y_m z_m t a)
     :precision binary64
     (*
      z_s
      (*
       y_s
       (* x_s (if (<= z_m 6.8e-131) (/ (* z_m (* x_m y_m)) z_m) (* x_m y_m))))))
    x\_m = fabs(x);
    x\_s = copysign(1.0, x);
    y\_m = fabs(y);
    y\_s = copysign(1.0, y);
    z\_m = fabs(z);
    z\_s = copysign(1.0, z);
    assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
    double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
    	double tmp;
    	if (z_m <= 6.8e-131) {
    		tmp = (z_m * (x_m * y_m)) / z_m;
    	} else {
    		tmp = x_m * y_m;
    	}
    	return z_s * (y_s * (x_s * tmp));
    }
    
    x\_m = abs(x)
    x\_s = copysign(1.0d0, x)
    y\_m = abs(y)
    y\_s = copysign(1.0d0, y)
    z\_m = abs(z)
    z\_s = copysign(1.0d0, z)
    NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
    real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
        real(8), intent (in) :: z_s
        real(8), intent (in) :: y_s
        real(8), intent (in) :: x_s
        real(8), intent (in) :: x_m
        real(8), intent (in) :: y_m
        real(8), intent (in) :: z_m
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8) :: tmp
        if (z_m <= 6.8d-131) then
            tmp = (z_m * (x_m * y_m)) / z_m
        else
            tmp = x_m * y_m
        end if
        code = z_s * (y_s * (x_s * tmp))
    end function
    
    x\_m = Math.abs(x);
    x\_s = Math.copySign(1.0, x);
    y\_m = Math.abs(y);
    y\_s = Math.copySign(1.0, y);
    z\_m = Math.abs(z);
    z\_s = Math.copySign(1.0, z);
    assert x_m < y_m && y_m < z_m && z_m < t && t < a;
    public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
    	double tmp;
    	if (z_m <= 6.8e-131) {
    		tmp = (z_m * (x_m * y_m)) / z_m;
    	} else {
    		tmp = x_m * y_m;
    	}
    	return z_s * (y_s * (x_s * tmp));
    }
    
    x\_m = math.fabs(x)
    x\_s = math.copysign(1.0, x)
    y\_m = math.fabs(y)
    y\_s = math.copysign(1.0, y)
    z\_m = math.fabs(z)
    z\_s = math.copysign(1.0, z)
    [x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
    def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
    	tmp = 0
    	if z_m <= 6.8e-131:
    		tmp = (z_m * (x_m * y_m)) / z_m
    	else:
    		tmp = x_m * y_m
    	return z_s * (y_s * (x_s * tmp))
    
    x\_m = abs(x)
    x\_s = copysign(1.0, x)
    y\_m = abs(y)
    y\_s = copysign(1.0, y)
    z\_m = abs(z)
    z\_s = copysign(1.0, z)
    x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
    function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
    	tmp = 0.0
    	if (z_m <= 6.8e-131)
    		tmp = Float64(Float64(z_m * Float64(x_m * y_m)) / z_m);
    	else
    		tmp = Float64(x_m * y_m);
    	end
    	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
    end
    
    x\_m = abs(x);
    x\_s = sign(x) * abs(1.0);
    y\_m = abs(y);
    y\_s = sign(y) * abs(1.0);
    z\_m = abs(z);
    z\_s = sign(z) * abs(1.0);
    x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
    function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
    	tmp = 0.0;
    	if (z_m <= 6.8e-131)
    		tmp = (z_m * (x_m * y_m)) / z_m;
    	else
    		tmp = x_m * y_m;
    	end
    	tmp_2 = z_s * (y_s * (x_s * tmp));
    end
    
    x\_m = N[Abs[x], $MachinePrecision]
    x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    y\_m = N[Abs[y], $MachinePrecision]
    y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    z\_m = N[Abs[z], $MachinePrecision]
    z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
    code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[z$95$m, 6.8e-131], N[(N[(z$95$m * N[(x$95$m * y$95$m), $MachinePrecision]), $MachinePrecision] / z$95$m), $MachinePrecision], N[(x$95$m * y$95$m), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    x\_m = \left|x\right|
    \\
    x\_s = \mathsf{copysign}\left(1, x\right)
    \\
    y\_m = \left|y\right|
    \\
    y\_s = \mathsf{copysign}\left(1, y\right)
    \\
    z\_m = \left|z\right|
    \\
    z\_s = \mathsf{copysign}\left(1, z\right)
    \\
    [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
    \\
    z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
    \mathbf{if}\;z\_m \leq 6.8 \cdot 10^{-131}:\\
    \;\;\;\;\frac{z\_m \cdot \left(x\_m \cdot y\_m\right)}{z\_m}\\
    
    \mathbf{else}:\\
    \;\;\;\;x\_m \cdot y\_m\\
    
    
    \end{array}\right)\right)
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < 6.7999999999999999e-131

      1. Initial program 66.3%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \color{blue}{z}\right) \]
      4. Step-by-step derivation
        1. Simplified19.9%

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

        if 6.7999999999999999e-131 < z

        1. Initial program 60.4%

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

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

            \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{y}\right) \]
        5. Simplified92.8%

          \[\leadsto \color{blue}{x \cdot y} \]
      5. Recombined 2 regimes into one program.
      6. Final simplification50.1%

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 6.8 \cdot 10^{-131}:\\ \;\;\;\;\frac{z \cdot \left(x \cdot y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
      7. Add Preprocessing

      Alternative 18: 73.2% accurate, 37.7× speedup?

      \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \left(x\_m \cdot y\_m\right)\right)\right) \end{array} \]
      x\_m = (fabs.f64 x)
      x\_s = (copysign.f64 #s(literal 1 binary64) x)
      y\_m = (fabs.f64 y)
      y\_s = (copysign.f64 #s(literal 1 binary64) y)
      z\_m = (fabs.f64 z)
      z\_s = (copysign.f64 #s(literal 1 binary64) z)
      NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
      (FPCore (z_s y_s x_s x_m y_m z_m t a)
       :precision binary64
       (* z_s (* y_s (* x_s (* x_m y_m)))))
      x\_m = fabs(x);
      x\_s = copysign(1.0, x);
      y\_m = fabs(y);
      y\_s = copysign(1.0, y);
      z\_m = fabs(z);
      z\_s = copysign(1.0, z);
      assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
      double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
      	return z_s * (y_s * (x_s * (x_m * y_m)));
      }
      
      x\_m = abs(x)
      x\_s = copysign(1.0d0, x)
      y\_m = abs(y)
      y\_s = copysign(1.0d0, y)
      z\_m = abs(z)
      z\_s = copysign(1.0d0, z)
      NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
      real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
          real(8), intent (in) :: z_s
          real(8), intent (in) :: y_s
          real(8), intent (in) :: x_s
          real(8), intent (in) :: x_m
          real(8), intent (in) :: y_m
          real(8), intent (in) :: z_m
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          code = z_s * (y_s * (x_s * (x_m * y_m)))
      end function
      
      x\_m = Math.abs(x);
      x\_s = Math.copySign(1.0, x);
      y\_m = Math.abs(y);
      y\_s = Math.copySign(1.0, y);
      z\_m = Math.abs(z);
      z\_s = Math.copySign(1.0, z);
      assert x_m < y_m && y_m < z_m && z_m < t && t < a;
      public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
      	return z_s * (y_s * (x_s * (x_m * y_m)));
      }
      
      x\_m = math.fabs(x)
      x\_s = math.copysign(1.0, x)
      y\_m = math.fabs(y)
      y\_s = math.copysign(1.0, y)
      z\_m = math.fabs(z)
      z\_s = math.copysign(1.0, z)
      [x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
      def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
      	return z_s * (y_s * (x_s * (x_m * y_m)))
      
      x\_m = abs(x)
      x\_s = copysign(1.0, x)
      y\_m = abs(y)
      y\_s = copysign(1.0, y)
      z\_m = abs(z)
      z\_s = copysign(1.0, z)
      x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
      function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
      	return Float64(z_s * Float64(y_s * Float64(x_s * Float64(x_m * y_m))))
      end
      
      x\_m = abs(x);
      x\_s = sign(x) * abs(1.0);
      y\_m = abs(y);
      y\_s = sign(y) * abs(1.0);
      z\_m = abs(z);
      z\_s = sign(z) * abs(1.0);
      x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
      function tmp = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
      	tmp = z_s * (y_s * (x_s * (x_m * y_m)));
      end
      
      x\_m = N[Abs[x], $MachinePrecision]
      x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      y\_m = N[Abs[y], $MachinePrecision]
      y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      z\_m = N[Abs[z], $MachinePrecision]
      z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
      code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * N[(x$95$m * y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      x\_m = \left|x\right|
      \\
      x\_s = \mathsf{copysign}\left(1, x\right)
      \\
      y\_m = \left|y\right|
      \\
      y\_s = \mathsf{copysign}\left(1, y\right)
      \\
      z\_m = \left|z\right|
      \\
      z\_s = \mathsf{copysign}\left(1, z\right)
      \\
      [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
      \\
      z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \left(x\_m \cdot y\_m\right)\right)\right)
      \end{array}
      
      Derivation
      1. Initial program 63.9%

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

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

          \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{y}\right) \]
      5. Simplified47.2%

        \[\leadsto \color{blue}{x \cdot y} \]
      6. Add Preprocessing

      Developer Target 1: 87.4% accurate, 0.9× 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 2024158 
      (FPCore (x y z t a)
        :name "Statistics.Math.RootFinding:ridders from math-functions-0.1.5.2"
        :precision binary64
      
        :alt
        (! :herbie-platform default (if (< z -31921305903852764000000000000000000000000000000) (- (* y x)) (if (< z 5976268120920894000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (* x z) (/ (sqrt (- (* z z) (* a t))) y)) (* y x))))
      
        (/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))