Fixes for bugs in sinpi/cospi/tanpi
PR: 272742
(cherry picked from commit 2d3b0a687b910c84606e4bc36176945ad5c60406)