I have a long nested list, but many elements are numbers of order 10^-18
or less, e.g.
{{0.217548, -0.217548, -0.0373272, -9.83823*10^-18, -8.13807*10^-19}, \
{0.217548, 0.217548, 0.0373272, 7.54332*10^-18, 6.23849*10^-19}, \
{0.183095, 0.0504041, 0.00207916, -0.214279, -0.0218996}, \
{0.985472, -0.193791, -0.461242, 4.17611*10^-20, 1.22184*10^-20}, \
{0.985472, 0.193791, 0.461242, -1.18329*10^-30, -9.86076*10^-31},
{0.60405, 9.7862*10^-23, -9.11593*10^-24, -1.54354*10^-22, -1.91278*10^-23}, \
{0.80994, 0.556147, 0.623645, 0.558531, 0.625958}}
Then, to make the output more readable, I want to print in the output the numbers with absolute value smaller than 10^-18
as zeros.
What is the smartest and fastest way to do this?
N[results, precision]
(reference.wolfram.com/mathematica/ref/N.html)? $\endgroup$Chop
your list. The second argument defines the threshold for zero. $\endgroup$