Benches Uncategorized

3

Cos function,

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

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

3 replies

Sign in or join Beachball Help to reply.

  1. 0

    robin sykes

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I just looked back at my numbers page about 20mins later and it has worked this time, Don't know why it just works now.

  2. 0

    KOENIG Yvan

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    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

  3. 0

    Badunit

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    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)