soccer jersey forums.silverfrost.com :: View topic - Infinity in Fortran
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 

Infinity in Fortran

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



Joined: 10 Sep 2006
Posts: 105
Location: United Kingdom

PostPosted: Fri Dec 22, 2023 9:51 am    Post subject: Infinity in Fortran Reply with quote

Hello

What is the best way to represent the result of a calculation as +infinity or -infinity in ftn95? In Matlab/Scilab there is a special variable that can be used.

Thanks

Lester
Back to top
View user's profile Send private message
wahorger



Joined: 13 Oct 2014
Posts: 1225
Location: Morrison, CO, USA

PostPosted: Fri Dec 22, 2023 10:54 pm    Post subject: Reply with quote

If you have a calculation that generates a floating point overflow, you can have it detected. Other than that, you are out of luck. This ability is documented in the HELP file that comes with PLATO. Search for floating point trap, or just "floating point" to get references.

MATLAB traps these conditions (overflow, underflow) and signals internally that infinity is reached. Remember, MATLAB is NOT a compiler that generates native code, as does FTN95. So it can deal with INFINITY in whatever way it chooses.
Back to top
View user's profile Send private message Visit poster's website
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