RM SH
RM SH

Reputation: 21

Why does cos(x) give me a result of x as x was in radians?

I am using Python but there is something strange. Why does cos(x) give me a result of x as was in radians? while cos(radians(x)) gives the answer as x was in degree

for example :

>>> cos(75)
0.9217512697247493 

but the truth is if 75 is in degree, then cos(75) = 0.26

>>> cos(radians(75))
0.25881904510252074 

but the truth is if 75 is in radians, then cos(75) = 0.90

I am wrong ? why is that happening ?

Upvotes: 0

Views: 652

Answers (1)

ruakh
ruakh

Reputation: 183211

  • cos(75) means "the cosine of 75 radians". (See documentation.)
  • radians(75) means "convert 75° to radians", i.e. "the number of radians that's equivalent to 75°". (See documentation.)
  • so cos(radians(75)) means "the cosine of {the number of radians that's equivalent to 75°} radians", i.e. "the cosine of 75°".

Upvotes: 6

Related Questions