\[ \begin{array}{c}[x, y] = \mathsf{sort}([x, y])\\ \end{array} \]
\[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}
\]
↓
\[\begin{array}{l}
\mathbf{if}\;y \cdot \left(1 + z \cdot z\right) \leq 10^{+305}:\\
\;\;\;\;\frac{\frac{1}{x}}{\mathsf{fma}\left(y \cdot z, z, y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y \cdot \left(z \cdot x\right)} \cdot \frac{1}{z}\\
\end{array}
\]
(FPCore (x y z) :precision binary64 (/ (/ 1.0 x) (* y (+ 1.0 (* z z)))))
↓
(FPCore (x y z)
:precision binary64
(if (<= (* y (+ 1.0 (* z z))) 1e+305)
(/ (/ 1.0 x) (fma (* y z) z y))
(* (/ 1.0 (* y (* z x))) (/ 1.0 z))))
double code(double x, double y, double z) {
return (1.0 / x) / (y * (1.0 + (z * z)));
}
↓
double code(double x, double y, double z) {
double tmp;
if ((y * (1.0 + (z * z))) <= 1e+305) {
tmp = (1.0 / x) / fma((y * z), z, y);
} else {
tmp = (1.0 / (y * (z * x))) * (1.0 / z);
}
return tmp;
}
function code(x, y, z)
return Float64(Float64(1.0 / x) / Float64(y * Float64(1.0 + Float64(z * z))))
end
↓
function code(x, y, z)
tmp = 0.0
if (Float64(y * Float64(1.0 + Float64(z * z))) <= 1e+305)
tmp = Float64(Float64(1.0 / x) / fma(Float64(y * z), z, y));
else
tmp = Float64(Float64(1.0 / Float64(y * Float64(z * x))) * Float64(1.0 / z));
end
return tmp
end
code[x_, y_, z_] := N[(N[(1.0 / x), $MachinePrecision] / N[(y * N[(1.0 + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_] := If[LessEqual[N[(y * N[(1.0 + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+305], N[(N[(1.0 / x), $MachinePrecision] / N[(N[(y * z), $MachinePrecision] * z + y), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(y * N[(z * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]]
\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}
↓
\begin{array}{l}
\mathbf{if}\;y \cdot \left(1 + z \cdot z\right) \leq 10^{+305}:\\
\;\;\;\;\frac{\frac{1}{x}}{\mathsf{fma}\left(y \cdot z, z, y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y \cdot \left(z \cdot x\right)} \cdot \frac{1}{z}\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 2.7 |
|---|
| Cost | 968 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -750000000000:\\
\;\;\;\;\frac{1}{z \cdot \left(x \cdot \left(y \cdot z\right)\right)}\\
\mathbf{elif}\;z \leq 0.86:\\
\;\;\;\;\frac{1 - z \cdot z}{y \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y \cdot \left(z \cdot x\right)} \cdot \frac{1}{z}\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 1.9 |
|---|
| Cost | 968 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+52}:\\
\;\;\;\;\frac{1}{z \cdot \left(x \cdot \left(y \cdot z\right)\right)}\\
\mathbf{elif}\;z \leq 19500000:\\
\;\;\;\;\frac{1}{y \cdot \left(x + \left(z \cdot z\right) \cdot x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y \cdot \left(z \cdot x\right)} \cdot \frac{1}{z}\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 1.9 |
|---|
| Cost | 968 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+152}:\\
\;\;\;\;\frac{1}{\frac{y \cdot z}{\frac{1}{z \cdot x}}}\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+150}:\\
\;\;\;\;\frac{\frac{\frac{1}{x}}{y}}{1 + z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y \cdot \left(z \cdot x\right)} \cdot \frac{1}{z}\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 4.8 |
|---|
| Cost | 841 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -750000000000 \lor \neg \left(z \leq 1\right):\\
\;\;\;\;\frac{1}{x \cdot \left(z \cdot \left(y \cdot z\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y \cdot x}\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 4.9 |
|---|
| Cost | 841 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -750000000000 \lor \neg \left(z \leq 1\right):\\
\;\;\;\;\frac{1}{y \cdot \left(z \cdot \left(z \cdot x\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y \cdot x}\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 2.7 |
|---|
| Cost | 841 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -750000000000 \lor \neg \left(z \leq 1\right):\\
\;\;\;\;\frac{1}{z \cdot \left(x \cdot \left(y \cdot z\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y \cdot x}\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 2.3 |
|---|
| Cost | 836 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 5 \cdot 10^{-6}:\\
\;\;\;\;\frac{1 - z \cdot z}{y \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z \cdot \left(x \cdot \left(y \cdot z\right)\right)}\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 28.7 |
|---|
| Cost | 320 |
|---|
\[\frac{1}{y \cdot x}
\]