Implement Java's Math.sin(x) function which takes an input number and returns the sin() double value.
sin(x) is defined by the Taylor Series as:
Challenges:
- Taylor series has no end. When do you decide to terminate and return value to avoid infinite loop?
- What is the precision to aim for return value?
Decision: Passed to onsite & Downleveled. Needed few hints from the interviewer to be nudged in the right direction.
Comments (7)


