Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

natural logaritm

keremusu1
Beginner
608 Views

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?

0 Kudos
1 Reply
Jeffrey_A_Intel
Employee
608 Views

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_test

IMPLICIT NONE

PARAMETER wp = KIND( 1.0D0 )

REAL( wp ) :: x, z

x = 10.0_wp

z = LOG( x )

WRITE( *, * ) x, z

END

PROGRAM log_test

0 Kudos
Reply