Simple FORTRAN question

  • Fortran
  • Thread starter Benzoate
  • Start date
  • #1
420
0
I want Fortran to regconize trigonometric functions.

The trigonometric equation I am trying to right in Fortran is the Law of cosines

COS(c)=d^2+a^2-b^2/(2*a*d)
However, I want Fortran to calculate the inverse of the above equation:

How would I write the following equation in Fortran?
c=COS^1-(d^2+a^2-b^2/(2*a*d))
 

Answers and Replies

  • #2
Borek
Mentor
28,631
3,105
You are looking for arccos - you will have to check documentation for the correct name of the function, as it differs between dialects.
 
  • #3
alphysicist
Homework Helper
2,238
1
Hi Benzoate,

The inverse cosine function is given by:

acos()
 

Related Threads on Simple FORTRAN question

  • Last Post
Replies
2
Views
3K
  • Last Post
Replies
2
Views
3K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
1
Views
1K
Replies
1
Views
8K
  • Last Post
Replies
2
Views
2K
  • Last Post
2
Replies
32
Views
10K
Replies
3
Views
5K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
19
Views
6K
Top