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

Percentage Accurate: 88.4% → 99.6%
Time: 11.9s
Alternatives: 14
Speedup: 0.5×

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 14 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.4% 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.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{y\_m}\\ y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z \cdot z \leq 2 \cdot 10^{+293}:\\ \;\;\;\;\frac{\frac{1}{y\_m}}{x\_m \cdot \mathsf{fma}\left(z, z, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{x\_m \cdot 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 y_m))))
   (*
    y_s
    (*
     x_s
     (if (<= (* z z) 2e+293)
       (/ (/ 1.0 y_m) (* x_m (fma z z 1.0)))
       (/ (/ 1.0 (* x_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(y_m);
	double tmp;
	if ((z * z) <= 2e+293) {
		tmp = (1.0 / y_m) / (x_m * fma(z, z, 1.0));
	} else {
		tmp = (1.0 / (x_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(y_m))
	tmp = 0.0
	if (Float64(z * z) <= 2e+293)
		tmp = Float64(Float64(1.0 / y_m) / Float64(x_m * fma(z, z, 1.0)));
	else
		tmp = Float64(Float64(1.0 / Float64(x_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[y$95$m], $MachinePrecision]), $MachinePrecision]}, N[(y$95$s * N[(x$95$s * If[LessEqual[N[(z * z), $MachinePrecision], 2e+293], N[(N[(1.0 / y$95$m), $MachinePrecision] / N[(x$95$m * N[(z * z + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(x$95$m * t$95$0), $MachinePrecision]), $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{y\_m}\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \cdot z \leq 2 \cdot 10^{+293}:\\
\;\;\;\;\frac{\frac{1}{y\_m}}{x\_m \cdot \mathsf{fma}\left(z, z, 1\right)}\\

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


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

    1. Initial program 98.1%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. remove-double-neg98.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\sqrt{y \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}}} \cdot \frac{\frac{1}{x}}{\sqrt{y \cdot \left(1 + z \cdot z\right)}} \]
      12. *-commutative47.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{\frac{1}{y}}{x}}}{1 + {z}^{2}} \]
      5. associate-/l/95.8%

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

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

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

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

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

    if 1.9999999999999998e293 < (*.f64 z z)

    1. Initial program 75.1%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. remove-double-neg75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 \cdot \color{blue}{\frac{\frac{1}{{z}^{2}}}{x \cdot y}} \]
      3. pow-flip75.7%

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

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

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

      \[\leadsto \color{blue}{1 \cdot \frac{{z}^{-2}}{y \cdot x}} \]
    8. Step-by-step derivation
      1. *-lft-identity75.7%

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

        \[\leadsto \frac{{z}^{-2}}{\color{blue}{x \cdot y}} \]
    9. Simplified75.7%

      \[\leadsto \color{blue}{\frac{{z}^{-2}}{x \cdot y}} \]
    10. Step-by-step derivation
      1. div-inv75.7%

        \[\leadsto \color{blue}{{z}^{-2} \cdot \frac{1}{x \cdot y}} \]
      2. metadata-eval75.7%

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

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

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

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

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

        \[\leadsto \frac{1 \cdot \frac{1}{x}}{\color{blue}{\sqrt{y \cdot {z}^{2}} \cdot \sqrt{y \cdot {z}^{2}}}} \]
      8. times-frac40.8%

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

        \[\leadsto \frac{1}{\sqrt{\color{blue}{{z}^{2} \cdot y}}} \cdot \frac{\frac{1}{x}}{\sqrt{y \cdot {z}^{2}}} \]
      10. sqrt-prod40.8%

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

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

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

        \[\leadsto \frac{1}{\color{blue}{z} \cdot \sqrt{y}} \cdot \frac{\frac{1}{x}}{\sqrt{y \cdot {z}^{2}}} \]
      14. *-commutative40.8%

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

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

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

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

        \[\leadsto \frac{1}{z \cdot \sqrt{y}} \cdot \frac{\frac{1}{x}}{\color{blue}{z} \cdot \sqrt{y}} \]
    11. Applied egg-rr51.2%

      \[\leadsto \color{blue}{\frac{1}{z \cdot \sqrt{y}} \cdot \frac{\frac{1}{x}}{z \cdot \sqrt{y}}} \]
    12. Step-by-step derivation
      1. associate-*l/51.2%

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

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

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

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

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

Alternative 2: 99.4% 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])\\ \\ \begin{array}{l} t_0 := \mathsf{hypot}\left(1, z\right) \cdot \sqrt{y\_m}\\ y\_s \cdot \left(x\_s \cdot \frac{\frac{1}{t\_0}}{t\_0 \cdot x\_m}\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 (* (hypot 1.0 z) (sqrt y_m))))
   (* y_s (* x_s (/ (/ 1.0 t_0) (* t_0 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 t_0 = hypot(1.0, z) * sqrt(y_m);
	return y_s * (x_s * ((1.0 / t_0) / (t_0 * x_m)));
}
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 t_0 = Math.hypot(1.0, z) * Math.sqrt(y_m);
	return y_s * (x_s * ((1.0 / t_0) / (t_0 * 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):
	t_0 = math.hypot(1.0, z) * math.sqrt(y_m)
	return y_s * (x_s * ((1.0 / t_0) / (t_0 * 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)
	t_0 = Float64(hypot(1.0, z) * sqrt(y_m))
	return Float64(y_s * Float64(x_s * Float64(Float64(1.0 / t_0) / Float64(t_0 * 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)
	t_0 = hypot(1.0, z) * sqrt(y_m);
	tmp = y_s * (x_s * ((1.0 / t_0) / (t_0 * 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_] := Block[{t$95$0 = N[(N[Sqrt[1.0 ^ 2 + z ^ 2], $MachinePrecision] * N[Sqrt[y$95$m], $MachinePrecision]), $MachinePrecision]}, N[(y$95$s * N[(x$95$s * N[(N[(1.0 / t$95$0), $MachinePrecision] / N[(t$95$0 * 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])\\
\\
\begin{array}{l}
t_0 := \mathsf{hypot}\left(1, z\right) \cdot \sqrt{y\_m}\\
y\_s \cdot \left(x\_s \cdot \frac{\frac{1}{t\_0}}{t\_0 \cdot x\_m}\right)
\end{array}
\end{array}
Derivation
  1. Initial program 91.5%

    \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
  2. Step-by-step derivation
    1. remove-double-neg91.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}} \cdot \frac{\frac{1}{x}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}} \]
  7. Step-by-step derivation
    1. associate-/l/48.5%

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

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

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

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

    \[\leadsto \color{blue}{\frac{\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}}{x \cdot \left(\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}\right)}} \]
  9. Final simplification48.5%

    \[\leadsto \frac{\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}}}{\left(\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}\right) \cdot x} \]
  10. Add Preprocessing

Alternative 3: 98.7% 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 \frac{\frac{\frac{1}{x\_m}}{\mathsf{hypot}\left(1, z\right)} \cdot \frac{1}{\mathsf{hypot}\left(1, z\right)}}{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) (hypot 1.0 z)) (/ 1.0 (hypot 1.0 z))) 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) / hypot(1.0, z)) * (1.0 / hypot(1.0, z))) / y_m));
}
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) / Math.hypot(1.0, z)) * (1.0 / Math.hypot(1.0, z))) / 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) / math.hypot(1.0, z)) * (1.0 / math.hypot(1.0, z))) / 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(Float64(Float64(1.0 / x_m) / hypot(1.0, z)) * Float64(1.0 / hypot(1.0, z))) / 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) / hypot(1.0, z)) * (1.0 / hypot(1.0, z))) / 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[(N[(N[(1.0 / x$95$m), $MachinePrecision] / N[Sqrt[1.0 ^ 2 + z ^ 2], $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[Sqrt[1.0 ^ 2 + z ^ 2], $MachinePrecision]), $MachinePrecision]), $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{\frac{1}{x\_m}}{\mathsf{hypot}\left(1, z\right)} \cdot \frac{1}{\mathsf{hypot}\left(1, z\right)}}{y\_m}\right)
\end{array}
Derivation
  1. Initial program 91.5%

    \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
  2. Step-by-step derivation
    1. remove-double-neg91.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{\frac{1}{x}}{\mathsf{hypot}\left(1, z\right)}}{\sqrt{y}}} \cdot \frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}} \]
    3. associate-/r*47.8%

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

      \[\leadsto \color{blue}{\frac{\frac{\frac{1}{x}}{\mathsf{hypot}\left(1, z\right)} \cdot \frac{1}{\mathsf{hypot}\left(1, z\right)}}{\sqrt{y} \cdot \sqrt{y}}} \]
    5. add-sqr-sqrt94.5%

      \[\leadsto \frac{\frac{\frac{1}{x}}{\mathsf{hypot}\left(1, z\right)} \cdot \frac{1}{\mathsf{hypot}\left(1, z\right)}}{\color{blue}{y}} \]
  8. Applied egg-rr94.5%

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

