2016-09-13 5 views
-8

とは異なる結果を与える私はCOS /罪/日焼け機能は私の電卓

cos(90) 

を入力した場合、私は

-0.4480736 

を取得しかし、私の電卓は、私は得ることはありません

0 

を与えますそれ。

?cos 
These functions give the obvious trigonometric functions. They 
respectively compute the cosine, sine, tangent, arc-cosine, 
arc-sine, arc-tangent, and the two-argument arc-tangent. 

明らかですか? help(Trig)から

+9

度とラジアンの差を読んでください... – jonrsharpe

答えて

3

角度はラジアンではなく度で、標準のバージョン(すなわち、直角にπ/ 2である)ため、およびcospi等のための '半回転' に記載されてい

> cos(pi) 
[1] -1 
> cos(2*pi) 
[1] 1 

マインドこと:

> pi 
[1] 3.141593