Silverfrost Forums

Welcome to our forums

passing double to single

26 Jun 2007 7:04 #1993

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

26 Jun 2007 8:27 #1994
  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?

27 Jun 2007 7:38 #1996

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

27 Jun 2007 11:02 #1998

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.

Please login to reply.