now computes reverse cosine. still have to double-check output, but there appear to be no lgoic errors, so no worries.