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

Percentage Accurate: 88.4% → 99.5%
Time: 15.9s
Alternatives: 12
Speedup: 0.8×

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 12 alternatives:

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

Initial Program: 88.4% accurate, 1.0× speedup?

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

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

Alternative 1: 99.5% accurate, 0.0× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ y_m = \left|y\right| \\ y_s = \mathsf{copysign}\left(1, y\right) \\ [x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\ \\ y_s \cdot \left(x_s \cdot \frac{\frac{1}{\frac{\mathsf{hypot}\left(1, z\right) \cdot x_m}{{y_m}^{-0.5}}}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y_m}}\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
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) x_m) (pow y_m -0.5)))
    (* (hypot 1.0 z) (sqrt 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) * x_m) / pow(y_m, -0.5))) / (hypot(1.0, z) * sqrt(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) * x_m) / Math.pow(y_m, -0.5))) / (Math.hypot(1.0, z) * Math.sqrt(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) * x_m) / math.pow(y_m, -0.5))) / (math.hypot(1.0, z) * math.sqrt(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(Float64(hypot(1.0, z) * x_m) / (y_m ^ -0.5))) / Float64(hypot(1.0, z) * sqrt(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) * x_m) / (y_m ^ -0.5))) / (hypot(1.0, z) * sqrt(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[(N[Sqrt[1.0 ^ 2 + z ^ 2], $MachinePrecision] * x$95$m), $MachinePrecision] / N[Power[y$95$m, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[1.0 ^ 2 + z ^ 2], $MachinePrecision] * N[Sqrt[y$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y_s \cdot \left(x_s \cdot \frac{\frac{1}{\frac{\mathsf{hypot}\left(1, z\right) \cdot x_m}{{y_m}^{-0.5}}}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y_m}}\right)
\end{array}
Derivation
  1. Initial program 91.0%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{1}{x \cdot \left(y \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
  4. Step-by-step derivation
    1. associate-/r*91.0%

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\sqrt{y} \cdot \color{blue}{\mathsf{hypot}\left(1, z\right)}} \cdot \frac{\frac{1}{x}}{\sqrt{y \cdot \mathsf{fma}\left(z, z, 1\right)}} \]
    9. associate-/l/45.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{\frac{1}{\sqrt{y} \cdot \left(\mathsf{hypot}\left(1, z\right) \cdot x\right)}}{\sqrt{y} \cdot \mathsf{hypot}\left(1, z\right)}} \]
  8. Step-by-step derivation
    1. /-rgt-identity49.4%

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

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

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

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

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

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

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

    \[\leadsto \frac{\frac{1}{\frac{\mathsf{hypot}\left(1, z\right) \cdot x}{{y}^{-0.5}}}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y}} \]

Alternative 2: 99.4% accurate, 0.0× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ y_m = \left|y\right| \\ y_s = \mathsf{copysign}\left(1, y\right) \\ [x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\ \\ y_s \cdot \left(x_s \cdot \frac{\frac{1}{\left(\mathsf{hypot}\left(1, z\right) \cdot x_m\right) \cdot \sqrt{y_m}}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y_m}}\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
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) x_m) (sqrt y_m)))
    (* (hypot 1.0 z) (sqrt 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) * x_m) * sqrt(y_m))) / (hypot(1.0, z) * sqrt(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) * x_m) * Math.sqrt(y_m))) / (Math.hypot(1.0, z) * Math.sqrt(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) * x_m) * math.sqrt(y_m))) / (math.hypot(1.0, z) * math.sqrt(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(Float64(hypot(1.0, z) * x_m) * sqrt(y_m))) / Float64(hypot(1.0, z) * sqrt(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) * x_m) * sqrt(y_m))) / (hypot(1.0, z) * sqrt(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[(N[Sqrt[1.0 ^ 2 + z ^ 2], $MachinePrecision] * x$95$m), $MachinePrecision] * N[Sqrt[y$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[1.0 ^ 2 + z ^ 2], $MachinePrecision] * N[Sqrt[y$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y_s \cdot \left(x_s \cdot \frac{\frac{1}{\left(\mathsf{hypot}\left(1, z\right) \cdot x_m\right) \cdot \sqrt{y_m}}}{\mathsf{hypot}\left(1, z\right) \cdot \sqrt{y_m}}\right)
\end{array}
Derivation
  1. Initial program 91.0%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{1}{x \cdot \left(y \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
  4. Step-by-step derivation
    1. associate-/r*91.0%

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\sqrt{y} \cdot \color{blue}{\mathsf{hypot}\left(1, z\right)}} \cdot \frac{\frac{1}{x}}{\sqrt{y \cdot \mathsf{fma}\left(z, z, 1\right)}} \]
    9. associate-/l/45.7%

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

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

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

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

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

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

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

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

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

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

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

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 \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 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 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 91.0%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{1}{\color{blue}{x \cdot \frac{1 + z \cdot z}{1}}}}{y} \]
    11. /-rgt-identity88.7%

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

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

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

    \[\leadsto \color{blue}{\frac{\frac{1}{x \cdot \mathsf{fma}\left(z, z, 1\right)}}{y}} \]
  4. Step-by-step derivation
    1. /-rgt-identity88.7%

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

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

    \[\leadsto \frac{\frac{1}{\color{blue}{\frac{x}{\frac{1}{\mathsf{fma}\left(z, z, 1\right)}}}}}{y} \]
  6. Step-by-step derivation
    1. associate-/r/88.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{1}{\color{blue}{x \cdot \frac{1 + z \cdot z}{1}}}}{y} \]
    11. /-rgt-identity88.7%

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

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

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

    \[\leadsto \color{blue}{\frac{\frac{1}{x \cdot \mathsf{fma}\left(z, z, 1\right)}}{y}} \]
  4. Step-by-step derivation
    1. associate-/r*89.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 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{\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot x_m}}{y_m}}{\mathsf{hypot}\left(1, z\right)}\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
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) x_m)) y_m) (hypot 1.0 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) {
	return y_s * (x_s * (((1.0 / (hypot(1.0, z) * x_m)) / y_m) / hypot(1.0, z)));
}
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) * x_m)) / y_m) / Math.hypot(1.0, z)));
}
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) * x_m)) / y_m) / math.hypot(1.0, z)))
x_m = abs(x)
x_s = copysign(1.0, x)
y_m = abs(y)
y_s = copysign(1.0, y)
x_m, y_m, z = sort([x_m, y_m, z])
function code(y_s, x_s, x_m, y_m, z)
	return Float64(y_s * Float64(x_s * Float64(Float64(Float64(1.0 / Float64(hypot(1.0, z) * x_m)) / y_m) / hypot(1.0, z))))
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) * x_m)) / y_m) / hypot(1.0, z)));
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * N[(N[(N[(1.0 / N[(N[Sqrt[1.0 ^ 2 + z ^ 2], $MachinePrecision] * x$95$m), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision] / N[Sqrt[1.0 ^ 2 + z ^ 2], $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{\frac{\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot x_m}}{y_m}}{\mathsf{hypot}\left(1, z\right)}\right)
\end{array}
Derivation
  1. Initial program 91.0%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{1}{x \cdot \left(y \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
  4. Step-by-step derivation
    1. associate-/r*91.0%

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

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

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

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

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

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

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

      \[\leadsto \frac{1}{\sqrt{y} \cdot \color{blue}{\mathsf{hypot}\left(1, z\right)}} \cdot \frac{\frac{1}{x}}{\sqrt{y \cdot \mathsf{fma}\left(z, z, 1\right)}} \]
    9. associate-/l/45.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{\frac{1}{\sqrt{y} \cdot \left(\mathsf{hypot}\left(1, z\right) \cdot x\right)}}{\sqrt{y} \cdot \mathsf{hypot}\left(1, z\right)}} \]
  8. Step-by-step derivation
    1. /-rgt-identity49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{z}}{y_m} \cdot \frac{\frac{1}{z}}{x_m}\\


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

    1. Initial program 93.4%

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

        \[\leadsto \color{blue}{\frac{\frac{\frac{1}{x}}{1 + z \cdot z}}{y}} \]
      2. /-rgt-identity91.6%

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

        \[\leadsto \color{blue}{\frac{\frac{\frac{1}{x}}{1 + z \cdot z} \cdot 1}{y}} \]
      4. *-rgt-identity91.6%

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

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

        \[\leadsto \frac{\color{blue}{\frac{\frac{1}{x} \cdot 1}{1 + z \cdot z}}}{y} \]
      7. *-commutative91.6%

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

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

        \[\leadsto \frac{\frac{1}{\color{blue}{\frac{1 + z \cdot z}{1} \cdot x}}}{y} \]
      10. *-commutative91.0%

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

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

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

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

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

    if 1.35000000000000003e154 < z

    1. Initial program 66.3%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{\frac{1}{x} \cdot 1}{1 + z \cdot z}}}{y} \]
      7. *-commutative66.3%

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

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

        \[\leadsto \frac{\frac{1}{\color{blue}{\frac{1 + z \cdot z}{1} \cdot x}}}{y} \]
      10. *-commutative66.3%

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

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

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

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

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

      \[\leadsto \frac{\frac{1}{\color{blue}{x \cdot {z}^{2}}}}{y} \]
    5. Step-by-step derivation
      1. /-rgt-identity66.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 97.9% accurate, 0.8× speedup?

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

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{\frac{1}{z}}{x_m}}{z}}{y_m}\\


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

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000018e-11 < (*.f64 z z)

    1. Initial program 81.4%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{x \cdot \left(y \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
    4. Step-by-step derivation
      1. associate-/r*81.4%

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\sqrt{y} \cdot \color{blue}{\mathsf{hypot}\left(1, z\right)}} \cdot \frac{\frac{1}{x}}{\sqrt{y \cdot \mathsf{fma}\left(z, z, 1\right)}} \]
      9. associate-/l/40.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{\frac{\frac{1}{z}}{x}}}{z}}{y} \]
    14. Applied egg-rr83.5%

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

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

