Logarithmic embedding of number field units (source code)

= Logarithmic embedding of number field units

Choose the real embeddings $\sigma_i$ and one embedding $\tau_j$ from each complex-conjugate pair. The weighted logarithmic embedding is
$$
\operatorname{Log}(u)=
\bigl(\log|\sigma_1u|,\ldots,\log|\sigma_ru|,
2\log|\tau_1u|,\ldots,2\log|\tau_su|\bigr).
$$
For a unit, the sum of these coordinates is $\log|N_{K/\mathbb Q}(u)|=0$.