Cos function,

I was first having trouble with the SIN function but i have got that sorted by using SIN(RADIANS(15)) so i used the same principle for COS but it still does not work.

If you put cos(90) into into a calculator you obviously get 0, in numbers you get different answers depending on the function but none of them are 0

=COS(RADIANS(90)) = 6.123*10^-17
=COS(DEGREES(90)) = -0.299
=COS(90) = -0.448

Where am i going wrong and how do i make it equal 0

Imac 24 inch, Mac OS X (10.6.1)

Posted on Oct 12, 2009 9:12 AM

Reply
3 replies

Oct 12, 2009 11:56 AM in response to robin sykes

It's really simple.
THe COS function is clearly described in the iWork Formulas and Functions User Guide which every user may download from the Help menu.

The COS function requires an argument which must be an angle measured in radians.

=COS(0) returns 1
=COS(PI()/4) returns 0.707106781186547
=COS(PI()/2) returns 6.12323E-17

as there is a function converting degrees into radians, we may write

=COS(RADIANS(45)) returns logically 0.707106781186547 because, most often 45° and PI/4 are the same angle.
=COS(RADIANS(90)) returne logically 6.12323E-17 because, most often 90 ° and PI/2 are the same angle.

Yvan KOENIG (VALLAURIS, France) lundi 12 octobre 2009 20:55:42

Oct 12, 2009 2:33 PM in response to robin sykes

COS(RADIANS(90)) is the correct formula.

6.123E-17 is effectively zero. There have been a few threads related to floating point math and the small errors that occur. This would be one of those small errors. Numbers does not try to "pretty things up" by saying "that looks like zero so let's make it a zero". I recommend using ROUND to round the result to a few decimal places.

ROUND(COS(RADIANS(90)),4) will equal zero

I do not know why your answer without using ROUND is showing as a zero unless you have formatted the cell to display that way. A simple test to see if it is really zero is =IF(your cell=0,true)

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Cos function,

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.