- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For example, there is a same result
REAL(8) :: log_double = 5.D0
PRINT*,"LOG ( DOUBLE ) =", LOG(log_double)
PRINT*,"DLOG( DOUBLE ) =", DLOG(log_double)
LOG ( DOUBLE ) = 1.60943791243410
DLOG( DOUBLE ) = 1.60943791243410
Thanks for answers,
Pete.
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In Fortran 77 and earlier, there was ALOG for single precision arguments and DLOG for double precision arguments. Fortran 90 introduced the generic function LOG to make it easier to write code without having to remember the specific names of all the intrinsic functions. LOG() is equivalent to ALOG and LOG() is equivalent to DLOG.
The specific names are still retained for the sake of backwards compatibility.
The specific names are still retained for the sake of backwards compatibility.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you. I hope that a same way was made for SIN, COS and etc.....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
All of the intrinsic functions mentioned in this thread were made generic in the f77 standard, making the f66 double precision versions de facto obsolescent. Internally, the support library may have separate entry points for various data types (not to mention scalar vs. vector, and for various instruction sets and, in ifort 12, arch-compatibility vs. specific sub-architectures), all accessed via the standard intrinsic names.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh, the last stuppid question please!
About entry points.
Will be my prog run "faster" if old fashion DSIN(double) vs SIN(double)is using?
About entry points.
Will be my prog run "faster" if old fashion DSIN(double) vs SIN(double)is using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No. Exactly the same run-time code is used in either case. However, use of specific functions such as DSIN can cause maintenance problems later so I recommend using the generic functions where possible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Steve,
This is sad news for all my previuos program code. :)
DEC is in our hearts. ;)
This is sad news for all my previuos program code. :)
DEC is in our hearts. ;)

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