- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
I'm trying to calculate the natural logaritm of a number with the command LOG. But, whatever the number within the brackets is, this warning appears:
This argument data type is incompatible with this intrinsic procedure; procedure assumed EXTERNAL. [LOG]
What do I need to do to be able to calculate the natural logaritm of a number?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is the type of the argument? Showing the relevant code would be the best answer.
LOG(X) requires that the type of X be either real or complex.
This sample program works fine:
PROGRAM
log_testIMPLICIT NONE
PARAMETER wp = KIND( 1.0D0 )
REAL( wp ) :: x, z
x = 10.0_wp
z = LOG( x )
WRITE( *, * ) x, z
END
PROGRAM log_test
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page