Fixed ccos, csin, and ctan edge cases