This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: add/assign problem, part 2.


David Mebane writes:
 > 
 > Andrew, the output you're getting is not quite right -- the solver
 > isn't going through any iterations, because the variable _nres_ in
 > LSMbdnew::iterate is zero every time, since LSMbdnew::norm isn't
 > working properly.  But I have tracked the problem to the function
 > bulkfunc::f.  If you notice, the function bulkfunc::setparam
 > doesn't actually set all the param's.  It misses one -- po2.  When
 > you get down into bulkfunc::f, then, you'll note that the second
 > element in the output array has a sqrt(po2) in the denominator.
 > 
 > Now, this obviously isn't any kind of compiler error (again,
 > sorry), but so that I can make it at least a little relevant to the
 > list, does anyone know why the value here was returned as zero (but
 > obviously was something more along the lines of nan)?  Is that a
 > compiler issue?

No.  If you want a variable or a field to be initialized as NaN, then
you have to do that yourself.

Anyway, now you know how to proceed: if you have any more problems,
produce a test case *and the expected output*.  Let's hope it's all
plain sailing from now on...

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]