AnsweredAssumed Answered

matrix value is -1.#QNAN

Question asked by Tianhao Zhang on Oct 22, 2008
Latest reply on Oct 28, 2008 by Tianhao Zhang
hi,

in the same .c file, i have a main function and another function called get_dv.

inside main, i initialize an array by saying
double dphidx[]={
  0.0, -1.0, -94.02, -1.0, 0.0, 1.0, 94.02, 1.0, 0.0, -1.0, -102.6, -1.0, 0.0, 1.0, 102.6, 1.0
  }; //16 element array

however, when i enter the debugger, the first 3 elements of the array appears to be -1.#QNAN, while the rest of the array is correct. i get the same result if I initialize the array element by element.

Then inside get_dv i initialize another array dphidx2[] similar to dphidx[] from main, yet this time, every single element is -1.#QNAN.

i selected float32 and double32 from the set up menu. can someone please help me fix this?

Thanks

Outcomes