Simple FORTRAN question

  • Fortran
  • Thread starter Benzoate
  • Start date
  • #1
420
0

Main Question or Discussion Point

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,327
2,714
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 for: 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
992
Replies
1
Views
7K
  • Last Post
Replies
2
Views
2K
  • Last Post
2
Replies
32
Views
9K
Replies
3
Views
5K
Top