How do you create a damped cosine wave?

… and because the remap node doesn’t seem to work right: