implement improved accuracy cosine function.  math.cos() in java is not
accurate enough.  need something with the same accuracy as wolfram.