port sin, cos, sin_cos