Statistics.Distribution.CauchyLorentz:$cdensity from math-functions-0.1.5.2

Percentage Accurate: 88.7% → 99.6%
Time: 11.3s
Alternatives: 13
Speedup: 0.7×

Specification

?
\[\begin{array}{l} \\ \frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \end{array} \]
(FPCore (x y z) :precision binary64 (/ (/ 1.0 x) (* y (+ 1.0 (* z z)))))
double code(double x, double y, double z) {
	return (1.0 / x) / (y * (1.0 + (z * z)));
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (1.0d0 / x) / (y * (1.0d0 + (z * z)))
end function
public static double code(double x, double y, double z) {
	return (1.0 / x) / (y * (1.0 + (z * z)));
}
def code(x, y, z):
	return (1.0 / x) / (y * (1.0 + (z * z)))
function code(x, y, z)
	return Float64(Float64(1.0 / x) / Float64(y * Float64(1.0 + Float64(z * z))))
end
function tmp = code(x, y, z)
	tmp = (1.0 / x) / (y * (1.0 + (z * z)));
end
code[x_, y_, z_] := N[(N[(1.0 / x), $MachinePrecision] / N[(y * N[(1.0 + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 88.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \end{array} \]
(FPCore (x y z) :precision binary64 (/ (/ 1.0 x) (* y (+ 1.0 (* z z)))))
double code(double x, double y, double z) {
	return (1.0 / x) / (y * (1.0 + (z * z)));
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (1.0d0 / x) / (y * (1.0d0 + (z * z)))
end function
public static double code(double x, double y, double z) {
	return (1.0 / x) / (y * (1.0 + (z * z)));
}
def code(x, y, z):
	return (1.0 / x) / (y * (1.0 + (z * z)))
function code(x, y, z)
	return Float64(Float64(1.0 / x) / Float64(y * Float64(1.0 + Float64(z * z))))
end
function tmp = code(x, y, z)
	tmp = (1.0 / x) / (y * (1.0 + (z * z)));
end
code[x_, y_, z_] := N[(N[(1.0 / x), $MachinePrecision] / N[(y * N[(1.0 + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}
\end{array}

Alternative 1: 99.6% accurate, 0.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) \\ [x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\ \\ y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z \cdot z \leq 5 \cdot 10^{+300}:\\ \;\;\;\;\frac{\frac{1}{y\_m}}{x\_m \cdot \mathsf{fma}\left(z, z, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{{x\_m}^{-0.5}}{z \cdot \sqrt{y\_m}}\right)}^{2}\\ \end{array}\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
(FPCore (y_s x_s x_m y_m z)
 :precision binary64
 (*
  y_s
  (*
   x_s
   (if (<= (* z z) 5e+300)
     (/ (/ 1.0 y_m) (* x_m (fma z z 1.0)))
     (pow (/ (pow x_m -0.5) (* z (sqrt y_m))) 2.0)))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
	double tmp;
	if ((z * z) <= 5e+300) {
		tmp = (1.0 / y_m) / (x_m * fma(z, z, 1.0));
	} else {
		tmp = pow((pow(x_m, -0.5) / (z * sqrt(y_m))), 2.0);
	}
	return 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)
x_m, y_m, z = sort([x_m, y_m, z])
function code(y_s, x_s, x_m, y_m, z)
	tmp = 0.0
	if (Float64(z * z) <= 5e+300)
		tmp = Float64(Float64(1.0 / y_m) / Float64(x_m * fma(z, z, 1.0)));
	else
		tmp = Float64((x_m ^ -0.5) / Float64(z * sqrt(y_m))) ^ 2.0;
	end
	return 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]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * If[LessEqual[N[(z * z), $MachinePrecision], 5e+300], N[(N[(1.0 / y$95$m), $MachinePrecision] / N[(x$95$m * N[(z * z + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[Power[x$95$m, -0.5], $MachinePrecision] / N[(z * N[Sqrt[y$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $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)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \cdot z \leq 5 \cdot 10^{+300}:\\
\;\;\;\;\frac{\frac{1}{y\_m}}{x\_m \cdot \mathsf{fma}\left(z, z, 1\right)}\\

\mathbf{else}:\\
\;\;\;\;{\left(\frac{{x\_m}^{-0.5}}{z \cdot \sqrt{y\_m}}\right)}^{2}\\


\end{array}\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z z) < 5.00000000000000026e300

    1. Initial program 96.0%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. associate-/l/95.8%

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

        \[\leadsto \frac{1}{\color{blue}{-\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      3. distribute-rgt-neg-out95.8%

        \[\leadsto \frac{1}{-\color{blue}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot \left(-x\right)}} \]
      4. distribute-rgt-neg-out95.8%

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

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

        \[\leadsto \frac{1}{\color{blue}{y \cdot \left(\left(1 + z \cdot z\right) \cdot x\right)}} \]
      7. *-commutative95.8%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(x \cdot \left(1 + z \cdot z\right)\right)}} \]
      8. sqr-neg95.8%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(1 + \color{blue}{\left(-z\right) \cdot \left(-z\right)}\right)\right)} \]
      9. +-commutative95.8%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(\left(-z\right) \cdot \left(-z\right) + 1\right)}\right)} \]
      10. sqr-neg95.8%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(\color{blue}{z \cdot z} + 1\right)\right)} \]
      11. fma-define95.8%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}\right)} \]
    3. Simplified95.8%

      \[\leadsto \color{blue}{\frac{1}{y \cdot \left(x \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative95.8%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\mathsf{fma}\left(z, z, 1\right) \cdot x\right)}} \]
      2. associate-*r*95.8%

        \[\leadsto \frac{1}{\color{blue}{\left(y \cdot \mathsf{fma}\left(z, z, 1\right)\right) \cdot x}} \]
      3. fma-undefine95.8%

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

        \[\leadsto \frac{1}{\left(y \cdot \color{blue}{\left(1 + z \cdot z\right)}\right) \cdot x} \]
      5. associate-/l/96.0%

        \[\leadsto \color{blue}{\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}} \]
      6. add-sqr-sqrt53.8%

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}}}{y \cdot \left(1 + z \cdot z\right)} \]
      7. add-sqr-sqrt29.3%

        \[\leadsto \frac{\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}}{\color{blue}{\sqrt{y \cdot \left(1 + z \cdot z\right)} \cdot \sqrt{y \cdot \left(1 + z \cdot z\right)}}} \]
      8. times-frac29.3%

        \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{x}}}{\sqrt{y \cdot \left(1 + z \cdot z\right)}} \cdot \frac{\sqrt{\frac{1}{x}}}{\sqrt{y \cdot \left(1 + z \cdot z\right)}}} \]
    6. Applied egg-rr29.8%

      \[\leadsto \color{blue}{\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}} \cdot \frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}} \]
    7. Step-by-step derivation
      1. unpow229.8%

        \[\leadsto \color{blue}{{\left(\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
    8. Simplified29.8%

      \[\leadsto \color{blue}{{\left(\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
    9. Step-by-step derivation
      1. div-inv29.8%

        \[\leadsto {\color{blue}{\left({x}^{-0.5} \cdot \frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}}^{2} \]
      2. unpow-prod-down29.2%

        \[\leadsto \color{blue}{{\left({x}^{-0.5}\right)}^{2} \cdot {\left(\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
      3. pow229.2%

        \[\leadsto \color{blue}{\left({x}^{-0.5} \cdot {x}^{-0.5}\right)} \cdot {\left(\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2} \]
      4. pow-prod-up55.1%

        \[\leadsto \color{blue}{{x}^{\left(-0.5 + -0.5\right)}} \cdot {\left(\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2} \]
      5. metadata-eval55.1%

        \[\leadsto {x}^{\color{blue}{-1}} \cdot {\left(\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2} \]
      6. inv-pow55.1%

        \[\leadsto \color{blue}{\frac{1}{x}} \cdot {\left(\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2} \]
      7. metadata-eval55.1%

        \[\leadsto \frac{1}{x} \cdot {\left(\frac{\color{blue}{\sqrt{1}}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2} \]
      8. *-commutative55.1%

        \[\leadsto \frac{1}{x} \cdot {\left(\frac{\sqrt{1}}{\color{blue}{\sqrt{y} \cdot \mathsf{hypot}\left(1, z\right)}}\right)}^{2} \]
      9. hypot-1-def55.1%

        \[\leadsto \frac{1}{x} \cdot {\left(\frac{\sqrt{1}}{\sqrt{y} \cdot \color{blue}{\sqrt{1 + z \cdot z}}}\right)}^{2} \]
      10. sqrt-prod55.1%

        \[\leadsto \frac{1}{x} \cdot {\left(\frac{\sqrt{1}}{\color{blue}{\sqrt{y \cdot \left(1 + z \cdot z\right)}}}\right)}^{2} \]
      11. +-commutative55.1%

        \[\leadsto \frac{1}{x} \cdot {\left(\frac{\sqrt{1}}{\sqrt{y \cdot \color{blue}{\left(z \cdot z + 1\right)}}}\right)}^{2} \]
      12. fma-undefine55.1%

        \[\leadsto \frac{1}{x} \cdot {\left(\frac{\sqrt{1}}{\sqrt{y \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}}}\right)}^{2} \]
      13. sqrt-div57.7%

        \[\leadsto \frac{1}{x} \cdot {\color{blue}{\left(\sqrt{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}}\right)}}^{2} \]
      14. pow257.7%

        \[\leadsto \frac{1}{x} \cdot \color{blue}{\left(\sqrt{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}} \cdot \sqrt{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}}\right)} \]
      15. add-sqr-sqrt95.9%

        \[\leadsto \frac{1}{x} \cdot \color{blue}{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}} \]
      16. associate-/r*96.0%

        \[\leadsto \frac{1}{x} \cdot \color{blue}{\frac{\frac{1}{y}}{\mathsf{fma}\left(z, z, 1\right)}} \]
      17. fma-undefine96.0%

        \[\leadsto \frac{1}{x} \cdot \frac{\frac{1}{y}}{\color{blue}{z \cdot z + 1}} \]
      18. +-commutative96.0%

        \[\leadsto \frac{1}{x} \cdot \frac{\frac{1}{y}}{\color{blue}{1 + z \cdot z}} \]
      19. frac-times96.1%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{y}}{x \cdot \left(1 + z \cdot z\right)}} \]
    10. Applied egg-rr96.1%

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

    if 5.00000000000000026e300 < (*.f64 z z)

    1. Initial program 71.7%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. associate-/l/71.7%

        \[\leadsto \color{blue}{\frac{1}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x}} \]
      2. remove-double-neg71.7%

        \[\leadsto \frac{1}{\color{blue}{-\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      3. distribute-rgt-neg-out71.7%

        \[\leadsto \frac{1}{-\color{blue}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot \left(-x\right)}} \]
      4. distribute-rgt-neg-out71.7%

        \[\leadsto \frac{1}{-\color{blue}{\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      5. remove-double-neg71.7%

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

        \[\leadsto \frac{1}{\color{blue}{y \cdot \left(\left(1 + z \cdot z\right) \cdot x\right)}} \]
      7. *-commutative71.7%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(x \cdot \left(1 + z \cdot z\right)\right)}} \]
      8. sqr-neg71.7%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(1 + \color{blue}{\left(-z\right) \cdot \left(-z\right)}\right)\right)} \]
      9. +-commutative71.7%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(\left(-z\right) \cdot \left(-z\right) + 1\right)}\right)} \]
      10. sqr-neg71.7%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(\color{blue}{z \cdot z} + 1\right)\right)} \]
      11. fma-define71.7%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}\right)} \]
    3. Simplified71.7%

      \[\leadsto \color{blue}{\frac{1}{y \cdot \left(x \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative71.7%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\mathsf{fma}\left(z, z, 1\right) \cdot x\right)}} \]
      2. associate-*r*71.7%

        \[\leadsto \frac{1}{\color{blue}{\left(y \cdot \mathsf{fma}\left(z, z, 1\right)\right) \cdot x}} \]
      3. fma-undefine71.7%

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

        \[\leadsto \frac{1}{\left(y \cdot \color{blue}{\left(1 + z \cdot z\right)}\right) \cdot x} \]
      5. associate-/l/71.7%

        \[\leadsto \color{blue}{\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}} \]
      6. add-sqr-sqrt33.9%

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}}}{y \cdot \left(1 + z \cdot z\right)} \]
      7. add-sqr-sqrt14.8%

        \[\leadsto \frac{\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}}{\color{blue}{\sqrt{y \cdot \left(1 + z \cdot z\right)} \cdot \sqrt{y \cdot \left(1 + z \cdot z\right)}}} \]
      8. times-frac14.8%

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

      \[\leadsto \color{blue}{\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}} \cdot \frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}} \]
    7. Step-by-step derivation
      1. unpow221.4%

        \[\leadsto \color{blue}{{\left(\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
    8. Simplified21.4%

      \[\leadsto \color{blue}{{\left(\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
    9. Taylor expanded in z around inf 21.4%

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

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

Alternative 2: 99.2% accurate, 0.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) \\ [x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\ \\ y\_s \cdot \left(x\_s \cdot {\left(\frac{{x\_m}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y\_m}}\right)}^{2}\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
(FPCore (y_s x_s x_m y_m z)
 :precision binary64
 (* y_s (* x_s (pow (/ (pow x_m -0.5) (* (hypot 1.0 z) (sqrt y_m))) 2.0))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
	return y_s * (x_s * pow((pow(x_m, -0.5) / (hypot(1.0, z) * sqrt(y_m))), 2.0));
}
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
	return y_s * (x_s * Math.pow((Math.pow(x_m, -0.5) / (Math.hypot(1.0, z) * Math.sqrt(y_m))), 2.0));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
[x_m, y_m, z] = sort([x_m, y_m, z])
def code(y_s, x_s, x_m, y_m, z):
	return y_s * (x_s * math.pow((math.pow(x_m, -0.5) / (math.hypot(1.0, z) * math.sqrt(y_m))), 2.0))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
x_m, y_m, z = sort([x_m, y_m, z])
function code(y_s, x_s, x_m, y_m, z)
	return Float64(y_s * Float64(x_s * (Float64((x_m ^ -0.5) / Float64(hypot(1.0, z) * sqrt(y_m))) ^ 2.0)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp = code(y_s, x_s, x_m, y_m, z)
	tmp = y_s * (x_s * (((x_m ^ -0.5) / (hypot(1.0, z) * sqrt(y_m))) ^ 2.0));
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]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * N[Power[N[(N[Power[x$95$m, -0.5], $MachinePrecision] / N[(N[Sqrt[1.0 ^ 2 + z ^ 2], $MachinePrecision] * N[Sqrt[y$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $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)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot {\left(\frac{{x\_m}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y\_m}}\right)}^{2}\right)
\end{array}
Derivation
  1. Initial program 89.4%

    \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
  2. Step-by-step derivation
    1. associate-/l/89.2%

      \[\leadsto \color{blue}{\frac{1}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x}} \]
    2. remove-double-neg89.2%

      \[\leadsto \frac{1}{\color{blue}{-\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
    3. distribute-rgt-neg-out89.2%

      \[\leadsto \frac{1}{-\color{blue}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot \left(-x\right)}} \]
    4. distribute-rgt-neg-out89.2%

      \[\leadsto \frac{1}{-\color{blue}{\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
    5. remove-double-neg89.2%

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

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

      \[\leadsto \frac{1}{y \cdot \color{blue}{\left(x \cdot \left(1 + z \cdot z\right)\right)}} \]
    8. sqr-neg89.2%

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

      \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(\left(-z\right) \cdot \left(-z\right) + 1\right)}\right)} \]
    10. sqr-neg89.2%

      \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(\color{blue}{z \cdot z} + 1\right)\right)} \]
    11. fma-define89.2%

      \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}\right)} \]
  3. Simplified89.2%

    \[\leadsto \color{blue}{\frac{1}{y \cdot \left(x \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. *-commutative89.2%

      \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\mathsf{fma}\left(z, z, 1\right) \cdot x\right)}} \]
    2. associate-*r*89.2%

      \[\leadsto \frac{1}{\color{blue}{\left(y \cdot \mathsf{fma}\left(z, z, 1\right)\right) \cdot x}} \]
    3. fma-undefine89.2%

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

      \[\leadsto \frac{1}{\left(y \cdot \color{blue}{\left(1 + z \cdot z\right)}\right) \cdot x} \]
    5. associate-/l/89.4%

      \[\leadsto \color{blue}{\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}} \]
    6. add-sqr-sqrt48.4%

      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}}}{y \cdot \left(1 + z \cdot z\right)} \]
    7. add-sqr-sqrt25.3%

      \[\leadsto \frac{\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}}{\color{blue}{\sqrt{y \cdot \left(1 + z \cdot z\right)} \cdot \sqrt{y \cdot \left(1 + z \cdot z\right)}}} \]
    8. times-frac25.3%

      \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{x}}}{\sqrt{y \cdot \left(1 + z \cdot z\right)}} \cdot \frac{\sqrt{\frac{1}{x}}}{\sqrt{y \cdot \left(1 + z \cdot z\right)}}} \]
  6. Applied egg-rr27.5%

    \[\leadsto \color{blue}{\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}} \cdot \frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}} \]
  7. Step-by-step derivation
    1. unpow227.5%

      \[\leadsto \color{blue}{{\left(\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
  8. Simplified27.5%

    \[\leadsto \color{blue}{{\left(\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
  9. Add Preprocessing

Alternative 3: 99.6% accurate, 0.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) \\ [x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\ \\ \begin{array}{l} t_0 := z \cdot \sqrt{x\_m}\\ y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z \cdot z \leq 5 \cdot 10^{+300}:\\ \;\;\;\;\frac{\frac{1}{y\_m}}{x\_m \cdot \mathsf{fma}\left(z, z, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{1}{y\_m}}{t\_0}}{t\_0}\\ \end{array}\right) \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
(FPCore (y_s x_s x_m y_m z)
 :precision binary64
 (let* ((t_0 (* z (sqrt x_m))))
   (*
    y_s
    (*
     x_s
     (if (<= (* z z) 5e+300)
       (/ (/ 1.0 y_m) (* x_m (fma z z 1.0)))
       (/ (/ (/ 1.0 y_m) t_0) t_0))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
	double t_0 = z * sqrt(x_m);
	double tmp;
	if ((z * z) <= 5e+300) {
		tmp = (1.0 / y_m) / (x_m * fma(z, z, 1.0));
	} else {
		tmp = ((1.0 / y_m) / t_0) / t_0;
	}
	return 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)
x_m, y_m, z = sort([x_m, y_m, z])
function code(y_s, x_s, x_m, y_m, z)
	t_0 = Float64(z * sqrt(x_m))
	tmp = 0.0
	if (Float64(z * z) <= 5e+300)
		tmp = Float64(Float64(1.0 / y_m) / Float64(x_m * fma(z, z, 1.0)));
	else
		tmp = Float64(Float64(Float64(1.0 / y_m) / t_0) / t_0);
	end
	return 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]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := Block[{t$95$0 = N[(z * N[Sqrt[x$95$m], $MachinePrecision]), $MachinePrecision]}, N[(y$95$s * N[(x$95$s * If[LessEqual[N[(z * z), $MachinePrecision], 5e+300], N[(N[(1.0 / y$95$m), $MachinePrecision] / N[(x$95$m * N[(z * z + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / y$95$m), $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$0), $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)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
\begin{array}{l}
t_0 := z \cdot \sqrt{x\_m}\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \cdot z \leq 5 \cdot 10^{+300}:\\
\;\;\;\;\frac{\frac{1}{y\_m}}{x\_m \cdot \mathsf{fma}\left(z, z, 1\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{1}{y\_m}}{t\_0}}{t\_0}\\


\end{array}\right)
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z z) < 5.00000000000000026e300

    1. Initial program 96.0%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. associate-/l/95.8%

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

        \[\leadsto \frac{1}{\color{blue}{-\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      3. distribute-rgt-neg-out95.8%

        \[\leadsto \frac{1}{-\color{blue}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot \left(-x\right)}} \]
      4. distribute-rgt-neg-out95.8%

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

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

        \[\leadsto \frac{1}{\color{blue}{y \cdot \left(\left(1 + z \cdot z\right) \cdot x\right)}} \]
      7. *-commutative95.8%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(x \cdot \left(1 + z \cdot z\right)\right)}} \]
      8. sqr-neg95.8%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(1 + \color{blue}{\left(-z\right) \cdot \left(-z\right)}\right)\right)} \]
      9. +-commutative95.8%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(\left(-z\right) \cdot \left(-z\right) + 1\right)}\right)} \]
      10. sqr-neg95.8%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(\color{blue}{z \cdot z} + 1\right)\right)} \]
      11. fma-define95.8%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}\right)} \]
    3. Simplified95.8%

      \[\leadsto \color{blue}{\frac{1}{y \cdot \left(x \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative95.8%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\mathsf{fma}\left(z, z, 1\right) \cdot x\right)}} \]
      2. associate-*r*95.8%

        \[\leadsto \frac{1}{\color{blue}{\left(y \cdot \mathsf{fma}\left(z, z, 1\right)\right) \cdot x}} \]
      3. fma-undefine95.8%

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

        \[\leadsto \frac{1}{\left(y \cdot \color{blue}{\left(1 + z \cdot z\right)}\right) \cdot x} \]
      5. associate-/l/96.0%

        \[\leadsto \color{blue}{\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}} \]
      6. add-sqr-sqrt53.8%

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}}}{y \cdot \left(1 + z \cdot z\right)} \]
      7. add-sqr-sqrt29.3%

        \[\leadsto \frac{\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}}{\color{blue}{\sqrt{y \cdot \left(1 + z \cdot z\right)} \cdot \sqrt{y \cdot \left(1 + z \cdot z\right)}}} \]
      8. times-frac29.3%

        \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{x}}}{\sqrt{y \cdot \left(1 + z \cdot z\right)}} \cdot \frac{\sqrt{\frac{1}{x}}}{\sqrt{y \cdot \left(1 + z \cdot z\right)}}} \]
    6. Applied egg-rr29.8%

      \[\leadsto \color{blue}{\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}} \cdot \frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}} \]
    7. Step-by-step derivation
      1. unpow229.8%

        \[\leadsto \color{blue}{{\left(\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
    8. Simplified29.8%

      \[\leadsto \color{blue}{{\left(\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
    9. Step-by-step derivation
      1. div-inv29.8%

        \[\leadsto {\color{blue}{\left({x}^{-0.5} \cdot \frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}}^{2} \]
      2. unpow-prod-down29.2%

        \[\leadsto \color{blue}{{\left({x}^{-0.5}\right)}^{2} \cdot {\left(\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
      3. pow229.2%

        \[\leadsto \color{blue}{\left({x}^{-0.5} \cdot {x}^{-0.5}\right)} \cdot {\left(\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2} \]
      4. pow-prod-up55.1%

        \[\leadsto \color{blue}{{x}^{\left(-0.5 + -0.5\right)}} \cdot {\left(\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2} \]
      5. metadata-eval55.1%

        \[\leadsto {x}^{\color{blue}{-1}} \cdot {\left(\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2} \]
      6. inv-pow55.1%

        \[\leadsto \color{blue}{\frac{1}{x}} \cdot {\left(\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2} \]
      7. metadata-eval55.1%

        \[\leadsto \frac{1}{x} \cdot {\left(\frac{\color{blue}{\sqrt{1}}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2} \]
      8. *-commutative55.1%

        \[\leadsto \frac{1}{x} \cdot {\left(\frac{\sqrt{1}}{\color{blue}{\sqrt{y} \cdot \mathsf{hypot}\left(1, z\right)}}\right)}^{2} \]
      9. hypot-1-def55.1%

        \[\leadsto \frac{1}{x} \cdot {\left(\frac{\sqrt{1}}{\sqrt{y} \cdot \color{blue}{\sqrt{1 + z \cdot z}}}\right)}^{2} \]
      10. sqrt-prod55.1%

        \[\leadsto \frac{1}{x} \cdot {\left(\frac{\sqrt{1}}{\color{blue}{\sqrt{y \cdot \left(1 + z \cdot z\right)}}}\right)}^{2} \]
      11. +-commutative55.1%

        \[\leadsto \frac{1}{x} \cdot {\left(\frac{\sqrt{1}}{\sqrt{y \cdot \color{blue}{\left(z \cdot z + 1\right)}}}\right)}^{2} \]
      12. fma-undefine55.1%

        \[\leadsto \frac{1}{x} \cdot {\left(\frac{\sqrt{1}}{\sqrt{y \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}}}\right)}^{2} \]
      13. sqrt-div57.7%

        \[\leadsto \frac{1}{x} \cdot {\color{blue}{\left(\sqrt{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}}\right)}}^{2} \]
      14. pow257.7%

        \[\leadsto \frac{1}{x} \cdot \color{blue}{\left(\sqrt{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}} \cdot \sqrt{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}}\right)} \]
      15. add-sqr-sqrt95.9%

        \[\leadsto \frac{1}{x} \cdot \color{blue}{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}} \]
      16. associate-/r*96.0%

        \[\leadsto \frac{1}{x} \cdot \color{blue}{\frac{\frac{1}{y}}{\mathsf{fma}\left(z, z, 1\right)}} \]
      17. fma-undefine96.0%

        \[\leadsto \frac{1}{x} \cdot \frac{\frac{1}{y}}{\color{blue}{z \cdot z + 1}} \]
      18. +-commutative96.0%

        \[\leadsto \frac{1}{x} \cdot \frac{\frac{1}{y}}{\color{blue}{1 + z \cdot z}} \]
      19. frac-times96.1%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{y}}{x \cdot \left(1 + z \cdot z\right)}} \]
    10. Applied egg-rr96.1%

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

    if 5.00000000000000026e300 < (*.f64 z z)

    1. Initial program 71.7%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. associate-/l/71.7%

        \[\leadsto \color{blue}{\frac{1}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x}} \]
      2. remove-double-neg71.7%

        \[\leadsto \frac{1}{\color{blue}{-\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      3. distribute-rgt-neg-out71.7%

        \[\leadsto \frac{1}{-\color{blue}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot \left(-x\right)}} \]
      4. distribute-rgt-neg-out71.7%

        \[\leadsto \frac{1}{-\color{blue}{\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      5. remove-double-neg71.7%

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

        \[\leadsto \frac{1}{\color{blue}{y \cdot \left(\left(1 + z \cdot z\right) \cdot x\right)}} \]
      7. *-commutative71.7%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(x \cdot \left(1 + z \cdot z\right)\right)}} \]
      8. sqr-neg71.7%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(1 + \color{blue}{\left(-z\right) \cdot \left(-z\right)}\right)\right)} \]
      9. +-commutative71.7%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(\left(-z\right) \cdot \left(-z\right) + 1\right)}\right)} \]
      10. sqr-neg71.7%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(\color{blue}{z \cdot z} + 1\right)\right)} \]
      11. fma-define71.7%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}\right)} \]
    3. Simplified71.7%

      \[\leadsto \color{blue}{\frac{1}{y \cdot \left(x \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative71.7%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\mathsf{fma}\left(z, z, 1\right) \cdot x\right)}} \]
      2. associate-*r*71.7%

        \[\leadsto \frac{1}{\color{blue}{\left(y \cdot \mathsf{fma}\left(z, z, 1\right)\right) \cdot x}} \]
      3. fma-undefine71.7%

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

        \[\leadsto \frac{1}{\left(y \cdot \color{blue}{\left(1 + z \cdot z\right)}\right) \cdot x} \]
      5. associate-/l/71.7%

        \[\leadsto \color{blue}{\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}} \]
      6. add-sqr-sqrt33.9%

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}}}{y \cdot \left(1 + z \cdot z\right)} \]
      7. add-sqr-sqrt14.8%

        \[\leadsto \frac{\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}}{\color{blue}{\sqrt{y \cdot \left(1 + z \cdot z\right)} \cdot \sqrt{y \cdot \left(1 + z \cdot z\right)}}} \]
      8. times-frac14.8%

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

      \[\leadsto \color{blue}{\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}} \cdot \frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}} \]
    7. Step-by-step derivation
      1. unpow221.4%

        \[\leadsto \color{blue}{{\left(\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
    8. Simplified21.4%

      \[\leadsto \color{blue}{{\left(\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
    9. Taylor expanded in z around inf 38.6%

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

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

        \[\leadsto {\left(\frac{\color{blue}{\sqrt{\frac{1}{x \cdot y}}}}{z}\right)}^{2} \]
      3. associate-/r*38.6%

        \[\leadsto {\left(\frac{\sqrt{\color{blue}{\frac{\frac{1}{x}}{y}}}}{z}\right)}^{2} \]
    11. Simplified38.6%

      \[\leadsto {\color{blue}{\left(\frac{\sqrt{\frac{\frac{1}{x}}{y}}}{z}\right)}}^{2} \]
    12. Step-by-step derivation
      1. unpow238.6%

        \[\leadsto \color{blue}{\frac{\sqrt{\frac{\frac{1}{x}}{y}}}{z} \cdot \frac{\sqrt{\frac{\frac{1}{x}}{y}}}{z}} \]
      2. frac-times29.2%

        \[\leadsto \color{blue}{\frac{\sqrt{\frac{\frac{1}{x}}{y}} \cdot \sqrt{\frac{\frac{1}{x}}{y}}}{z \cdot z}} \]
      3. add-sqr-sqrt71.1%

        \[\leadsto \frac{\color{blue}{\frac{\frac{1}{x}}{y}}}{z \cdot z} \]
      4. associate-/l/71.1%

        \[\leadsto \frac{\color{blue}{\frac{1}{y \cdot x}}}{z \cdot z} \]
      5. unpow271.1%

        \[\leadsto \frac{\frac{1}{y \cdot x}}{\color{blue}{{z}^{2}}} \]
      6. associate-/r*71.2%

        \[\leadsto \color{blue}{\frac{1}{\left(y \cdot x\right) \cdot {z}^{2}}} \]
      7. associate-*r*71.7%

        \[\leadsto \frac{1}{\color{blue}{y \cdot \left(x \cdot {z}^{2}\right)}} \]
      8. associate-/r*71.7%

        \[\leadsto \color{blue}{\frac{\frac{1}{y}}{x \cdot {z}^{2}}} \]
      9. add-sqr-sqrt33.9%

        \[\leadsto \frac{\frac{1}{y}}{\color{blue}{\sqrt{x \cdot {z}^{2}} \cdot \sqrt{x \cdot {z}^{2}}}} \]
      10. associate-/r*33.9%

        \[\leadsto \color{blue}{\frac{\frac{\frac{1}{y}}{\sqrt{x \cdot {z}^{2}}}}{\sqrt{x \cdot {z}^{2}}}} \]
      11. *-commutative33.9%

        \[\leadsto \frac{\frac{\frac{1}{y}}{\sqrt{\color{blue}{{z}^{2} \cdot x}}}}{\sqrt{x \cdot {z}^{2}}} \]
      12. sqrt-prod33.9%

        \[\leadsto \frac{\frac{\frac{1}{y}}{\color{blue}{\sqrt{{z}^{2}} \cdot \sqrt{x}}}}{\sqrt{x \cdot {z}^{2}}} \]
      13. sqrt-pow133.9%

        \[\leadsto \frac{\frac{\frac{1}{y}}{\color{blue}{{z}^{\left(\frac{2}{2}\right)}} \cdot \sqrt{x}}}{\sqrt{x \cdot {z}^{2}}} \]
      14. metadata-eval33.9%

        \[\leadsto \frac{\frac{\frac{1}{y}}{{z}^{\color{blue}{1}} \cdot \sqrt{x}}}{\sqrt{x \cdot {z}^{2}}} \]
      15. pow133.9%

        \[\leadsto \frac{\frac{\frac{1}{y}}{\color{blue}{z} \cdot \sqrt{x}}}{\sqrt{x \cdot {z}^{2}}} \]
      16. *-commutative33.9%

        \[\leadsto \frac{\frac{\frac{1}{y}}{z \cdot \sqrt{x}}}{\sqrt{\color{blue}{{z}^{2} \cdot x}}} \]
      17. sqrt-prod33.9%

        \[\leadsto \frac{\frac{\frac{1}{y}}{z \cdot \sqrt{x}}}{\color{blue}{\sqrt{{z}^{2}} \cdot \sqrt{x}}} \]
      18. sqrt-pow149.9%

        \[\leadsto \frac{\frac{\frac{1}{y}}{z \cdot \sqrt{x}}}{\color{blue}{{z}^{\left(\frac{2}{2}\right)}} \cdot \sqrt{x}} \]
      19. metadata-eval49.9%

        \[\leadsto \frac{\frac{\frac{1}{y}}{z \cdot \sqrt{x}}}{{z}^{\color{blue}{1}} \cdot \sqrt{x}} \]
      20. pow149.9%

        \[\leadsto \frac{\frac{\frac{1}{y}}{z \cdot \sqrt{x}}}{\color{blue}{z} \cdot \sqrt{x}} \]
    13. Applied egg-rr49.9%

      \[\leadsto \color{blue}{\frac{\frac{\frac{1}{y}}{z \cdot \sqrt{x}}}{z \cdot \sqrt{x}}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

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

\mathbf{elif}\;z \cdot z \leq 10^{+290}:\\
\;\;\;\;\frac{\frac{1}{y\_m}}{x\_m \cdot {z}^{2}}\\

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


\end{array}\right)
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 z z) < 1e14

    1. Initial program 99.8%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Add Preprocessing

    if 1e14 < (*.f64 z z) < 1.00000000000000006e290

    1. Initial program 88.7%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. associate-/l/88.6%

        \[\leadsto \color{blue}{\frac{1}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x}} \]
      2. remove-double-neg88.6%

        \[\leadsto \frac{1}{\color{blue}{-\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      3. distribute-rgt-neg-out88.6%

        \[\leadsto \frac{1}{-\color{blue}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot \left(-x\right)}} \]
      4. distribute-rgt-neg-out88.6%

        \[\leadsto \frac{1}{-\color{blue}{\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      5. remove-double-neg88.6%

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

        \[\leadsto \frac{1}{\color{blue}{y \cdot \left(\left(1 + z \cdot z\right) \cdot x\right)}} \]
      7. *-commutative88.7%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(x \cdot \left(1 + z \cdot z\right)\right)}} \]
      8. sqr-neg88.7%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(1 + \color{blue}{\left(-z\right) \cdot \left(-z\right)}\right)\right)} \]
      9. +-commutative88.7%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(\left(-z\right) \cdot \left(-z\right) + 1\right)}\right)} \]
      10. sqr-neg88.7%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(\color{blue}{z \cdot z} + 1\right)\right)} \]
      11. fma-define88.7%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}\right)} \]
    3. Simplified88.7%

      \[\leadsto \color{blue}{\frac{1}{y \cdot \left(x \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative88.7%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\mathsf{fma}\left(z, z, 1\right) \cdot x\right)}} \]
      2. associate-*r*88.6%

        \[\leadsto \frac{1}{\color{blue}{\left(y \cdot \mathsf{fma}\left(z, z, 1\right)\right) \cdot x}} \]
      3. fma-undefine88.6%

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

        \[\leadsto \frac{1}{\left(y \cdot \color{blue}{\left(1 + z \cdot z\right)}\right) \cdot x} \]
      5. associate-/l/88.7%

        \[\leadsto \color{blue}{\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}} \]
      6. add-sqr-sqrt51.8%

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}}}{y \cdot \left(1 + z \cdot z\right)} \]
      7. add-sqr-sqrt30.0%

        \[\leadsto \frac{\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}}{\color{blue}{\sqrt{y \cdot \left(1 + z \cdot z\right)} \cdot \sqrt{y \cdot \left(1 + z \cdot z\right)}}} \]
      8. times-frac30.0%

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

      \[\leadsto \color{blue}{\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}} \cdot \frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}} \]
    7. Step-by-step derivation
      1. unpow231.4%

        \[\leadsto \color{blue}{{\left(\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
    8. Simplified31.4%

      \[\leadsto \color{blue}{{\left(\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
    9. Taylor expanded in z around inf 50.7%

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

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

        \[\leadsto {\left(\frac{\color{blue}{\sqrt{\frac{1}{x \cdot y}}}}{z}\right)}^{2} \]
      3. associate-/r*50.8%

        \[\leadsto {\left(\frac{\sqrt{\color{blue}{\frac{\frac{1}{x}}{y}}}}{z}\right)}^{2} \]
    11. Simplified50.8%

      \[\leadsto {\color{blue}{\left(\frac{\sqrt{\frac{\frac{1}{x}}{y}}}{z}\right)}}^{2} \]
    12. Step-by-step derivation
      1. unpow250.8%

        \[\leadsto \color{blue}{\frac{\sqrt{\frac{\frac{1}{x}}{y}}}{z} \cdot \frac{\sqrt{\frac{\frac{1}{x}}{y}}}{z}} \]
      2. frac-times50.9%

        \[\leadsto \color{blue}{\frac{\sqrt{\frac{\frac{1}{x}}{y}} \cdot \sqrt{\frac{\frac{1}{x}}{y}}}{z \cdot z}} \]
      3. add-sqr-sqrt90.7%

        \[\leadsto \frac{\color{blue}{\frac{\frac{1}{x}}{y}}}{z \cdot z} \]
      4. associate-/l/90.7%

        \[\leadsto \frac{\color{blue}{\frac{1}{y \cdot x}}}{z \cdot z} \]
      5. unpow290.7%

        \[\leadsto \frac{\frac{1}{y \cdot x}}{\color{blue}{{z}^{2}}} \]
      6. associate-/r*90.2%

        \[\leadsto \color{blue}{\frac{1}{\left(y \cdot x\right) \cdot {z}^{2}}} \]
      7. associate-*r*88.7%

        \[\leadsto \frac{1}{\color{blue}{y \cdot \left(x \cdot {z}^{2}\right)}} \]
      8. associate-/r*89.2%

        \[\leadsto \color{blue}{\frac{\frac{1}{y}}{x \cdot {z}^{2}}} \]
    13. Applied egg-rr89.2%

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

    if 1.00000000000000006e290 < (*.f64 z z)

    1. Initial program 72.1%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. associate-/l/72.1%

        \[\leadsto \color{blue}{\frac{1}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x}} \]
      2. remove-double-neg72.1%

        \[\leadsto \frac{1}{\color{blue}{-\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      3. distribute-rgt-neg-out72.1%

        \[\leadsto \frac{1}{-\color{blue}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot \left(-x\right)}} \]
      4. distribute-rgt-neg-out72.1%

        \[\leadsto \frac{1}{-\color{blue}{\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      5. remove-double-neg72.1%

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

        \[\leadsto \frac{1}{\color{blue}{y \cdot \left(\left(1 + z \cdot z\right) \cdot x\right)}} \]
      7. *-commutative72.0%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(x \cdot \left(1 + z \cdot z\right)\right)}} \]
      8. sqr-neg72.0%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(1 + \color{blue}{\left(-z\right) \cdot \left(-z\right)}\right)\right)} \]
      9. +-commutative72.0%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(\left(-z\right) \cdot \left(-z\right) + 1\right)}\right)} \]
      10. sqr-neg72.0%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(\color{blue}{z \cdot z} + 1\right)\right)} \]
      11. fma-define72.0%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}\right)} \]
    3. Simplified72.0%

      \[\leadsto \color{blue}{\frac{1}{y \cdot \left(x \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-sqr-sqrt33.4%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\sqrt{x \cdot \mathsf{fma}\left(z, z, 1\right)} \cdot \sqrt{x \cdot \mathsf{fma}\left(z, z, 1\right)}\right)}} \]
      2. pow233.4%

        \[\leadsto \frac{1}{y \cdot \color{blue}{{\left(\sqrt{x \cdot \mathsf{fma}\left(z, z, 1\right)}\right)}^{2}}} \]
      3. *-commutative33.4%

        \[\leadsto \frac{1}{y \cdot {\left(\sqrt{\color{blue}{\mathsf{fma}\left(z, z, 1\right) \cdot x}}\right)}^{2}} \]
      4. sqrt-prod33.4%

        \[\leadsto \frac{1}{y \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(z, z, 1\right)} \cdot \sqrt{x}\right)}}^{2}} \]
      5. fma-undefine33.4%

        \[\leadsto \frac{1}{y \cdot {\left(\sqrt{\color{blue}{z \cdot z + 1}} \cdot \sqrt{x}\right)}^{2}} \]
      6. +-commutative33.4%

        \[\leadsto \frac{1}{y \cdot {\left(\sqrt{\color{blue}{1 + z \cdot z}} \cdot \sqrt{x}\right)}^{2}} \]
      7. hypot-1-def38.7%

        \[\leadsto \frac{1}{y \cdot {\left(\color{blue}{\mathsf{hypot}\left(1, z\right)} \cdot \sqrt{x}\right)}^{2}} \]
    6. Applied egg-rr38.7%

      \[\leadsto \frac{1}{y \cdot \color{blue}{{\left(\mathsf{hypot}\left(1, z\right) \cdot \sqrt{x}\right)}^{2}}} \]
    7. Taylor expanded in z around inf 38.7%

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

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\left(\sqrt{x} \cdot z\right) \cdot \left(\sqrt{x} \cdot z\right)\right)}} \]
      2. swap-sqr33.4%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\left(\sqrt{x} \cdot \sqrt{x}\right) \cdot \left(z \cdot z\right)\right)}} \]
      3. add-sqr-sqrt72.0%

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

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

        \[\leadsto \frac{1}{\color{blue}{\left(y \cdot x\right) \cdot {z}^{2}}} \]
      6. associate-/l/71.6%

        \[\leadsto \color{blue}{\frac{\frac{1}{{z}^{2}}}{y \cdot x}} \]
      7. pow271.6%

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

        \[\leadsto \frac{\color{blue}{\frac{\frac{1}{z}}{z}}}{y \cdot x} \]
      9. un-div-inv72.0%

        \[\leadsto \frac{\color{blue}{\frac{1}{z} \cdot \frac{1}{z}}}{y \cdot x} \]
      10. times-frac99.7%

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

      \[\leadsto \color{blue}{\frac{\frac{1}{z}}{y} \cdot \frac{\frac{1}{z}}{x}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 5: 99.0% accurate, 0.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) \\ [x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\ \\ y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z \cdot z \leq 10^{+290}:\\ \;\;\;\;\frac{\frac{1}{y\_m}}{x\_m \cdot \mathsf{fma}\left(z, z, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{z}}{y\_m} \cdot \frac{\frac{1}{z}}{x\_m}\\ \end{array}\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
(FPCore (y_s x_s x_m y_m z)
 :precision binary64
 (*
  y_s
  (*
   x_s
   (if (<= (* z z) 1e+290)
     (/ (/ 1.0 y_m) (* x_m (fma z z 1.0)))
     (* (/ (/ 1.0 z) y_m) (/ (/ 1.0 z) x_m))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
	double tmp;
	if ((z * z) <= 1e+290) {
		tmp = (1.0 / y_m) / (x_m * fma(z, z, 1.0));
	} else {
		tmp = ((1.0 / z) / y_m) * ((1.0 / z) / x_m);
	}
	return 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)
x_m, y_m, z = sort([x_m, y_m, z])
function code(y_s, x_s, x_m, y_m, z)
	tmp = 0.0
	if (Float64(z * z) <= 1e+290)
		tmp = Float64(Float64(1.0 / y_m) / Float64(x_m * fma(z, z, 1.0)));
	else
		tmp = Float64(Float64(Float64(1.0 / z) / y_m) * Float64(Float64(1.0 / z) / x_m));
	end
	return 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]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * If[LessEqual[N[(z * z), $MachinePrecision], 1e+290], N[(N[(1.0 / y$95$m), $MachinePrecision] / N[(x$95$m * N[(z * z + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / z), $MachinePrecision] / y$95$m), $MachinePrecision] * N[(N[(1.0 / z), $MachinePrecision] / 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)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \cdot z \leq 10^{+290}:\\
\;\;\;\;\frac{\frac{1}{y\_m}}{x\_m \cdot \mathsf{fma}\left(z, z, 1\right)}\\

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


\end{array}\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z z) < 1.00000000000000006e290

    1. Initial program 96.0%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. associate-/l/95.8%

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

        \[\leadsto \frac{1}{\color{blue}{-\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      3. distribute-rgt-neg-out95.8%

        \[\leadsto \frac{1}{-\color{blue}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot \left(-x\right)}} \]
      4. distribute-rgt-neg-out95.8%

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

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

        \[\leadsto \frac{1}{\color{blue}{y \cdot \left(\left(1 + z \cdot z\right) \cdot x\right)}} \]
      7. *-commutative95.8%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(x \cdot \left(1 + z \cdot z\right)\right)}} \]
      8. sqr-neg95.8%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(1 + \color{blue}{\left(-z\right) \cdot \left(-z\right)}\right)\right)} \]
      9. +-commutative95.8%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(\left(-z\right) \cdot \left(-z\right) + 1\right)}\right)} \]
      10. sqr-neg95.8%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(\color{blue}{z \cdot z} + 1\right)\right)} \]
      11. fma-define95.8%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}\right)} \]
    3. Simplified95.8%

      \[\leadsto \color{blue}{\frac{1}{y \cdot \left(x \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative95.8%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\mathsf{fma}\left(z, z, 1\right) \cdot x\right)}} \]
      2. associate-*r*95.8%

        \[\leadsto \frac{1}{\color{blue}{\left(y \cdot \mathsf{fma}\left(z, z, 1\right)\right) \cdot x}} \]
      3. fma-undefine95.8%

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

        \[\leadsto \frac{1}{\left(y \cdot \color{blue}{\left(1 + z \cdot z\right)}\right) \cdot x} \]
      5. associate-/l/96.0%

        \[\leadsto \color{blue}{\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}} \]
      6. add-sqr-sqrt54.1%

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}}}{y \cdot \left(1 + z \cdot z\right)} \]
      7. add-sqr-sqrt29.5%

        \[\leadsto \frac{\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}}{\color{blue}{\sqrt{y \cdot \left(1 + z \cdot z\right)} \cdot \sqrt{y \cdot \left(1 + z \cdot z\right)}}} \]
      8. times-frac29.5%

        \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{x}}}{\sqrt{y \cdot \left(1 + z \cdot z\right)}} \cdot \frac{\sqrt{\frac{1}{x}}}{\sqrt{y \cdot \left(1 + z \cdot z\right)}}} \]
    6. Applied egg-rr30.0%

      \[\leadsto \color{blue}{\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}} \cdot \frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}} \]
    7. Step-by-step derivation
      1. unpow230.0%

        \[\leadsto \color{blue}{{\left(\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
    8. Simplified30.0%

      \[\leadsto \color{blue}{{\left(\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
    9. Step-by-step derivation
      1. div-inv30.0%

        \[\leadsto {\color{blue}{\left({x}^{-0.5} \cdot \frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}}^{2} \]
      2. unpow-prod-down29.4%

        \[\leadsto \color{blue}{{\left({x}^{-0.5}\right)}^{2} \cdot {\left(\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
      3. pow229.4%

        \[\leadsto \color{blue}{\left({x}^{-0.5} \cdot {x}^{-0.5}\right)} \cdot {\left(\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2} \]
      4. pow-prod-up54.8%

        \[\leadsto \color{blue}{{x}^{\left(-0.5 + -0.5\right)}} \cdot {\left(\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2} \]
      5. metadata-eval54.8%

        \[\leadsto {x}^{\color{blue}{-1}} \cdot {\left(\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2} \]
      6. inv-pow54.8%

        \[\leadsto \color{blue}{\frac{1}{x}} \cdot {\left(\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2} \]
      7. metadata-eval54.8%

        \[\leadsto \frac{1}{x} \cdot {\left(\frac{\color{blue}{\sqrt{1}}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2} \]
      8. *-commutative54.8%

        \[\leadsto \frac{1}{x} \cdot {\left(\frac{\sqrt{1}}{\color{blue}{\sqrt{y} \cdot \mathsf{hypot}\left(1, z\right)}}\right)}^{2} \]
      9. hypot-1-def54.8%

        \[\leadsto \frac{1}{x} \cdot {\left(\frac{\sqrt{1}}{\sqrt{y} \cdot \color{blue}{\sqrt{1 + z \cdot z}}}\right)}^{2} \]
      10. sqrt-prod54.8%

        \[\leadsto \frac{1}{x} \cdot {\left(\frac{\sqrt{1}}{\color{blue}{\sqrt{y \cdot \left(1 + z \cdot z\right)}}}\right)}^{2} \]
      11. +-commutative54.8%

        \[\leadsto \frac{1}{x} \cdot {\left(\frac{\sqrt{1}}{\sqrt{y \cdot \color{blue}{\left(z \cdot z + 1\right)}}}\right)}^{2} \]
      12. fma-undefine54.8%

        \[\leadsto \frac{1}{x} \cdot {\left(\frac{\sqrt{1}}{\sqrt{y \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}}}\right)}^{2} \]
      13. sqrt-div57.5%

        \[\leadsto \frac{1}{x} \cdot {\color{blue}{\left(\sqrt{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}}\right)}}^{2} \]
      14. pow257.5%

        \[\leadsto \frac{1}{x} \cdot \color{blue}{\left(\sqrt{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}} \cdot \sqrt{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}}\right)} \]
      15. add-sqr-sqrt95.9%

        \[\leadsto \frac{1}{x} \cdot \color{blue}{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}} \]
      16. associate-/r*95.9%

        \[\leadsto \frac{1}{x} \cdot \color{blue}{\frac{\frac{1}{y}}{\mathsf{fma}\left(z, z, 1\right)}} \]
      17. fma-undefine95.9%

        \[\leadsto \frac{1}{x} \cdot \frac{\frac{1}{y}}{\color{blue}{z \cdot z + 1}} \]
      18. +-commutative95.9%

        \[\leadsto \frac{1}{x} \cdot \frac{\frac{1}{y}}{\color{blue}{1 + z \cdot z}} \]
      19. frac-times96.1%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{y}}{x \cdot \left(1 + z \cdot z\right)}} \]
    10. Applied egg-rr96.1%

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

    if 1.00000000000000006e290 < (*.f64 z z)

    1. Initial program 72.1%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. associate-/l/72.1%

        \[\leadsto \color{blue}{\frac{1}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x}} \]
      2. remove-double-neg72.1%

        \[\leadsto \frac{1}{\color{blue}{-\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      3. distribute-rgt-neg-out72.1%

        \[\leadsto \frac{1}{-\color{blue}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot \left(-x\right)}} \]
      4. distribute-rgt-neg-out72.1%

        \[\leadsto \frac{1}{-\color{blue}{\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      5. remove-double-neg72.1%

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

        \[\leadsto \frac{1}{\color{blue}{y \cdot \left(\left(1 + z \cdot z\right) \cdot x\right)}} \]
      7. *-commutative72.0%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(x \cdot \left(1 + z \cdot z\right)\right)}} \]
      8. sqr-neg72.0%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(1 + \color{blue}{\left(-z\right) \cdot \left(-z\right)}\right)\right)} \]
      9. +-commutative72.0%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(\left(-z\right) \cdot \left(-z\right) + 1\right)}\right)} \]
      10. sqr-neg72.0%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(\color{blue}{z \cdot z} + 1\right)\right)} \]
      11. fma-define72.0%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}\right)} \]
    3. Simplified72.0%

      \[\leadsto \color{blue}{\frac{1}{y \cdot \left(x \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-sqr-sqrt33.4%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\sqrt{x \cdot \mathsf{fma}\left(z, z, 1\right)} \cdot \sqrt{x \cdot \mathsf{fma}\left(z, z, 1\right)}\right)}} \]
      2. pow233.4%

        \[\leadsto \frac{1}{y \cdot \color{blue}{{\left(\sqrt{x \cdot \mathsf{fma}\left(z, z, 1\right)}\right)}^{2}}} \]
      3. *-commutative33.4%

        \[\leadsto \frac{1}{y \cdot {\left(\sqrt{\color{blue}{\mathsf{fma}\left(z, z, 1\right) \cdot x}}\right)}^{2}} \]
      4. sqrt-prod33.4%

        \[\leadsto \frac{1}{y \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(z, z, 1\right)} \cdot \sqrt{x}\right)}}^{2}} \]
      5. fma-undefine33.4%

        \[\leadsto \frac{1}{y \cdot {\left(\sqrt{\color{blue}{z \cdot z + 1}} \cdot \sqrt{x}\right)}^{2}} \]
      6. +-commutative33.4%

        \[\leadsto \frac{1}{y \cdot {\left(\sqrt{\color{blue}{1 + z \cdot z}} \cdot \sqrt{x}\right)}^{2}} \]
      7. hypot-1-def38.7%

        \[\leadsto \frac{1}{y \cdot {\left(\color{blue}{\mathsf{hypot}\left(1, z\right)} \cdot \sqrt{x}\right)}^{2}} \]
    6. Applied egg-rr38.7%

      \[\leadsto \frac{1}{y \cdot \color{blue}{{\left(\mathsf{hypot}\left(1, z\right) \cdot \sqrt{x}\right)}^{2}}} \]
    7. Taylor expanded in z around inf 38.7%

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

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\left(\sqrt{x} \cdot z\right) \cdot \left(\sqrt{x} \cdot z\right)\right)}} \]
      2. swap-sqr33.4%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\left(\sqrt{x} \cdot \sqrt{x}\right) \cdot \left(z \cdot z\right)\right)}} \]
      3. add-sqr-sqrt72.0%

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

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

        \[\leadsto \frac{1}{\color{blue}{\left(y \cdot x\right) \cdot {z}^{2}}} \]
      6. associate-/l/71.6%

        \[\leadsto \color{blue}{\frac{\frac{1}{{z}^{2}}}{y \cdot x}} \]
      7. pow271.6%

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

        \[\leadsto \frac{\color{blue}{\frac{\frac{1}{z}}{z}}}{y \cdot x} \]
      9. un-div-inv72.0%

        \[\leadsto \frac{\color{blue}{\frac{1}{z} \cdot \frac{1}{z}}}{y \cdot x} \]
      10. times-frac99.7%

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

      \[\leadsto \color{blue}{\frac{\frac{1}{z}}{y} \cdot \frac{\frac{1}{z}}{x}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 6: 98.6% accurate, 0.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) \\ [x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\ \\ y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z \cdot z \leq 10^{+273}:\\ \;\;\;\;\frac{1}{y\_m \cdot \left(x\_m \cdot \mathsf{fma}\left(z, z, 1\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{z}}{y\_m} \cdot \frac{\frac{1}{z}}{x\_m}\\ \end{array}\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
(FPCore (y_s x_s x_m y_m z)
 :precision binary64
 (*
  y_s
  (*
   x_s
   (if (<= (* z z) 1e+273)
     (/ 1.0 (* y_m (* x_m (fma z z 1.0))))
     (* (/ (/ 1.0 z) y_m) (/ (/ 1.0 z) x_m))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
	double tmp;
	if ((z * z) <= 1e+273) {
		tmp = 1.0 / (y_m * (x_m * fma(z, z, 1.0)));
	} else {
		tmp = ((1.0 / z) / y_m) * ((1.0 / z) / x_m);
	}
	return 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)
x_m, y_m, z = sort([x_m, y_m, z])
function code(y_s, x_s, x_m, y_m, z)
	tmp = 0.0
	if (Float64(z * z) <= 1e+273)
		tmp = Float64(1.0 / Float64(y_m * Float64(x_m * fma(z, z, 1.0))));
	else
		tmp = Float64(Float64(Float64(1.0 / z) / y_m) * Float64(Float64(1.0 / z) / x_m));
	end
	return 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]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * If[LessEqual[N[(z * z), $MachinePrecision], 1e+273], N[(1.0 / N[(y$95$m * N[(x$95$m * N[(z * z + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / z), $MachinePrecision] / y$95$m), $MachinePrecision] * N[(N[(1.0 / z), $MachinePrecision] / 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)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \cdot z \leq 10^{+273}:\\
\;\;\;\;\frac{1}{y\_m \cdot \left(x\_m \cdot \mathsf{fma}\left(z, z, 1\right)\right)}\\

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


\end{array}\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z z) < 9.99999999999999945e272

    1. Initial program 96.1%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. associate-/l/95.9%

        \[\leadsto \color{blue}{\frac{1}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x}} \]
      2. remove-double-neg95.9%

        \[\leadsto \frac{1}{\color{blue}{-\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      3. distribute-rgt-neg-out95.9%

        \[\leadsto \frac{1}{-\color{blue}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot \left(-x\right)}} \]
      4. distribute-rgt-neg-out95.9%

        \[\leadsto \frac{1}{-\color{blue}{\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      5. remove-double-neg95.9%

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

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

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(x \cdot \left(1 + z \cdot z\right)\right)}} \]
      8. sqr-neg96.4%

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

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(\left(-z\right) \cdot \left(-z\right) + 1\right)}\right)} \]
      10. sqr-neg96.4%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(\color{blue}{z \cdot z} + 1\right)\right)} \]
      11. fma-define96.4%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}\right)} \]
    3. Simplified96.4%

      \[\leadsto \color{blue}{\frac{1}{y \cdot \left(x \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
    4. Add Preprocessing

    if 9.99999999999999945e272 < (*.f64 z z)

    1. Initial program 72.5%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. associate-/l/72.5%

        \[\leadsto \color{blue}{\frac{1}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x}} \]
      2. remove-double-neg72.5%

        \[\leadsto \frac{1}{\color{blue}{-\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      3. distribute-rgt-neg-out72.5%

        \[\leadsto \frac{1}{-\color{blue}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot \left(-x\right)}} \]
      4. distribute-rgt-neg-out72.5%

        \[\leadsto \frac{1}{-\color{blue}{\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      5. remove-double-neg72.5%

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

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

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(x \cdot \left(1 + z \cdot z\right)\right)}} \]
      8. sqr-neg71.2%

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

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(\left(-z\right) \cdot \left(-z\right) + 1\right)}\right)} \]
      10. sqr-neg71.2%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(\color{blue}{z \cdot z} + 1\right)\right)} \]
      11. fma-define71.2%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}\right)} \]
    3. Simplified71.2%

      \[\leadsto \color{blue}{\frac{1}{y \cdot \left(x \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-sqr-sqrt33.6%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\sqrt{x \cdot \mathsf{fma}\left(z, z, 1\right)} \cdot \sqrt{x \cdot \mathsf{fma}\left(z, z, 1\right)}\right)}} \]
      2. pow233.6%

        \[\leadsto \frac{1}{y \cdot \color{blue}{{\left(\sqrt{x \cdot \mathsf{fma}\left(z, z, 1\right)}\right)}^{2}}} \]
      3. *-commutative33.6%

        \[\leadsto \frac{1}{y \cdot {\left(\sqrt{\color{blue}{\mathsf{fma}\left(z, z, 1\right) \cdot x}}\right)}^{2}} \]
      4. sqrt-prod33.6%

        \[\leadsto \frac{1}{y \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(z, z, 1\right)} \cdot \sqrt{x}\right)}}^{2}} \]
      5. fma-undefine33.6%

        \[\leadsto \frac{1}{y \cdot {\left(\sqrt{\color{blue}{z \cdot z + 1}} \cdot \sqrt{x}\right)}^{2}} \]
      6. +-commutative33.6%

        \[\leadsto \frac{1}{y \cdot {\left(\sqrt{\color{blue}{1 + z \cdot z}} \cdot \sqrt{x}\right)}^{2}} \]
      7. hypot-1-def38.8%

        \[\leadsto \frac{1}{y \cdot {\left(\color{blue}{\mathsf{hypot}\left(1, z\right)} \cdot \sqrt{x}\right)}^{2}} \]
    6. Applied egg-rr38.8%

      \[\leadsto \frac{1}{y \cdot \color{blue}{{\left(\mathsf{hypot}\left(1, z\right) \cdot \sqrt{x}\right)}^{2}}} \]
    7. Taylor expanded in z around inf 38.8%

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

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\left(\sqrt{x} \cdot z\right) \cdot \left(\sqrt{x} \cdot z\right)\right)}} \]
      2. swap-sqr33.6%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\left(\sqrt{x} \cdot \sqrt{x}\right) \cdot \left(z \cdot z\right)\right)}} \]
      3. add-sqr-sqrt71.2%

        \[\leadsto \frac{1}{y \cdot \left(\color{blue}{x} \cdot \left(z \cdot z\right)\right)} \]
      4. pow271.2%

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

        \[\leadsto \frac{1}{\color{blue}{\left(y \cdot x\right) \cdot {z}^{2}}} \]
      6. associate-/l/72.4%

        \[\leadsto \color{blue}{\frac{\frac{1}{{z}^{2}}}{y \cdot x}} \]
      7. pow272.4%

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

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

        \[\leadsto \frac{\color{blue}{\frac{1}{z} \cdot \frac{1}{z}}}{y \cdot x} \]
      10. times-frac99.4%

        \[\leadsto \color{blue}{\frac{\frac{1}{z}}{y} \cdot \frac{\frac{1}{z}}{x}} \]
    9. Applied egg-rr99.4%

      \[\leadsto \color{blue}{\frac{\frac{1}{z}}{y} \cdot \frac{\frac{1}{z}}{x}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 7: 98.8% accurate, 0.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) \\ [x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\ \\ y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z \cdot z \leq 10^{+14}:\\ \;\;\;\;\frac{\frac{1}{x\_m}}{y\_m \cdot \left(1 + z \cdot z\right)}\\ \mathbf{elif}\;z \cdot z \leq 10^{+273}:\\ \;\;\;\;\frac{1}{y\_m \cdot \left(x\_m \cdot \left(z \cdot z\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{z}}{y\_m} \cdot \frac{\frac{1}{z}}{x\_m}\\ \end{array}\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
(FPCore (y_s x_s x_m y_m z)
 :precision binary64
 (*
  y_s
  (*
   x_s
   (if (<= (* z z) 1e+14)
     (/ (/ 1.0 x_m) (* y_m (+ 1.0 (* z z))))
     (if (<= (* z z) 1e+273)
       (/ 1.0 (* y_m (* x_m (* z z))))
       (* (/ (/ 1.0 z) y_m) (/ (/ 1.0 z) x_m)))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
	double tmp;
	if ((z * z) <= 1e+14) {
		tmp = (1.0 / x_m) / (y_m * (1.0 + (z * z)));
	} else if ((z * z) <= 1e+273) {
		tmp = 1.0 / (y_m * (x_m * (z * z)));
	} else {
		tmp = ((1.0 / z) / y_m) * ((1.0 / z) / x_m);
	}
	return 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)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
    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
    real(8) :: tmp
    if ((z * z) <= 1d+14) then
        tmp = (1.0d0 / x_m) / (y_m * (1.0d0 + (z * z)))
    else if ((z * z) <= 1d+273) then
        tmp = 1.0d0 / (y_m * (x_m * (z * z)))
    else
        tmp = ((1.0d0 / z) / y_m) * ((1.0d0 / z) / x_m)
    end if
    code = 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);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
	double tmp;
	if ((z * z) <= 1e+14) {
		tmp = (1.0 / x_m) / (y_m * (1.0 + (z * z)));
	} else if ((z * z) <= 1e+273) {
		tmp = 1.0 / (y_m * (x_m * (z * z)));
	} else {
		tmp = ((1.0 / z) / y_m) * ((1.0 / z) / x_m);
	}
	return 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)
[x_m, y_m, z] = sort([x_m, y_m, z])
def code(y_s, x_s, x_m, y_m, z):
	tmp = 0
	if (z * z) <= 1e+14:
		tmp = (1.0 / x_m) / (y_m * (1.0 + (z * z)))
	elif (z * z) <= 1e+273:
		tmp = 1.0 / (y_m * (x_m * (z * z)))
	else:
		tmp = ((1.0 / z) / y_m) * ((1.0 / z) / x_m)
	return 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)
x_m, y_m, z = sort([x_m, y_m, z])
function code(y_s, x_s, x_m, y_m, z)
	tmp = 0.0
	if (Float64(z * z) <= 1e+14)
		tmp = Float64(Float64(1.0 / x_m) / Float64(y_m * Float64(1.0 + Float64(z * z))));
	elseif (Float64(z * z) <= 1e+273)
		tmp = Float64(1.0 / Float64(y_m * Float64(x_m * Float64(z * z))));
	else
		tmp = Float64(Float64(Float64(1.0 / z) / y_m) * Float64(Float64(1.0 / z) / x_m));
	end
	return 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);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp_2 = code(y_s, x_s, x_m, y_m, z)
	tmp = 0.0;
	if ((z * z) <= 1e+14)
		tmp = (1.0 / x_m) / (y_m * (1.0 + (z * z)));
	elseif ((z * z) <= 1e+273)
		tmp = 1.0 / (y_m * (x_m * (z * z)));
	else
		tmp = ((1.0 / z) / y_m) * ((1.0 / z) / x_m);
	end
	tmp_2 = 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]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * If[LessEqual[N[(z * z), $MachinePrecision], 1e+14], N[(N[(1.0 / x$95$m), $MachinePrecision] / N[(y$95$m * N[(1.0 + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * z), $MachinePrecision], 1e+273], N[(1.0 / N[(y$95$m * N[(x$95$m * N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / z), $MachinePrecision] / y$95$m), $MachinePrecision] * N[(N[(1.0 / z), $MachinePrecision] / 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)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \cdot z \leq 10^{+14}:\\
\;\;\;\;\frac{\frac{1}{x\_m}}{y\_m \cdot \left(1 + z \cdot z\right)}\\

\mathbf{elif}\;z \cdot z \leq 10^{+273}:\\
\;\;\;\;\frac{1}{y\_m \cdot \left(x\_m \cdot \left(z \cdot z\right)\right)}\\

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


\end{array}\right)
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 z z) < 1e14

    1. Initial program 99.8%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Add Preprocessing

    if 1e14 < (*.f64 z z) < 9.99999999999999945e272

    1. Initial program 88.8%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. associate-/l/88.7%

        \[\leadsto \color{blue}{\frac{1}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x}} \]
      2. remove-double-neg88.7%

        \[\leadsto \frac{1}{\color{blue}{-\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      3. distribute-rgt-neg-out88.7%

        \[\leadsto \frac{1}{-\color{blue}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot \left(-x\right)}} \]
      4. distribute-rgt-neg-out88.7%

        \[\leadsto \frac{1}{-\color{blue}{\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      5. remove-double-neg88.7%

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

        \[\leadsto \frac{1}{\color{blue}{y \cdot \left(\left(1 + z \cdot z\right) \cdot x\right)}} \]
      7. *-commutative90.3%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(x \cdot \left(1 + z \cdot z\right)\right)}} \]
      8. sqr-neg90.3%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(1 + \color{blue}{\left(-z\right) \cdot \left(-z\right)}\right)\right)} \]
      9. +-commutative90.3%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(\left(-z\right) \cdot \left(-z\right) + 1\right)}\right)} \]
      10. sqr-neg90.3%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(\color{blue}{z \cdot z} + 1\right)\right)} \]
      11. fma-define90.3%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}\right)} \]
    3. Simplified90.3%

      \[\leadsto \color{blue}{\frac{1}{y \cdot \left(x \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 88.7%

      \[\leadsto \frac{1}{\color{blue}{x \cdot \left(y \cdot {z}^{2}\right)}} \]
    6. Step-by-step derivation
      1. *-commutative88.7%

        \[\leadsto \frac{1}{x \cdot \color{blue}{\left({z}^{2} \cdot y\right)}} \]
      2. associate-*r*90.3%

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

        \[\leadsto \frac{1}{\color{blue}{y \cdot \left(x \cdot {z}^{2}\right)}} \]
    7. Simplified90.3%

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

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

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

    if 9.99999999999999945e272 < (*.f64 z z)

    1. Initial program 72.5%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. associate-/l/72.5%

        \[\leadsto \color{blue}{\frac{1}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x}} \]
      2. remove-double-neg72.5%

        \[\leadsto \frac{1}{\color{blue}{-\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      3. distribute-rgt-neg-out72.5%

        \[\leadsto \frac{1}{-\color{blue}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot \left(-x\right)}} \]
      4. distribute-rgt-neg-out72.5%

        \[\leadsto \frac{1}{-\color{blue}{\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      5. remove-double-neg72.5%

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

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

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(x \cdot \left(1 + z \cdot z\right)\right)}} \]
      8. sqr-neg71.2%

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

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(\left(-z\right) \cdot \left(-z\right) + 1\right)}\right)} \]
      10. sqr-neg71.2%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(\color{blue}{z \cdot z} + 1\right)\right)} \]
      11. fma-define71.2%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}\right)} \]
    3. Simplified71.2%

      \[\leadsto \color{blue}{\frac{1}{y \cdot \left(x \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-sqr-sqrt33.6%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\sqrt{x \cdot \mathsf{fma}\left(z, z, 1\right)} \cdot \sqrt{x \cdot \mathsf{fma}\left(z, z, 1\right)}\right)}} \]
      2. pow233.6%

        \[\leadsto \frac{1}{y \cdot \color{blue}{{\left(\sqrt{x \cdot \mathsf{fma}\left(z, z, 1\right)}\right)}^{2}}} \]
      3. *-commutative33.6%

        \[\leadsto \frac{1}{y \cdot {\left(\sqrt{\color{blue}{\mathsf{fma}\left(z, z, 1\right) \cdot x}}\right)}^{2}} \]
      4. sqrt-prod33.6%

        \[\leadsto \frac{1}{y \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(z, z, 1\right)} \cdot \sqrt{x}\right)}}^{2}} \]
      5. fma-undefine33.6%

        \[\leadsto \frac{1}{y \cdot {\left(\sqrt{\color{blue}{z \cdot z + 1}} \cdot \sqrt{x}\right)}^{2}} \]
      6. +-commutative33.6%

        \[\leadsto \frac{1}{y \cdot {\left(\sqrt{\color{blue}{1 + z \cdot z}} \cdot \sqrt{x}\right)}^{2}} \]
      7. hypot-1-def38.8%

        \[\leadsto \frac{1}{y \cdot {\left(\color{blue}{\mathsf{hypot}\left(1, z\right)} \cdot \sqrt{x}\right)}^{2}} \]
    6. Applied egg-rr38.8%

      \[\leadsto \frac{1}{y \cdot \color{blue}{{\left(\mathsf{hypot}\left(1, z\right) \cdot \sqrt{x}\right)}^{2}}} \]
    7. Taylor expanded in z around inf 38.8%

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

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\left(\sqrt{x} \cdot z\right) \cdot \left(\sqrt{x} \cdot z\right)\right)}} \]
      2. swap-sqr33.6%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\left(\sqrt{x} \cdot \sqrt{x}\right) \cdot \left(z \cdot z\right)\right)}} \]
      3. add-sqr-sqrt71.2%

        \[\leadsto \frac{1}{y \cdot \left(\color{blue}{x} \cdot \left(z \cdot z\right)\right)} \]
      4. pow271.2%

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

        \[\leadsto \frac{1}{\color{blue}{\left(y \cdot x\right) \cdot {z}^{2}}} \]
      6. associate-/l/72.4%

        \[\leadsto \color{blue}{\frac{\frac{1}{{z}^{2}}}{y \cdot x}} \]
      7. pow272.4%

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

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

        \[\leadsto \frac{\color{blue}{\frac{1}{z} \cdot \frac{1}{z}}}{y \cdot x} \]
      10. times-frac99.4%

        \[\leadsto \color{blue}{\frac{\frac{1}{z}}{y} \cdot \frac{\frac{1}{z}}{x}} \]
    9. Applied egg-rr99.4%

      \[\leadsto \color{blue}{\frac{\frac{1}{z}}{y} \cdot \frac{\frac{1}{z}}{x}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 8: 98.0% accurate, 0.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) \\ [x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\ \\ y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z \cdot z \leq 1:\\ \;\;\;\;\frac{\frac{1}{y\_m}}{x\_m}\\ \mathbf{elif}\;z \cdot z \leq 10^{+273}:\\ \;\;\;\;\frac{1}{y\_m \cdot \left(x\_m \cdot \left(z \cdot z\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{z}}{y\_m} \cdot \frac{\frac{1}{z}}{x\_m}\\ \end{array}\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
(FPCore (y_s x_s x_m y_m z)
 :precision binary64
 (*
  y_s
  (*
   x_s
   (if (<= (* z z) 1.0)
     (/ (/ 1.0 y_m) x_m)
     (if (<= (* z z) 1e+273)
       (/ 1.0 (* y_m (* x_m (* z z))))
       (* (/ (/ 1.0 z) y_m) (/ (/ 1.0 z) x_m)))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
	double tmp;
	if ((z * z) <= 1.0) {
		tmp = (1.0 / y_m) / x_m;
	} else if ((z * z) <= 1e+273) {
		tmp = 1.0 / (y_m * (x_m * (z * z)));
	} else {
		tmp = ((1.0 / z) / y_m) * ((1.0 / z) / x_m);
	}
	return 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)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
    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
    real(8) :: tmp
    if ((z * z) <= 1.0d0) then
        tmp = (1.0d0 / y_m) / x_m
    else if ((z * z) <= 1d+273) then
        tmp = 1.0d0 / (y_m * (x_m * (z * z)))
    else
        tmp = ((1.0d0 / z) / y_m) * ((1.0d0 / z) / x_m)
    end if
    code = 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);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
	double tmp;
	if ((z * z) <= 1.0) {
		tmp = (1.0 / y_m) / x_m;
	} else if ((z * z) <= 1e+273) {
		tmp = 1.0 / (y_m * (x_m * (z * z)));
	} else {
		tmp = ((1.0 / z) / y_m) * ((1.0 / z) / x_m);
	}
	return 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)
[x_m, y_m, z] = sort([x_m, y_m, z])
def code(y_s, x_s, x_m, y_m, z):
	tmp = 0
	if (z * z) <= 1.0:
		tmp = (1.0 / y_m) / x_m
	elif (z * z) <= 1e+273:
		tmp = 1.0 / (y_m * (x_m * (z * z)))
	else:
		tmp = ((1.0 / z) / y_m) * ((1.0 / z) / x_m)
	return 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)
x_m, y_m, z = sort([x_m, y_m, z])
function code(y_s, x_s, x_m, y_m, z)
	tmp = 0.0
	if (Float64(z * z) <= 1.0)
		tmp = Float64(Float64(1.0 / y_m) / x_m);
	elseif (Float64(z * z) <= 1e+273)
		tmp = Float64(1.0 / Float64(y_m * Float64(x_m * Float64(z * z))));
	else
		tmp = Float64(Float64(Float64(1.0 / z) / y_m) * Float64(Float64(1.0 / z) / x_m));
	end
	return 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);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp_2 = code(y_s, x_s, x_m, y_m, z)
	tmp = 0.0;
	if ((z * z) <= 1.0)
		tmp = (1.0 / y_m) / x_m;
	elseif ((z * z) <= 1e+273)
		tmp = 1.0 / (y_m * (x_m * (z * z)));
	else
		tmp = ((1.0 / z) / y_m) * ((1.0 / z) / x_m);
	end
	tmp_2 = 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]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * If[LessEqual[N[(z * z), $MachinePrecision], 1.0], N[(N[(1.0 / y$95$m), $MachinePrecision] / x$95$m), $MachinePrecision], If[LessEqual[N[(z * z), $MachinePrecision], 1e+273], N[(1.0 / N[(y$95$m * N[(x$95$m * N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / z), $MachinePrecision] / y$95$m), $MachinePrecision] * N[(N[(1.0 / z), $MachinePrecision] / 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)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \cdot z \leq 1:\\
\;\;\;\;\frac{\frac{1}{y\_m}}{x\_m}\\

\mathbf{elif}\;z \cdot z \leq 10^{+273}:\\
\;\;\;\;\frac{1}{y\_m \cdot \left(x\_m \cdot \left(z \cdot z\right)\right)}\\

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


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

    1. Initial program 99.8%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. associate-/l/99.5%

        \[\leadsto \color{blue}{\frac{1}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x}} \]
      2. remove-double-neg99.5%

        \[\leadsto \frac{1}{\color{blue}{-\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      3. distribute-rgt-neg-out99.5%

        \[\leadsto \frac{1}{-\color{blue}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot \left(-x\right)}} \]
      4. distribute-rgt-neg-out99.5%

        \[\leadsto \frac{1}{-\color{blue}{\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      5. remove-double-neg99.5%

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

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

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(x \cdot \left(1 + z \cdot z\right)\right)}} \]
      8. sqr-neg99.5%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(1 + \color{blue}{\left(-z\right) \cdot \left(-z\right)}\right)\right)} \]
      9. +-commutative99.5%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(\left(-z\right) \cdot \left(-z\right) + 1\right)}\right)} \]
      10. sqr-neg99.5%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(\color{blue}{z \cdot z} + 1\right)\right)} \]
      11. fma-define99.5%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}\right)} \]
    3. Simplified99.5%

      \[\leadsto \color{blue}{\frac{1}{y \cdot \left(x \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative99.5%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\mathsf{fma}\left(z, z, 1\right) \cdot x\right)}} \]
      2. associate-*r*99.5%

        \[\leadsto \frac{1}{\color{blue}{\left(y \cdot \mathsf{fma}\left(z, z, 1\right)\right) \cdot x}} \]
      3. fma-undefine99.5%

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

        \[\leadsto \frac{1}{\left(y \cdot \color{blue}{\left(1 + z \cdot z\right)}\right) \cdot x} \]
      5. associate-/l/99.8%

        \[\leadsto \color{blue}{\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}} \]
      6. add-sqr-sqrt56.4%

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}}}{y \cdot \left(1 + z \cdot z\right)} \]
      7. add-sqr-sqrt29.4%

        \[\leadsto \frac{\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}}{\color{blue}{\sqrt{y \cdot \left(1 + z \cdot z\right)} \cdot \sqrt{y \cdot \left(1 + z \cdot z\right)}}} \]
      8. times-frac29.3%

        \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{x}}}{\sqrt{y \cdot \left(1 + z \cdot z\right)}} \cdot \frac{\sqrt{\frac{1}{x}}}{\sqrt{y \cdot \left(1 + z \cdot z\right)}}} \]
    6. Applied egg-rr29.3%

      \[\leadsto \color{blue}{\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}} \cdot \frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}} \]
    7. Step-by-step derivation
      1. unpow229.3%

        \[\leadsto \color{blue}{{\left(\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
    8. Simplified29.3%

      \[\leadsto \color{blue}{{\left(\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
    9. Step-by-step derivation
      1. div-inv29.4%

        \[\leadsto {\color{blue}{\left({x}^{-0.5} \cdot \frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}}^{2} \]
      2. unpow-prod-down29.3%

        \[\leadsto \color{blue}{{\left({x}^{-0.5}\right)}^{2} \cdot {\left(\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
      3. pow229.3%

        \[\leadsto \color{blue}{\left({x}^{-0.5} \cdot {x}^{-0.5}\right)} \cdot {\left(\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2} \]
      4. metadata-eval29.3%

        \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot {\left(\frac{\color{blue}{\sqrt{1}}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2} \]
      5. *-commutative29.3%

        \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot {\left(\frac{\sqrt{1}}{\color{blue}{\sqrt{y} \cdot \mathsf{hypot}\left(1, z\right)}}\right)}^{2} \]
      6. hypot-1-def29.3%

        \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot {\left(\frac{\sqrt{1}}{\sqrt{y} \cdot \color{blue}{\sqrt{1 + z \cdot z}}}\right)}^{2} \]
      7. sqrt-prod29.3%

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

        \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot {\left(\frac{\sqrt{1}}{\sqrt{y \cdot \color{blue}{\left(z \cdot z + 1\right)}}}\right)}^{2} \]
      9. fma-undefine29.3%

        \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot {\left(\frac{\sqrt{1}}{\sqrt{y \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}}}\right)}^{2} \]
      10. sqrt-div29.4%

        \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot {\color{blue}{\left(\sqrt{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}}\right)}}^{2} \]
      11. pow229.4%

        \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot \color{blue}{\left(\sqrt{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}} \cdot \sqrt{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}}\right)} \]
      12. add-sqr-sqrt56.3%

        \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot \color{blue}{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}} \]
      13. pow-prod-up99.6%

        \[\leadsto \color{blue}{{x}^{\left(-0.5 + -0.5\right)}} \cdot \frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)} \]
      14. metadata-eval99.6%

        \[\leadsto {x}^{\color{blue}{-1}} \cdot \frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)} \]
      15. inv-pow99.6%

        \[\leadsto \color{blue}{\frac{1}{x}} \cdot \frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)} \]
      16. *-commutative99.6%

        \[\leadsto \color{blue}{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)} \cdot \frac{1}{x}} \]
      17. un-div-inv99.7%

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

      \[\leadsto \color{blue}{\frac{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}}{x}} \]
    11. Taylor expanded in z around 0 98.7%

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

    if 1 < (*.f64 z z) < 9.99999999999999945e272

    1. Initial program 89.4%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. associate-/l/89.4%

        \[\leadsto \color{blue}{\frac{1}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x}} \]
      2. remove-double-neg89.4%

        \[\leadsto \frac{1}{\color{blue}{-\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      3. distribute-rgt-neg-out89.4%

        \[\leadsto \frac{1}{-\color{blue}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot \left(-x\right)}} \]
      4. distribute-rgt-neg-out89.4%

        \[\leadsto \frac{1}{-\color{blue}{\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      5. remove-double-neg89.4%

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

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

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(x \cdot \left(1 + z \cdot z\right)\right)}} \]
      8. sqr-neg90.9%

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

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(\left(-z\right) \cdot \left(-z\right) + 1\right)}\right)} \]
      10. sqr-neg90.9%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(\color{blue}{z \cdot z} + 1\right)\right)} \]
      11. fma-define90.9%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}\right)} \]
    3. Simplified90.9%

      \[\leadsto \color{blue}{\frac{1}{y \cdot \left(x \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 87.8%

      \[\leadsto \frac{1}{\color{blue}{x \cdot \left(y \cdot {z}^{2}\right)}} \]
    6. Step-by-step derivation
      1. *-commutative87.8%

        \[\leadsto \frac{1}{x \cdot \color{blue}{\left({z}^{2} \cdot y\right)}} \]
      2. associate-*r*89.3%

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

        \[\leadsto \frac{1}{\color{blue}{y \cdot \left(x \cdot {z}^{2}\right)}} \]
    7. Simplified89.3%

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

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

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

    if 9.99999999999999945e272 < (*.f64 z z)

    1. Initial program 72.5%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. associate-/l/72.5%

        \[\leadsto \color{blue}{\frac{1}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x}} \]
      2. remove-double-neg72.5%

        \[\leadsto \frac{1}{\color{blue}{-\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      3. distribute-rgt-neg-out72.5%

        \[\leadsto \frac{1}{-\color{blue}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot \left(-x\right)}} \]
      4. distribute-rgt-neg-out72.5%

        \[\leadsto \frac{1}{-\color{blue}{\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      5. remove-double-neg72.5%

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

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

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(x \cdot \left(1 + z \cdot z\right)\right)}} \]
      8. sqr-neg71.2%

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

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(\left(-z\right) \cdot \left(-z\right) + 1\right)}\right)} \]
      10. sqr-neg71.2%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(\color{blue}{z \cdot z} + 1\right)\right)} \]
      11. fma-define71.2%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}\right)} \]
    3. Simplified71.2%

      \[\leadsto \color{blue}{\frac{1}{y \cdot \left(x \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-sqr-sqrt33.6%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\sqrt{x \cdot \mathsf{fma}\left(z, z, 1\right)} \cdot \sqrt{x \cdot \mathsf{fma}\left(z, z, 1\right)}\right)}} \]
      2. pow233.6%

        \[\leadsto \frac{1}{y \cdot \color{blue}{{\left(\sqrt{x \cdot \mathsf{fma}\left(z, z, 1\right)}\right)}^{2}}} \]
      3. *-commutative33.6%

        \[\leadsto \frac{1}{y \cdot {\left(\sqrt{\color{blue}{\mathsf{fma}\left(z, z, 1\right) \cdot x}}\right)}^{2}} \]
      4. sqrt-prod33.6%

        \[\leadsto \frac{1}{y \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(z, z, 1\right)} \cdot \sqrt{x}\right)}}^{2}} \]
      5. fma-undefine33.6%

        \[\leadsto \frac{1}{y \cdot {\left(\sqrt{\color{blue}{z \cdot z + 1}} \cdot \sqrt{x}\right)}^{2}} \]
      6. +-commutative33.6%

        \[\leadsto \frac{1}{y \cdot {\left(\sqrt{\color{blue}{1 + z \cdot z}} \cdot \sqrt{x}\right)}^{2}} \]
      7. hypot-1-def38.8%

        \[\leadsto \frac{1}{y \cdot {\left(\color{blue}{\mathsf{hypot}\left(1, z\right)} \cdot \sqrt{x}\right)}^{2}} \]
    6. Applied egg-rr38.8%

      \[\leadsto \frac{1}{y \cdot \color{blue}{{\left(\mathsf{hypot}\left(1, z\right) \cdot \sqrt{x}\right)}^{2}}} \]
    7. Taylor expanded in z around inf 38.8%

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

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\left(\sqrt{x} \cdot z\right) \cdot \left(\sqrt{x} \cdot z\right)\right)}} \]
      2. swap-sqr33.6%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\left(\sqrt{x} \cdot \sqrt{x}\right) \cdot \left(z \cdot z\right)\right)}} \]
      3. add-sqr-sqrt71.2%

        \[\leadsto \frac{1}{y \cdot \left(\color{blue}{x} \cdot \left(z \cdot z\right)\right)} \]
      4. pow271.2%

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

        \[\leadsto \frac{1}{\color{blue}{\left(y \cdot x\right) \cdot {z}^{2}}} \]
      6. associate-/l/72.4%

        \[\leadsto \color{blue}{\frac{\frac{1}{{z}^{2}}}{y \cdot x}} \]
      7. pow272.4%

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

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

        \[\leadsto \frac{\color{blue}{\frac{1}{z} \cdot \frac{1}{z}}}{y \cdot x} \]
      10. times-frac99.4%

        \[\leadsto \color{blue}{\frac{\frac{1}{z}}{y} \cdot \frac{\frac{1}{z}}{x}} \]
    9. Applied egg-rr99.4%

      \[\leadsto \color{blue}{\frac{\frac{1}{z}}{y} \cdot \frac{\frac{1}{z}}{x}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 9: 95.4% accurate, 0.5× speedup?

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

\mathbf{elif}\;z \cdot z \leq 10^{+273}:\\
\;\;\;\;\frac{1}{y\_m \cdot \left(x\_m \cdot \left(z \cdot z\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{z}}{z \cdot \left(x\_m \cdot y\_m\right)}\\


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

    1. Initial program 99.8%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. associate-/l/99.5%

        \[\leadsto \color{blue}{\frac{1}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x}} \]
      2. remove-double-neg99.5%

        \[\leadsto \frac{1}{\color{blue}{-\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      3. distribute-rgt-neg-out99.5%

        \[\leadsto \frac{1}{-\color{blue}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot \left(-x\right)}} \]
      4. distribute-rgt-neg-out99.5%

        \[\leadsto \frac{1}{-\color{blue}{\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      5. remove-double-neg99.5%

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

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

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(x \cdot \left(1 + z \cdot z\right)\right)}} \]
      8. sqr-neg99.5%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(1 + \color{blue}{\left(-z\right) \cdot \left(-z\right)}\right)\right)} \]
      9. +-commutative99.5%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(\left(-z\right) \cdot \left(-z\right) + 1\right)}\right)} \]
      10. sqr-neg99.5%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(\color{blue}{z \cdot z} + 1\right)\right)} \]
      11. fma-define99.5%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}\right)} \]
    3. Simplified99.5%

      \[\leadsto \color{blue}{\frac{1}{y \cdot \left(x \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative99.5%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\mathsf{fma}\left(z, z, 1\right) \cdot x\right)}} \]
      2. associate-*r*99.5%

        \[\leadsto \frac{1}{\color{blue}{\left(y \cdot \mathsf{fma}\left(z, z, 1\right)\right) \cdot x}} \]
      3. fma-undefine99.5%

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

        \[\leadsto \frac{1}{\left(y \cdot \color{blue}{\left(1 + z \cdot z\right)}\right) \cdot x} \]
      5. associate-/l/99.8%

        \[\leadsto \color{blue}{\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}} \]
      6. add-sqr-sqrt56.4%

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}}}{y \cdot \left(1 + z \cdot z\right)} \]
      7. add-sqr-sqrt29.4%

        \[\leadsto \frac{\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}}{\color{blue}{\sqrt{y \cdot \left(1 + z \cdot z\right)} \cdot \sqrt{y \cdot \left(1 + z \cdot z\right)}}} \]
      8. times-frac29.3%

        \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{x}}}{\sqrt{y \cdot \left(1 + z \cdot z\right)}} \cdot \frac{\sqrt{\frac{1}{x}}}{\sqrt{y \cdot \left(1 + z \cdot z\right)}}} \]
    6. Applied egg-rr29.3%

      \[\leadsto \color{blue}{\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}} \cdot \frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}} \]
    7. Step-by-step derivation
      1. unpow229.3%

        \[\leadsto \color{blue}{{\left(\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
    8. Simplified29.3%

      \[\leadsto \color{blue}{{\left(\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
    9. Step-by-step derivation
      1. div-inv29.4%

        \[\leadsto {\color{blue}{\left({x}^{-0.5} \cdot \frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}}^{2} \]
      2. unpow-prod-down29.3%

        \[\leadsto \color{blue}{{\left({x}^{-0.5}\right)}^{2} \cdot {\left(\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
      3. pow229.3%

        \[\leadsto \color{blue}{\left({x}^{-0.5} \cdot {x}^{-0.5}\right)} \cdot {\left(\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2} \]
      4. metadata-eval29.3%

        \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot {\left(\frac{\color{blue}{\sqrt{1}}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2} \]
      5. *-commutative29.3%

        \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot {\left(\frac{\sqrt{1}}{\color{blue}{\sqrt{y} \cdot \mathsf{hypot}\left(1, z\right)}}\right)}^{2} \]
      6. hypot-1-def29.3%

        \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot {\left(\frac{\sqrt{1}}{\sqrt{y} \cdot \color{blue}{\sqrt{1 + z \cdot z}}}\right)}^{2} \]
      7. sqrt-prod29.3%

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

        \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot {\left(\frac{\sqrt{1}}{\sqrt{y \cdot \color{blue}{\left(z \cdot z + 1\right)}}}\right)}^{2} \]
      9. fma-undefine29.3%

        \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot {\left(\frac{\sqrt{1}}{\sqrt{y \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}}}\right)}^{2} \]
      10. sqrt-div29.4%

        \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot {\color{blue}{\left(\sqrt{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}}\right)}}^{2} \]
      11. pow229.4%

        \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot \color{blue}{\left(\sqrt{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}} \cdot \sqrt{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}}\right)} \]
      12. add-sqr-sqrt56.3%

        \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot \color{blue}{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}} \]
      13. pow-prod-up99.6%

        \[\leadsto \color{blue}{{x}^{\left(-0.5 + -0.5\right)}} \cdot \frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)} \]
      14. metadata-eval99.6%

        \[\leadsto {x}^{\color{blue}{-1}} \cdot \frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)} \]
      15. inv-pow99.6%

        \[\leadsto \color{blue}{\frac{1}{x}} \cdot \frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)} \]
      16. *-commutative99.6%

        \[\leadsto \color{blue}{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)} \cdot \frac{1}{x}} \]
      17. un-div-inv99.7%

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

      \[\leadsto \color{blue}{\frac{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}}{x}} \]
    11. Taylor expanded in z around 0 98.7%

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

    if 1 < (*.f64 z z) < 9.99999999999999945e272

    1. Initial program 89.4%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. associate-/l/89.4%

        \[\leadsto \color{blue}{\frac{1}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x}} \]
      2. remove-double-neg89.4%

        \[\leadsto \frac{1}{\color{blue}{-\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      3. distribute-rgt-neg-out89.4%

        \[\leadsto \frac{1}{-\color{blue}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot \left(-x\right)}} \]
      4. distribute-rgt-neg-out89.4%

        \[\leadsto \frac{1}{-\color{blue}{\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      5. remove-double-neg89.4%

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

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

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(x \cdot \left(1 + z \cdot z\right)\right)}} \]
      8. sqr-neg90.9%

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

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(\left(-z\right) \cdot \left(-z\right) + 1\right)}\right)} \]
      10. sqr-neg90.9%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(\color{blue}{z \cdot z} + 1\right)\right)} \]
      11. fma-define90.9%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}\right)} \]
    3. Simplified90.9%

      \[\leadsto \color{blue}{\frac{1}{y \cdot \left(x \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 87.8%

      \[\leadsto \frac{1}{\color{blue}{x \cdot \left(y \cdot {z}^{2}\right)}} \]
    6. Step-by-step derivation
      1. *-commutative87.8%

        \[\leadsto \frac{1}{x \cdot \color{blue}{\left({z}^{2} \cdot y\right)}} \]
      2. associate-*r*89.3%

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

        \[\leadsto \frac{1}{\color{blue}{y \cdot \left(x \cdot {z}^{2}\right)}} \]
    7. Simplified89.3%

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

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

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

    if 9.99999999999999945e272 < (*.f64 z z)

    1. Initial program 72.5%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. associate-/l/72.5%

        \[\leadsto \color{blue}{\frac{1}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x}} \]
      2. remove-double-neg72.5%

        \[\leadsto \frac{1}{\color{blue}{-\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      3. distribute-rgt-neg-out72.5%

        \[\leadsto \frac{1}{-\color{blue}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot \left(-x\right)}} \]
      4. distribute-rgt-neg-out72.5%

        \[\leadsto \frac{1}{-\color{blue}{\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      5. remove-double-neg72.5%

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

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

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(x \cdot \left(1 + z \cdot z\right)\right)}} \]
      8. sqr-neg71.2%

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

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(\left(-z\right) \cdot \left(-z\right) + 1\right)}\right)} \]
      10. sqr-neg71.2%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(\color{blue}{z \cdot z} + 1\right)\right)} \]
      11. fma-define71.2%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}\right)} \]
    3. Simplified71.2%

      \[\leadsto \color{blue}{\frac{1}{y \cdot \left(x \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 72.5%

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

        \[\leadsto \frac{1}{x \cdot \color{blue}{\left({z}^{2} \cdot y\right)}} \]
      2. associate-*r*71.2%

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

        \[\leadsto \frac{1}{\color{blue}{y \cdot \left(x \cdot {z}^{2}\right)}} \]
    7. Simplified71.2%

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

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

        \[\leadsto \color{blue}{\frac{\frac{1}{y \cdot x}}{{z}^{2}}} \]
      3. associate-/l/72.3%

        \[\leadsto \frac{\color{blue}{\frac{\frac{1}{x}}{y}}}{{z}^{2}} \]
      4. add-sqr-sqrt29.4%

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{\frac{1}{x}}{y}} \cdot \sqrt{\frac{\frac{1}{x}}{y}}}}{{z}^{2}} \]
      5. unpow229.4%

        \[\leadsto \frac{\sqrt{\frac{\frac{1}{x}}{y}} \cdot \sqrt{\frac{\frac{1}{x}}{y}}}{\color{blue}{z \cdot z}} \]
      6. frac-times38.3%

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

        \[\leadsto \color{blue}{\left(\sqrt{\frac{\frac{1}{x}}{y}} \cdot \frac{1}{z}\right)} \cdot \frac{\sqrt{\frac{\frac{1}{x}}{y}}}{z} \]
      8. div-inv38.3%

        \[\leadsto \left(\sqrt{\frac{\frac{1}{x}}{y}} \cdot \frac{1}{z}\right) \cdot \color{blue}{\left(\sqrt{\frac{\frac{1}{x}}{y}} \cdot \frac{1}{z}\right)} \]
      9. swap-sqr29.8%

        \[\leadsto \color{blue}{\left(\sqrt{\frac{\frac{1}{x}}{y}} \cdot \sqrt{\frac{\frac{1}{x}}{y}}\right) \cdot \left(\frac{1}{z} \cdot \frac{1}{z}\right)} \]
      10. add-sqr-sqrt72.7%

        \[\leadsto \color{blue}{\frac{\frac{1}{x}}{y}} \cdot \left(\frac{1}{z} \cdot \frac{1}{z}\right) \]
      11. associate-/l/72.7%

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

      \[\leadsto \color{blue}{\frac{1}{y \cdot x} \cdot \left(\frac{1}{z} \cdot \frac{1}{z}\right)} \]
    10. Step-by-step derivation
      1. un-div-inv72.7%

        \[\leadsto \frac{1}{y \cdot x} \cdot \color{blue}{\frac{\frac{1}{z}}{z}} \]
      2. frac-times89.5%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{z}}{\left(y \cdot x\right) \cdot z}} \]
      3. *-un-lft-identity89.5%

        \[\leadsto \frac{\color{blue}{\frac{1}{z}}}{\left(y \cdot x\right) \cdot z} \]
      4. *-commutative89.5%

        \[\leadsto \frac{\frac{1}{z}}{\color{blue}{\left(x \cdot y\right)} \cdot z} \]
    11. Applied egg-rr89.5%

      \[\leadsto \color{blue}{\frac{\frac{1}{z}}{\left(x \cdot y\right) \cdot z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification93.7%

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

Alternative 10: 91.6% accurate, 0.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) \\ [x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\ \\ y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z \cdot z \leq 1:\\ \;\;\;\;\frac{\frac{1}{y\_m}}{x\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{y\_m \cdot \left(x\_m \cdot \left(z \cdot z\right)\right)}\\ \end{array}\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
(FPCore (y_s x_s x_m y_m z)
 :precision binary64
 (*
  y_s
  (*
   x_s
   (if (<= (* z z) 1.0) (/ (/ 1.0 y_m) x_m) (/ 1.0 (* y_m (* x_m (* z z))))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
	double tmp;
	if ((z * z) <= 1.0) {
		tmp = (1.0 / y_m) / x_m;
	} else {
		tmp = 1.0 / (y_m * (x_m * (z * z)));
	}
	return 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)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
    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
    real(8) :: tmp
    if ((z * z) <= 1.0d0) then
        tmp = (1.0d0 / y_m) / x_m
    else
        tmp = 1.0d0 / (y_m * (x_m * (z * z)))
    end if
    code = 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);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
	double tmp;
	if ((z * z) <= 1.0) {
		tmp = (1.0 / y_m) / x_m;
	} else {
		tmp = 1.0 / (y_m * (x_m * (z * z)));
	}
	return 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)
[x_m, y_m, z] = sort([x_m, y_m, z])
def code(y_s, x_s, x_m, y_m, z):
	tmp = 0
	if (z * z) <= 1.0:
		tmp = (1.0 / y_m) / x_m
	else:
		tmp = 1.0 / (y_m * (x_m * (z * z)))
	return 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)
x_m, y_m, z = sort([x_m, y_m, z])
function code(y_s, x_s, x_m, y_m, z)
	tmp = 0.0
	if (Float64(z * z) <= 1.0)
		tmp = Float64(Float64(1.0 / y_m) / x_m);
	else
		tmp = Float64(1.0 / Float64(y_m * Float64(x_m * Float64(z * z))));
	end
	return 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);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp_2 = code(y_s, x_s, x_m, y_m, z)
	tmp = 0.0;
	if ((z * z) <= 1.0)
		tmp = (1.0 / y_m) / x_m;
	else
		tmp = 1.0 / (y_m * (x_m * (z * z)));
	end
	tmp_2 = 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]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * If[LessEqual[N[(z * z), $MachinePrecision], 1.0], N[(N[(1.0 / y$95$m), $MachinePrecision] / x$95$m), $MachinePrecision], N[(1.0 / N[(y$95$m * N[(x$95$m * N[(z * z), $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)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \cdot z \leq 1:\\
\;\;\;\;\frac{\frac{1}{y\_m}}{x\_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{y\_m \cdot \left(x\_m \cdot \left(z \cdot z\right)\right)}\\


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

    1. Initial program 99.8%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. associate-/l/99.5%

        \[\leadsto \color{blue}{\frac{1}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x}} \]
      2. remove-double-neg99.5%

        \[\leadsto \frac{1}{\color{blue}{-\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      3. distribute-rgt-neg-out99.5%

        \[\leadsto \frac{1}{-\color{blue}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot \left(-x\right)}} \]
      4. distribute-rgt-neg-out99.5%

        \[\leadsto \frac{1}{-\color{blue}{\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      5. remove-double-neg99.5%

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

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

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(x \cdot \left(1 + z \cdot z\right)\right)}} \]
      8. sqr-neg99.5%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(1 + \color{blue}{\left(-z\right) \cdot \left(-z\right)}\right)\right)} \]
      9. +-commutative99.5%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(\left(-z\right) \cdot \left(-z\right) + 1\right)}\right)} \]
      10. sqr-neg99.5%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(\color{blue}{z \cdot z} + 1\right)\right)} \]
      11. fma-define99.5%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}\right)} \]
    3. Simplified99.5%

      \[\leadsto \color{blue}{\frac{1}{y \cdot \left(x \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative99.5%

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\mathsf{fma}\left(z, z, 1\right) \cdot x\right)}} \]
      2. associate-*r*99.5%

        \[\leadsto \frac{1}{\color{blue}{\left(y \cdot \mathsf{fma}\left(z, z, 1\right)\right) \cdot x}} \]
      3. fma-undefine99.5%

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

        \[\leadsto \frac{1}{\left(y \cdot \color{blue}{\left(1 + z \cdot z\right)}\right) \cdot x} \]
      5. associate-/l/99.8%

        \[\leadsto \color{blue}{\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}} \]
      6. add-sqr-sqrt56.4%

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}}}{y \cdot \left(1 + z \cdot z\right)} \]
      7. add-sqr-sqrt29.4%

        \[\leadsto \frac{\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}}{\color{blue}{\sqrt{y \cdot \left(1 + z \cdot z\right)} \cdot \sqrt{y \cdot \left(1 + z \cdot z\right)}}} \]
      8. times-frac29.3%

        \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{x}}}{\sqrt{y \cdot \left(1 + z \cdot z\right)}} \cdot \frac{\sqrt{\frac{1}{x}}}{\sqrt{y \cdot \left(1 + z \cdot z\right)}}} \]
    6. Applied egg-rr29.3%

      \[\leadsto \color{blue}{\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}} \cdot \frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}} \]
    7. Step-by-step derivation
      1. unpow229.3%

        \[\leadsto \color{blue}{{\left(\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
    8. Simplified29.3%

      \[\leadsto \color{blue}{{\left(\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
    9. Step-by-step derivation
      1. div-inv29.4%

        \[\leadsto {\color{blue}{\left({x}^{-0.5} \cdot \frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}}^{2} \]
      2. unpow-prod-down29.3%

        \[\leadsto \color{blue}{{\left({x}^{-0.5}\right)}^{2} \cdot {\left(\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
      3. pow229.3%

        \[\leadsto \color{blue}{\left({x}^{-0.5} \cdot {x}^{-0.5}\right)} \cdot {\left(\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2} \]
      4. metadata-eval29.3%

        \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot {\left(\frac{\color{blue}{\sqrt{1}}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2} \]
      5. *-commutative29.3%

        \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot {\left(\frac{\sqrt{1}}{\color{blue}{\sqrt{y} \cdot \mathsf{hypot}\left(1, z\right)}}\right)}^{2} \]
      6. hypot-1-def29.3%

        \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot {\left(\frac{\sqrt{1}}{\sqrt{y} \cdot \color{blue}{\sqrt{1 + z \cdot z}}}\right)}^{2} \]
      7. sqrt-prod29.3%

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

        \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot {\left(\frac{\sqrt{1}}{\sqrt{y \cdot \color{blue}{\left(z \cdot z + 1\right)}}}\right)}^{2} \]
      9. fma-undefine29.3%

        \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot {\left(\frac{\sqrt{1}}{\sqrt{y \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}}}\right)}^{2} \]
      10. sqrt-div29.4%

        \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot {\color{blue}{\left(\sqrt{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}}\right)}}^{2} \]
      11. pow229.4%

        \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot \color{blue}{\left(\sqrt{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}} \cdot \sqrt{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}}\right)} \]
      12. add-sqr-sqrt56.3%

        \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot \color{blue}{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}} \]
      13. pow-prod-up99.6%

        \[\leadsto \color{blue}{{x}^{\left(-0.5 + -0.5\right)}} \cdot \frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)} \]
      14. metadata-eval99.6%

        \[\leadsto {x}^{\color{blue}{-1}} \cdot \frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)} \]
      15. inv-pow99.6%

        \[\leadsto \color{blue}{\frac{1}{x}} \cdot \frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)} \]
      16. *-commutative99.6%

        \[\leadsto \color{blue}{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)} \cdot \frac{1}{x}} \]
      17. un-div-inv99.7%

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

      \[\leadsto \color{blue}{\frac{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}}{x}} \]
    11. Taylor expanded in z around 0 98.7%

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

    if 1 < (*.f64 z z)

    1. Initial program 80.5%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. associate-/l/80.4%

        \[\leadsto \color{blue}{\frac{1}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x}} \]
      2. remove-double-neg80.4%

        \[\leadsto \frac{1}{\color{blue}{-\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      3. distribute-rgt-neg-out80.4%

        \[\leadsto \frac{1}{-\color{blue}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot \left(-x\right)}} \]
      4. distribute-rgt-neg-out80.4%

        \[\leadsto \frac{1}{-\color{blue}{\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
      5. remove-double-neg80.4%

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

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

        \[\leadsto \frac{1}{y \cdot \color{blue}{\left(x \cdot \left(1 + z \cdot z\right)\right)}} \]
      8. sqr-neg80.5%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(1 + \color{blue}{\left(-z\right) \cdot \left(-z\right)}\right)\right)} \]
      9. +-commutative80.5%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(\left(-z\right) \cdot \left(-z\right) + 1\right)}\right)} \]
      10. sqr-neg80.5%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(\color{blue}{z \cdot z} + 1\right)\right)} \]
      11. fma-define80.5%

        \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}\right)} \]
    3. Simplified80.5%

      \[\leadsto \color{blue}{\frac{1}{y \cdot \left(x \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 79.7%

      \[\leadsto \frac{1}{\color{blue}{x \cdot \left(y \cdot {z}^{2}\right)}} \]
    6. Step-by-step derivation
      1. *-commutative79.7%

        \[\leadsto \frac{1}{x \cdot \color{blue}{\left({z}^{2} \cdot y\right)}} \]
      2. associate-*r*79.7%

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

        \[\leadsto \frac{1}{\color{blue}{y \cdot \left(x \cdot {z}^{2}\right)}} \]
    7. Simplified79.7%

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

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

      \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(z \cdot z\right)}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 11: 58.0% accurate, 2.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) \\ [x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\ \\ y\_s \cdot \left(x\_s \cdot \frac{\frac{1}{y\_m}}{x\_m}\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
(FPCore (y_s x_s x_m y_m z)
 :precision binary64
 (* y_s (* x_s (/ (/ 1.0 y_m) x_m))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
	return y_s * (x_s * ((1.0 / y_m) / x_m));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
    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
    code = y_s * (x_s * ((1.0d0 / 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);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
	return y_s * (x_s * ((1.0 / 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)
[x_m, y_m, z] = sort([x_m, y_m, z])
def code(y_s, x_s, x_m, y_m, z):
	return y_s * (x_s * ((1.0 / y_m) / x_m))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
x_m, y_m, z = sort([x_m, y_m, z])
function code(y_s, x_s, x_m, y_m, z)
	return Float64(y_s * Float64(x_s * Float64(Float64(1.0 / 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);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp = code(y_s, x_s, x_m, y_m, z)
	tmp = y_s * (x_s * ((1.0 / 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]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * N[(N[(1.0 / y$95$m), $MachinePrecision] / x$95$m), $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)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \frac{\frac{1}{y\_m}}{x\_m}\right)
\end{array}
Derivation
  1. Initial program 89.4%

    \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
  2. Step-by-step derivation
    1. associate-/l/89.2%

      \[\leadsto \color{blue}{\frac{1}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x}} \]
    2. remove-double-neg89.2%

      \[\leadsto \frac{1}{\color{blue}{-\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
    3. distribute-rgt-neg-out89.2%

      \[\leadsto \frac{1}{-\color{blue}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot \left(-x\right)}} \]
    4. distribute-rgt-neg-out89.2%

      \[\leadsto \frac{1}{-\color{blue}{\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
    5. remove-double-neg89.2%

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

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

      \[\leadsto \frac{1}{y \cdot \color{blue}{\left(x \cdot \left(1 + z \cdot z\right)\right)}} \]
    8. sqr-neg89.2%

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

      \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(\left(-z\right) \cdot \left(-z\right) + 1\right)}\right)} \]
    10. sqr-neg89.2%

      \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(\color{blue}{z \cdot z} + 1\right)\right)} \]
    11. fma-define89.2%

      \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}\right)} \]
  3. Simplified89.2%

    \[\leadsto \color{blue}{\frac{1}{y \cdot \left(x \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. *-commutative89.2%

      \[\leadsto \frac{1}{y \cdot \color{blue}{\left(\mathsf{fma}\left(z, z, 1\right) \cdot x\right)}} \]
    2. associate-*r*89.2%

      \[\leadsto \frac{1}{\color{blue}{\left(y \cdot \mathsf{fma}\left(z, z, 1\right)\right) \cdot x}} \]
    3. fma-undefine89.2%

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

      \[\leadsto \frac{1}{\left(y \cdot \color{blue}{\left(1 + z \cdot z\right)}\right) \cdot x} \]
    5. associate-/l/89.4%

      \[\leadsto \color{blue}{\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}} \]
    6. add-sqr-sqrt48.4%

      \[\leadsto \frac{\color{blue}{\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}}}{y \cdot \left(1 + z \cdot z\right)} \]
    7. add-sqr-sqrt25.3%

      \[\leadsto \frac{\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}}{\color{blue}{\sqrt{y \cdot \left(1 + z \cdot z\right)} \cdot \sqrt{y \cdot \left(1 + z \cdot z\right)}}} \]
    8. times-frac25.3%

      \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{x}}}{\sqrt{y \cdot \left(1 + z \cdot z\right)}} \cdot \frac{\sqrt{\frac{1}{x}}}{\sqrt{y \cdot \left(1 + z \cdot z\right)}}} \]
  6. Applied egg-rr27.5%

    \[\leadsto \color{blue}{\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}} \cdot \frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}} \]
  7. Step-by-step derivation
    1. unpow227.5%

      \[\leadsto \color{blue}{{\left(\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
  8. Simplified27.5%

    \[\leadsto \color{blue}{{\left(\frac{{x}^{-0.5}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
  9. Step-by-step derivation
    1. div-inv27.5%

      \[\leadsto {\color{blue}{\left({x}^{-0.5} \cdot \frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}}^{2} \]
    2. unpow-prod-down25.7%

      \[\leadsto \color{blue}{{\left({x}^{-0.5}\right)}^{2} \cdot {\left(\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2}} \]
    3. pow225.7%

      \[\leadsto \color{blue}{\left({x}^{-0.5} \cdot {x}^{-0.5}\right)} \cdot {\left(\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2} \]
    4. metadata-eval25.7%

      \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot {\left(\frac{\color{blue}{\sqrt{1}}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}\right)}^{2} \]
    5. *-commutative25.7%

      \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot {\left(\frac{\sqrt{1}}{\color{blue}{\sqrt{y} \cdot \mathsf{hypot}\left(1, z\right)}}\right)}^{2} \]
    6. hypot-1-def25.3%

      \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot {\left(\frac{\sqrt{1}}{\sqrt{y} \cdot \color{blue}{\sqrt{1 + z \cdot z}}}\right)}^{2} \]
    7. sqrt-prod25.3%

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

      \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot {\left(\frac{\sqrt{1}}{\sqrt{y \cdot \color{blue}{\left(z \cdot z + 1\right)}}}\right)}^{2} \]
    9. fma-undefine25.3%

      \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot {\left(\frac{\sqrt{1}}{\sqrt{y \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}}}\right)}^{2} \]
    10. sqrt-div32.0%

      \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot {\color{blue}{\left(\sqrt{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}}\right)}}^{2} \]
    11. pow232.0%

      \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot \color{blue}{\left(\sqrt{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}} \cdot \sqrt{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}}\right)} \]
    12. add-sqr-sqrt48.4%

      \[\leadsto \left({x}^{-0.5} \cdot {x}^{-0.5}\right) \cdot \color{blue}{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}} \]
    13. pow-prod-up89.3%

      \[\leadsto \color{blue}{{x}^{\left(-0.5 + -0.5\right)}} \cdot \frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)} \]
    14. metadata-eval89.3%

      \[\leadsto {x}^{\color{blue}{-1}} \cdot \frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)} \]
    15. inv-pow89.3%

      \[\leadsto \color{blue}{\frac{1}{x}} \cdot \frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)} \]
    16. *-commutative89.3%

      \[\leadsto \color{blue}{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)} \cdot \frac{1}{x}} \]
    17. un-div-inv89.3%

      \[\leadsto \color{blue}{\frac{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}}{x}} \]
  10. Applied egg-rr89.3%

    \[\leadsto \color{blue}{\frac{\frac{1}{y \cdot \mathsf{fma}\left(z, z, 1\right)}}{x}} \]
  11. Taylor expanded in z around 0 56.5%

    \[\leadsto \frac{\color{blue}{\frac{1}{y}}}{x} \]
  12. Add Preprocessing

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

    \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
  2. Step-by-step derivation
    1. associate-/l/89.2%

      \[\leadsto \color{blue}{\frac{1}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x}} \]
    2. remove-double-neg89.2%

      \[\leadsto \frac{1}{\color{blue}{-\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
    3. distribute-rgt-neg-out89.2%

      \[\leadsto \frac{1}{-\color{blue}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot \left(-x\right)}} \]
    4. distribute-rgt-neg-out89.2%

      \[\leadsto \frac{1}{-\color{blue}{\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
    5. remove-double-neg89.2%

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

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

      \[\leadsto \frac{1}{y \cdot \color{blue}{\left(x \cdot \left(1 + z \cdot z\right)\right)}} \]
    8. sqr-neg89.2%

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

      \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(\left(-z\right) \cdot \left(-z\right) + 1\right)}\right)} \]
    10. sqr-neg89.2%

      \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(\color{blue}{z \cdot z} + 1\right)\right)} \]
    11. fma-define89.2%

      \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}\right)} \]
  3. Simplified89.2%

    \[\leadsto \color{blue}{\frac{1}{y \cdot \left(x \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
  4. Add Preprocessing
  5. Taylor expanded in z around 0 56.4%

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

      \[\leadsto \color{blue}{\frac{\frac{1}{x}}{y}} \]
  7. Simplified56.6%

    \[\leadsto \color{blue}{\frac{\frac{1}{x}}{y}} \]
  8. Add Preprocessing

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

    \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
  2. Step-by-step derivation
    1. associate-/l/89.2%

      \[\leadsto \color{blue}{\frac{1}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x}} \]
    2. remove-double-neg89.2%

      \[\leadsto \frac{1}{\color{blue}{-\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
    3. distribute-rgt-neg-out89.2%

      \[\leadsto \frac{1}{-\color{blue}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot \left(-x\right)}} \]
    4. distribute-rgt-neg-out89.2%

      \[\leadsto \frac{1}{-\color{blue}{\left(-\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x\right)}} \]
    5. remove-double-neg89.2%

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

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

      \[\leadsto \frac{1}{y \cdot \color{blue}{\left(x \cdot \left(1 + z \cdot z\right)\right)}} \]
    8. sqr-neg89.2%

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

      \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\left(\left(-z\right) \cdot \left(-z\right) + 1\right)}\right)} \]
    10. sqr-neg89.2%

      \[\leadsto \frac{1}{y \cdot \left(x \cdot \left(\color{blue}{z \cdot z} + 1\right)\right)} \]
    11. fma-define89.2%

      \[\leadsto \frac{1}{y \cdot \left(x \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}\right)} \]
  3. Simplified89.2%

    \[\leadsto \color{blue}{\frac{1}{y \cdot \left(x \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
  4. Add Preprocessing
  5. Taylor expanded in z around 0 56.4%

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

    \[\leadsto \frac{1}{x \cdot y} \]
  7. Add Preprocessing

Developer Target 1: 92.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 1 + z \cdot z\\ t_1 := y \cdot t\_0\\ t_2 := \frac{\frac{1}{y}}{t\_0 \cdot x}\\ \mathbf{if}\;t\_1 < -\infty:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 < 8.680743250567252 \cdot 10^{+305}:\\ \;\;\;\;\frac{\frac{1}{x}}{t\_0 \cdot y}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (+ 1.0 (* z z))) (t_1 (* y t_0)) (t_2 (/ (/ 1.0 y) (* t_0 x))))
   (if (< t_1 (- INFINITY))
     t_2
     (if (< t_1 8.680743250567252e+305) (/ (/ 1.0 x) (* t_0 y)) t_2))))
