Qualcomm interview question

Approach to implement math functions