Alternative 4: 94.5% 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 5 \cdot 10^{+277}:\\ \;\;\;\;\frac{\frac{1}{y\_m}}{x\_m \cdot \mathsf{fma}\left(z, z, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{1}{x\_m}}{\mathsf{hypot}\left(1, z\right)} \cdot \frac{1}{z}}{y\_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) 5e+277)
     (/ (/ 1.0 y_m) (* x_m (fma z z 1.0)))
     (/ (* (/ (/ 1.0 x_m) (hypot 1.0 z)) (/ 1.0 z)) 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) <= 5e+277) {
		tmp = (1.0 / y_m) / (x_m * fma(z, z, 1.0));
	} else {
		tmp = (((1.0 / x_m) / hypot(1.0, z)) * (1.0 / z)) / 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) <= 5e+277)
		tmp = Float64(Float64(1.0 / y_m) / Float64(x_m * fma(z, z, 1.0)));
	else
		tmp = Float64(Float64(Float64(Float64(1.0 / x_m) / hypot(1.0, z)) * Float64(1.0 / z)) / y_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], 5e+277], N[(N[(1.0 / y$95$m), $MachinePrecision] / N[(x$95$m * N[(z * z + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(1.0 / x$95$m), $MachinePrecision] / N[Sqrt[1.0 ^ 2 + z ^ 2], $MachinePrecision]), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $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 \begin{array}{l}
\mathbf{if}\;z \cdot z \leq 5 \cdot 10^{+277}:\\
\;\;\;\;\frac{\frac{1}{y\_m}}{x\_m \cdot \mathsf{fma}\left(z, z, 1\right)}\\

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


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

    1. Initial program 98.6%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. remove-double-neg98.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\sqrt{y \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}}} \cdot \frac{\frac{1}{x}}{\sqrt{y \cdot \left(1 + z \cdot z\right)}} \]
      12. *-commutative47.7%

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

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

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

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

        \[\leadsto \frac{1}{\color{blue}{\mathsf{hypot}\left(1, z\right)} \cdot \sqrt{y}} \cdot \frac{\frac{1}{x}}{\sqrt{y \cdot \left(1 + z \cdot z\right)}} \]
      17. +-commutative47.7%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{\frac{1}{y}}{x}}}{1 + {z}^{2}} \]
      5. associate-/l/96.3%

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

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

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

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

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

    if 4.99999999999999982e277 < (*.f64 z z)

    1. Initial program 74.9%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. remove-double-neg74.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{\frac{1}{x}}{\mathsf{hypot}\left(1, z\right)}}{\sqrt{y}}} \cdot \frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}} \]
      3. associate-/r*49.3%

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

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

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

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

      \[\leadsto \frac{\frac{\frac{1}{x}}{\mathsf{hypot}\left(1, z\right)} \cdot \color{blue}{\frac{1}{z}}}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification91.9%

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

Alternative 5: 99.1% 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 5 \cdot 10^{+296}:\\ \;\;\;\;\frac{\frac{1}{y\_m}}{x\_m \cdot \mathsf{fma}\left(z, z, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{x\_m}}{z} \cdot \frac{\frac{1}{y\_m}}{z}\\ \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+296)
     (/ (/ 1.0 y_m) (* x_m (fma z z 1.0)))
     (* (/ (/ 1.0 x_m) z) (/ (/ 1.0 y_m) 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) <= 5e+296) {
		tmp = (1.0 / y_m) / (x_m * fma(z, z, 1.0));
	} else {
		tmp = ((1.0 / x_m) / z) * ((1.0 / y_m) / 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) <= 5e+296)
		tmp = Float64(Float64(1.0 / y_m) / Float64(x_m * fma(z, z, 1.0)));
	else
		tmp = Float64(Float64(Float64(1.0 / x_m) / z) * Float64(Float64(1.0 / y_m) / z));
	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+296], 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 / x$95$m), $MachinePrecision] / z), $MachinePrecision] * N[(N[(1.0 / y$95$m), $MachinePrecision] / z), $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 5 \cdot 10^{+296}:\\
\;\;\;\;\frac{\frac{1}{y\_m}}{x\_m \cdot \mathsf{fma}\left(z, z, 1\right)}\\

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


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

    1. Initial program 98.1%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. remove-double-neg98.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\sqrt{y \cdot \color{blue}{\mathsf{fma}\left(z, z, 1\right)}}} \cdot \frac{\frac{1}{x}}{\sqrt{y \cdot \left(1 + z \cdot z\right)}} \]
      12. *-commutative47.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{\frac{1}{y}}{x}}}{1 + {z}^{2}} \]
      5. associate-/l/95.4%

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

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

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

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

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

    if 5.0000000000000001e296 < (*.f64 z z)

    1. Initial program 74.5%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. remove-double-neg74.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 \cdot \color{blue}{\frac{\frac{1}{{z}^{2}}}{x \cdot y}} \]
      3. pow-flip75.1%

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

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

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

      \[\leadsto \color{blue}{1 \cdot \frac{{z}^{-2}}{y \cdot x}} \]
    8. Step-by-step derivation
      1. *-lft-identity75.1%

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

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

      \[\leadsto \color{blue}{\frac{{z}^{-2}}{x \cdot y}} \]
    10. Step-by-step derivation
      1. div-inv75.1%

        \[\leadsto \color{blue}{{z}^{-2} \cdot \frac{1}{x \cdot y}} \]
      2. metadata-eval75.1%

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{x}}{{z}^{2} \cdot y}} \]
      6. *-un-lft-identity74.5%

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

        \[\leadsto \color{blue}{\frac{\frac{\frac{1}{x}}{y}}{{z}^{2}}} \]
      8. div-inv74.0%

        \[\leadsto \frac{\color{blue}{\frac{1}{x} \cdot \frac{1}{y}}}{{z}^{2}} \]
      9. unpow274.0%

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

        \[\leadsto \color{blue}{\frac{\frac{1}{x}}{z} \cdot \frac{\frac{1}{y}}{z}} \]
    11. Applied egg-rr98.5%

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

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