double code(double x, double y, double z) {
	double t_0 = 1.0 + (z * z);
	double t_1 = y * t_0;
	double t_2 = (1.0 / y) / (t_0 * x);
	double tmp;
	if (t_1 < -((double) INFINITY)) {
		tmp = t_2;
	} else if (t_1 < 8.680743250567252e+305) {
		tmp = (1.0 / x) / (t_0 * y);
	} else {
		tmp = t_2;
	}
	return tmp;
}
public static double code(double x, double y, double z) {
	double t_0 = 1.0 + (z * z);
	double t_1 = y * t_0;
	double t_2 = (1.0 / y) / (t_0 * x);
	double tmp;
	if (t_1 < -Double.POSITIVE_INFINITY) {
		tmp = t_2;
	} else if (t_1 < 8.680743250567252e+305) {
		tmp = (1.0 / x) / (t_0 * y);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = 1.0 + (z * z)
	t_1 = y * t_0
	t_2 = (1.0 / y) / (t_0 * x)
	tmp = 0
	if t_1 < -math.inf:
		tmp = t_2
	elif t_1 < 8.680743250567252e+305:
		tmp = (1.0 / x) / (t_0 * y)
	else:
		tmp = t_2
	return tmp
function code(x, y, z)
	t_0 = Float64(1.0 + Float64(z * z))
	t_1 = Float64(y * t_0)
	t_2 = Float64(Float64(1.0 / y) / Float64(t_0 * x))
	tmp = 0.0
	if (t_1 < Float64(-Inf))
		tmp = t_2;
	elseif (t_1 < 8.680743250567252e+305)
		tmp = Float64(Float64(1.0 / x) / Float64(t_0 * y));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = 1.0 + (z * z);
	t_1 = y * t_0;
	t_2 = (1.0 / y) / (t_0 * x);
	tmp = 0.0;
	if (t_1 < -Inf)
		tmp = t_2;
	elseif (t_1 < 8.680743250567252e+305)
		tmp = (1.0 / x) / (t_0 * y);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(1.0 + N[(z * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(1.0 / y), $MachinePrecision] / N[(t$95$0 * x), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$1, (-Infinity)], t$95$2, If[Less[t$95$1, 8.680743250567252e+305], N[(N[(1.0 / x), $MachinePrecision] / N[(t$95$0 * y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 1 + z \cdot z\\
t_1 := y \cdot t\_0\\
t_2 := \frac{\frac{1}{y}}{t\_0 \cdot x}\\
\mathbf{if}\;t\_1 < -\infty:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 < 8.680743250567252 \cdot 10^{+305}:\\
\;\;\;\;\frac{\frac{1}{x}}{t\_0 \cdot y}\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024154 
(FPCore (x y z)
  :name "Statistics.Distribution.CauchyLorentz:$cdensity from math-functions-0.1.5.2"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< (* y (+ 1 (* z z))) -inf.0) (/ (/ 1 y) (* (+ 1 (* z z)) x)) (if (< (* y (+ 1 (* z z))) 868074325056725200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (/ 1 x) (* (+ 1 (* z z)) y)) (/ (/ 1 y) (* (+ 1 (* z z)) x)))))

  (/ (/ 1.0 x) (* y (+ 1.0 (* z z)))))