Math functions

how to use ln|cos(x) | in arduino uno

do not forget to handle the zero .

z = abs(cos(x));
if (z != 0)
{
y = log (z);
}
else
{
// y = ? or print an error message..
}