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 

Puzzled by warning

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



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Sun Sep 02, 2018 11:24 pm    Post subject: Puzzled by warning Reply with quote

The test code
Code:
implicit none
real t,ftbl
t=0.5
ftbl = 3.0/(1.0+t) - 2.0*t + 1.0
print *,ftbl
end

causes the 8.30.279 compiler to issue a puzzling warning:
Code:
0004) ftbl = 3.0/(1.0+t) - 2.0*t + 1.0
WARNING - A REAL constant has been truncated with possible loss of precision - maybe a KIND is required

Older versions of the FTN95 compiler, such as 8.0 and 7.2, do not issue this warning with the same source code. Moving the "1.0" from the end to the beginning of the right hand side expression makes the warning go away.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Mon Sep 03, 2018 7:45 am    Post subject: Reply with quote

Thank you for the feedback.

A new warning was recently added for loss of precision when single precision real constants are used in double precision expressions. The warning here means that at least some of the arithmetic is actually being carried out in double precision (or potentially so from the compiler's point of view).

I have made a note that we should try to fix this.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


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

PostPosted: Mon Oct 29, 2018 3:43 pm    Post subject: Reply with quote

This has now been fixed for the next release of FTN95.
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