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

Percentage Accurate: 60.6% → 93.4%
Time: 21.5s
Alternatives: 18
Speedup: 37.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 60.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.4% accurate, 0.2× 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{z_m \cdot z_m - t \cdot a}\\ t_2 := \frac{z_m \cdot \left(y_m \cdot x_m\right)}{t_1}\\ z_s \cdot \left(y_s \cdot \left(x_s \cdot \begin{array}{l} \mathbf{if}\;t_2 \leq 0:\\ \;\;\;\;y_m \cdot \frac{x_m}{1 + \left(a \cdot 0.3333333333333333\right) \cdot \left(\frac{t}{{z_m}^{2}} \cdot -1.5\right)}\\ \mathbf{elif}\;t_2 \leq 10^{+232}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;\frac{y_m}{\frac{t_1}{z_m \cdot x_m}}\\ \mathbf{else}:\\ \;\;\;\;y_m \cdot \frac{x_m}{\frac{\mathsf{fma}\left(-0.5, t \cdot \frac{a}{z_m}, z_m\right)}{z_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 (- (* z_m z_m) (* t a)))) (t_2 (/ (* z_m (* y_m x_m)) t_1)))
   (*
    z_s
    (*
     y_s
     (*
      x_s
      (if (<= t_2 0.0)
        (*
         y_m
         (/
          x_m
          (+ 1.0 (* (* a 0.3333333333333333) (* (/ t (pow z_m 2.0)) -1.5)))))
        (if (<= t_2 1e+232)
          t_2
          (if (<= t_2 INFINITY)
            (/ y_m (/ t_1 (* z_m x_m)))
            (* y_m (/ x_m (/ (fma -0.5 (* t (/ a 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 t_1 = sqrt(((z_m * z_m) - (t * a)));
	double t_2 = (z_m * (y_m * x_m)) / t_1;
	double tmp;
	if (t_2 <= 0.0) {
		tmp = y_m * (x_m / (1.0 + ((a * 0.3333333333333333) * ((t / pow(z_m, 2.0)) * -1.5))));
	} else if (t_2 <= 1e+232) {
		tmp = t_2;
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = y_m / (t_1 / (z_m * x_m));
	} else {
		tmp = y_m * (x_m / (fma(-0.5, (t * (a / 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)
	t_1 = sqrt(Float64(Float64(z_m * z_m) - Float64(t * a)))
	t_2 = Float64(Float64(z_m * Float64(y_m * x_m)) / t_1)
	tmp = 0.0
	if (t_2 <= 0.0)
		tmp = Float64(y_m * Float64(x_m / Float64(1.0 + Float64(Float64(a * 0.3333333333333333) * Float64(Float64(t / (z_m ^ 2.0)) * -1.5)))));
	elseif (t_2 <= 1e+232)
		tmp = t_2;
	elseif (t_2 <= Inf)
		tmp = Float64(y_m / Float64(t_1 / Float64(z_m * x_m)));
	else
		tmp = Float64(y_m * Float64(x_m / Float64(fma(-0.5, Float64(t * Float64(a / 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_] := Block[{t$95$1 = N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(z$95$m * N[(y$95$m * x$95$m), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[t$95$2, 0.0], N[(y$95$m * N[(x$95$m / N[(1.0 + N[(N[(a * 0.3333333333333333), $MachinePrecision] * N[(N[(t / N[Power[z$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * -1.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+232], t$95$2, If[LessEqual[t$95$2, Infinity], N[(y$95$m / N[(t$95$1 / N[(z$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y$95$m * N[(x$95$m / N[(N[(-0.5 * N[(t * N[(a / z$95$m), $MachinePrecision]), $MachinePrecision] + z$95$m), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
\\
\begin{array}{l}
t_1 := \sqrt{z_m \cdot z_m - t \cdot a}\\
t_2 := \frac{z_m \cdot \left(y_m \cdot x_m\right)}{t_1}\\
z_s \cdot \left(y_s \cdot \left(x_s \cdot \begin{array}{l}
\mathbf{if}\;t_2 \leq 0:\\
\;\;\;\;y_m \cdot \frac{x_m}{1 + \left(a \cdot 0.3333333333333333\right) \cdot \left(\frac{t}{{z_m}^{2}} \cdot -1.5\right)}\\

\mathbf{elif}\;t_2 \leq 10^{+232}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\frac{y_m}{\frac{t_1}{z_m \cdot x_m}}\\

\mathbf{else}:\\
\;\;\;\;y_m \cdot \frac{x_m}{\frac{\mathsf{fma}\left(-0.5, t \cdot \frac{a}{z_m}, z_m\right)}{z_m}}\\


\end{array}\right)\right)
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < 0.0

    1. Initial program 64.4%

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

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

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

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

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

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

      \[\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 47.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{\mathsf{fma}\left(-0.5, \color{blue}{\frac{a}{\frac{z}{t}}}, z\right)}{z}} \cdot y \]
      10. associate-/r/50.1%

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

      \[\leadsto \color{blue}{\frac{x}{\frac{\mathsf{fma}\left(-0.5, \frac{a}{z} \cdot t, z\right)}{z}} \cdot y} \]
    8. Step-by-step derivation
      1. add-cbrt-cube50.0%

        \[\leadsto \frac{x}{\color{blue}{\sqrt[3]{\left(\frac{\mathsf{fma}\left(-0.5, \frac{a}{z} \cdot t, z\right)}{z} \cdot \frac{\mathsf{fma}\left(-0.5, \frac{a}{z} \cdot t, z\right)}{z}\right) \cdot \frac{\mathsf{fma}\left(-0.5, \frac{a}{z} \cdot t, z\right)}{z}}}} \cdot y \]
      2. pow1/350.0%

        \[\leadsto \frac{x}{\color{blue}{{\left(\left(\frac{\mathsf{fma}\left(-0.5, \frac{a}{z} \cdot t, z\right)}{z} \cdot \frac{\mathsf{fma}\left(-0.5, \frac{a}{z} \cdot t, z\right)}{z}\right) \cdot \frac{\mathsf{fma}\left(-0.5, \frac{a}{z} \cdot t, z\right)}{z}\right)}^{0.3333333333333333}}} \cdot y \]
      3. pow350.0%

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

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

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

      \[\leadsto \frac{x}{\color{blue}{{\left({\left(\frac{\mathsf{fma}\left(-0.5, \frac{a}{\frac{z}{t}}, z\right)}{z}\right)}^{3}\right)}^{0.3333333333333333}}} \cdot y \]
    10. Taylor expanded in a around 0 50.0%

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

        \[\leadsto \frac{x}{1 + \color{blue}{\left(0.3333333333333333 \cdot a\right) \cdot \left(-1 \cdot \frac{t}{{z}^{2}} + -0.5 \cdot \frac{t}{{z}^{2}}\right)}} \cdot y \]
      2. distribute-rgt-out50.0%

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

        \[\leadsto \frac{x}{1 + \left(0.3333333333333333 \cdot a\right) \cdot \left(\frac{t}{{z}^{2}} \cdot \color{blue}{-1.5}\right)} \cdot y \]
    12. Simplified50.0%

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

    if 0.0 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < 1.00000000000000006e232

    1. Initial program 99.6%

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

    if 1.00000000000000006e232 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < +inf.0

    1. Initial program 34.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.7%

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

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

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

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

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

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

    if +inf.0 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))))

    1. Initial program 0.0%

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

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

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

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

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

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

      \[\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 30.4%

      \[\leadsto \frac{y}{\frac{\color{blue}{z + -0.5 \cdot \frac{a \cdot t}{z}}}{x \cdot z}} \]
    6. Step-by-step derivation
      1. div-inv30.4%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{\mathsf{fma}\left(-0.5, \color{blue}{\frac{a}{\frac{z}{t}}}, z\right)}{z}} \cdot y \]
      10. associate-/r/51.7%

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

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

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

Alternative 2: 93.5% accurate, 0.2× 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{z_m \cdot z_m - t \cdot a}\\ t_2 := \frac{z_m \cdot \left(y_m \cdot x_m\right)}{t_1}\\ t_3 := y_m \cdot \frac{x_m}{\frac{\mathsf{fma}\left(-0.5, t \cdot \frac{a}{z_m}, z_m\right)}{z_m}}\\ z_s \cdot \left(y_s \cdot \left(x_s \cdot \begin{array}{l} \mathbf{if}\;t_2 \leq 0:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq 10^{+232}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;\frac{y_m}{\frac{t_1}{z_m \cdot x_m}}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \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 (- (* z_m z_m) (* t a))))
        (t_2 (/ (* z_m (* y_m x_m)) t_1))
        (t_3 (* y_m (/ x_m (/ (fma -0.5 (* t (/ a z_m)) z_m) z_m)))))
   (*
    z_s
    (*
     y_s
     (*
      x_s
      (if (<= t_2 0.0)
        t_3
        (if (<= t_2 1e+232)
          t_2
          (if (<= t_2 INFINITY) (/ y_m (/ t_1 (* z_m x_m))) t_3))))))))
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(((z_m * z_m) - (t * a)));
	double t_2 = (z_m * (y_m * x_m)) / t_1;
	double t_3 = y_m * (x_m / (fma(-0.5, (t * (a / z_m)), z_m) / z_m));
	double tmp;
	if (t_2 <= 0.0) {
		tmp = t_3;
	} else if (t_2 <= 1e+232) {
		tmp = t_2;
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = y_m / (t_1 / (z_m * x_m));
	} else {
		tmp = t_3;
	}
	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(Float64(z_m * z_m) - Float64(t * a)))
	t_2 = Float64(Float64(z_m * Float64(y_m * x_m)) / t_1)
	t_3 = Float64(y_m * Float64(x_m / Float64(fma(-0.5, Float64(t * Float64(a / z_m)), z_m) / z_m)))
	tmp = 0.0
	if (t_2 <= 0.0)
		tmp = t_3;
	elseif (t_2 <= 1e+232)
		tmp = t_2;
	elseif (t_2 <= Inf)
		tmp = Float64(y_m / Float64(t_1 / Float64(z_m * x_m)));
	else
		tmp = t_3;
	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_] := Block[{t$95$1 = N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(z$95$m * N[(y$95$m * x$95$m), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(y$95$m * N[(x$95$m / N[(N[(-0.5 * N[(t * N[(a / z$95$m), $MachinePrecision]), $MachinePrecision] + z$95$m), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[t$95$2, 0.0], t$95$3, If[LessEqual[t$95$2, 1e+232], t$95$2, If[LessEqual[t$95$2, Infinity], N[(y$95$m / N[(t$95$1 / N[(z$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]), $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{z_m \cdot z_m - t \cdot a}\\
t_2 := \frac{z_m \cdot \left(y_m \cdot x_m\right)}{t_1}\\
t_3 := y_m \cdot \frac{x_m}{\frac{\mathsf{fma}\left(-0.5, t \cdot \frac{a}{z_m}, z_m\right)}{z_m}}\\
z_s \cdot \left(y_s \cdot \left(x_s \cdot \begin{array}{l}
\mathbf{if}\;t_2 \leq 0:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t_2 \leq 10^{+232}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\frac{y_m}{\frac{t_1}{z_m \cdot x_m}}\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}\right)\right)
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < 0.0 or +inf.0 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))))

    1. Initial program 51.3%

      \[\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 \frac{\color{blue}{x \cdot \left(y \cdot z\right)}}{\sqrt{z \cdot z - t \cdot a}} \]
      2. *-commutative50.0%

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

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

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

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

      \[\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 43.9%

      \[\leadsto \frac{y}{\frac{\color{blue}{z + -0.5 \cdot \frac{a \cdot t}{z}}}{x \cdot z}} \]
    6. Step-by-step derivation
      1. div-inv43.9%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{\mathsf{fma}\left(-0.5, \color{blue}{\frac{a}{\frac{z}{t}}}, z\right)}{z}} \cdot y \]
      10. associate-/r/50.4%

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

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

    if 0.0 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < 1.00000000000000006e232

    1. Initial program 99.6%

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

    if 1.00000000000000006e232 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < +inf.0

    1. Initial program 34.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.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{\frac{\sqrt{z \cdot z - t \cdot a}}{x \cdot z}}} \]
    4. Add Preprocessing
  3. Recombined 3 regimes into one program.
  4. Final simplification60.1%

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

Alternative 3: 91.3% 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 5.5 \cdot 10^{+37}:\\ \;\;\;\;\frac{z_m \cdot y_m}{\frac{\sqrt{{z_m}^{2} - t \cdot a}}{x_m}}\\ \mathbf{else}:\\ \;\;\;\;y_m \cdot x_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.5e+37)
      (/ (* z_m y_m) (/ (sqrt (- (pow z_m 2.0) (* t a))) x_m))
      (* y_m x_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.5e+37) {
		tmp = (z_m * y_m) / (sqrt((pow(z_m, 2.0) - (t * a))) / x_m);
	} else {
		tmp = y_m * x_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.5d+37) then
        tmp = (z_m * y_m) / (sqrt(((z_m ** 2.0d0) - (t * a))) / x_m)
    else
        tmp = y_m * x_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.5e+37) {
		tmp = (z_m * y_m) / (Math.sqrt((Math.pow(z_m, 2.0) - (t * a))) / x_m);
	} else {
		tmp = y_m * x_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.5e+37:
		tmp = (z_m * y_m) / (math.sqrt((math.pow(z_m, 2.0) - (t * a))) / x_m)
	else:
		tmp = y_m * x_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.5e+37)
		tmp = Float64(Float64(z_m * y_m) / Float64(sqrt(Float64((z_m ^ 2.0) - Float64(t * a))) / x_m));
	else
		tmp = Float64(y_m * x_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.5e+37)
		tmp = (z_m * y_m) / (sqrt(((z_m ^ 2.0) - (t * a))) / x_m);
	else
		tmp = y_m * x_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.5e+37], N[(N[(z$95$m * y$95$m), $MachinePrecision] / N[(N[Sqrt[N[(N[Power[z$95$m, 2.0], $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / x$95$m), $MachinePrecision]), $MachinePrecision], N[(y$95$m * x$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.5 \cdot 10^{+37}:\\
\;\;\;\;\frac{z_m \cdot y_m}{\frac{\sqrt{{z_m}^{2} - t \cdot a}}{x_m}}\\

\mathbf{else}:\\
\;\;\;\;y_m \cdot x_m\\


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

    1. Initial program 64.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.50000000000000016e37 < z

    1. Initial program 43.3%

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

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

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

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

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

      \[\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 90.8%

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

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

Alternative 4: 90.0% 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 6.2 \cdot 10^{-103}:\\ \;\;\;\;\frac{z_m \cdot y_m}{\frac{\sqrt{t \cdot \left(-a\right)}}{x_m}}\\ \mathbf{elif}\;z_m \leq 9.5 \cdot 10^{+135}:\\ \;\;\;\;y_m \cdot \frac{z_m \cdot x_m}{\sqrt{z_m \cdot z_m - t \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;y_m \cdot x_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 6.2e-103)
      (/ (* z_m y_m) (/ (sqrt (* t (- a))) x_m))
      (if (<= z_m 9.5e+135)
        (* y_m (/ (* z_m x_m) (sqrt (- (* z_m z_m) (* t a)))))
        (* y_m x_m)))))))
x_m = fabs(x);
x_s = copysign(1.0, x);
y_m = fabs(y);
y_s = copysign(1.0, y);
z_m = fabs(z);
z_s = copysign(1.0, z);
assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 6.2e-103) {
		tmp = (z_m * y_m) / (sqrt((t * -a)) / x_m);
	} else if (z_m <= 9.5e+135) {
		tmp = y_m * ((z_m * x_m) / sqrt(((z_m * z_m) - (t * a))));
	} else {
		tmp = y_m * x_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
y_m = abs(y)
y_s = copysign(1.0d0, y)
z_m = abs(z)
z_s = copysign(1.0d0, z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z_m <= 6.2d-103) then
        tmp = (z_m * y_m) / (sqrt((t * -a)) / x_m)
    else if (z_m <= 9.5d+135) then
        tmp = y_m * ((z_m * x_m) / sqrt(((z_m * z_m) - (t * a))))
    else
        tmp = y_m * x_m
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
assert x_m < y_m && y_m < z_m && z_m < t && t < a;
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 6.2e-103) {
		tmp = (z_m * y_m) / (Math.sqrt((t * -a)) / x_m);
	} else if (z_m <= 9.5e+135) {
		tmp = y_m * ((z_m * x_m) / Math.sqrt(((z_m * z_m) - (t * a))));
	} else {
		tmp = y_m * x_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
y_m = math.fabs(y)
y_s = math.copysign(1.0, y)
z_m = math.fabs(z)
z_s = math.copysign(1.0, z)
[x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
	tmp = 0
	if z_m <= 6.2e-103:
		tmp = (z_m * y_m) / (math.sqrt((t * -a)) / x_m)
	elif z_m <= 9.5e+135:
		tmp = y_m * ((z_m * x_m) / math.sqrt(((z_m * z_m) - (t * a))))
	else:
		tmp = y_m * x_m
	return z_s * (y_s * (x_s * tmp))
x_m = abs(x)
x_s = copysign(1.0, x)
y_m = abs(y)
y_s = copysign(1.0, y)
z_m = abs(z)
z_s = copysign(1.0, z)
x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0
	if (z_m <= 6.2e-103)
		tmp = Float64(Float64(z_m * y_m) / Float64(sqrt(Float64(t * Float64(-a))) / x_m));
	elseif (z_m <= 9.5e+135)
		tmp = Float64(y_m * Float64(Float64(z_m * x_m) / sqrt(Float64(Float64(z_m * z_m) - Float64(t * a)))));
	else
		tmp = Float64(y_m * x_m);
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
y_m = abs(y);
y_s = sign(y) * abs(1.0);
z_m = abs(z);
z_s = sign(z) * abs(1.0);
x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0;
	if (z_m <= 6.2e-103)
		tmp = (z_m * y_m) / (sqrt((t * -a)) / x_m);
	elseif (z_m <= 9.5e+135)
		tmp = y_m * ((z_m * x_m) / sqrt(((z_m * z_m) - (t * a))));
	else
		tmp = y_m * x_m;
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[z$95$m, 6.2e-103], N[(N[(z$95$m * y$95$m), $MachinePrecision] / N[(N[Sqrt[N[(t * (-a)), $MachinePrecision]], $MachinePrecision] / x$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z$95$m, 9.5e+135], 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[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y$95$m * x$95$m), $MachinePrecision]]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
z_m = \left|z\right|
\\
z_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
\\
z_s \cdot \left(y_s \cdot \left(x_s \cdot \begin{array}{l}
\mathbf{if}\;z_m \leq 6.2 \cdot 10^{-103}:\\
\;\;\;\;\frac{z_m \cdot y_m}{\frac{\sqrt{t \cdot \left(-a\right)}}{x_m}}\\

\mathbf{elif}\;z_m \leq 9.5 \cdot 10^{+135}:\\
\;\;\;\;y_m \cdot \frac{z_m \cdot x_m}{\sqrt{z_m \cdot z_m - t \cdot a}}\\

\mathbf{else}:\\
\;\;\;\;y_m \cdot x_m\\


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.2000000000000003e-103 < z < 9.50000000000000036e135

    1. Initial program 80.8%

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

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

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

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

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

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

    if 9.50000000000000036e135 < z

    1. Initial program 15.9%

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

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

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

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

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

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

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

Alternative 5: 91.8% 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{z_m \cdot z_m - t \cdot a}\\ z_s \cdot \left(y_s \cdot \left(x_s \cdot \begin{array}{l} \mathbf{if}\;z_m \leq 5.2 \cdot 10^{-61}:\\ \;\;\;\;\frac{\left(z_m \cdot y_m\right) \cdot x_m}{t_1}\\ \mathbf{elif}\;z_m \leq 10^{+135}:\\ \;\;\;\;y_m \cdot \frac{z_m \cdot x_m}{t_1}\\ \mathbf{else}:\\ \;\;\;\;y_m \cdot x_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 (- (* z_m z_m) (* t a)))))
   (*
    z_s
    (*
     y_s
     (*
      x_s
      (if (<= z_m 5.2e-61)
        (/ (* (* z_m y_m) x_m) t_1)
        (if (<= z_m 1e+135) (* y_m (/ (* z_m x_m) t_1)) (* y_m x_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(((z_m * z_m) - (t * a)));
	double tmp;
	if (z_m <= 5.2e-61) {
		tmp = ((z_m * y_m) * x_m) / t_1;
	} else if (z_m <= 1e+135) {
		tmp = y_m * ((z_m * x_m) / t_1);
	} else {
		tmp = y_m * x_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(((z_m * z_m) - (t * a)))
    if (z_m <= 5.2d-61) then
        tmp = ((z_m * y_m) * x_m) / t_1
    else if (z_m <= 1d+135) then
        tmp = y_m * ((z_m * x_m) / t_1)
    else
        tmp = y_m * x_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(((z_m * z_m) - (t * a)));
	double tmp;
	if (z_m <= 5.2e-61) {
		tmp = ((z_m * y_m) * x_m) / t_1;
	} else if (z_m <= 1e+135) {
		tmp = y_m * ((z_m * x_m) / t_1);
	} else {
		tmp = y_m * x_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(((z_m * z_m) - (t * a)))
	tmp = 0
	if z_m <= 5.2e-61:
		tmp = ((z_m * y_m) * x_m) / t_1
	elif z_m <= 1e+135:
		tmp = y_m * ((z_m * x_m) / t_1)
	else:
		tmp = y_m * x_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(Float64(z_m * z_m) - Float64(t * a)))
	tmp = 0.0
	if (z_m <= 5.2e-61)
		tmp = Float64(Float64(Float64(z_m * y_m) * x_m) / t_1);
	elseif (z_m <= 1e+135)
		tmp = Float64(y_m * Float64(Float64(z_m * x_m) / t_1));
	else
		tmp = Float64(y_m * x_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(((z_m * z_m) - (t * a)));
	tmp = 0.0;
	if (z_m <= 5.2e-61)
		tmp = ((z_m * y_m) * x_m) / t_1;
	elseif (z_m <= 1e+135)
		tmp = y_m * ((z_m * x_m) / t_1);
	else
		tmp = y_m * x_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[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[z$95$m, 5.2e-61], N[(N[(N[(z$95$m * y$95$m), $MachinePrecision] * x$95$m), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[z$95$m, 1e+135], N[(y$95$m * N[(N[(z$95$m * x$95$m), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(y$95$m * x$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{z_m \cdot z_m - t \cdot a}\\
z_s \cdot \left(y_s \cdot \left(x_s \cdot \begin{array}{l}
\mathbf{if}\;z_m \leq 5.2 \cdot 10^{-61}:\\
\;\;\;\;\frac{\left(z_m \cdot y_m\right) \cdot x_m}{t_1}\\

\mathbf{elif}\;z_m \leq 10^{+135}:\\
\;\;\;\;y_m \cdot \frac{z_m \cdot x_m}{t_1}\\

\mathbf{else}:\\
\;\;\;\;y_m \cdot x_m\\


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

    1. Initial program 63.2%

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

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

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

    if 5.20000000000000021e-61 < z < 9.99999999999999962e134

    1. Initial program 82.0%

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

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

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

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

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

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

    if 9.99999999999999962e134 < z

    1. Initial program 15.9%

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

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

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

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

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

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

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

Alternative 6: 80.8% 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.3 \cdot 10^{-65}:\\ \;\;\;\;y_m \cdot \frac{z_m \cdot x_m}{\sqrt{t \cdot \left(-a\right)}}\\ \mathbf{else}:\\ \;\;\;\;y_m \cdot x_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.3e-65)
      (* y_m (/ (* z_m x_m) (sqrt (* t (- a)))))
      (* y_m x_m))))))
x_m = fabs(x);
x_s = copysign(1.0, x);
y_m = fabs(y);
y_s = copysign(1.0, y);
z_m = fabs(z);
z_s = copysign(1.0, z);
assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 3.3e-65) {
		tmp = y_m * ((z_m * x_m) / sqrt((t * -a)));
	} else {
		tmp = y_m * x_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
y_m = abs(y)
y_s = copysign(1.0d0, y)
z_m = abs(z)
z_s = copysign(1.0d0, z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z_m <= 3.3d-65) then
        tmp = y_m * ((z_m * x_m) / sqrt((t * -a)))
    else
        tmp = y_m * x_m
    end if
    code = z_s * (y_s * (x_s * tmp))
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
assert x_m < y_m && y_m < z_m && z_m < t && t < a;
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double tmp;
	if (z_m <= 3.3e-65) {
		tmp = y_m * ((z_m * x_m) / Math.sqrt((t * -a)));
	} else {
		tmp = y_m * x_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
y_m = math.fabs(y)
y_s = math.copysign(1.0, y)
z_m = math.fabs(z)
z_s = math.copysign(1.0, z)
[x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
	tmp = 0
	if z_m <= 3.3e-65:
		tmp = y_m * ((z_m * x_m) / math.sqrt((t * -a)))
	else:
		tmp = y_m * x_m
	return z_s * (y_s * (x_s * tmp))
x_m = abs(x)
x_s = copysign(1.0, x)
y_m = abs(y)
y_s = copysign(1.0, y)
z_m = abs(z)
z_s = copysign(1.0, z)
x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0
	if (z_m <= 3.3e-65)
		tmp = Float64(y_m * Float64(Float64(z_m * x_m) / sqrt(Float64(t * Float64(-a)))));
	else
		tmp = Float64(y_m * x_m);
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
y_m = abs(y);
y_s = sign(y) * abs(1.0);
z_m = abs(z);
z_s = sign(z) * abs(1.0);
x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = 0.0;
	if (z_m <= 3.3e-65)
		tmp = y_m * ((z_m * x_m) / sqrt((t * -a)));
	else
		tmp = y_m * x_m;
	end
	tmp_2 = z_s * (y_s * (x_s * tmp));
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[z$95$m, 3.3e-65], N[(y$95$m * N[(N[(z$95$m * x$95$m), $MachinePrecision] / N[Sqrt[N[(t * (-a)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y$95$m * x$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.3 \cdot 10^{-65}:\\
\;\;\;\;y_m \cdot \frac{z_m \cdot x_m}{\sqrt{t \cdot \left(-a\right)}}\\

\mathbf{else}:\\
\;\;\;\;y_m \cdot x_m\\


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

    1. Initial program 63.0%

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

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

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

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

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

      \[\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-neg36.5%

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

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

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

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

    if 3.3000000000000001e-65 < z

    1. Initial program 51.7%

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

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

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

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

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

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

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

Alternative 7: 84.2% 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 \cdot 10^{-65}:\\ \;\;\;\;\frac{\left(z_m \cdot y_m\right) \cdot x_m}{\sqrt{t \cdot \left(-a\right)}}\\ \mathbf{else}:\\ \;\;\;\;y_m \cdot x_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 3e-65)
      (/ (* (* z_m y_m) x_m) (sqrt (* t (- a))))
      (* y_m x_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 <= 3e-65) {
		tmp = ((z_m * y_m) * x_m) / sqrt((t * -a));
	} else {
		tmp = y_m * x_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 <= 3d-65) then
        tmp = ((z_m * y_m) * x_m) / sqrt((t * -a))
    else
        tmp = y_m * x_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 <= 3e-65) {
		tmp = ((z_m * y_m) * x_m) / Math.sqrt((t * -a));
	} else {
		tmp = y_m * x_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 <= 3e-65:
		tmp = ((z_m * y_m) * x_m) / math.sqrt((t * -a))
	else:
		tmp = y_m * x_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 <= 3e-65)
		tmp = Float64(Float64(Float64(z_m * y_m) * x_m) / sqrt(Float64(t * Float64(-a))));
	else
		tmp = Float64(y_m * x_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 <= 3e-65)
		tmp = ((z_m * y_m) * x_m) / sqrt((t * -a));
	else
		tmp = y_m * x_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, 3e-65], N[(N[(N[(z$95$m * y$95$m), $MachinePrecision] * x$95$m), $MachinePrecision] / N[Sqrt[N[(t * (-a)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y$95$m * x$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 \cdot 10^{-65}:\\
\;\;\;\;\frac{\left(z_m \cdot y_m\right) \cdot x_m}{\sqrt{t \cdot \left(-a\right)}}\\

\mathbf{else}:\\
\;\;\;\;y_m \cdot x_m\\


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

    1. Initial program 63.0%

      \[\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 \frac{\color{blue}{x \cdot \left(y \cdot z\right)}}{\sqrt{z \cdot z - t \cdot a}} \]
    3. Simplified61.1%

      \[\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 38.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-neg36.5%

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

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

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

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

    if 2.99999999999999998e-65 < z

    1. Initial program 51.7%

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

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

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

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

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

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

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

Alternative 8: 84.7% accurate, 1.0× speedup?

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

\mathbf{else}:\\
\;\;\;\;y_m \cdot x_m\\


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

    1. Initial program 63.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.40000000000000042e-65 < z

    1. Initial program 51.7%

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

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

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

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

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

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

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

Alternative 9: 78.7% accurate, 4.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 \begin{array}{l} \mathbf{if}\;z_m \leq 0.0085:\\ \;\;\;\;\frac{z_m \cdot y_m}{-0.5 \cdot \frac{1}{\frac{z_m}{t} \cdot \frac{x_m}{a}} + \frac{z_m}{x_m}}\\ \mathbf{else}:\\ \;\;\;\;y_m \cdot x_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 0.0085)
      (/ (* z_m y_m) (+ (* -0.5 (/ 1.0 (* (/ z_m t) (/ x_m a)))) (/ z_m x_m)))
      (* y_m x_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 <= 0.0085) {
		tmp = (z_m * y_m) / ((-0.5 * (1.0 / ((z_m / t) * (x_m / a)))) + (z_m / x_m));
	} else {
		tmp = y_m * x_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 <= 0.0085d0) then
        tmp = (z_m * y_m) / (((-0.5d0) * (1.0d0 / ((z_m / t) * (x_m / a)))) + (z_m / x_m))
    else
        tmp = y_m * x_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 <= 0.0085) {
		tmp = (z_m * y_m) / ((-0.5 * (1.0 / ((z_m / t) * (x_m / a)))) + (z_m / x_m));
	} else {
		tmp = y_m * x_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 <= 0.0085:
		tmp = (z_m * y_m) / ((-0.5 * (1.0 / ((z_m / t) * (x_m / a)))) + (z_m / x_m))
	else:
		tmp = y_m * x_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 <= 0.0085)
		tmp = Float64(Float64(z_m * y_m) / Float64(Float64(-0.5 * Float64(1.0 / Float64(Float64(z_m / t) * Float64(x_m / a)))) + Float64(z_m / x_m)));
	else
		tmp = Float64(y_m * x_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 <= 0.0085)
		tmp = (z_m * y_m) / ((-0.5 * (1.0 / ((z_m / t) * (x_m / a)))) + (z_m / x_m));
	else
		tmp = y_m * x_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, 0.0085], N[(N[(z$95$m * y$95$m), $MachinePrecision] / N[(N[(-0.5 * N[(1.0 / N[(N[(z$95$m / t), $MachinePrecision] * N[(x$95$m / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z$95$m / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y$95$m * x$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 0.0085:\\
\;\;\;\;\frac{z_m \cdot y_m}{-0.5 \cdot \frac{1}{\frac{z_m}{t} \cdot \frac{x_m}{a}} + \frac{z_m}{x_m}}\\

\mathbf{else}:\\
\;\;\;\;y_m \cdot x_m\\


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

    1. Initial program 64.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{z \cdot y}{\color{blue}{-0.5 \cdot \frac{a \cdot t}{x \cdot z} + \frac{z}{x}}} \]
    8. Step-by-step derivation
      1. clear-num24.0%

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

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

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

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

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

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

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

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

    if 0.0085000000000000006 < z

    1. Initial program 48.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.7%

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

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

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

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

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

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

Alternative 10: 78.6% 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}\;z_m \leq 0.0082:\\ \;\;\;\;\frac{z_m \cdot y_m}{\frac{z_m}{x_m} + -0.5 \cdot \left(\frac{a}{z_m} \cdot \frac{t}{x_m}\right)}\\ \mathbf{else}:\\ \;\;\;\;y_m \cdot x_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 0.0082)
      (/ (* z_m y_m) (+ (/ z_m x_m) (* -0.5 (* (/ a z_m) (/ t x_m)))))
      (* y_m x_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 <= 0.0082) {
		tmp = (z_m * y_m) / ((z_m / x_m) + (-0.5 * ((a / z_m) * (t / x_m))));
	} else {
		tmp = y_m * x_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 <= 0.0082d0) then
        tmp = (z_m * y_m) / ((z_m / x_m) + ((-0.5d0) * ((a / z_m) * (t / x_m))))
    else
        tmp = y_m * x_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 <= 0.0082) {
		tmp = (z_m * y_m) / ((z_m / x_m) + (-0.5 * ((a / z_m) * (t / x_m))));
	} else {
		tmp = y_m * x_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 <= 0.0082:
		tmp = (z_m * y_m) / ((z_m / x_m) + (-0.5 * ((a / z_m) * (t / x_m))))
	else:
		tmp = y_m * x_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 <= 0.0082)
		tmp = Float64(Float64(z_m * y_m) / Float64(Float64(z_m / x_m) + Float64(-0.5 * Float64(Float64(a / z_m) * Float64(t / x_m)))));
	else
		tmp = Float64(y_m * x_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 <= 0.0082)
		tmp = (z_m * y_m) / ((z_m / x_m) + (-0.5 * ((a / z_m) * (t / x_m))));
	else
		tmp = y_m * x_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, 0.0082], N[(N[(z$95$m * y$95$m), $MachinePrecision] / N[(N[(z$95$m / x$95$m), $MachinePrecision] + N[(-0.5 * N[(N[(a / z$95$m), $MachinePrecision] * N[(t / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y$95$m * x$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 0.0082:\\
\;\;\;\;\frac{z_m \cdot y_m}{\frac{z_m}{x_m} + -0.5 \cdot \left(\frac{a}{z_m} \cdot \frac{t}{x_m}\right)}\\

\mathbf{else}:\\
\;\;\;\;y_m \cdot x_m\\


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

    1. Initial program 64.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.00820000000000000069 < z

    1. Initial program 48.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.7%

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

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

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

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

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

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

Alternative 11: 78.4% 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 0.02:\\ \;\;\;\;\frac{\left(z_m \cdot y_m\right) \cdot x_m}{z_m + -0.5 \cdot \left(t \cdot \frac{a}{z_m}\right)}\\ \mathbf{else}:\\ \;\;\;\;y_m \cdot x_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 0.02)
      (/ (* (* z_m y_m) x_m) (+ z_m (* -0.5 (* t (/ a z_m)))))
      (* y_m x_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 <= 0.02) {
		tmp = ((z_m * y_m) * x_m) / (z_m + (-0.5 * (t * (a / z_m))));
	} else {
		tmp = y_m * x_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 <= 0.02d0) then
        tmp = ((z_m * y_m) * x_m) / (z_m + ((-0.5d0) * (t * (a / z_m))))
    else
        tmp = y_m * x_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 <= 0.02) {
		tmp = ((z_m * y_m) * x_m) / (z_m + (-0.5 * (t * (a / z_m))));
	} else {
		tmp = y_m * x_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 <= 0.02:
		tmp = ((z_m * y_m) * x_m) / (z_m + (-0.5 * (t * (a / z_m))))
	else:
		tmp = y_m * x_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 <= 0.02)
		tmp = Float64(Float64(Float64(z_m * y_m) * x_m) / Float64(z_m + Float64(-0.5 * Float64(t * Float64(a / z_m)))));
	else
		tmp = Float64(y_m * x_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 <= 0.02)
		tmp = ((z_m * y_m) * x_m) / (z_m + (-0.5 * (t * (a / z_m))));
	else
		tmp = y_m * x_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, 0.02], N[(N[(N[(z$95$m * y$95$m), $MachinePrecision] * x$95$m), $MachinePrecision] / N[(z$95$m + N[(-0.5 * N[(t * N[(a / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y$95$m * x$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 0.02:\\
\;\;\;\;\frac{\left(z_m \cdot y_m\right) \cdot x_m}{z_m + -0.5 \cdot \left(t \cdot \frac{a}{z_m}\right)}\\

\mathbf{else}:\\
\;\;\;\;y_m \cdot x_m\\


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

    1. Initial program 64.0%

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

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

      \[\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 inf 26.3%

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

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

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

    if 0.0200000000000000004 < z

    1. Initial program 48.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.7%

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

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

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

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

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

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

Alternative 12: 78.4% 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 0.052:\\ \;\;\;\;\frac{\left(z_m \cdot y_m\right) \cdot x_m}{z_m + -0.5 \cdot \frac{a}{\frac{z_m}{t}}}\\ \mathbf{else}:\\ \;\;\;\;y_m \cdot x_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 0.052)
      (/ (* (* z_m y_m) x_m) (+ z_m (* -0.5 (/ a (/ z_m t)))))
      (* y_m x_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 <= 0.052) {
		tmp = ((z_m * y_m) * x_m) / (z_m + (-0.5 * (a / (z_m / t))));
	} else {
		tmp = y_m * x_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 <= 0.052d0) then
        tmp = ((z_m * y_m) * x_m) / (z_m + ((-0.5d0) * (a / (z_m / t))))
    else
        tmp = y_m * x_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 <= 0.052) {
		tmp = ((z_m * y_m) * x_m) / (z_m + (-0.5 * (a / (z_m / t))));
	} else {
		tmp = y_m * x_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 <= 0.052:
		tmp = ((z_m * y_m) * x_m) / (z_m + (-0.5 * (a / (z_m / t))))
	else:
		tmp = y_m * x_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 <= 0.052)
		tmp = Float64(Float64(Float64(z_m * y_m) * x_m) / Float64(z_m + Float64(-0.5 * Float64(a / Float64(z_m / t)))));
	else
		tmp = Float64(y_m * x_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 <= 0.052)
		tmp = ((z_m * y_m) * x_m) / (z_m + (-0.5 * (a / (z_m / t))));
	else
		tmp = y_m * x_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, 0.052], N[(N[(N[(z$95$m * y$95$m), $MachinePrecision] * x$95$m), $MachinePrecision] / N[(z$95$m + N[(-0.5 * N[(a / N[(z$95$m / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y$95$m * x$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 0.052:\\
\;\;\;\;\frac{\left(z_m \cdot y_m\right) \cdot x_m}{z_m + -0.5 \cdot \frac{a}{\frac{z_m}{t}}}\\

\mathbf{else}:\\
\;\;\;\;y_m \cdot x_m\\


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

    1. Initial program 64.0%

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

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

      \[\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 inf 26.3%

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

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

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

    if 0.0519999999999999976 < z

    1. Initial program 48.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.7%

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

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

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

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

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

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

Alternative 13: 78.7% 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 0.031:\\ \;\;\;\;\frac{z_m \cdot y_m}{\frac{z_m + -0.5 \cdot \frac{t \cdot a}{z_m}}{x_m}}\\ \mathbf{else}:\\ \;\;\;\;y_m \cdot x_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 0.031)
      (/ (* z_m y_m) (/ (+ z_m (* -0.5 (/ (* t a) z_m))) x_m))
      (* y_m x_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 <= 0.031) {
		tmp = (z_m * y_m) / ((z_m + (-0.5 * ((t * a) / z_m))) / x_m);
	} else {
		tmp = y_m * x_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 <= 0.031d0) then
        tmp = (z_m * y_m) / ((z_m + ((-0.5d0) * ((t * a) / z_m))) / x_m)
    else
        tmp = y_m * x_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 <= 0.031) {
		tmp = (z_m * y_m) / ((z_m + (-0.5 * ((t * a) / z_m))) / x_m);
	} else {
		tmp = y_m * x_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 <= 0.031:
		tmp = (z_m * y_m) / ((z_m + (-0.5 * ((t * a) / z_m))) / x_m)
	else:
		tmp = y_m * x_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 <= 0.031)
		tmp = Float64(Float64(z_m * y_m) / Float64(Float64(z_m + Float64(-0.5 * Float64(Float64(t * a) / z_m))) / x_m));
	else
		tmp = Float64(y_m * x_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 <= 0.031)
		tmp = (z_m * y_m) / ((z_m + (-0.5 * ((t * a) / z_m))) / x_m);
	else
		tmp = y_m * x_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, 0.031], N[(N[(z$95$m * y$95$m), $MachinePrecision] / N[(N[(z$95$m + N[(-0.5 * N[(N[(t * a), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x$95$m), $MachinePrecision]), $MachinePrecision], N[(y$95$m * x$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 0.031:\\
\;\;\;\;\frac{z_m \cdot y_m}{\frac{z_m + -0.5 \cdot \frac{t \cdot a}{z_m}}{x_m}}\\

\mathbf{else}:\\
\;\;\;\;y_m \cdot x_m\\


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

    1. Initial program 64.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.031 < z

    1. Initial program 48.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.7%

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

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

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

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

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

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

Alternative 14: 76.2% accurate, 7.5× speedup?

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

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

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

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

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

    \[\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.9%

    \[\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*42.9%

      \[\leadsto y \cdot \frac{x \cdot z}{z + -0.5 \cdot \color{blue}{\frac{a}{\frac{z}{t}}}} \]
  7. Simplified42.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/42.8%

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

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

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

Alternative 15: 76.2% accurate, 7.5× speedup?

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

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

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

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

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

    \[\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.9%

    \[\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*42.9%

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

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

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

Alternative 16: 76.3% accurate, 8.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}\;z_m \leq 10^{-189}:\\ \;\;\;\;y_m \cdot \frac{1}{\frac{z_m}{z_m \cdot x_m}}\\ \mathbf{else}:\\ \;\;\;\;y_m \cdot x_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 1e-189) (* y_m (/ 1.0 (/ z_m (* z_m x_m)))) (* y_m x_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 <= 1e-189) {
		tmp = y_m * (1.0 / (z_m / (z_m * x_m)));
	} else {
		tmp = y_m * x_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 <= 1d-189) then
        tmp = y_m * (1.0d0 / (z_m / (z_m * x_m)))
    else
        tmp = y_m * x_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 <= 1e-189) {
		tmp = y_m * (1.0 / (z_m / (z_m * x_m)));
	} else {
		tmp = y_m * x_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 <= 1e-189:
		tmp = y_m * (1.0 / (z_m / (z_m * x_m)))
	else:
		tmp = y_m * x_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 <= 1e-189)
		tmp = Float64(y_m * Float64(1.0 / Float64(z_m / Float64(z_m * x_m))));
	else
		tmp = Float64(y_m * x_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 <= 1e-189)
		tmp = y_m * (1.0 / (z_m / (z_m * x_m)));
	else
		tmp = y_m * x_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, 1e-189], N[(y$95$m * N[(1.0 / N[(z$95$m / N[(z$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y$95$m * x$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 10^{-189}:\\
\;\;\;\;y_m \cdot \frac{1}{\frac{z_m}{z_m \cdot x_m}}\\

\mathbf{else}:\\
\;\;\;\;y_m \cdot x_m\\


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

    1. Initial program 60.6%

      \[\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 \frac{\color{blue}{x \cdot \left(y \cdot z\right)}}{\sqrt{z \cdot z - t \cdot a}} \]
      2. *-commutative58.7%

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

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

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

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

      \[\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 18.7%

      \[\leadsto \frac{y}{\frac{\color{blue}{z}}{x \cdot z}} \]
    6. Step-by-step derivation
      1. div-inv18.7%

        \[\leadsto \color{blue}{y \cdot \frac{1}{\frac{z}{x \cdot z}}} \]
      2. *-commutative18.7%

        \[\leadsto y \cdot \frac{1}{\frac{z}{\color{blue}{z \cdot x}}} \]
    7. Applied egg-rr18.7%

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

    if 1.00000000000000007e-189 < z

    1. Initial program 56.9%

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

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

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

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

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

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

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

Alternative 17: 76.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.6 \cdot 10^{-190}:\\ \;\;\;\;\frac{y_m}{\frac{z_m}{z_m \cdot x_m}}\\ \mathbf{else}:\\ \;\;\;\;y_m \cdot x_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.6e-190) (/ y_m (/ z_m (* z_m x_m))) (* y_m x_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.6e-190) {
		tmp = y_m / (z_m / (z_m * x_m));
	} else {
		tmp = y_m * x_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.6d-190) then
        tmp = y_m / (z_m / (z_m * x_m))
    else
        tmp = y_m * x_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.6e-190) {
		tmp = y_m / (z_m / (z_m * x_m));
	} else {
		tmp = y_m * x_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.6e-190:
		tmp = y_m / (z_m / (z_m * x_m))
	else:
		tmp = y_m * x_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.6e-190)
		tmp = Float64(y_m / Float64(z_m / Float64(z_m * x_m)));
	else
		tmp = Float64(y_m * x_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.6e-190)
		tmp = y_m / (z_m / (z_m * x_m));
	else
		tmp = y_m * x_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.6e-190], N[(y$95$m / N[(z$95$m / N[(z$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y$95$m * x$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.6 \cdot 10^{-190}:\\
\;\;\;\;\frac{y_m}{\frac{z_m}{z_m \cdot x_m}}\\

\mathbf{else}:\\
\;\;\;\;y_m \cdot x_m\\


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

    1. Initial program 60.6%

      \[\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 \frac{\color{blue}{x \cdot \left(y \cdot z\right)}}{\sqrt{z \cdot z - t \cdot a}} \]
      2. *-commutative58.7%

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

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

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

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

      \[\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 18.7%

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

    if 5.60000000000000011e-190 < z

    1. Initial program 56.9%

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

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

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

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

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

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

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

Alternative 18: 73.3% 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(y_m \cdot x_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 (* y_m x_m)))))
x_m = fabs(x);
x_s = copysign(1.0, x);
y_m = fabs(y);
y_s = copysign(1.0, y);
z_m = fabs(z);
z_s = copysign(1.0, z);
assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	return z_s * (y_s * (x_s * (y_m * x_m)));
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
y_m = abs(y)
y_s = copysign(1.0d0, y)
z_m = abs(z)
z_s = copysign(1.0d0, z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
real(8) function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: y_s
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y_m
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = z_s * (y_s * (x_s * (y_m * x_m)))
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
z_m = Math.abs(z);
z_s = Math.copySign(1.0, z);
assert x_m < y_m && y_m < z_m && z_m < t && t < a;
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	return z_s * (y_s * (x_s * (y_m * x_m)));
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
y_m = math.fabs(y)
y_s = math.copysign(1.0, y)
z_m = math.fabs(z)
z_s = math.copysign(1.0, z)
[x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
	return z_s * (y_s * (x_s * (y_m * x_m)))
x_m = abs(x)
x_s = copysign(1.0, x)
y_m = abs(y)
y_s = copysign(1.0, y)
z_m = abs(z)
z_s = copysign(1.0, z)
x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	return Float64(z_s * Float64(y_s * Float64(x_s * Float64(y_m * x_m))))
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
y_m = abs(y);
y_s = sign(y) * abs(1.0);
z_m = abs(z);
z_s = sign(z) * abs(1.0);
x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
function tmp = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	tmp = z_s * (y_s * (x_s * (y_m * x_m)));
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z_m = N[Abs[z], $MachinePrecision]
z_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * N[(y$95$m * x$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(y_m \cdot x_m\right)\right)\right)
\end{array}
Derivation
  1. Initial program 59.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.1%

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

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

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

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

    \[\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.7%

    \[\leadsto y \cdot \color{blue}{x} \]
  6. Final simplification41.7%

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

Developer target: 87.6% 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 2024019 
(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)))))