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 

Extension to iso_fortran_env

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



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

PostPosted: Sun Dec 24, 2023 5:15 pm    Post subject: Extension to iso_fortran_env Reply with quote

Hello.

There does not appear to be support for ieee_arithmetic in the current ftn95 e.g.

Code:

program ieee
    use, intrinsic :: iso_fortran_env, only: wp=>real64
    use, intrinsic :: ieee_arithmetic
    implicit none

    print *, ieee_value(1.0_wp, ieee_positive_inf)
    print *, ieee_value(1.0_wp, ieee_negative_inf)
end program ieee


This might be handy to have in a future release to deal better with coding infinity into mathematical functions. For infinity I just set a very large number as a break point.

Lester
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Dec 27, 2023 9:23 am    Post subject: Reply with quote

Lester

Thank you for the feedback. I have made a note of your suggestion.

This is a part of the 2003 Standard that has not yet been implemented in FTN95.

At the moment computing z = 0.0 then v = 1.0/z will raise a runtime time exception as will v = z/z. This default exception handling will need to be changed when implementing the ieee_arithmetic module and this could be unsafe if the programmer is not fully aware if the implications.
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 -> Suggestions 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