PDA

View Full Version : IMSL Dumb question



blgurus
11-27-2006, 10:58 PM
Ok I have read the Absoft fortran documentation and it states that the NNLPF specific interface names are S_NNLPF and D_NNLPF.

I assume that means single precision and double precision.

I can compile this

CALL S_NNLPF(FCN2,M,ME,IBTYPE,XLB,XUB)

where

! XLB is vector array of lower bounds on variables
REAL(KIND(1E0)) XLB(DATAPOINTS)

! XUB is vector array of upper bounds on variables
REAL(KIND(1E0)) XUB(DATAPOINTS)

But what would the XLB and XUB declarations look like if I compile it for double precision?

CALL D_NNLPF(FCN2,M,ME,IBTYPE,XLB,XUB)

I am really dumb and rusty on Fortran so please avoid flames!

ed
11-28-2006, 05:16 AM
I should let our Fortran experts answer first, but my guess is that you need to set KIND=2 instead of KIND=1. I'm used to different syntax than your example, but REAL(KIND(1e0)) is really setting REAL(KIND(1)) which would be float. For double, try REAL(KIND(2)).