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

Percentage Accurate: 61.6% → 93.1%
Time: 16.5s
Alternatives: 11
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 11 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: 93.1% accurate, 0.3× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\ \\ z\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 2.8 \cdot 10^{-179}:\\ \;\;\;\;x\_m \cdot \left(\frac{1}{\sqrt{{z\_m}^{2} - a \cdot t}} \cdot \left(z\_m \cdot y\right)\right)\\ \mathbf{elif}\;z\_m \leq 10^{+145}:\\ \;\;\;\;x\_m \cdot \left(y \cdot \frac{z\_m}{\sqrt{z\_m \cdot z\_m - a \cdot t}}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x\_m \cdot y\right) \cdot \left(e^{\mathsf{log1p}\left(\frac{z\_m}{\mathsf{fma}\left(a \cdot \frac{t}{z\_m}, -0.5, z\_m\right)}\right)} + -1\right)\\ \end{array}\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s x_s x_m y z_m t a)
 :precision binary64
 (*
  z_s
  (*
   x_s
   (if (<= z_m 2.8e-179)
     (* x_m (* (/ 1.0 (sqrt (- (pow z_m 2.0) (* a t)))) (* z_m y)))
     (if (<= z_m 1e+145)
       (* x_m (* y (/ z_m (sqrt (- (* z_m z_m) (* a t))))))
       (*
        (* x_m y)
        (+ (exp (log1p (/ z_m (fma (* a (/ t z_m)) -0.5 z_m)))) -1.0)))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
assert(x_m < y && y < z_m && z_m < t && t < a);
double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 2.8e-179) {
		tmp = x_m * ((1.0 / sqrt((pow(z_m, 2.0) - (a * t)))) * (z_m * y));
	} else if (z_m <= 1e+145) {
		tmp = x_m * (y * (z_m / sqrt(((z_m * z_m) - (a * t)))));
	} else {
		tmp = (x_m * y) * (exp(log1p((z_m / fma((a * (t / z_m)), -0.5, z_m)))) + -1.0);
	}
	return z_s * (x_s * tmp);
}
x\_m = abs(x)
x\_s = copysign(1.0, x)
z\_m = abs(z)
z\_s = copysign(1.0, z)
x_m, y, z_m, t, a = sort([x_m, y, z_m, t, a])
function code(z_s, x_s, x_m, y, z_m, t, a)
	tmp = 0.0
	if (z_m <= 2.8e-179)
		tmp = Float64(x_m * Float64(Float64(1.0 / sqrt(Float64((z_m ^ 2.0) - Float64(a * t)))) * Float64(z_m * y)));
	elseif (z_m <= 1e+145)
		tmp = Float64(x_m * Float64(y * Float64(z_m / sqrt(Float64(Float64(z_m * z_m) - Float64(a * t))))));
	else
		tmp = Float64(Float64(x_m * y) * Float64(exp(log1p(Float64(z_m / fma(Float64(a * Float64(t / z_m)), -0.5, z_m)))) + -1.0));
	end
	return Float64(z_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]
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, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, x$95$s_, x$95$m_, y_, z$95$m_, t_, a_] := N[(z$95$s * N[(x$95$s * If[LessEqual[z$95$m, 2.8e-179], N[(x$95$m * N[(N[(1.0 / N[Sqrt[N[(N[Power[z$95$m, 2.0], $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(z$95$m * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z$95$m, 1e+145], N[(x$95$m * N[(y * N[(z$95$m / N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m * y), $MachinePrecision] * N[(N[Exp[N[Log[1 + N[(z$95$m / N[(N[(a * N[(t / z$95$m), $MachinePrecision]), $MachinePrecision] * -0.5 + z$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\
\\
z\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 2.8 \cdot 10^{-179}:\\
\;\;\;\;x\_m \cdot \left(\frac{1}{\sqrt{{z\_m}^{2} - a \cdot t}} \cdot \left(z\_m \cdot y\right)\right)\\

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

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


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

    1. Initial program 62.8%

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(y \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/61.4%

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

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

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

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

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

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

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

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

    if 2.8000000000000001e-179 < z < 9.9999999999999999e144

    1. Initial program 89.2%

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

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

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

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

    if 9.9999999999999999e144 < z

    1. Initial program 25.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot y\right) \cdot \left(e^{\mathsf{log1p}\left(\frac{z}{-0.5 \cdot \color{blue}{\left(a \cdot \frac{t}{z}\right)} + z}\right)} - 1\right) \]
      6. *-commutative95.9%

        \[\leadsto \left(x \cdot y\right) \cdot \left(e^{\mathsf{log1p}\left(\frac{z}{\color{blue}{\left(a \cdot \frac{t}{z}\right) \cdot -0.5} + z}\right)} - 1\right) \]
      7. fma-define95.9%

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

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

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

Alternative 2: 93.0% accurate, 0.3× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\ \\ z\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 4.4 \cdot 10^{-182}:\\ \;\;\;\;x\_m \cdot \left(\frac{1}{\sqrt{{z\_m}^{2} - a \cdot t}} \cdot \left(z\_m \cdot y\right)\right)\\ \mathbf{elif}\;z\_m \leq 10^{+144}:\\ \;\;\;\;x\_m \cdot \left(y \cdot \frac{z\_m}{\sqrt{z\_m \cdot z\_m - a \cdot t}}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x\_m \cdot y\right) \cdot \log \left(e^{\frac{z\_m}{\mathsf{fma}\left(a \cdot \frac{t}{z\_m}, -0.5, z\_m\right)}}\right)\\ \end{array}\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
NOTE: x_m, y, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s x_s x_m y z_m t a)
 :precision binary64
 (*
  z_s
  (*
   x_s
   (if (<= z_m 4.4e-182)
     (* x_m (* (/ 1.0 (sqrt (- (pow z_m 2.0) (* a t)))) (* z_m y)))
     (if (<= z_m 1e+144)
       (* x_m (* y (/ z_m (sqrt (- (* z_m z_m) (* a t))))))
       (* (* x_m y) (log (exp (/ z_m (fma (* a (/ t z_m)) -0.5 z_m))))))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
assert(x_m < y && y < z_m && z_m < t && t < a);
double code(double z_s, double x_s, double x_m, double y, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 4.4e-182) {
		tmp = x_m * ((1.0 / sqrt((pow(z_m, 2.0) - (a * t)))) * (z_m * y));
	} else if (z_m <= 1e+144) {
		tmp = x_m * (y * (z_m / sqrt(((z_m * z_m) - (a * t)))));
	} else {
		tmp = (x_m * y) * log(exp((z_m / fma((a * (t / z_m)), -0.5, z_m))));
	}
	return z_s * (x_s * tmp);
}
x\_m = abs(x)
x\_s = copysign(1.0, x)
z\_m = abs(z)
z\_s = copysign(1.0, z)
x_m, y, z_m, t, a = sort([x_m, y, z_m, t, a])
function code(z_s, x_s, x_m, y, z_m, t, a)
	tmp = 0.0
	if (z_m <= 4.4e-182)
		tmp = Float64(x_m * Float64(Float64(1.0 / sqrt(Float64((z_m ^ 2.0) - Float64(a * t)))) * Float64(z_m * y)));
	elseif (z_m <= 1e+144)
		tmp = Float64(x_m * Float64(y * Float64(z_m / sqrt(Float64(Float64(z_m * z_m) - Float64(a * t))))));
	else
		tmp = Float64(Float64(x_m * y) * log(exp(Float64(z_m / fma(Float64(a * Float64(t / z_m)), -0.5, z_m)))));
	end
	return Float64(z_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]
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, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, x$95$s_, x$95$m_, y_, z$95$m_, t_, a_] := N[(z$95$s * N[(x$95$s * If[LessEqual[z$95$m, 4.4e-182], N[(x$95$m * N[(N[(1.0 / N[Sqrt[N[(N[Power[z$95$m, 2.0], $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(z$95$m * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z$95$m, 1e+144], N[(x$95$m * N[(y * N[(z$95$m / N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m * y), $MachinePrecision] * N[Log[N[Exp[N[(z$95$m / N[(N[(a * N[(t / z$95$m), $MachinePrecision]), $MachinePrecision] * -0.5 + z$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y, z_m, t, a] = \mathsf{sort}([x_m, y, z_m, t, a])\\
\\
z\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 4.4 \cdot 10^{-182}:\\
\;\;\;\;x\_m \cdot \left(\frac{1}{\sqrt{{z\_m}^{2} - a \cdot t}} \cdot \left(z\_m \cdot y\right)\right)\\

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

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


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

    1. Initial program 62.8%

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(y \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/61.4%

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

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

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

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

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

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

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

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

    if 4.3999999999999999e-182 < z < 1.00000000000000002e144

    1. Initial program 89.2%

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

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

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

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

    if 1.00000000000000002e144 < z

    1. Initial program 25.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot y\right) \cdot \log \left(e^{\frac{z}{-0.5 \cdot \color{blue}{\left(a \cdot \frac{t}{z}\right)} + z}}\right) \]
      5. *-commutative95.9%

        \[\leadsto \left(x \cdot y\right) \cdot \log \left(e^{\frac{z}{\color{blue}{\left(a \cdot \frac{t}{z}\right) \cdot -0.5} + z}}\right) \]
      6. fma-define95.9%

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

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

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

Alternative 3: 93.1% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 62.8%

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(y \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/61.4%

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

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

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

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

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

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

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

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

    if 8.00000000000000038e-181 < z < 1.00000000000000002e144

    1. Initial program 89.2%

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

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

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

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

    if 1.00000000000000002e144 < z

    1. Initial program 25.2%

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

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

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

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

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

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

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

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

Alternative 4: 93.0% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 61.9%

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

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

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

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

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

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

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

    if 3.9999999999999998e-234 < z < 1.00000000000000002e144

    1. Initial program 86.8%

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

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

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

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

    if 1.00000000000000002e144 < z

    1. Initial program 25.2%

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

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

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

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

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

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

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

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

Alternative 5: 84.4% accurate, 1.0× speedup?

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

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


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

    1. Initial program 62.8%

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

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

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

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

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

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

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

    if 2.3500000000000001e-179 < z

    1. Initial program 61.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 84.0% accurate, 1.0× speedup?

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

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


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

    1. Initial program 62.8%

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

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

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

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

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

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

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

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

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

    if 2.8999999999999999e-179 < z

    1. Initial program 61.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 79.9% accurate, 7.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 79.8% accurate, 7.5× speedup?

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

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

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

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

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

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

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

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

Alternative 9: 79.5% accurate, 7.5× speedup?

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

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

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

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

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

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

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

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

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

Alternative 10: 72.3% accurate, 9.4× speedup?

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

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


\end{array}\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 3.00000000000000026e-197

    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*65.9%

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

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

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

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

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

    if 3.00000000000000026e-197 < a

    1. Initial program 60.8%

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

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

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

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

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

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

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

Alternative 11: 73.1% accurate, 37.7× speedup?

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

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

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

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

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

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

    \[\leadsto y \cdot \color{blue}{x} \]
  6. Final simplification40.8%

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

Developer Target 1: 88.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 2024116 
(FPCore (x y z t a)
  :name "Statistics.Math.RootFinding:ridders from math-functions-0.1.5.2"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< z -31921305903852764000000000000000000000000000000) (- (* y x)) (if (< z 5976268120920894000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (* x z) (/ (sqrt (- (* z z) (* a t))) y)) (* y x))))

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