Silverfrost Forums

Welcome to our forums

Complex intrinsics with kind=3 arguments

6 Jun 2022 9:18 #29016

It appears that the support for complex intrinsics such as COSH(x) introduced fairly recently does not include support for their use when X is a kind=3 variable.

For the sample below, the symbol CXCOSH is reported by the compiler as missing.

! Compile with Win32 as program uses kind=3 complex variables
!
!  cosh(x) = cos(j*x)            j = cmplx(0.0,1.0)
!
!   Try x = 1.0 + j1.0
!
print*, cos ( cmplx(0.0,1.0,kind=2) * cmplx(1.0,1.0,kind=2) )
print*, cosh( cmplx(1.0,1.0,kind=2) )
print*
print*, cos ( cmplx(0.0,1.0,kind=3) * cmplx(1.0,1.0,kind=3) )
print*, cosh( cmplx(1.0,1.0,kind=3))
end

Is this an omission, or is there a reason for not providing this support? Rather caught me out for the task I have in hand at the moment (but I can work around using the appropriate identities)

Ken

6 Jun 2022 10:37 #29017

Ken

cosh(z) for complex and extended precision z has not been implemented.

In fact none of the new intrinsics with real values have been implemented for extended precision.

As you will know, no extended precision values can be used with 64 bit FTN95.

6 Jun 2022 10:55 #29018

Thanks Paul, I know what I need to do now. I did not think to test the real value case. Ken

8 Jun 2022 9:26 #29021

Paul,

Looking at the 'old' intrinsics, for complex and extended precision z, log(z) and exp(z) have been implemented but not sqrt(z).

print*, log(cmplx(0.0,1.0,kind=3))
print*, exp(cmplx(0.0,1.0,kind=3))
print*, sqrt(cmplx(0.0,1.0,kind=3))
end

Ken

8 Jun 2022 9:48 #29023

Thanks Ken.

This will be easy to fix.

The compiler is asking for CXSQRT@ but the library routine is CXSQR@.

Please login to reply.