0

Sine function on JavaScript, Math.sin(), works accurately on most angles I've tried so far except for PI rad (180 degrees) and its integer multiples like 2PI, 3PI, 4PI... (in radians). These angles were all suppost to return 0. But, for example, sine of PI rad returns 1.2246063538223773e-16. Help! Someone please tell me what's wrong.

1 Answers1

0

This is called scientific notation.

The e-16 means that there are 16 0s before the number starts.

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964