Alternative 6: 96.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 5 \cdot 10^{+296}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(z, z, 1\right) \cdot \left(y\_m \cdot x\_m\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{x\_m}}{z} \cdot \frac{\frac{1}{y\_m}}{z}\\ \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+296)
     (/ 1.0 (* (fma z z 1.0) (* y_m x_m)))
     (* (/ (/ 1.0 x_m) z) (/ (/ 1.0 y_m) 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) <= 5e+296) {
		tmp = 1.0 / (fma(z, z, 1.0) * (y_m * x_m));
	} else {
		tmp = ((1.0 / x_m) / z) * ((1.0 / y_m) / 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) <= 5e+296)
		tmp = Float64(1.0 / Float64(fma(z, z, 1.0) * Float64(y_m * x_m)));
	else
		tmp = Float64(Float64(Float64(1.0 / x_m) / z) * Float64(Float64(1.0 / y_m) / z));
	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+296], N[(1.0 / N[(N[(z * z + 1.0), $MachinePrecision] * N[(y$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / x$95$m), $MachinePrecision] / z), $MachinePrecision] * N[(N[(1.0 / y$95$m), $MachinePrecision] / z), $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 5 \cdot 10^{+296}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(z, z, 1\right) \cdot \left(y\_m \cdot x\_m\right)}\\

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


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

    1. Initial program 98.1%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. remove-double-neg98.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000001e296 < (*.f64 z z)

    1. Initial program 74.5%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. remove-double-neg74.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 \cdot \color{blue}{\frac{\frac{1}{{z}^{2}}}{x \cdot y}} \]
      3. pow-flip75.1%

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

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

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

      \[\leadsto \color{blue}{1 \cdot \frac{{z}^{-2}}{y \cdot x}} \]
    8. Step-by-step derivation
      1. *-lft-identity75.1%

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

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

      \[\leadsto \color{blue}{\frac{{z}^{-2}}{x \cdot y}} \]
    10. Step-by-step derivation
      1. div-inv75.1%

        \[\leadsto \color{blue}{{z}^{-2} \cdot \frac{1}{x \cdot y}} \]
      2. metadata-eval75.1%

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{x}}{{z}^{2} \cdot y}} \]
      6. *-un-lft-identity74.5%

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

        \[\leadsto \color{blue}{\frac{\frac{\frac{1}{x}}{y}}{{z}^{2}}} \]
      8. div-inv74.0%

        \[\leadsto \frac{\color{blue}{\frac{1}{x} \cdot \frac{1}{y}}}{{z}^{2}} \]
      9. unpow274.0%

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

        \[\leadsto \color{blue}{\frac{\frac{1}{x}}{z} \cdot \frac{\frac{1}{y}}{z}} \]
    11. Applied egg-rr98.5%

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

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

