Frustrating excel problem with COS

  • Thread starter Thread starter tommy060289
  • Start date Start date
  • Tags Tags
    Cos Excel
AI Thread Summary
Excel calculates trigonometric functions like COS using radians by default, which can lead to incorrect results if angles are input in degrees. To resolve this, users can convert degrees to radians using the RADIANS() function, allowing for accurate calculations. For example, using COS(RADIANS(angle_in_degrees)) will yield the correct cosine value for degrees. Additionally, the DEGREES() function can convert radians back to degrees if needed. This method is particularly useful for users handling large datasets, as it avoids the need for manual adjustments to each calculation.
tommy060289
Messages
20
Reaction score
0
Dear all,

I am currently using excel to work out some values for incident solar radiation but I am running into a rather frustrating problem when I try to do the following:

=COS(9.863)

my calculator tells me correctly this is 0.985.

however, when I put this in excel it decides it actually equals 0.905, which is obviously wrong.

I've gathered this is an issue with excel giving the answer in Rads rather than degrees but I can not figure out how you force excel to output the correct answer (in degrees) and since I have thousands of calculations it isn't feasible for me to alter every one manually.

Cheers,

Tom
 
Computer science news on Phys.org
No worries, figured I can get it to change by adding:

*(Pi()/180) on the end
 
You can also use the RADIANS() function: COS(RADIANS(angle_in_degrees)).

And if you ever need to go the other way, there's a DEGREES() function: DEGREES(ACOS(x)).
 
tommy060289 said:
I've gathered this is an issue with excel giving the answer in Rads rather than degrees but I can not figure out how you force excel to output the correct answer (in degrees) and since I have thousands of calculations it isn't feasible for me to alter every one manually.
Just to clarify, hopefully you realize the output result of =cos(9.863) is not in radians, it is the input number 9.863 that Excel assumes is in radians.

jtbell said:
You can also use the RADIANS() function: COS(RADIANS(angle_in_degrees)).

And if you ever need to go the other way, there's a DEGREES() function: DEGREES(ACOS(x)).
I didn't know that, thanks for the tip!
 
In my discussions elsewhere, I've noticed a lot of disagreement regarding AI. A question that comes up is, "Is AI hype?" Unfortunately, when this question is asked, the one asking, as far as I can tell, may mean one of three things which can lead to lots of confusion. I'll list them out now for clarity. 1. Can AI do everything a human can do and how close are we to that? 2. Are corporations and governments using the promise of AI to gain more power for themselves? 3. Are AI and transhumans...
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...
Back
Top