Describe a time when you had to write code to perform complex mathematical or statistical calculations. How did you ensure accuracy?