Alternative 7: 92.1% 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 \leq 4.2 \cdot 10^{+26}:\\ \;\;\;\;\frac{\frac{1}{x\_m}}{y\_m \cdot \left(1 + z \cdot z\right)}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+178}:\\ \;\;\;\;\frac{1}{z} \cdot \frac{\frac{1}{y\_m \cdot x\_m}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{z} \cdot \frac{1}{x\_m \cdot \left(z \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 4.2e+26)
     (/ (/ 1.0 x_m) (* y_m (+ 1.0 (* z z))))
     (if (<= z 2.1e+178)
       (* (/ 1.0 z) (/ (/ 1.0 (* y_m x_m)) z))
       (* (/ 1.0 z) (/ 1.0 (* x_m (* z 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 <= 4.2e+26) {
		tmp = (1.0 / x_m) / (y_m * (1.0 + (z * z)));
	} else if (z <= 2.1e+178) {
		tmp = (1.0 / z) * ((1.0 / (y_m * x_m)) / z);
	} else {
		tmp = (1.0 / z) * (1.0 / (x_m * (z * 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 <= 4.2d+26) then
        tmp = (1.0d0 / x_m) / (y_m * (1.0d0 + (z * z)))
    else if (z <= 2.1d+178) then
        tmp = (1.0d0 / z) * ((1.0d0 / (y_m * x_m)) / z)
    else
        tmp = (1.0d0 / z) * (1.0d0 / (x_m * (z * 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 <= 4.2e+26) {
		tmp = (1.0 / x_m) / (y_m * (1.0 + (z * z)));
	} else if (z <= 2.1e+178) {
		tmp = (1.0 / z) * ((1.0 / (y_m * x_m)) / z);
	} else {
		tmp = (1.0 / z) * (1.0 / (x_m * (z * 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 <= 4.2e+26:
		tmp = (1.0 / x_m) / (y_m * (1.0 + (z * z)))
	elif z <= 2.1e+178:
		tmp = (1.0 / z) * ((1.0 / (y_m * x_m)) / z)
	else:
		tmp = (1.0 / z) * (1.0 / (x_m * (z * 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 (z <= 4.2e+26)
		tmp = Float64(Float64(1.0 / x_m) / Float64(y_m * Float64(1.0 + Float64(z * z))));
	elseif (z <= 2.1e+178)
		tmp = Float64(Float64(1.0 / z) * Float64(Float64(1.0 / Float64(y_m * x_m)) / z));
	else
		tmp = Float64(Float64(1.0 / z) * Float64(1.0 / Float64(x_m * Float64(z * 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 <= 4.2e+26)
		tmp = (1.0 / x_m) / (y_m * (1.0 + (z * z)));
	elseif (z <= 2.1e+178)
		tmp = (1.0 / z) * ((1.0 / (y_m * x_m)) / z);
	else
		tmp = (1.0 / z) * (1.0 / (x_m * (z * 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[z, 4.2e+26], N[(N[(1.0 / x$95$m), $MachinePrecision] / N[(y$95$m * N[(1.0 + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+178], N[(N[(1.0 / z), $MachinePrecision] * N[(N[(1.0 / N[(y$95$m * x$95$m), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / z), $MachinePrecision] * N[(1.0 / N[(x$95$m * N[(z * y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
[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 \leq 4.2 \cdot 10^{+26}:\\
\;\;\;\;\frac{\frac{1}{x\_m}}{y\_m \cdot \left(1 + z \cdot z\right)}\\

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

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


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

    1. Initial program 93.2%

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

    if 4.2000000000000002e26 < z < 2.0999999999999999e178

    1. Initial program 91.5%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. remove-double-neg91.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 \cdot \color{blue}{\frac{\frac{1}{{z}^{2}}}{x \cdot y}} \]
      3. pow-flip95.8%

        \[\leadsto 1 \cdot \frac{\color{blue}{{z}^{\left(-2\right)}}}{x \cdot y} \]
      4. metadata-eval95.8%

        \[\leadsto 1 \cdot \frac{{z}^{\color{blue}{-2}}}{x \cdot y} \]
      5. *-commutative95.8%

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

      \[\leadsto \color{blue}{1 \cdot \frac{{z}^{-2}}{y \cdot x}} \]
    8. Step-by-step derivation
      1. *-lft-identity95.8%

        \[\leadsto \color{blue}{\frac{{z}^{-2}}{y \cdot x}} \]
      2. *-commutative95.8%

        \[\leadsto \frac{{z}^{-2}}{\color{blue}{x \cdot y}} \]
    9. Simplified95.8%

      \[\leadsto \color{blue}{\frac{{z}^{-2}}{x \cdot y}} \]
    10. Step-by-step derivation
      1. div-inv95.8%

        \[\leadsto \color{blue}{{z}^{-2} \cdot \frac{1}{x \cdot y}} \]
      2. metadata-eval95.8%

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{x}}{{z}^{2} \cdot y}} \]
      6. *-un-lft-identity91.5%

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

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

        \[\leadsto \frac{\color{blue}{\frac{1}{x \cdot y}}}{{z}^{2}} \]
      9. *-un-lft-identity95.6%

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

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

        \[\leadsto \color{blue}{\frac{1}{z} \cdot \frac{\frac{1}{x \cdot y}}{z}} \]
      12. *-commutative99.9%

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

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

    if 2.0999999999999999e178 < z

    1. Initial program 82.7%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. remove-double-neg82.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 \cdot \color{blue}{\frac{\frac{1}{{z}^{2}}}{x \cdot y}} \]
      3. pow-flip82.2%

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

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

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

      \[\leadsto \color{blue}{1 \cdot \frac{{z}^{-2}}{y \cdot x}} \]
    8. Step-by-step derivation
      1. *-lft-identity82.2%

        \[\leadsto \color{blue}{\frac{{z}^{-2}}{y \cdot x}} \]
      2. *-commutative82.2%

        \[\leadsto \frac{{z}^{-2}}{\color{blue}{x \cdot y}} \]
    9. Simplified82.2%

      \[\leadsto \color{blue}{\frac{{z}^{-2}}{x \cdot y}} \]
    10. Step-by-step derivation
      1. div-inv82.2%

        \[\leadsto \color{blue}{{z}^{-2} \cdot \frac{1}{x \cdot y}} \]
      2. metadata-eval82.2%

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

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

        \[\leadsto \frac{1}{{z}^{2}} \cdot \color{blue}{\frac{\frac{1}{x}}{y}} \]
      5. times-frac82.7%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{x}}{{z}^{2} \cdot y}} \]
      6. *-un-lft-identity82.7%

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

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

        \[\leadsto \frac{\color{blue}{\frac{1}{x \cdot y}}}{{z}^{2}} \]
      9. *-un-lft-identity82.2%

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

        \[\leadsto \frac{1 \cdot \frac{1}{x \cdot y}}{\color{blue}{z \cdot z}} \]
      11. times-frac85.0%

        \[\leadsto \color{blue}{\frac{1}{z} \cdot \frac{\frac{1}{x \cdot y}}{z}} \]
      12. *-commutative85.0%

        \[\leadsto \frac{1}{z} \cdot \frac{\frac{1}{\color{blue}{y \cdot x}}}{z} \]
    11. Applied egg-rr85.0%

      \[\leadsto \color{blue}{\frac{1}{z} \cdot \frac{\frac{1}{y \cdot x}}{z}} \]
    12. Taylor expanded in y around 0 99.9%

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

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

Alternative 8: 76.7% 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 \leq 1:\\ \;\;\;\;\frac{\frac{1}{y\_m}}{x\_m}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{+178}:\\ \;\;\;\;\frac{\frac{1}{z}}{z \cdot \left(y\_m \cdot x\_m\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{z} \cdot \frac{1}{x\_m \cdot \left(z \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 1.0)
     (/ (/ 1.0 y_m) x_m)
     (if (<= z 1.7e+178)
       (/ (/ 1.0 z) (* z (* y_m x_m)))
       (* (/ 1.0 z) (/ 1.0 (* x_m (* z 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 <= 1.0) {
		tmp = (1.0 / y_m) / x_m;
	} else if (z <= 1.7e+178) {
		tmp = (1.0 / z) / (z * (y_m * x_m));
	} else {
		tmp = (1.0 / z) * (1.0 / (x_m * (z * 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 <= 1.0d0) then
        tmp = (1.0d0 / y_m) / x_m
    else if (z <= 1.7d+178) then
        tmp = (1.0d0 / z) / (z * (y_m * x_m))
    else
        tmp = (1.0d0 / z) * (1.0d0 / (x_m * (z * 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 <= 1.0) {
		tmp = (1.0 / y_m) / x_m;
	} else if (z <= 1.7e+178) {
		tmp = (1.0 / z) / (z * (y_m * x_m));
	} else {
		tmp = (1.0 / z) * (1.0 / (x_m * (z * 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 <= 1.0:
		tmp = (1.0 / y_m) / x_m
	elif z <= 1.7e+178:
		tmp = (1.0 / z) / (z * (y_m * x_m))
	else:
		tmp = (1.0 / z) * (1.0 / (x_m * (z * 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 (z <= 1.0)
		tmp = Float64(Float64(1.0 / y_m) / x_m);
	elseif (z <= 1.7e+178)
		tmp = Float64(Float64(1.0 / z) / Float64(z * Float64(y_m * x_m)));
	else
		tmp = Float64(Float64(1.0 / z) * Float64(1.0 / Float64(x_m * Float64(z * 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 <= 1.0)
		tmp = (1.0 / y_m) / x_m;
	elseif (z <= 1.7e+178)
		tmp = (1.0 / z) / (z * (y_m * x_m));
	else
		tmp = (1.0 / z) * (1.0 / (x_m * (z * 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[z, 1.0], N[(N[(1.0 / y$95$m), $MachinePrecision] / x$95$m), $MachinePrecision], If[LessEqual[z, 1.7e+178], N[(N[(1.0 / z), $MachinePrecision] / N[(z * N[(y$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / z), $MachinePrecision] * N[(1.0 / N[(x$95$m * N[(z * y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
[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 \leq 1:\\
\;\;\;\;\frac{\frac{1}{y\_m}}{x\_m}\\

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

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


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

    1. Initial program 92.9%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. remove-double-neg92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{x \cdot y}} \]
    6. Step-by-step derivation
      1. *-commutative73.5%

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

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

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

    if 1 < z < 1.7000000000000001e178

    1. Initial program 93.6%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. remove-double-neg93.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 \cdot \color{blue}{\frac{\frac{1}{{z}^{2}}}{x \cdot y}} \]
      3. pow-flip93.6%

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

        \[\leadsto 1 \cdot \frac{{z}^{\color{blue}{-2}}}{x \cdot y} \]
      5. *-commutative93.6%

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

      \[\leadsto \color{blue}{1 \cdot \frac{{z}^{-2}}{y \cdot x}} \]
    8. Step-by-step derivation
      1. *-lft-identity93.6%

        \[\leadsto \color{blue}{\frac{{z}^{-2}}{y \cdot x}} \]
      2. *-commutative93.6%

        \[\leadsto \frac{{z}^{-2}}{\color{blue}{x \cdot y}} \]
    9. Simplified93.6%

      \[\leadsto \color{blue}{\frac{{z}^{-2}}{x \cdot y}} \]
    10. Step-by-step derivation
      1. div-inv91.6%

        \[\leadsto \color{blue}{{z}^{-2} \cdot \frac{1}{x \cdot y}} \]
      2. metadata-eval91.6%

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{x}}{{z}^{2} \cdot y}} \]
      6. *-un-lft-identity91.1%

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

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

        \[\leadsto \frac{\color{blue}{\frac{1}{x \cdot y}}}{{z}^{2}} \]
      9. *-un-lft-identity91.2%

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

        \[\leadsto \frac{1 \cdot \frac{1}{x \cdot y}}{\color{blue}{z \cdot z}} \]
      11. times-frac94.3%

        \[\leadsto \color{blue}{\frac{1}{z} \cdot \frac{\frac{1}{x \cdot y}}{z}} \]
      12. *-commutative94.3%

        \[\leadsto \frac{1}{z} \cdot \frac{\frac{1}{\color{blue}{y \cdot x}}}{z} \]
    11. Applied egg-rr94.3%

      \[\leadsto \color{blue}{\frac{1}{z} \cdot \frac{\frac{1}{y \cdot x}}{z}} \]
    12. Step-by-step derivation
      1. clear-num94.2%

        \[\leadsto \frac{1}{z} \cdot \color{blue}{\frac{1}{\frac{z}{\frac{1}{y \cdot x}}}} \]
      2. un-div-inv94.3%

        \[\leadsto \color{blue}{\frac{\frac{1}{z}}{\frac{z}{\frac{1}{y \cdot x}}}} \]
      3. div-inv94.2%

        \[\leadsto \frac{\frac{1}{z}}{\color{blue}{z \cdot \frac{1}{\frac{1}{y \cdot x}}}} \]
      4. clear-num96.3%

        \[\leadsto \frac{\frac{1}{z}}{z \cdot \color{blue}{\frac{y \cdot x}{1}}} \]
      5. /-rgt-identity96.3%

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

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

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

    if 1.7000000000000001e178 < z

    1. Initial program 82.7%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. remove-double-neg82.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 \cdot \color{blue}{\frac{\frac{1}{{z}^{2}}}{x \cdot y}} \]
      3. pow-flip82.2%

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

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

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

      \[\leadsto \color{blue}{1 \cdot \frac{{z}^{-2}}{y \cdot x}} \]
    8. Step-by-step derivation
      1. *-lft-identity82.2%

        \[\leadsto \color{blue}{\frac{{z}^{-2}}{y \cdot x}} \]
      2. *-commutative82.2%

        \[\leadsto \frac{{z}^{-2}}{\color{blue}{x \cdot y}} \]
    9. Simplified82.2%

      \[\leadsto \color{blue}{\frac{{z}^{-2}}{x \cdot y}} \]
    10. Step-by-step derivation
      1. div-inv82.2%

        \[\leadsto \color{blue}{{z}^{-2} \cdot \frac{1}{x \cdot y}} \]
      2. metadata-eval82.2%

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

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

        \[\leadsto \frac{1}{{z}^{2}} \cdot \color{blue}{\frac{\frac{1}{x}}{y}} \]
      5. times-frac82.7%

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{x}}{{z}^{2} \cdot y}} \]
      6. *-un-lft-identity82.7%

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

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

        \[\leadsto \frac{\color{blue}{\frac{1}{x \cdot y}}}{{z}^{2}} \]
      9. *-un-lft-identity82.2%

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

        \[\leadsto \frac{1 \cdot \frac{1}{x \cdot y}}{\color{blue}{z \cdot z}} \]
      11. times-frac85.0%

        \[\leadsto \color{blue}{\frac{1}{z} \cdot \frac{\frac{1}{x \cdot y}}{z}} \]
      12. *-commutative85.0%

        \[\leadsto \frac{1}{z} \cdot \frac{\frac{1}{\color{blue}{y \cdot x}}}{z} \]
    11. Applied egg-rr85.0%

      \[\leadsto \color{blue}{\frac{1}{z} \cdot \frac{\frac{1}{y \cdot x}}{z}} \]
    12. Taylor expanded in y around 0 99.9%

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

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

Alternative 9: 76.0% accurate, 0.8× 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 \leq 1:\\ \;\;\;\;\frac{\frac{1}{y\_m}}{x\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{z}}{z \cdot \left(y\_m \cdot x\_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 1.0) (/ (/ 1.0 y_m) x_m) (/ (/ 1.0 z) (* z (* 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) {
	double tmp;
	if (z <= 1.0) {
		tmp = (1.0 / y_m) / x_m;
	} else {
		tmp = (1.0 / z) / (z * (y_m * 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 <= 1.0d0) then
        tmp = (1.0d0 / y_m) / x_m
    else
        tmp = (1.0d0 / z) / (z * (y_m * 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 <= 1.0) {
		tmp = (1.0 / y_m) / x_m;
	} else {
		tmp = (1.0 / z) / (z * (y_m * 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 <= 1.0:
		tmp = (1.0 / y_m) / x_m
	else:
		tmp = (1.0 / z) / (z * (y_m * 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 (z <= 1.0)
		tmp = Float64(Float64(1.0 / y_m) / x_m);
	else
		tmp = Float64(Float64(1.0 / z) / Float64(z * Float64(y_m * 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 <= 1.0)
		tmp = (1.0 / y_m) / x_m;
	else
		tmp = (1.0 / z) / (z * (y_m * 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[z, 1.0], N[(N[(1.0 / y$95$m), $MachinePrecision] / x$95$m), $MachinePrecision], N[(N[(1.0 / z), $MachinePrecision] / N[(z * N[(y$95$m * x$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 \leq 1:\\
\;\;\;\;\frac{\frac{1}{y\_m}}{x\_m}\\

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


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

    1. Initial program 92.9%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. remove-double-neg92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{x \cdot y}} \]
    6. Step-by-step derivation
      1. *-commutative73.5%

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

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

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

    if 1 < z

    1. Initial program 87.5%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. remove-double-neg87.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 \cdot \color{blue}{\frac{\frac{1}{{z}^{2}}}{x \cdot y}} \]
      3. pow-flip87.2%

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

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

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

      \[\leadsto \color{blue}{1 \cdot \frac{{z}^{-2}}{y \cdot x}} \]
    8. Step-by-step derivation
      1. *-lft-identity87.2%

        \[\leadsto \color{blue}{\frac{{z}^{-2}}{y \cdot x}} \]
      2. *-commutative87.2%

        \[\leadsto \frac{{z}^{-2}}{\color{blue}{x \cdot y}} \]
    9. Simplified87.2%

      \[\leadsto \color{blue}{\frac{{z}^{-2}}{x \cdot y}} \]
    10. Step-by-step derivation
      1. div-inv86.3%

        \[\leadsto \color{blue}{{z}^{-2} \cdot \frac{1}{x \cdot y}} \]
      2. metadata-eval86.3%

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{x}}{{z}^{2} \cdot y}} \]
      6. *-un-lft-identity86.4%

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

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

        \[\leadsto \frac{\color{blue}{\frac{1}{x \cdot y}}}{{z}^{2}} \]
      9. *-un-lft-identity86.2%

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

        \[\leadsto \frac{1 \cdot \frac{1}{x \cdot y}}{\color{blue}{z \cdot z}} \]
      11. times-frac89.1%

        \[\leadsto \color{blue}{\frac{1}{z} \cdot \frac{\frac{1}{x \cdot y}}{z}} \]
      12. *-commutative89.1%

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

      \[\leadsto \color{blue}{\frac{1}{z} \cdot \frac{\frac{1}{y \cdot x}}{z}} \]
    12. Step-by-step derivation
      1. clear-num89.1%

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

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

        \[\leadsto \frac{\frac{1}{z}}{\color{blue}{z \cdot \frac{1}{\frac{1}{y \cdot x}}}} \]
      4. clear-num90.0%

        \[\leadsto \frac{\frac{1}{z}}{z \cdot \color{blue}{\frac{y \cdot x}{1}}} \]
      5. /-rgt-identity90.0%

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

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

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

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

Alternative 10: 75.8% accurate, 0.8× 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 \leq 1:\\ \;\;\;\;\frac{\frac{1}{y\_m}}{x\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{z \cdot \left(z \cdot \left(y\_m \cdot x\_m\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 1.0) (/ (/ 1.0 y_m) x_m) (/ 1.0 (* z (* z (* 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) {
	double tmp;
	if (z <= 1.0) {
		tmp = (1.0 / y_m) / x_m;
	} else {
		tmp = 1.0 / (z * (z * (y_m * 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 <= 1.0d0) then
        tmp = (1.0d0 / y_m) / x_m
    else
        tmp = 1.0d0 / (z * (z * (y_m * 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 <= 1.0) {
		tmp = (1.0 / y_m) / x_m;
	} else {
		tmp = 1.0 / (z * (z * (y_m * 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 <= 1.0:
		tmp = (1.0 / y_m) / x_m
	else:
		tmp = 1.0 / (z * (z * (y_m * 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 (z <= 1.0)
		tmp = Float64(Float64(1.0 / y_m) / x_m);
	else
		tmp = Float64(1.0 / Float64(z * Float64(z * Float64(y_m * 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 <= 1.0)
		tmp = (1.0 / y_m) / x_m;
	else
		tmp = 1.0 / (z * (z * (y_m * 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[z, 1.0], N[(N[(1.0 / y$95$m), $MachinePrecision] / x$95$m), $MachinePrecision], N[(1.0 / N[(z * N[(z * N[(y$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
[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 \leq 1:\\
\;\;\;\;\frac{\frac{1}{y\_m}}{x\_m}\\

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


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

    1. Initial program 92.9%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. remove-double-neg92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{x \cdot y}} \]
    6. Step-by-step derivation
      1. *-commutative73.5%

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

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

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

    if 1 < z

    1. Initial program 87.5%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. remove-double-neg87.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 \cdot \color{blue}{\frac{\frac{1}{{z}^{2}}}{x \cdot y}} \]
      3. pow-flip87.2%

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

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

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

      \[\leadsto \color{blue}{1 \cdot \frac{{z}^{-2}}{y \cdot x}} \]
    8. Step-by-step derivation
      1. *-lft-identity87.2%

        \[\leadsto \color{blue}{\frac{{z}^{-2}}{y \cdot x}} \]
      2. *-commutative87.2%

        \[\leadsto \frac{{z}^{-2}}{\color{blue}{x \cdot y}} \]
    9. Simplified87.2%

      \[\leadsto \color{blue}{\frac{{z}^{-2}}{x \cdot y}} \]
    10. Step-by-step derivation
      1. div-inv86.3%

        \[\leadsto \color{blue}{{z}^{-2} \cdot \frac{1}{x \cdot y}} \]
      2. metadata-eval86.3%

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

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{1}{x}}{{z}^{2} \cdot y}} \]
      6. *-un-lft-identity86.4%

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

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

        \[\leadsto \frac{\color{blue}{\frac{1}{x \cdot y}}}{{z}^{2}} \]
      9. *-un-lft-identity86.2%

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

        \[\leadsto \frac{1 \cdot \frac{1}{x \cdot y}}{\color{blue}{z \cdot z}} \]
      11. times-frac89.1%

        \[\leadsto \color{blue}{\frac{1}{z} \cdot \frac{\frac{1}{x \cdot y}}{z}} \]
      12. *-commutative89.1%

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

      \[\leadsto \color{blue}{\frac{1}{z} \cdot \frac{\frac{1}{y \cdot x}}{z}} \]
    12. Step-by-step derivation
      1. *-commutative89.1%

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot 1}{\frac{z}{\frac{1}{y \cdot x}} \cdot z}} \]
      4. metadata-eval89.1%

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

        \[\leadsto \frac{1}{\color{blue}{\left(z \cdot \frac{1}{\frac{1}{y \cdot x}}\right)} \cdot z} \]
      6. clear-num90.0%

        \[\leadsto \frac{1}{\left(z \cdot \color{blue}{\frac{y \cdot x}{1}}\right) \cdot z} \]
      7. /-rgt-identity90.0%

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

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

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

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

Alternative 11: 73.6% accurate, 0.8× 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 \leq 1:\\ \;\;\;\;\frac{\frac{1}{y\_m}}{x\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\left(z \cdot z\right) \cdot \left(y\_m \cdot x\_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 1.0) (/ (/ 1.0 y_m) x_m) (/ 1.0 (* (* z z) (* 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) {
	double tmp;
	if (z <= 1.0) {
		tmp = (1.0 / y_m) / x_m;
	} else {
		tmp = 1.0 / ((z * z) * (y_m * 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 <= 1.0d0) then
        tmp = (1.0d0 / y_m) / x_m
    else
        tmp = 1.0d0 / ((z * z) * (y_m * 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 <= 1.0) {
		tmp = (1.0 / y_m) / x_m;
	} else {
		tmp = 1.0 / ((z * z) * (y_m * 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 <= 1.0:
		tmp = (1.0 / y_m) / x_m
	else:
		tmp = 1.0 / ((z * z) * (y_m * 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 (z <= 1.0)
		tmp = Float64(Float64(1.0 / y_m) / x_m);
	else
		tmp = Float64(1.0 / Float64(Float64(z * z) * Float64(y_m * 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 <= 1.0)
		tmp = (1.0 / y_m) / x_m;
	else
		tmp = 1.0 / ((z * z) * (y_m * 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[z, 1.0], N[(N[(1.0 / y$95$m), $MachinePrecision] / x$95$m), $MachinePrecision], N[(1.0 / N[(N[(z * z), $MachinePrecision] * N[(y$95$m * x$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 \leq 1:\\
\;\;\;\;\frac{\frac{1}{y\_m}}{x\_m}\\

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


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

    1. Initial program 92.9%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. remove-double-neg92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{x \cdot y}} \]
    6. Step-by-step derivation
      1. *-commutative73.5%

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

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

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

    if 1 < z

    1. Initial program 87.5%

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
    2. Step-by-step derivation
      1. remove-double-neg87.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 58.3% 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 91.5%

    \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
  2. Step-by-step derivation
    1. remove-double-neg91.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{1}{x \cdot y}} \]
  6. Step-by-step derivation
    1. *-commutative58.8%

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

      \[\leadsto \color{blue}{\frac{\frac{1}{y}}{x}} \]
  7. Simplified58.9%

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

Alternative 13: 58.3% 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 91.5%

    \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
  2. Add Preprocessing
  3. Taylor expanded in z around 0 58.9%

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

Alternative 14: 58.4% 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}{y\_m \cdot 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(1.0 / Float64(y_m * x_m))))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
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[(1.0 / N[(y$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \frac{1}{y\_m \cdot x\_m}\right)
\end{array}
Derivation
  1. Initial program 91.5%

    \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)} \]
  2. Step-by-step derivation
    1. remove-double-neg91.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{1}{y \cdot x} \]
  7. Add Preprocessing

Developer Target 1: 92.2% 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 2024160 
(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)))))