Add cmath header for fmod and sqrt