forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Complex intrinsics with kind=3 arguments

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
Kenneth_Smith



Joined: 18 May 2012
Posts: 697
Location: Hamilton, Lanarkshire, Scotland.

PostPosted: Mon Jun 06, 2022 10:18 am    Post subject: Complex intrinsics with kind=3 arguments Reply with quote

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.

Code:
! 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
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon Jun 06, 2022 11:37 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message AIM Address
Kenneth_Smith



Joined: 18 May 2012
Posts: 697
Location: Hamilton, Lanarkshire, Scotland.

PostPosted: Mon Jun 06, 2022 11:55 am    Post subject: Reply with quote

Thanks Paul, I know what I need to do now. I did not think to test the real value case. Ken
Back to top
View user's profile Send private message Visit poster's website
Kenneth_Smith



Joined: 18 May 2012
Posts: 697
Location: Hamilton, Lanarkshire, Scotland.

PostPosted: Wed Jun 08, 2022 10:26 am    Post subject: Reply with quote

Paul,

Looking at the "old" intrinsics, for complex and extended precision z, log(z) and exp(z) have been implemented but not sqrt(z).
Code:
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
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Wed Jun 08, 2022 10:48 am    Post subject: Reply with quote

Thanks Ken.

This will be easy to fix.

The compiler is asking for CXSQRT@ but the library routine is CXSQR@.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group