problem with SLATEC ccbrt function
beliavsky_at_aol.com
Date: 01/27/04
- Next message: Pierre Asselin: "Re: wrong xlf90 fp math ?"
- Previous message: Pierre Asselin: "Re: Help from fellow Fortran Users"
- Next in thread: James Van Buskirk: "Re: problem with SLATEC ccbrt function"
- Reply: James Van Buskirk: "Re: problem with SLATEC ccbrt function"
- Reply: Richard Maine: "Re: problem with SLATEC ccbrt function"
- Reply: Brian Wannamaker: "Re: problem with SLATEC ccbrt function"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 27 Jan 2004 07:24:01 -0800
I compiled the SLATEC library using Lahey/Fujitsu Fortran 95 5.70c and
got the following message for file "ccbrt.f", which computes the
complex cube root:
C:\fortran>lf95 -c -f95 -nco -o0 -w ccbrt.f
Lahey/Fujitsu Fortran 95 Express Release 5.70c
Compiling program unit CCBRT at line 1:
3205-W: "ccbrt.f", line 25, column 15: Intrinsic procedure CARG is
not standard-conforming.
2206-S: "ccbrt.f", line 25, column 15: Invalid type, attribute, or
value of actual argument for intrinsic function CARG.
3205-W: "ccbrt.f", line 26, column 11: Intrinsic procedure CBRT is
not standard-conforming.
Encountered 1 error, 2 warnings in file ccbrt.f.
Compiling file ccbrt.f.
Compaq Visual Fortran 6.6c and g77 version 2.95.2 do not generate
these warning and error messages.
Is ccbrt.f standard F77 and standard F95? If not, how can it be fixed?
I never use complex variables in Fortran and am fuzzy about how to use
them and the instrinsic functions that call them.
I am attaching the source of ccbrt.f below. It can be downloaded from
http://www.netlib.org/slatec/fnlib/ccbrt.f . According to the counter
at www.netlib.org, SLATEC has been accessed more than 5 million times!
*DECK CCBRT
COMPLEX FUNCTION CCBRT (Z)
C***BEGIN PROLOGUE CCBRT
C***PURPOSE Compute the cube root.
C***LIBRARY SLATEC (FNLIB)
C***CATEGORY C2
C***TYPE COMPLEX (CBRT-S, DCBRT-D, CCBRT-C)
C***KEYWORDS CUBE ROOT, ELEMENTARY FUNCTIONS, FNLIB, ROOTS
C***AUTHOR Fullerton, W., (LANL)
C***DESCRIPTION
C
C CCBRT(Z) calculates the complex cube root of Z. The principal root
C for which -PI .LT. arg(Z) .LE. +PI is returned.
C
C***REFERENCES (NONE)
C***ROUTINES CALLED CARG, CBRT
C***REVISION HISTORY (YYMMDD)
C 770401 DATE WRITTEN
C 890531 Changed all specific intrinsics to generic. (WRB)
C 890531 REVISION DATE from Version 3.2
C 891214 Prologue converted to Version 4.0 format. (BAB)
C***END PROLOGUE CCBRT
COMPLEX Z
C***FIRST EXECUTABLE STATEMENT CCBRT
THETA = CARG(Z) / 3.0
R = CBRT (ABS(Z))
C
CCBRT = CMPLX (R*COS(THETA), R*SIN(THETA))
C
RETURN
END
- Next message: Pierre Asselin: "Re: wrong xlf90 fp math ?"
- Previous message: Pierre Asselin: "Re: Help from fellow Fortran Users"
- Next in thread: James Van Buskirk: "Re: problem with SLATEC ccbrt function"
- Reply: James Van Buskirk: "Re: problem with SLATEC ccbrt function"
- Reply: Richard Maine: "Re: problem with SLATEC ccbrt function"
- Reply: Brian Wannamaker: "Re: problem with SLATEC ccbrt function"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|