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 

passing double to single

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



Joined: 04 Sep 2006
Posts: 56

PostPosted: Tue Jun 26, 2007 8:04 pm    Post subject: passing double to single Reply with quote

Hello,

My program curve fits data in double precision, and later the results are displayed as graphs using the simple plot library. My problem is that I have an intermittent fault when passing the double precision array for plotting to a single precision array accepted by Simpleplot. The values are normalised to be within the single precision range before passing to the single precision array, however I intermittently receive a floating point overflow error. I don't understand why it only happens intermittently as I'm testing with the same data each time.

How do I pass the values from my double precision array to the single precision array?

Best regards

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


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

PostPosted: Tue Jun 26, 2007 9:27 pm    Post subject: Reply with quote

1. Is there a SimplePlot routine that will take double precision values?

2. If you have to convert to single precision then copy into a single precision array before the call.

3. Have you tested your program using /CHECKMATE?
Back to top
View user's profile Send private message AIM Address
acp693



Joined: 04 Sep 2006
Posts: 56

PostPosted: Wed Jun 27, 2007 8:38 am    Post subject: Reply with quote

Hello Paul,

I don't think any of the Simple plot routines that I am using take double precision. the routine used is VSZU.

I am already passing my double precision arrays to a single precision array by using:

singlearray = sngl(doublearray)

The values in doublearray are normalised so that they lie within single precision limits.

I haven't checked with Checkmate, as the part of my code which does the curve fitting, uses calls to the acml library which somehow checkmate objects to, and the code will not run. the calls to acml work alright in release mode. I will have to seperate the graphing part of the code to be able to run checkmate.

best regards

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


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

PostPosted: Wed Jun 27, 2007 12:02 pm    Post subject: Reply with quote

If you cannot use /CHECKMATE can you use /CHECK or just /DEBUG?

If you start up your program with SDBG it should stop and show you the line where the overflow occurs.
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