\[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\]
↓
\[\begin{array}{l}
t_0 := \left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;z \leq -1 \cdot 10^{-20} \lor \neg \left(z \leq 1.6 \cdot 10^{-86}\right):\\
\;\;\;\;t_0 + \left(\frac{0.083333333333333}{x} + \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, z \cdot \left(z \cdot \left(\frac{y}{x} + \frac{0.0007936500793651}{x}\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{\frac{1}{x}}{\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}}\\
\end{array}
\]
(FPCore (x y z)
:precision binary64
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x)))↓
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (- (* (+ x -0.5) (log x)) x) 0.91893853320467)))
(if (or (<= z -1e-20) (not (<= z 1.6e-86)))
(+
t_0
(+
(/ 0.083333333333333 x)
(fma
-0.0027777777777778
(/ z x)
(* z (* z (+ (/ y x) (/ 0.0007936500793651 x)))))))
(+
t_0
(/
(/ 1.0 x)
(/
1.0
(fma
z
(fma (+ y 0.0007936500793651) z -0.0027777777777778)
0.083333333333333)))))))double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
↓
double code(double x, double y, double z) {
double t_0 = (((x + -0.5) * log(x)) - x) + 0.91893853320467;
double tmp;
if ((z <= -1e-20) || !(z <= 1.6e-86)) {
tmp = t_0 + ((0.083333333333333 / x) + fma(-0.0027777777777778, (z / x), (z * (z * ((y / x) + (0.0007936500793651 / x))))));
} else {
tmp = t_0 + ((1.0 / x) / (1.0 / fma(z, fma((y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333)));
}
return tmp;
}
function code(x, y, z)
return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x))
end
↓
function code(x, y, z)
t_0 = Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - x) + 0.91893853320467)
tmp = 0.0
if ((z <= -1e-20) || !(z <= 1.6e-86))
tmp = Float64(t_0 + Float64(Float64(0.083333333333333 / x) + fma(-0.0027777777777778, Float64(z / x), Float64(z * Float64(z * Float64(Float64(y / x) + Float64(0.0007936500793651 / x)))))));
else
tmp = Float64(t_0 + Float64(Float64(1.0 / x) / Float64(1.0 / fma(z, fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333))));
end
return tmp
end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision]}, If[Or[LessEqual[z, -1e-20], N[Not[LessEqual[z, 1.6e-86]], $MachinePrecision]], N[(t$95$0 + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(-0.0027777777777778 * N[(z / x), $MachinePrecision] + N[(z * N[(z * N[(N[(y / x), $MachinePrecision] + N[(0.0007936500793651 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(1.0 / x), $MachinePrecision] / N[(1.0 / N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] + 0.083333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
↓
\begin{array}{l}
t_0 := \left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;z \leq -1 \cdot 10^{-20} \lor \neg \left(z \leq 1.6 \cdot 10^{-86}\right):\\
\;\;\;\;t_0 + \left(\frac{0.083333333333333}{x} + \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, z \cdot \left(z \cdot \left(\frac{y}{x} + \frac{0.0007936500793651}{x}\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{\frac{1}{x}}{\frac{1}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}}\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 0.4 |
|---|
| Cost | 14788 |
|---|
\[\begin{array}{l}
t_0 := \left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;x \leq 2.8 \cdot 10^{-13}:\\
\;\;\;\;t_0 + \left(-0.0027777777777778 \cdot \frac{z}{x} + \left(\frac{0.083333333333333}{x} + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 + \left(\frac{0.083333333333333}{x} + \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, z \cdot \left(z \cdot \left(\frac{y}{x} + \frac{0.0007936500793651}{x}\right)\right)\right)\right)\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 2.0 |
|---|
| Cost | 9804 |
|---|
\[\begin{array}{l}
t_0 := z \cdot \left(-0.0027777777777778 + z \cdot \left(y + 0.0007936500793651\right)\right)\\
t_1 := z \cdot \frac{z}{x}\\
t_2 := \left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;t_0 \leq -5 \cdot 10^{+48}:\\
\;\;\;\;\left(0.91893853320467 + \left(x \cdot \log x - x\right)\right) + y \cdot t_1\\
\mathbf{elif}\;t_0 \leq 4 \cdot 10^{-40}:\\
\;\;\;\;t_2 + \frac{0.083333333333333}{x}\\
\mathbf{elif}\;t_0 \leq 10^{+287}:\\
\;\;\;\;\frac{0.083333333333333 + t_0}{x} + \left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2 + \left(-0.0027777777777778 \cdot \frac{z}{x} + 0.0007936500793651 \cdot t_1\right)\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 2.7 |
|---|
| Cost | 9676 |
|---|
\[\begin{array}{l}
t_0 := z \cdot \left(-0.0027777777777778 + z \cdot \left(y + 0.0007936500793651\right)\right)\\
t_1 := \left(0.91893853320467 + \left(x \cdot \log x - x\right)\right) + y \cdot \left(z \cdot \frac{z}{x}\right)\\
\mathbf{if}\;t_0 \leq -5 \cdot 10^{+48}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_0 \leq 4 \cdot 10^{-40}:\\
\;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\
\mathbf{elif}\;t_0 \leq 10^{+287}:\\
\;\;\;\;\frac{0.083333333333333 + t_0}{x} + \left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 0.4 |
|---|
| Cost | 9288 |
|---|
\[\begin{array}{l}
t_0 := z \cdot \left(-0.0027777777777778 + z \cdot \left(y + 0.0007936500793651\right)\right)\\
t_1 := \left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;t_0 \leq -\infty:\\
\;\;\;\;\left(0.91893853320467 + \left(x \cdot \log x - x\right)\right) + y \cdot \left(z \cdot \frac{z}{x}\right)\\
\mathbf{elif}\;t_0 \leq 10^{+287}:\\
\;\;\;\;t_1 + \frac{0.083333333333333 + t_0}{x}\\
\mathbf{else}:\\
\;\;\;\;t_1 + \left(-0.0027777777777778 \cdot \frac{z}{x} + z \cdot \left(z \cdot \frac{y + 0.0007936500793651}{x}\right)\right)\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 1.3 |
|---|
| Cost | 9160 |
|---|
\[\begin{array}{l}
t_0 := z \cdot \left(-0.0027777777777778 + z \cdot \left(y + 0.0007936500793651\right)\right)\\
t_1 := z \cdot \frac{z}{x}\\
t_2 := \left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;t_0 \leq -\infty:\\
\;\;\;\;\left(0.91893853320467 + \left(x \cdot \log x - x\right)\right) + y \cdot t_1\\
\mathbf{elif}\;t_0 \leq 10^{+287}:\\
\;\;\;\;t_2 + \frac{0.083333333333333 + t_0}{x}\\
\mathbf{else}:\\
\;\;\;\;t_2 + \left(-0.0027777777777778 \cdot \frac{z}{x} + 0.0007936500793651 \cdot t_1\right)\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 0.4 |
|---|
| Cost | 8388 |
|---|
\[\begin{array}{l}
t_0 := -0.0027777777777778 \cdot \frac{z}{x}\\
t_1 := \left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;x \leq 10^{+23}:\\
\;\;\;\;t_1 + \left(t_0 + \left(\frac{0.083333333333333}{x} + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 + \left(t_0 + z \cdot \left(z \cdot \frac{y + 0.0007936500793651}{x}\right)\right)\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 2.6 |
|---|
| Cost | 7880 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq 0.22:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(-0.0027777777777778 + z \cdot \left(y + 0.0007936500793651\right)\right)}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\
\mathbf{elif}\;x \leq 6 \cdot 10^{+100}:\\
\;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(x \cdot \log x - x\right)\right) + y \cdot \left(z \cdot \frac{z}{x}\right)\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 8.9 |
|---|
| Cost | 7752 |
|---|
\[\begin{array}{l}
t_0 := \left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;z \leq -12500:\\
\;\;\;\;\left(0.91893853320467 + \left(x \cdot \log x - x\right)\right) + z \cdot \frac{z}{\frac{x}{y}}\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-28}:\\
\;\;\;\;t_0 + \frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + y \cdot \left(z \cdot \frac{z}{x}\right)\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 9.0 |
|---|
| Cost | 7752 |
|---|
\[\begin{array}{l}
t_0 := \left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;z \leq -12500:\\
\;\;\;\;t_0 + z \cdot \frac{z}{\frac{x}{y}}\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{-35}:\\
\;\;\;\;t_0 + \frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + y \cdot \left(z \cdot \frac{z}{x}\right)\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 3.8 |
|---|
| Cost | 7748 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq 2500:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(-0.0027777777777778 + z \cdot \left(y + 0.0007936500793651\right)\right)}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + y \cdot \left(z \cdot \frac{z}{x}\right)\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 9.0 |
|---|
| Cost | 7625 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -15200 \lor \neg \left(z \leq 9.6 \cdot 10^{-35}\right):\\
\;\;\;\;\left(0.91893853320467 + \left(x \cdot \log x - x\right)\right) + y \cdot \left(z \cdot \frac{z}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\
\end{array}
\]
| Alternative 12 |
|---|
| Error | 8.9 |
|---|
| Cost | 7624 |
|---|
\[\begin{array}{l}
t_0 := 0.91893853320467 + \left(x \cdot \log x - x\right)\\
\mathbf{if}\;z \leq -12500:\\
\;\;\;\;t_0 + z \cdot \frac{z}{\frac{x}{y}}\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-28}:\\
\;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 + y \cdot \left(z \cdot \frac{z}{x}\right)\\
\end{array}
\]
| Alternative 13 |
|---|
| Error | 11.7 |
|---|
| Cost | 7232 |
|---|
\[\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}
\]
| Alternative 14 |
|---|
| Error | 12.7 |
|---|
| Cost | 7104 |
|---|
\[\frac{0.083333333333333}{x} + \left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right)
\]
| Alternative 15 |
|---|
| Error | 40.8 |
|---|
| Cost | 6921 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -12500 \lor \neg \left(z \leq 2.5 \cdot 10^{-36}\right):\\
\;\;\;\;0.91893853320467 + \frac{z \cdot z}{\frac{x}{y}}\\
\mathbf{else}:\\
\;\;\;\;{\left(x \cdot 12.000000000000048\right)}^{-1}\\
\end{array}
\]
| Alternative 16 |
|---|
| Error | 40.7 |
|---|
| Cost | 841 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -12500 \lor \neg \left(z \leq 7 \cdot 10^{-31}\right):\\
\;\;\;\;0.91893853320467 + \frac{z \cdot z}{\frac{x}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\end{array}
\]
| Alternative 17 |
|---|
| Error | 42.9 |
|---|
| Cost | 192 |
|---|
\[\frac{0.083333333333333}{x}
\]