Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

implementation of DACOSD
i have this error when porting a Fortran program from tru 64 to Linux:

[dma@alhena SIMECAFLD]$ make
f77  long_onde.F -o long_onde.o -c -Wall
long_onde.F: In subroutine `long_onde':
long_onde.F:423: warning:
radrad=dacosd(z/rayray) +i
^
Reference to unimplemented intrinsic `DACOSD' at (^) (assumed EXTERNAL)
long_onde.F:423:
radrad=dacosd(z/rayray) +i
^
Invalid declaration of or reference to symbol `dacosd' at (^) [initially
seen at (^)]
make: *** [long_onde.o] Error 1

i assume this due to dacosd not yet implemented under gcc
(see http://gcc.gnu.org/onlinedocs/gcc-3...-Intrinsic.html)

does anyone have an implementation of the function DACOSD ?

in a way as simple as dsind and dcosd can be implemented:

*        ****************************************
*************************
real*8 FUNCTION DSIND( angle )
*        ****************************************
*************************
implicit none
real*8 angle
real*8 pi

if( angle .eq. 180.0 ) then
dsind = 0.
else
pi=acos(0.)*2
dsind = dsin( angle * pi / 180.0 )
endif
return
end

*        ****************************************
*************************
real*8 FUNCTION DCOSD( angle )
*        ****************************************
*************************
implicit none
real*8 angle
real*8 pi

if( angle .eq. 90.0 ) then
dcosd = 0.
else if( angle .eq. 270.0 ) then
dcosd = 0.
else
pi=acos(0.)*2
dcosd = dcos( angle * pi / 180.0 )
endif
return
end

any help greatly appreciated

Damien
--

Damien MATTEI

email: Damien (dot) Mattei (AT) obs*azur (dot) fr
and replace * with -

Report this thread to moderator Post Follow-up to this message
Old Post
Damien MATTEI
05-27-05 01:57 PM


Re: implementation of DACOSD
Damien:  For work like this an example (using a module) may help:

http://ftp.cac.psu.edu/pub/ger/fort...thConstants.f95

Skip Knoble

On Fri, 27 May 2005 12:18:05 +0200, Damien MATTEI <donotreply@unice.fr> wrot
e:

-|i have this error when porting a Fortran program from tru 64 to Linux:
-|
-|[dma@alhena SIMECAFLD]$ make
-|f77  long_onde.F -o long_onde.o -c -Wall
-|long_onde.F: In subroutine `long_onde':
-|long_onde.F:423: warning:
-|                             radrad=dacosd(z/rayray) +i
-|                                    ^
-|Reference to unimplemented intrinsic `DACOSD' at (^) (assumed EXTERNAL)
-|long_onde.F:423:
-|                             radrad=dacosd(z/rayray) +i
-|                                    ^
-|Invalid declaration of or reference to symbol `dacosd' at (^) [initially
-|seen at (^)]
-|make: *** [long_onde.o] Error 1
-|
-|i assume this due to dacosd not yet implemented under gcc
-|(see http://gcc.gnu.org/onlinedocs/gcc-3...-Intrinsic.html)
-|
-|does anyone have an implementation of the function DACOSD ?
-|
-|in a way as simple as dsind and dcosd can be implemented:
-|
-|*        ****************************************
*************************
-|         real*8 FUNCTION DSIND( angle )
-|*        ****************************************
*************************
-|	implicit none
-|	real*8 angle
-|	real*8 pi
-|
-|	if( angle .eq. 180.0 ) then
-|	  dsind = 0.
-|	else
-|	  pi=acos(0.)*2
-|	  dsind = dsin( angle * pi / 180.0 )
-|	endif
-|	return
-|	end
-|
-|*        ****************************************
*************************
-|         real*8 FUNCTION DCOSD( angle )
-|*        ****************************************
*************************
-|	implicit none
-|	real*8 angle
-|	real*8 pi
-|
-|	if( angle .eq. 90.0 ) then
-|	  dcosd = 0.
-|	else if( angle .eq. 270.0 ) then
-|	  dcosd = 0.
-|         else
-|	  pi=acos(0.)*2
-|	  dcosd = dcos( angle * pi / 180.0 )
-|	endif
-|	return
-|	end
-|
-|any help greatly appreciated
-|
-|Damien


Report this thread to moderator Post Follow-up to this message
Old Post
Herman D. Knoble
05-27-05 09:01 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Fortran archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 10:26 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.