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

Percentage Accurate: 61.6% → 92.4%
Time: 19.3s
Alternatives: 13
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 13 alternatives:

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

Initial Program: 61.6% accurate, 1.0× speedup?

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

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

Alternative 1: 92.4% accurate, 0.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 \begin{array}{l} \mathbf{if}\;z\_m \leq 1.95 \cdot 10^{+18}:\\ \;\;\;\;x\_m \cdot \left({\left({z\_m}^{2} - a \cdot t\right)}^{-0.5} \cdot \left(z\_m \cdot y\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{\frac{\mathsf{fma}\left(-0.5, a \cdot \frac{t}{z\_m}, z\_m\right)}{z\_m}}\\ \end{array}\right)\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 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.95e+18)
      (* x_m (* (pow (- (pow z_m 2.0) (* a t)) -0.5) (* z_m y_m)))
      (/ (* x_m y_m) (/ (fma -0.5 (* a (/ t z_m)) z_m) 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 <= 1.95e+18) {
		tmp = x_m * (pow((pow(z_m, 2.0) - (a * t)), -0.5) * (z_m * y_m));
	} else {
		tmp = (x_m * y_m) / (fma(-0.5, (a * (t / z_m)), z_m) / 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 <= 1.95e+18)
		tmp = Float64(x_m * Float64((Float64((z_m ^ 2.0) - Float64(a * t)) ^ -0.5) * Float64(z_m * y_m)));
	else
		tmp = Float64(Float64(x_m * y_m) / Float64(fma(-0.5, Float64(a * Float64(t / z_m)), z_m) / z_m));
	end
	return Float64(z_s * Float64(y_s * Float64(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.95e+18], N[(x$95$m * N[(N[Power[N[(N[Power[z$95$m, 2.0], $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(z$95$m * y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m * y$95$m), $MachinePrecision] / N[(N[(-0.5 * N[(a * N[(t / z$95$m), $MachinePrecision]), $MachinePrecision] + z$95$m), $MachinePrecision] / z$95$m), $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 1.95 \cdot 10^{+18}:\\
\;\;\;\;x\_m \cdot \left({\left({z\_m}^{2} - a \cdot t\right)}^{-0.5} \cdot \left(z\_m \cdot y\_m\right)\right)\\

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


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

    1. Initial program 69.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.95e18 < z

    1. Initial program 43.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 1.95 \cdot 10^{+18}:\\ \;\;\;\;x \cdot \left({\left({z}^{2} - a \cdot t\right)}^{-0.5} \cdot \left(z \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{\mathsf{fma}\left(-0.5, a \cdot \frac{t}{z}, z\right)}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 90.3% 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 5.4 \cdot 10^{-157}:\\ \;\;\;\;\frac{x\_m \cdot \left(z\_m \cdot y\_m\right)}{\sqrt{a \cdot \left(-t\right)}}\\ \mathbf{elif}\;z\_m \leq 2 \cdot 10^{+125}:\\ \;\;\;\;y\_m \cdot \frac{z\_m \cdot x\_m}{\sqrt{z\_m \cdot z\_m - a \cdot t}}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot y\_m\\ \end{array}\right)\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 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 5.4e-157)
      (/ (* x_m (* z_m y_m)) (sqrt (* a (- t))))
      (if (<= z_m 2e+125)
        (* y_m (/ (* z_m x_m) (sqrt (- (* z_m z_m) (* a 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 <= 5.4e-157) {
		tmp = (x_m * (z_m * y_m)) / sqrt((a * -t));
	} else if (z_m <= 2e+125) {
		tmp = y_m * ((z_m * x_m) / sqrt(((z_m * z_m) - (a * 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 <= 5.4d-157) then
        tmp = (x_m * (z_m * y_m)) / sqrt((a * -t))
    else if (z_m <= 2d+125) then
        tmp = y_m * ((z_m * x_m) / sqrt(((z_m * z_m) - (a * 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 <= 5.4e-157) {
		tmp = (x_m * (z_m * y_m)) / Math.sqrt((a * -t));
	} else if (z_m <= 2e+125) {
		tmp = y_m * ((z_m * x_m) / Math.sqrt(((z_m * z_m) - (a * 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 <= 5.4e-157:
		tmp = (x_m * (z_m * y_m)) / math.sqrt((a * -t))
	elif z_m <= 2e+125:
		tmp = y_m * ((z_m * x_m) / math.sqrt(((z_m * z_m) - (a * 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 <= 5.4e-157)
		tmp = Float64(Float64(x_m * Float64(z_m * y_m)) / sqrt(Float64(a * Float64(-t))));
	elseif (z_m <= 2e+125)
		tmp = Float64(y_m * Float64(Float64(z_m * x_m) / sqrt(Float64(Float64(z_m * z_m) - Float64(a * 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 <= 5.4e-157)
		tmp = (x_m * (z_m * y_m)) / sqrt((a * -t));
	elseif (z_m <= 2e+125)
		tmp = y_m * ((z_m * x_m) / sqrt(((z_m * z_m) - (a * 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, 5.4e-157], N[(N[(x$95$m * N[(z$95$m * y$95$m), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(a * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[z$95$m, 2e+125], N[(y$95$m * N[(N[(z$95$m * x$95$m), $MachinePrecision] / N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(a * t), $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 5.4 \cdot 10^{-157}:\\
\;\;\;\;\frac{x\_m \cdot \left(z\_m \cdot y\_m\right)}{\sqrt{a \cdot \left(-t\right)}}\\

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

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


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

    1. Initial program 64.3%

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

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

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

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

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

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

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

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

    if 5.4e-157 < z < 1.9999999999999998e125

    1. Initial program 88.6%

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

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

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

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

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

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

    if 1.9999999999999998e125 < z

    1. Initial program 25.3%

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

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

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

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

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

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

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

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

Alternative 3: 88.6% 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 1.12 \cdot 10^{-156}:\\ \;\;\;\;\frac{x\_m \cdot \left(z\_m \cdot y\_m\right)}{\sqrt{a \cdot \left(-t\right)}}\\ \mathbf{elif}\;z\_m \leq 0.13:\\ \;\;\;\;y\_m \cdot \frac{z\_m \cdot x\_m}{\sqrt{z\_m \cdot z\_m - a \cdot t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{\frac{\mathsf{fma}\left(-0.5, a \cdot \frac{t}{z\_m}, z\_m\right)}{z\_m}}\\ \end{array}\right)\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 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.12e-156)
      (/ (* x_m (* z_m y_m)) (sqrt (* a (- t))))
      (if (<= z_m 0.13)
        (* y_m (/ (* z_m x_m) (sqrt (- (* z_m z_m) (* a t)))))
        (/ (* x_m y_m) (/ (fma -0.5 (* a (/ t z_m)) z_m) 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 <= 1.12e-156) {
		tmp = (x_m * (z_m * y_m)) / sqrt((a * -t));
	} else if (z_m <= 0.13) {
		tmp = y_m * ((z_m * x_m) / sqrt(((z_m * z_m) - (a * t))));
	} else {
		tmp = (x_m * y_m) / (fma(-0.5, (a * (t / z_m)), z_m) / 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 <= 1.12e-156)
		tmp = Float64(Float64(x_m * Float64(z_m * y_m)) / sqrt(Float64(a * Float64(-t))));
	elseif (z_m <= 0.13)
		tmp = Float64(y_m * Float64(Float64(z_m * x_m) / sqrt(Float64(Float64(z_m * z_m) - Float64(a * t)))));
	else
		tmp = Float64(Float64(x_m * y_m) / Float64(fma(-0.5, Float64(a * Float64(t / z_m)), z_m) / z_m));
	end
	return Float64(z_s * Float64(y_s * Float64(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.12e-156], N[(N[(x$95$m * N[(z$95$m * y$95$m), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(a * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[z$95$m, 0.13], N[(y$95$m * N[(N[(z$95$m * x$95$m), $MachinePrecision] / N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m * y$95$m), $MachinePrecision] / N[(N[(-0.5 * N[(a * N[(t / z$95$m), $MachinePrecision]), $MachinePrecision] + z$95$m), $MachinePrecision] / z$95$m), $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 1.12 \cdot 10^{-156}:\\
\;\;\;\;\frac{x\_m \cdot \left(z\_m \cdot y\_m\right)}{\sqrt{a \cdot \left(-t\right)}}\\

\mathbf{elif}\;z\_m \leq 0.13:\\
\;\;\;\;y\_m \cdot \frac{z\_m \cdot x\_m}{\sqrt{z\_m \cdot z\_m - a \cdot t}}\\

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


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

    1. Initial program 64.3%

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

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

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

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

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

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

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

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

    if 1.12000000000000004e-156 < z < 0.13

    1. Initial program 93.4%

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

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

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

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

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

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

    if 0.13 < z

    1. Initial program 44.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 1.12 \cdot 10^{-156}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{\sqrt{a \cdot \left(-t\right)}}\\ \mathbf{elif}\;z \leq 0.13:\\ \;\;\;\;y \cdot \frac{z \cdot x}{\sqrt{z \cdot z - a \cdot t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{\frac{\mathsf{fma}\left(-0.5, a \cdot \frac{t}{z}, z\right)}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 81.1% 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])\\ \\ \begin{array}{l} t_1 := \sqrt{a \cdot \left(-t\right)}\\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 1.46 \cdot 10^{-254}:\\ \;\;\;\;z\_m \cdot \frac{x\_m \cdot y\_m}{t\_1}\\ \mathbf{elif}\;z\_m \leq 1.8 \cdot 10^{-94}:\\ \;\;\;\;y\_m \cdot \frac{z\_m \cdot x\_m}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot y\_m\\ \end{array}\right)\right) \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 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
 (let* ((t_1 (sqrt (* a (- t)))))
   (*
    z_s
    (*
     y_s
     (*
      x_s
      (if (<= z_m 1.46e-254)
        (* z_m (/ (* x_m y_m) t_1))
        (if (<= z_m 1.8e-94) (* y_m (/ (* z_m x_m) t_1)) (* 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 t_1 = sqrt((a * -t));
	double tmp;
	if (z_m <= 1.46e-254) {
		tmp = z_m * ((x_m * y_m) / t_1);
	} else if (z_m <= 1.8e-94) {
		tmp = y_m * ((z_m * x_m) / t_1);
	} 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) :: t_1
    real(8) :: tmp
    t_1 = sqrt((a * -t))
    if (z_m <= 1.46d-254) then
        tmp = z_m * ((x_m * y_m) / t_1)
    else if (z_m <= 1.8d-94) then
        tmp = y_m * ((z_m * x_m) / t_1)
    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 t_1 = Math.sqrt((a * -t));
	double tmp;
	if (z_m <= 1.46e-254) {
		tmp = z_m * ((x_m * y_m) / t_1);
	} else if (z_m <= 1.8e-94) {
		tmp = y_m * ((z_m * x_m) / t_1);
	} 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):
	t_1 = math.sqrt((a * -t))
	tmp = 0
	if z_m <= 1.46e-254:
		tmp = z_m * ((x_m * y_m) / t_1)
	elif z_m <= 1.8e-94:
		tmp = y_m * ((z_m * x_m) / t_1)
	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)
	t_1 = sqrt(Float64(a * Float64(-t)))
	tmp = 0.0
	if (z_m <= 1.46e-254)
		tmp = Float64(z_m * Float64(Float64(x_m * y_m) / t_1));
	elseif (z_m <= 1.8e-94)
		tmp = Float64(y_m * Float64(Float64(z_m * x_m) / t_1));
	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)
	t_1 = sqrt((a * -t));
	tmp = 0.0;
	if (z_m <= 1.46e-254)
		tmp = z_m * ((x_m * y_m) / t_1);
	elseif (z_m <= 1.8e-94)
		tmp = y_m * ((z_m * x_m) / t_1);
	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_] := Block[{t$95$1 = N[Sqrt[N[(a * (-t)), $MachinePrecision]], $MachinePrecision]}, N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[z$95$m, 1.46e-254], N[(z$95$m * N[(N[(x$95$m * y$95$m), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z$95$m, 1.8e-94], N[(y$95$m * N[(N[(z$95$m * x$95$m), $MachinePrecision] / t$95$1), $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])\\
\\
\begin{array}{l}
t_1 := \sqrt{a \cdot \left(-t\right)}\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 1.46 \cdot 10^{-254}:\\
\;\;\;\;z\_m \cdot \frac{x\_m \cdot y\_m}{t\_1}\\

\mathbf{elif}\;z\_m \leq 1.8 \cdot 10^{-94}:\\
\;\;\;\;y\_m \cdot \frac{z\_m \cdot x\_m}{t\_1}\\

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


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

    1. Initial program 63.5%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot y}{\sqrt{\color{blue}{{z}^{2}} - t \cdot a}} \cdot z \]
    6. Applied egg-rr65.1%

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

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

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

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

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

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

    if 1.46000000000000008e-254 < z < 1.8e-94

    1. Initial program 84.0%

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

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

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

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

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

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

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

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

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

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

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

    if 1.8e-94 < z

    1. Initial program 53.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 1.46 \cdot 10^{-254}:\\ \;\;\;\;z \cdot \frac{x \cdot y}{\sqrt{a \cdot \left(-t\right)}}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-94}:\\ \;\;\;\;y \cdot \frac{z \cdot x}{\sqrt{a \cdot \left(-t\right)}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 91.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 2.1 \cdot 10^{+18}:\\ \;\;\;\;\frac{x\_m \cdot \left(z\_m \cdot y\_m\right)}{\sqrt{z\_m \cdot z\_m - a \cdot t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{\frac{\mathsf{fma}\left(-0.5, a \cdot \frac{t}{z\_m}, z\_m\right)}{z\_m}}\\ \end{array}\right)\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 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.1e+18)
      (/ (* x_m (* z_m y_m)) (sqrt (- (* z_m z_m) (* a t))))
      (/ (* x_m y_m) (/ (fma -0.5 (* a (/ t z_m)) z_m) 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 <= 2.1e+18) {
		tmp = (x_m * (z_m * y_m)) / sqrt(((z_m * z_m) - (a * t)));
	} else {
		tmp = (x_m * y_m) / (fma(-0.5, (a * (t / z_m)), z_m) / 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 <= 2.1e+18)
		tmp = Float64(Float64(x_m * Float64(z_m * y_m)) / sqrt(Float64(Float64(z_m * z_m) - Float64(a * t))));
	else
		tmp = Float64(Float64(x_m * y_m) / Float64(fma(-0.5, Float64(a * Float64(t / z_m)), z_m) / z_m));
	end
	return Float64(z_s * Float64(y_s * Float64(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.1e+18], N[(N[(x$95$m * N[(z$95$m * y$95$m), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m * y$95$m), $MachinePrecision] / N[(N[(-0.5 * N[(a * N[(t / z$95$m), $MachinePrecision]), $MachinePrecision] + z$95$m), $MachinePrecision] / z$95$m), $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 2.1 \cdot 10^{+18}:\\
\;\;\;\;\frac{x\_m \cdot \left(z\_m \cdot y\_m\right)}{\sqrt{z\_m \cdot z\_m - a \cdot t}}\\

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


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

    1. Initial program 69.7%

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

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

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

    if 2.1e18 < z

    1. Initial program 43.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 80.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 2.15 \cdot 10^{-94}:\\ \;\;\;\;y\_m \cdot \frac{z\_m \cdot x\_m}{\sqrt{a \cdot \left(-t\right)}}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot y\_m\\ \end{array}\right)\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 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.15e-94)
      (* y_m (/ (* z_m x_m) (sqrt (* a (- 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.15e-94) {
		tmp = y_m * ((z_m * x_m) / sqrt((a * -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.15d-94) then
        tmp = y_m * ((z_m * x_m) / sqrt((a * -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.15e-94) {
		tmp = y_m * ((z_m * x_m) / Math.sqrt((a * -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.15e-94:
		tmp = y_m * ((z_m * x_m) / math.sqrt((a * -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.15e-94)
		tmp = Float64(y_m * Float64(Float64(z_m * x_m) / sqrt(Float64(a * Float64(-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.15e-94)
		tmp = y_m * ((z_m * x_m) / sqrt((a * -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.15e-94], N[(y$95$m * N[(N[(z$95$m * x$95$m), $MachinePrecision] / N[Sqrt[N[(a * (-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.15 \cdot 10^{-94}:\\
\;\;\;\;y\_m \cdot \frac{z\_m \cdot x\_m}{\sqrt{a \cdot \left(-t\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.1499999999999999e-94

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

    if 2.1499999999999999e-94 < z

    1. Initial program 53.2%

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

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

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

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

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

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

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

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

Alternative 7: 84.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 3.7 \cdot 10^{-91}:\\ \;\;\;\;\frac{x\_m \cdot \left(z\_m \cdot y\_m\right)}{\sqrt{a \cdot \left(-t\right)}}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot y\_m\\ \end{array}\right)\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 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-91)
      (/ (* x_m (* z_m y_m)) (sqrt (* a (- 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 <= 3.7e-91) {
		tmp = (x_m * (z_m * y_m)) / sqrt((a * -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 <= 3.7d-91) then
        tmp = (x_m * (z_m * y_m)) / sqrt((a * -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 <= 3.7e-91) {
		tmp = (x_m * (z_m * y_m)) / Math.sqrt((a * -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 <= 3.7e-91:
		tmp = (x_m * (z_m * y_m)) / math.sqrt((a * -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 <= 3.7e-91)
		tmp = Float64(Float64(x_m * Float64(z_m * y_m)) / sqrt(Float64(a * Float64(-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 <= 3.7e-91)
		tmp = (x_m * (z_m * y_m)) / sqrt((a * -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, 3.7e-91], N[(N[(x$95$m * N[(z$95$m * y$95$m), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(a * (-t)), $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 3.7 \cdot 10^{-91}:\\
\;\;\;\;\frac{x\_m \cdot \left(z\_m \cdot y\_m\right)}{\sqrt{a \cdot \left(-t\right)}}\\

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


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

    1. Initial program 66.9%

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

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

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

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

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

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

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

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

    if 3.7000000000000002e-91 < z

    1. Initial program 52.7%

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

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

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

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

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

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

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

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

Alternative 8: 77.1% accurate, 5.1× 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}\;x\_m \cdot y\_m \leq 2 \cdot 10^{+143}:\\ \;\;\;\;y\_m \cdot \frac{z\_m \cdot x\_m}{z\_m + -0.5 \cdot \left(t \cdot \frac{a}{z\_m}\right)}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot y\_m\\ \end{array}\right)\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 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 (<= (* x_m y_m) 2e+143)
      (* y_m (/ (* z_m x_m) (+ z_m (* -0.5 (* t (/ a 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 ((x_m * y_m) <= 2e+143) {
		tmp = y_m * ((z_m * x_m) / (z_m + (-0.5 * (t * (a / 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 ((x_m * y_m) <= 2d+143) then
        tmp = y_m * ((z_m * x_m) / (z_m + ((-0.5d0) * (t * (a / 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 ((x_m * y_m) <= 2e+143) {
		tmp = y_m * ((z_m * x_m) / (z_m + (-0.5 * (t * (a / 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 (x_m * y_m) <= 2e+143:
		tmp = y_m * ((z_m * x_m) / (z_m + (-0.5 * (t * (a / 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 (Float64(x_m * y_m) <= 2e+143)
		tmp = Float64(y_m * Float64(Float64(z_m * x_m) / Float64(z_m + Float64(-0.5 * Float64(t * Float64(a / 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 ((x_m * y_m) <= 2e+143)
		tmp = y_m * ((z_m * x_m) / (z_m + (-0.5 * (t * (a / 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[N[(x$95$m * y$95$m), $MachinePrecision], 2e+143], N[(y$95$m * N[(N[(z$95$m * x$95$m), $MachinePrecision] / N[(z$95$m + N[(-0.5 * N[(t * N[(a / z$95$m), $MachinePrecision]), $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}\;x\_m \cdot y\_m \leq 2 \cdot 10^{+143}:\\
\;\;\;\;y\_m \cdot \frac{z\_m \cdot x\_m}{z\_m + -0.5 \cdot \left(t \cdot \frac{a}{z\_m}\right)}\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < 2e143

    1. Initial program 65.5%

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

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

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

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

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

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

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

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

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

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

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

    if 2e143 < (*.f64 x y)

    1. Initial program 41.1%

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

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

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

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

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

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

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

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

Alternative 9: 77.1% accurate, 5.1× 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}\;x\_m \cdot y\_m \leq 2 \cdot 10^{+143}:\\ \;\;\;\;y\_m \cdot \frac{z\_m \cdot x\_m}{z\_m + -0.5 \cdot \frac{a}{\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 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 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 (<= (* x_m y_m) 2e+143)
      (* y_m (/ (* z_m x_m) (+ z_m (* -0.5 (/ a (/ 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 ((x_m * y_m) <= 2e+143) {
		tmp = y_m * ((z_m * x_m) / (z_m + (-0.5 * (a / (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 ((x_m * y_m) <= 2d+143) then
        tmp = y_m * ((z_m * x_m) / (z_m + ((-0.5d0) * (a / (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 ((x_m * y_m) <= 2e+143) {
		tmp = y_m * ((z_m * x_m) / (z_m + (-0.5 * (a / (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 (x_m * y_m) <= 2e+143:
		tmp = y_m * ((z_m * x_m) / (z_m + (-0.5 * (a / (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 (Float64(x_m * y_m) <= 2e+143)
		tmp = Float64(y_m * Float64(Float64(z_m * x_m) / Float64(z_m + Float64(-0.5 * Float64(a / 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 ((x_m * y_m) <= 2e+143)
		tmp = y_m * ((z_m * x_m) / (z_m + (-0.5 * (a / (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[N[(x$95$m * y$95$m), $MachinePrecision], 2e+143], N[(y$95$m * N[(N[(z$95$m * x$95$m), $MachinePrecision] / N[(z$95$m + N[(-0.5 * N[(a / N[(z$95$m / t), $MachinePrecision]), $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}\;x\_m \cdot y\_m \leq 2 \cdot 10^{+143}:\\
\;\;\;\;y\_m \cdot \frac{z\_m \cdot x\_m}{z\_m + -0.5 \cdot \frac{a}{\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 (*.f64 x y) < 2e143

    1. Initial program 65.5%

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

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

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

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

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

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

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

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

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

    if 2e143 < (*.f64 x y)

    1. Initial program 41.1%

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

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

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

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

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

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

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

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

Alternative 10: 77.5% accurate, 5.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 \begin{array}{l} \mathbf{if}\;z\_m \leq 2.3 \cdot 10^{-5}:\\ \;\;\;\;z\_m \cdot \frac{x\_m \cdot y\_m}{z\_m + -0.5 \cdot \frac{a \cdot t}{z\_m}}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot y\_m\\ \end{array}\right)\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 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.3e-5)
      (* z_m (/ (* x_m y_m) (+ z_m (* -0.5 (/ (* a t) 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 <= 2.3e-5) {
		tmp = z_m * ((x_m * y_m) / (z_m + (-0.5 * ((a * t) / 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 <= 2.3d-5) then
        tmp = z_m * ((x_m * y_m) / (z_m + ((-0.5d0) * ((a * t) / 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 <= 2.3e-5) {
		tmp = z_m * ((x_m * y_m) / (z_m + (-0.5 * ((a * t) / 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 <= 2.3e-5:
		tmp = z_m * ((x_m * y_m) / (z_m + (-0.5 * ((a * t) / 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 <= 2.3e-5)
		tmp = Float64(z_m * Float64(Float64(x_m * y_m) / Float64(z_m + Float64(-0.5 * Float64(Float64(a * t) / 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 <= 2.3e-5)
		tmp = z_m * ((x_m * y_m) / (z_m + (-0.5 * ((a * t) / 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, 2.3e-5], N[(z$95$m * N[(N[(x$95$m * y$95$m), $MachinePrecision] / N[(z$95$m + N[(-0.5 * N[(N[(a * t), $MachinePrecision] / z$95$m), $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.3 \cdot 10^{-5}:\\
\;\;\;\;z\_m \cdot \frac{x\_m \cdot y\_m}{z\_m + -0.5 \cdot \frac{a \cdot t}{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 < 2.3e-5

    1. Initial program 69.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot y}{\sqrt{\color{blue}{{z}^{2}} - t \cdot a}} \cdot z \]
    6. Applied egg-rr71.1%

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

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

    if 2.3e-5 < z

    1. Initial program 44.9%

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

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

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

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

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

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

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

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

Alternative 11: 75.2% 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 1.54 \cdot 10^{-105}:\\ \;\;\;\;y\_m \cdot \frac{z\_m \cdot x\_m}{z\_m}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot y\_m\\ \end{array}\right)\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 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.54e-105) (* 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 <= 1.54e-105) {
		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 <= 1.54d-105) 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 <= 1.54e-105) {
		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 <= 1.54e-105:
		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 <= 1.54e-105)
		tmp = Float64(y_m * Float64(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 <= 1.54e-105)
		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, 1.54e-105], N[(y$95$m * N[(N[(z$95$m * x$95$m), $MachinePrecision] / z$95$m), $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.54 \cdot 10^{-105}:\\
\;\;\;\;y\_m \cdot \frac{z\_m \cdot x\_m}{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.5399999999999999e-105

    1. Initial program 65.8%

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

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

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

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

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

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

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

    if 1.5399999999999999e-105 < z

    1. Initial program 55.0%

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

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

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

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

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

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

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

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

Alternative 12: 75.3% 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 5 \cdot 10^{-116}:\\ \;\;\;\;\left(x\_m \cdot y\_m + 1\right) + -1\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot y\_m\\ \end{array}\right)\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 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-116) (+ (+ (* x_m y_m) 1.0) -1.0) (* 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 <= 5e-116) {
		tmp = ((x_m * y_m) + 1.0) + -1.0;
	} 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 <= 5d-116) then
        tmp = ((x_m * y_m) + 1.0d0) + (-1.0d0)
    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 <= 5e-116) {
		tmp = ((x_m * y_m) + 1.0) + -1.0;
	} 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 <= 5e-116:
		tmp = ((x_m * y_m) + 1.0) + -1.0
	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 <= 5e-116)
		tmp = Float64(Float64(Float64(x_m * y_m) + 1.0) + -1.0);
	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 <= 5e-116)
		tmp = ((x_m * y_m) + 1.0) + -1.0;
	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, 5e-116], N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] + 1.0), $MachinePrecision] + -1.0), $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 5 \cdot 10^{-116}:\\
\;\;\;\;\left(x\_m \cdot y\_m + 1\right) + -1\\

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


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

    1. Initial program 65.5%

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

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

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

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

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

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

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

      \[\leadsto \frac{y}{\color{blue}{\frac{1}{x}}} \]
    6. Step-by-step derivation
      1. associate-/r/16.1%

        \[\leadsto \color{blue}{\frac{y}{1} \cdot x} \]
      2. /-rgt-identity16.1%

        \[\leadsto \color{blue}{y} \cdot x \]
      3. *-commutative16.1%

        \[\leadsto \color{blue}{x \cdot y} \]
      4. remove-double-div16.1%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{1}{y}}} \]
      5. rgt-mult-inverse16.1%

        \[\leadsto x \cdot \frac{1}{\frac{\color{blue}{z \cdot \frac{1}{z}}}{y}} \]
      6. un-div-inv16.1%

        \[\leadsto x \cdot \frac{1}{\frac{\color{blue}{\frac{z}{z}}}{y}} \]
      7. associate-/r*18.1%

        \[\leadsto x \cdot \frac{1}{\color{blue}{\frac{z}{z \cdot y}}} \]
      8. div-inv18.1%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{z \cdot y}}} \]
      9. expm1-log1p-u17.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{x}{\frac{z}{z \cdot y}}\right)\right)} \]
      10. expm1-udef24.0%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{x}{\frac{z}{z \cdot y}}\right)} - 1} \]
      11. log1p-udef24.0%

        \[\leadsto e^{\color{blue}{\log \left(1 + \frac{x}{\frac{z}{z \cdot y}}\right)}} - 1 \]
      12. rem-exp-log24.4%

        \[\leadsto \color{blue}{\left(1 + \frac{x}{\frac{z}{z \cdot y}}\right)} - 1 \]
      13. div-inv24.4%

        \[\leadsto \left(1 + \color{blue}{x \cdot \frac{1}{\frac{z}{z \cdot y}}}\right) - 1 \]
      14. associate-/r*23.8%

        \[\leadsto \left(1 + x \cdot \frac{1}{\color{blue}{\frac{\frac{z}{z}}{y}}}\right) - 1 \]
      15. un-div-inv23.8%

        \[\leadsto \left(1 + x \cdot \frac{1}{\frac{\color{blue}{z \cdot \frac{1}{z}}}{y}}\right) - 1 \]
      16. rgt-mult-inverse23.8%

        \[\leadsto \left(1 + x \cdot \frac{1}{\frac{\color{blue}{1}}{y}}\right) - 1 \]
      17. remove-double-div23.8%

        \[\leadsto \left(1 + x \cdot \color{blue}{y}\right) - 1 \]
    7. Applied egg-rr23.8%

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

    if 5.0000000000000003e-116 < z

    1. Initial program 55.4%

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

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

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

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

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

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

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

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

Alternative 13: 72.1% 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 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
z_m = (fabs.f64 z)
z_s = (copysign.f64 1 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 61.4%

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

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

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

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

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

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

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

    \[\leadsto x \cdot y \]
  7. Add Preprocessing

Developer target: 87.3% 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 2024027 
(FPCore (x y z t a)
  :name "Statistics.Math.RootFinding:ridders from math-functions-0.1.5.2"
  :precision binary64

  :herbie-target
  (if (< z -3.1921305903852764e+46) (- (* y x)) (if (< z 5.976268120920894e+90) (/ (* x z) (/ (sqrt (- (* z z) (* a t))) y)) (* y x)))

  (/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))