Fix accuracy issue in cos_pi.
Add tests for cos_pi and sin_pi.
Doc regen.