Functions Not Found in HP FORTRAN 77/V [ HP FORTRAN 77/iX Migration Guide ] MPE/iX 5.0 Documentation
HP FORTRAN 77/iX Migration Guide
Functions Not Found in HP FORTRAN 77/V
The following FORTRAN 66/V functions don't exist in HP FORTRAN 77/V. If
your program uses one of these functions, replace or supply it as
described below, or find another way to perform the task.
BOOL CSINH CCOSH CTANH
Replacing the BOOL Function
Replace the BOOL function in one of two ways, depending on how it is
used. If FORTRAN 66/V program uses BOOL as a masking function, make the
changes illustrated in the following example:
FORTRAN 66/V i = (BOOL(i) .AND. 7L)
HP FORTRAN 77/V i = i .AND. 7
If the FORTRAN 66/V program uses BOOL to convert to a logical (expecting
logicals to be in the FORTRAN 66/V format), make the changes illustrated
in the following example:
FORTRAN 66/V IF (BOOL(i)) GOTO 10
HP FORTRAN 77/V IF (BTEST(i,0)) GOTO 10
Note that BTEST(i,0) tests the low-order bit of i, according to the
FORTRAN 66/V format for logicals. If the value of i has been adjusted to
the HP FORTRAN 77/V format for logicals, the bit defined by HP FORTRAN
77/V must be tested.
Supplying the CSINH Function
Supply the CSINH function of FORTRAN 66/V by adding the following lines
to your source code:
COMPLEX FUNCTION CSINH(c)
COMPLEX c
x = real(c)
y = aimag(c)
CSINH = cmplx(sinh(x) * cos(y), sin(y) * cosh(x))
RETURN
END
Supplying the CCOSH Function
Supply the CCOSH function of FORTRAN 66/V by adding the following lines
to your source code:
COMPLEX FUNCTION CCOSH(c)
COMPLEX c
x = real(c)
y = aimag(c)
CCOSH = cmplx(cosh(x) * cos(y), sin(y) * sinh(x))
RETURN
END
Supplying the CTANH Function
Supply the CTANH function of FORTRAN 66/V by adding the following lines
to your source code:
COMPLEX FUNCTION CTANH(c)
COMPLEX c
x = real(c)
y = aimag(c)
denom = cosh(2.0 * x) + cos(2.0 * y)
CTANH = cmplx(sinh(2.0 * x) / denom, sin(2.0 * y) / denom)
RETURN
END
MPE/iX 5.0 Documentation