Switched to a cosine for generating the sine table (hides a glitch)