Set the prec member on the output variable when computing the cosine.