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

Percentage Accurate: 89.5% → 98.6%
Time: 12.9s
Alternatives: 9
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 9 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: 89.5% 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: 98.6% accurate, 0.1× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ [x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\ \\ y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z \cdot z \leq 5 \cdot 10^{+111}:\\ \;\;\;\;\frac{\frac{\frac{1}{x\_m}}{y\_m}}{\mathsf{fma}\left(z, z, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{y\_m \cdot \left(z \cdot x\_m\right)}}{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+111)
     (/ (/ (/ 1.0 x_m) y_m) (fma z z 1.0))
     (/ (/ 1.0 (* y_m (* z x_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+111) {
		tmp = ((1.0 / x_m) / y_m) / fma(z, z, 1.0);
	} else {
		tmp = (1.0 / (y_m * (z * x_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+111)
		tmp = Float64(Float64(Float64(1.0 / x_m) / y_m) / fma(z, z, 1.0));
	else
		tmp = Float64(Float64(1.0 / Float64(y_m * Float64(z * x_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+111], N[(N[(N[(1.0 / x$95$m), $MachinePrecision] / y$95$m), $MachinePrecision] / N[(z * z + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(y$95$m * N[(z * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $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^{+111}:\\
\;\;\;\;\frac{\frac{\frac{1}{x\_m}}{y\_m}}{\mathsf{fma}\left(z, z, 1\right)}\\

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


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

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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)}}} \]
      9. +-commutative53.4%

        \[\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)}} \]
      10. fma-undefine53.4%

        \[\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)}} \]
      11. *-commutative53.4%

        \[\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)}} \]
      12. sqrt-prod53.4%

        \[\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)}} \]
      13. fma-undefine53.4%

        \[\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)}} \]
      14. +-commutative53.4%

        \[\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)}} \]
      15. hypot-1-def53.4%

        \[\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)}} \]
      16. +-commutative53.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.9999999999999997e111 < (*.f64 z z)

    1. Initial program 79.8%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{1}{\left(-y\right) \cdot x}}}{-\left(1 + z \cdot z\right)} \]
      6. associate-/l/80.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-out80.4%

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

        \[\leadsto \frac{1}{\color{blue}{-\left(-\left(1 + z \cdot z\right)\right) \cdot \left(y \cdot x\right)}} \]
      9. distribute-lft-neg-in80.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-neg80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{z} \cdot \frac{{z}^{\color{blue}{-1}}}{x \cdot y} \]
      6. unpow-190.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 98.8% 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{1}{\mathsf{hypot}\left(1, z\right) \cdot \left(\mathsf{hypot}\left(1, z\right) \cdot x\_m\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 (* (hypot 1.0 z) (* (hypot 1.0 z) x_m))) y_m))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
	return y_s * (x_s * ((1.0 / (hypot(1.0, z) * (hypot(1.0, z) * x_m))) / 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 / (Math.hypot(1.0, z) * (Math.hypot(1.0, z) * 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 / (math.hypot(1.0, z) * (math.hypot(1.0, z) * 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 / Float64(hypot(1.0, z) * Float64(hypot(1.0, z) * 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 / (hypot(1.0, z) * (hypot(1.0, z) * 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 / N[(N[Sqrt[1.0 ^ 2 + z ^ 2], $MachinePrecision] * N[(N[Sqrt[1.0 ^ 2 + z ^ 2], $MachinePrecision] * x$95$m), $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{1}{\mathsf{hypot}\left(1, z\right) \cdot \left(\mathsf{hypot}\left(1, z\right) \cdot x\_m\right)}}{y\_m}\right)
\end{array}
Derivation
  1. Initial program 90.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)}}} \]
    9. +-commutative45.8%

      \[\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)}} \]
    10. fma-undefine45.8%

      \[\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)}} \]
    11. *-commutative45.8%

      \[\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)}} \]
    12. sqrt-prod45.8%

      \[\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)}} \]
    13. fma-undefine45.8%

      \[\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)}} \]
    14. +-commutative45.8%

      \[\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)}} \]
    15. hypot-1-def45.8%

      \[\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)}} \]
    16. +-commutative45.8%

      \[\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-rr51.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. *-commutative51.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*51.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*51.2%

      \[\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-times49.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-sqrt95.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-rr95.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. Step-by-step derivation
    1. un-div-inv95.6%

      \[\leadsto \frac{\color{blue}{\frac{\frac{\frac{1}{x}}{\mathsf{hypot}\left(1, z\right)}}{\mathsf{hypot}\left(1, z\right)}}}{y} \]
    2. clear-num95.5%

      \[\leadsto \frac{\frac{\color{blue}{\frac{1}{\frac{\mathsf{hypot}\left(1, z\right)}{\frac{1}{x}}}}}{\mathsf{hypot}\left(1, z\right)}}{y} \]
    3. associate-/l/95.0%

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

      \[\leadsto \frac{\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \color{blue}{\left(\frac{\mathsf{hypot}\left(1, z\right)}{1} \cdot x\right)}}}{y} \]
    5. /-rgt-identity95.0%

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

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

    \[\leadsto \frac{\color{blue}{\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \left(x \cdot \mathsf{hypot}\left(1, z\right)\right)}}}{y} \]
  11. Final simplification95.0%

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

