Thorough, the exercise is actually testing your real skills for the job, not your knowledge of math algorithms, like some other companies do. The different part of the interview process help to get into the company mindset and goals, helping you understand where you could help.