Alternative 8: 78.2% accurate, 1.0× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ y_m = \left|y\right| \\ y_s = \mathsf{copysign}\left(1, y\right) \\ [x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\ \\ y_s \cdot \left(x_s \cdot \begin{array}{l} \mathbf{if}\;z \leq 1:\\ \;\;\;\;\frac{\frac{1}{y_m}}{x_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{y_m}}{z \cdot \left(z \cdot x_m\right)}\\ \end{array}\right) \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
(FPCore (y_s x_s x_m y_m z)
 :precision binary64
 (*
  y_s
  (* x_s (if (<= z 1.0) (/ (/ 1.0 y_m) x_m) (/ (/ 1.0 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 <= 1.0) {
		tmp = (1.0 / y_m) / x_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 <= 1.0d0) then
        tmp = (1.0d0 / y_m) / x_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 <= 1.0) {
		tmp = (1.0 / y_m) / x_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 <= 1.0:
		tmp = (1.0 / y_m) / x_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 (z <= 1.0)
		tmp = Float64(Float64(1.0 / y_m) / x_m);
	else
		tmp = Float64(Float64(1.0 / 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 <= 1.0)
		tmp = (1.0 / y_m) / x_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[z, 1.0], N[(N[(1.0 / y$95$m), $MachinePrecision] / x$95$m), $MachinePrecision], N[(N[(1.0 / y$95$m), $MachinePrecision] / N[(z * 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 \leq 1:\\
\;\;\;\;\frac{\frac{1}{y_m}}{x_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{y_m}}{z \cdot \left(z \cdot x_m\right)}\\


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

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{1}{y}}{x}} \]
    6. Simplified74.0%

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

    if 1 < z

    1. Initial program 82.7%

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

        \[\leadsto \color{blue}{\frac{\frac{\frac{1}{x}}{1 + z \cdot z}}{y}} \]
      2. /-rgt-identity72.6%

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

        \[\leadsto \color{blue}{\frac{\frac{\frac{1}{x}}{1 + z \cdot z} \cdot 1}{y}} \]
      4. *-rgt-identity72.6%

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

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

        \[\leadsto \frac{\color{blue}{\frac{\frac{1}{x} \cdot 1}{1 + z \cdot z}}}{y} \]
      7. *-commutative72.6%

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

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

        \[\leadsto \frac{\frac{1}{\color{blue}{\frac{1 + z \cdot z}{1} \cdot x}}}{y} \]
      10. *-commutative69.9%

        \[\leadsto \frac{\frac{1}{\color{blue}{x \cdot \frac{1 + z \cdot z}{1}}}}{y} \]
      11. /-rgt-identity69.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{{x}^{-0.5}} \cdot \sqrt{{x}^{-0.5}}}}{\sqrt{{z}^{2}}} \cdot \left(\sqrt{\frac{1}{x \cdot {z}^{2}}} \cdot \frac{1}{y}\right) \]
      10. add-sqr-sqrt34.6%

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

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

        \[\leadsto \frac{{x}^{-0.5}}{\color{blue}{\sqrt{z} \cdot \sqrt{z}}} \cdot \left(\sqrt{\frac{1}{x \cdot {z}^{2}}} \cdot \frac{1}{y}\right) \]
      13. add-sqr-sqrt34.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{1}{y}}}{\frac{{z}^{2}}{\frac{1}{x}}} \]
      10. clear-num69.7%

        \[\leadsto \frac{\frac{1}{y}}{\color{blue}{\frac{1}{\frac{\frac{1}{x}}{{z}^{2}}}}} \]
      11. div-inv69.7%

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

        \[\leadsto \frac{\frac{1}{y}}{\color{blue}{\frac{\frac{1}{\frac{1}{x}}}{\frac{1}{{z}^{2}}}}} \]
      13. remove-double-div69.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 78.2% accurate, 1.0× speedup?

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

\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{z \cdot \left(z \cdot x_m\right)}}{y_m}\\


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

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{1}{y}}{x}} \]
    6. Simplified74.0%

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

    if 1 < z

    1. Initial program 82.7%

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

        \[\leadsto \color{blue}{\frac{\frac{\frac{1}{x}}{1 + z \cdot z}}{y}} \]
      2. /-rgt-identity72.6%

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

        \[\leadsto \color{blue}{\frac{\frac{\frac{1}{x}}{1 + z \cdot z} \cdot 1}{y}} \]
      4. *-rgt-identity72.6%

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

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

        \[\leadsto \frac{\color{blue}{\frac{\frac{1}{x} \cdot 1}{1 + z \cdot z}}}{y} \]
      7. *-commutative72.6%

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

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

        \[\leadsto \frac{\frac{1}{\color{blue}{\frac{1 + z \cdot z}{1} \cdot x}}}{y} \]
      10. *-commutative69.9%

        \[\leadsto \frac{\frac{1}{\color{blue}{x \cdot \frac{1 + z \cdot z}{1}}}}{y} \]
      11. /-rgt-identity69.9%

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

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

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

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

      \[\leadsto \frac{\frac{1}{\color{blue}{x \cdot {z}^{2}}}}{y} \]
    5. Step-by-step derivation
      1. /-rgt-identity69.9%

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

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

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

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

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

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

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

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

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

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

