System.out.println( Math.sin(Math.PI) ); // output: 1.2246467991473532E-16
Don't get me wrong, I wasn't the best in my math class, but shouldn't this output 0 ?
I've tried to use this:
double pi = Math.toRadians(180); System.out.println( Math.sin(pi) );...but I got the same result
I've also tried to get cos of Math.PI and it worked fine. So what's the explanation?

New Topic/Question
Reply




MultiQuote



|