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 FP number

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



Joined: 10 Mar 2008
Posts: 2818
Location: South Pole, Antarctica

PostPosted: Tue Apr 16, 2024 11:54 am    Post subject: Invalid FP number Reply with quote

Good we have the debugger, otherwise the code without /debug just simply crash.


How to treat such presents from the hell? I do not know how it even appeared because i pre-screen every number before saving it on the subject of being denormal and out of scale.

What facilities for dealing with such numbers exist in Fortran and FTN95? Can I for example somehow filter them out before this assignment?
Back to top
View user's profile Send private message
Robert



Joined: 29 Nov 2006
Posts: 445
Location: Manchester

PostPosted: Tue Apr 16, 2024 12:09 pm    Post subject: Reply with quote

Is that value read from a file?
Back to top
View user's profile Send private message Visit poster's website
DanRRight



Joined: 10 Mar 2008
Posts: 2818
Location: South Pole, Antarctica

PostPosted: Wed Apr 17, 2024 11:57 am    Post subject: Reply with quote

The source of error was found. Yes, data was loaded from file and there was an error during read.
The question remains though: do Fortran/FTN have the ability to isolate such bad numbers ?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Apr 17, 2024 1:06 pm    Post subject: Reply with quote

Dan

The short answer is no. It's down to the programmer to allocate memory and say what data is stored.

You could write test code that accessed every floating point array element then the program will fault when reading an invalid value from memory.


Last edited by PaulLaidler on Fri Apr 19, 2024 5:50 pm; edited 1 time in total
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2818
Location: South Pole, Antarctica

PostPosted: Fri Apr 19, 2024 1:12 pm    Post subject: Reply with quote

Thanks for the info
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 -> 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