# list manipulation – Why does Log[Abs[#]] return a complex number?

For a nonzero number $$x$$, $$log|x|$$ should be a real number. Why does the following NestList contain non-real numbers when no numbers involved are close to zero? Is it a bug?

``````In[1] := N /@ NestList[Log[Abs[#]] &, 2, 70]

Out[1] = {2., 0.693147, -0.366513, -1.00372, 0.0037146, -5.59549, 1.72196,
0.543463, -0.609793, -0.494635, -0.703935, -0.35107, -1.04677,
0.0457093, -3.08545, 1.1267, 0.119292, -2.12618, 0.754329, -0.281927,
-1.26611, 0.235946, -1.44415, 0.367522, -1.00097, 0.000970967,
-6.93722, 1.9369, 0.661089, -0.413867, -0.882212, -0.125323,
-2.07686, 0.730856, -0.313538, -1.15983, 0.148277, -1.90867,
0.646408, -0.436324, -0.829369, -0.18709, -1.67617, 0.516509,
-0.660662, -0.414512, -0.880653, -0.127092, -2.06285, 0.724087,
-0.322844, -1.13058, 0.122735, -2.09773, 0.740854, -0.299951,
-1.20414, 0.185762, -1.68329, 0.52075, -0.652485, -0.426968,
-0.851047, -0.161288, -1.82456 + 3.14159 I, 1.29006 - 1.04463 I,
0.5068 + 2.46093 I, 0.921308 - 1.7739 I, 0.692586 - 1.09177 I,
0.256904 + 2.1361 I, 0.766164 - 1.69049 I}
``````

The following inputs also return the same result.

``````N /@ NestList[Log[ComplexExpand[Abs[#]]] &, 2, 70]
N /@ NestList[ComplexExpand[Log[Abs[#]]] &, 2, 70]
N /@ NestList[ComplexExpand[Re[Log[Abs[#]]]] &, 2, 70]
N /@ NestList[Log[Max[#, 0] + Max[-#, 0]] &, 2, 70]
N /@ NestList[Log[Sqrt[#^2]] &, 2, 70]
``````