Alternative 3: 98.6% accurate, 0.1× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ [x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\ \\ y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z \cdot z \leq 10^{+23}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(z, z, 1\right) \cdot \left(x\_m \cdot y\_m\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{y\_m \cdot \left(z \cdot x\_m\right)}}{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) 1e+23)
     (/ 1.0 (* (fma z z 1.0) (* x_m y_m)))
     (/ (/ 1.0 (* y_m (* z x_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) <= 1e+23) {
		tmp = 1.0 / (fma(z, z, 1.0) * (x_m * y_m));
	} else {
		tmp = (1.0 / (y_m * (z * x_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) <= 1e+23)
		tmp = Float64(1.0 / Float64(fma(z, z, 1.0) * Float64(x_m * y_m)));
	else
		tmp = Float64(Float64(1.0 / Float64(y_m * Float64(z * x_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], 1e+23], N[(1.0 / N[(N[(z * z + 1.0), $MachinePrecision] * N[(x$95$m * y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(y$95$m * N[(z * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \cdot z \leq 10^{+23}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(z, z, 1\right) \cdot \left(x\_m \cdot y\_m\right)}\\

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


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

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999992e22 < (*.f64 z z)

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\mathsf{fma}\left(z, z, 1\right) \cdot \color{blue}{\left(x \cdot y\right)}} \]
    3. Simplified81.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 inf 81.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{z} \cdot \frac{{z}^{\color{blue}{-1}}}{x \cdot y} \]
      6. unpow-191.4%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{1}{\frac{x \cdot y}{\frac{1}{z}}}}}{z} \]
      4. *-commutative91.5%

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

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

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

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

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

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

Alternative 4: 98.7% accurate, 0.6× speedup?

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

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


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

    1. Initial program 99.7%

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

    if 4e7 < (*.f64 z z)

    1. Initial program 80.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{z} \cdot \frac{{z}^{\color{blue}{-1}}}{x \cdot y} \]
      6. unpow-191.4%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{1}{\frac{x \cdot y}{\frac{1}{z}}}}}{z} \]
      4. *-commutative91.5%

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

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

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

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

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

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

Alternative 5: 98.0% accurate, 0.7× speedup?

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.20000000000000001 < (*.f64 z z)

    1. Initial program 80.6%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{1}{\left(-y\right) \cdot x}}}{-\left(1 + z \cdot z\right)} \]
      6. associate-/l/82.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-out82.4%

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

        \[\leadsto \frac{1}{\color{blue}{-\left(-\left(1 + z \cdot z\right)\right) \cdot \left(y \cdot x\right)}} \]
      9. distribute-lft-neg-in82.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-neg82.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{z} \cdot \frac{{z}^{\color{blue}{-1}}}{x \cdot y} \]
      6. unpow-191.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 98.2% accurate, 0.7× speedup?

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.20000000000000001 < (*.f64 z z)

    1. Initial program 80.6%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{1}{\left(-y\right) \cdot x}}}{-\left(1 + z \cdot z\right)} \]
      6. associate-/l/82.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-out82.4%

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

        \[\leadsto \frac{1}{\color{blue}{-\left(-\left(1 + z \cdot z\right)\right) \cdot \left(y \cdot x\right)}} \]
      9. distribute-lft-neg-in82.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-neg82.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{z} \cdot \frac{{z}^{\color{blue}{-1}}}{x \cdot y} \]
      6. unpow-191.2%

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

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

        \[\leadsto \frac{1}{z} \cdot \color{blue}{\frac{1}{\left(x \cdot y\right) \cdot z}} \]
      2. un-div-inv91.2%

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

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

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

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

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

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

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

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

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

Alternative 7: 97.8% accurate, 0.7× speedup?

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.20000000000000001 < (*.f64 z z)

    1. Initial program 80.6%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{1}{\left(-y\right) \cdot x}}}{-\left(1 + z \cdot z\right)} \]
      6. associate-/l/82.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-out82.4%

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

        \[\leadsto \frac{1}{\color{blue}{-\left(-\left(1 + z \cdot z\right)\right) \cdot \left(y \cdot x\right)}} \]
      9. distribute-lft-neg-in82.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-neg82.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{1}{{\color{blue}{\left(\left(z \cdot \sqrt{y \cdot x}\right) \cdot \left(z \cdot \sqrt{y \cdot x}\right)\right)}}^{-1}}} \]
      5. swap-sqr38.3%

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

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

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

        \[\leadsto \frac{1}{\frac{1}{{\left({z}^{2} \cdot \color{blue}{\left(x \cdot y\right)}\right)}^{-1}}} \]
      9. unpow-prod-down81.8%

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

        \[\leadsto \frac{1}{\frac{1}{{\color{blue}{\left(z \cdot z\right)}}^{-1} \cdot {\left(x \cdot y\right)}^{-1}}} \]
      11. pow-prod-down82.1%

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{y \cdot x}{\color{blue}{{z}^{\left(\frac{-2}{2}\right)} \cdot {z}^{\left(\frac{-2}{2}\right)}}}} \]
      19. times-frac96.5%

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

        \[\leadsto \frac{1}{\frac{y}{{z}^{\color{blue}{-1}}} \cdot \frac{x}{{z}^{\left(\frac{-2}{2}\right)}}} \]
      21. unpow-196.5%

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

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

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

        \[\leadsto \frac{1}{\color{blue}{\frac{1 \cdot x}{\frac{\frac{1}{z}}{y} \cdot \frac{1}{z}}}} \]
      3. *-un-lft-identity87.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 58.8% 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 90.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 58.9% accurate, 2.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{1}{x \cdot y} \]
  7. Add Preprocessing

Developer Target 1: 93.3% 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 2024185 
(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)))))