replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Invalid floating point operation
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 

Invalid floating point operation

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



Joined: 04 Nov 2012
Posts: 6

PostPosted: Thu Dec 06, 2012 9:43 am    Post subject: Invalid floating point operation Reply with quote

Hi
I get the error:
"Invalid floating point operation"



What is wrong? Question Question Question Question Question
L=98
U0=0.1
NJM=99
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Dec 06, 2012 11:43 am    Post subject: Reply with quote

I cannot see anything obviously wrong with this so try breaking up the assignment into smaller parts so that the error is localised.

Use 4.0 etc for real constants if you are multiplying reals.
Also, if L is an integer then you are relying on the numerator being real to get real rather than integer division.
Back to top
View user's profile Send private message AIM Address
davidb



Joined: 17 Jul 2009
Posts: 560
Location: UK

PostPosted: Thu Dec 06, 2012 9:12 pm    Post subject: Re: Invalid floating point operation Reply with quote

PPPO wrote:

What is wrong? Question Question Question Question Question
L=98
U0=0.1
NJM=99


I would guess these variables don't have these values in the expression you think they have. You should use the debugger to pause execution at this point and check the values are what you expect.

If they are different from what you expect, you need to trace backwards and find out how they got the values they have.

Paul's suggestion is a good one too. But as FTN95 has a brilliant debugger SBDG it would be shame not to use it to find your bug.
_________________
Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl
Back to top
View user's profile Send private message
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