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 

Real*10

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
Anonymous
Guest





PostPosted: Tue Jul 05, 2005 6:59 am    Post subject: Real*10 Reply with quote

Hello,

I want to run a program with real*10 (and complex*20) commands. How do I define a real number and the intrinsics:
For double precision we have for example: 1.0d0 and dsqrt(2.0d0) ;for a number and the square root we use a "d". For single precision, we use a "e" instead. What do I have to use for this extended precision?


Rutger
Back to top
PaulLaidler
Site Admin


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

PostPosted: Tue Jul 05, 2005 10:35 am    Post subject: Real*10 Reply with quote

Here is a simple example.
The intrinsics have generic names as well as specific names.
SQRT is used here and is generic.

INTEGER,PARAMETER::rkind = SELECTED_REAL_KIND(1Cool
REAL(rkind) x
x = 4.0_rkind
PRINT*, SQRT(x)
END
Back to top
View user's profile Send private message AIM Address
Anonymous
Guest





PostPosted: Wed Jul 06, 2005 1:21 am    Post subject: Real*10 Reply with quote

Thank you for your quick response,

It is working fine now. However, what should I put when I have a real number like "1.0d-12". I have tried several options like 1.0_rkind-12..., but they won't work. Hope to hear from you soon and thanks again.

Rutger
Back to top
PaulLaidler
Site Admin


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

PostPosted: Wed Jul 06, 2005 2:23 am    Post subject: Real*10 Reply with quote

x = 1.0e-12_rkind
Back to top
View user's profile Send private message AIM Address
Anonymous
Guest





PostPosted: Wed Jul 06, 2005 3:01 am    Post subject: Real*10 Reply with quote

Thank you very much,
it is working!

Greetings rutger
Back to top
Anonymous
Guest





PostPosted: Wed Jul 06, 2005 9:34 am    Post subject: Real*10 Reply with quote

Sorry, one more time...

I have a NAG libraray installed special for the salford compiler. However, can it be that these routine cannot handle this extended precision?

Greetings Rutger
Back to top
PaulLaidler
Site Admin


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

PostPosted: Thu Jul 07, 2005 1:52 am    Post subject: Real*10 Reply with quote

I am not familiar with the NAG library.
The NAG library manual will tell you the type and precision of the arguments.
My guess is that floating point arguments will be REAL*8.
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 -> General 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