Alternative 10: 78.3% accurate, 1.0× speedup?

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

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{1}{z}}{z \cdot x_m}}{y_m}\\


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

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{1}{y}}{x}} \]
    6. Simplified74.0%

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

    if 1.1499999999999999 < z

    1. Initial program 82.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{x \cdot \left(y \cdot \mathsf{fma}\left(z, z, 1\right)\right)}} \]
    4. Step-by-step derivation
      1. associate-/r*82.7%

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\sqrt{y} \cdot \color{blue}{\mathsf{hypot}\left(1, z\right)}} \cdot \frac{\frac{1}{x}}{\sqrt{y \cdot \mathsf{fma}\left(z, z, 1\right)}} \]
      9. associate-/l/43.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 1.15:\\ \;\;\;\;\frac{\frac{1}{y}}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{1}{z}}{z \cdot x}}{y}\\ \end{array} \]

Alternative 11: 58.7% 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 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 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 91.0%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{1}{x \cdot y} \]

Alternative 12: 58.7% accurate, 2.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{1}{y}}{x}} \]
  6. Simplified61.4%

    \[\leadsto \color{blue}{\frac{\frac{1}{y}}{x}} \]
  7. Final simplification61.4%

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

Developer target: 92.3% accurate, 0.4× 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 2023326 
(FPCore (x y z)
  :name "Statistics.Distribution.CauchyLorentz:$cdensity from math-functions-0.1.5.2"
  :precision binary64

  :herbie-target
  (if (< (* y (+ 1.0 (* z z))) (- INFINITY)) (/ (/ 1.0 y) (* (+ 1.0 (* z z)) x)) (if (< (* y (+ 1.0 (* z z))) 8.680743250567252e+305) (/ (/ 1.0 x) (* (+ 1.0 (* z z)) y)) (/ (/ 1.0 y) (* (+ 1.0 (* z z)) x))))

  (/ (/ 1.0 x) (* y (+ 1.0 (* z z)))))