I am developing an android app. for mathematical calculations. There I have some buttons like sin,cos,tan which should show their respective trigonometric values, for that I am using corresponding methods of java.lang.Math class and that works fine. But after some tests I came to know that, it shows some results as follows
sin(90)=0.89399........ //I want it to show 1
cos(90)=-0.44807........ //I want it to show 0
tan(90)=-1.995200...... //I want it to show Infinity as sin(90)/cos(90)=1/0=Infinity
Like the above examples there are many which show results like this. What should I do this for getting the results as mentioned above. Please help me.