Simple FORTRAN question

  • Fortran
  • Thread starter Benzoate
  • Start date
  • Tags
    Fortran
  • #1
421
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))
 
Technology news on Phys.org
  • #2
You are looking for arccos - you will have to check documentation for the correct name of the function, as it differs between dialects.
 
  • #3
Hi Benzoate,

The inverse cosine function is given by:

acos()
 

Suggested for: Simple FORTRAN question

2
Replies
60
Views
2K
Replies
12
Views
815
Replies
2
Views
684
Replies
8
Views
883
Replies
4
Views
939
2
Replies
37
Views
2K
Replies
8
Views
2K
Replies
12
Views
2K
Replies
4
Views
1K
Back
Top