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 

Problem with exponent (nearest...)

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





PostPosted: Thu Mar 27, 2008 6:23 pm    Post subject: Problem with exponent (nearest...) Reply with quote

Dear Paul,

Test49 shows that the statement

exponent (nearest(RX, RX)-RX)-1

gives a wrong result. It seems also that the “+” sign in

nearestRX = nearest(RX,+RX)

is not allowed.

I have run the test with FTN95 Version 5.20.

Klaus Lassmann

Code:

  Winapp

  Program Test49
      Implicit None
      Integer          :: machep,negep
      Real , Parameter :: RX=1.0
      Real             :: nearestRX

      nearestRX = nearest  (RX, RX)
      machep    = exponent (nearestRX-RX)-1

      nearestRX = nearest  (RX,-RX)
      negep     = exponent (nearestRX-RX)-1

      Write (*,*) 'machep    = ', machep
      Write (*,*) ' negep    = ',  negep

!     --- This form should be formally correct, but
!         gives a wrong result without warning

      machep    = exponent (nearest(RX, RX)-RX)-1
      negep     = exponent (nearest(RX,-RX)-RX)-1

      Write (*,*) 'machep = ', machep
      Write (*,*) ' negep = ',  negep

!     --- the following form leads to
!         "floating point stack overflow"

!     nearestRX = nearest(RX,+RX)

  End Program Test49
Back to top
PaulLaidler
Site Admin


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

PostPosted: Thu Mar 27, 2008 7:41 pm    Post subject: Reply with quote

Is the problem only with version 5.20 and have you tried the patch (version 5.20.1)?
Back to top
View user's profile Send private message AIM Address
KL
Guest





PostPosted: Fri Mar 28, 2008 3:03 pm    Post subject: Reply with quote

I have run it with 5.20
Back to top
KL
Guest





PostPosted: Tue Apr 22, 2008 4:27 pm    Post subject: above problem Reply with quote

Can I do anything further for clarifying the problem?

Klaus
Back to top
PaulLaidler
Site Admin


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

PostPosted: Tue Apr 22, 2008 7:27 pm    Post subject: Reply with quote

Thank you for reminding me about these bugs.
They do not need further clarification.
We will investigate them as soon as we can.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


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

PostPosted: Wed Apr 23, 2008 8:22 am    Post subject: Reply with quote

Both the bugs only occur when RX is declared as a PARAMETER.
The result is that FTN95 tries to do all of the coding inline and gets it wrong.
Back to top
View user's profile Send private message AIM Address
KL
Guest





PostPosted: Wed Apr 30, 2008 5:10 pm    Post subject: Reply with quote

But declaring RX as a parameter is not wrong, or? In this case it is very simple to circumvent the problem, but this is not always the case. So I would suggest to really solve this problem.

Best regards,

Klaus
Back to top
PaulLaidler
Site Admin


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

PostPosted: Wed Apr 30, 2008 7:15 pm    Post subject: Reply with quote

Sorry I did not express myself clearly.
We do intend to fix this bug.
My comment presents a temporary work-around.
Back to top
View user's profile Send private message AIM Address
KL
Guest





PostPosted: Sat May 03, 2008 9:02 am    Post subject: Reply with quote

Thank you very much Paul,

there is no hurry from my side. As I knew already a workaround I just thought it a good idea to inform you.

Best regards,

Klaus Lassmann
Back to top
PaulLaidler
Site Admin


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

PostPosted: Mon Jun 16, 2008 1:57 pm    Post subject: Reply with quote

This bug has now been fixed.
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