I want to calculate y(n)=32677Sin(45/1024n), where y is an integer and n ranges from 0 to 2048. How can I make this process quicker and more precisely?    Now I want to show you a reference answer:   Since   Sin(a+b)=Sin(a)Cos(b)+Cos(a)Sin(b)    And  Cos(a+b)=Cos(a)Cos(b)-Sin(a)Cos(b).   So I can store  Sin(45/10241) and  Cos(45/10241) only.Then use this formula:Sin(45/10242)=Sin(45/10241+45/10241),     Cos(45/10242)=Cos(45/10241+45/10241),  Sin(45/1024n)=Sin(45/1024(n-1)+45/10241),     Cos(45/1024n)=Cos(45/1024(n-1)+45/10241) ,This way maybe quicker without storing large array. 
How to calculate Sin function quicker and more precisely?
c++;algorithms