@nebula2: If many people say you are wrong maybe you are wrong.
In a right triangle, the cosine (cos) of either of the acute angles is equal to the quotient of the adjacent side divided by tbe Hypotenuse. It is a unitless number in the range [-1,+1]. It is not an angle so it is not expressed in degrees or in radians. Say for example, that the sides of the triangle are measured in feet. If the adjacent side is 10 feet long and the Hypotenuse is 20 feet long, the cosine is 10feet/20feet = 0.5. No units.
You can calculate the cosine of x as
cos(x) = 1 - x^2/2! + x^4/4! - x^6/6! + x^8/8! - x^10/10! …. This is an infinite series that must be truncated at some point to make it practical.
This method (known as a Taylor Series for cosine) only works when x is expressed in radians. Hence, if you want to compute cos(120°) you have to put x=120 * PI / 180 ≈ 2.094395. This is the reason why x is always expressed in radians when using trig functions in computer languages. To make it more comfortable, calculators and spreadsheets allow angles expressed in degrees, but the very first thing they do is to convert them to radians.
Then, when you put z = cos(120) in a computer language such as c++, you are calculating the cosine of an angle that measures 120 radians, which is indeed 0.81. Just 0.81. Not 0.81 degrees or 0.81 radians. The 0.81 is a “unitless” quantity as pointed above, not an angle.
You can use a calculator in radian mode to do this calculation. Or, convert 120 radians to degrees (6875.493542) and get its cosine using degrees mode in your calculator.
If you do try the Taylor Series for cosine to compute cos, be aware that there will be a truncating error which is less than the absolute value of the last term included in the calculation. For a large angle such as 120 radians it is best to first calculate an equivalent angle in the range (-pi,+pi) to speed up convergence and minimize rounding errors. You do this by adding or subtracting multiples of 2pi as needed, given that for any integer n, cos(x) = cos(x + 2pi*n)
So, 120 is “converted” to 120 - 38*pi = 0.619479. This is the value of x to be used when calculating cos using the above formula.
Last, but not least, everybody in this forum is here to help.