not currently at my workstation right now, but I'm curious to why nstep would be so huge... nstep has been predetermined and *times has allocated enough memories for maxstep double (which supposedly is equal to nstep)?
not currently at my workstation right now, but I'm curious to why nstep would be so huge... nstep has been predetermined and *times has allocated enough memories for maxstep double (which supposedly is equal to nstep)?
Well one of several things could be happening
- something is trashing the 'times' pointer itself, so when you try and index through it with an in-range value, you still lose.
- you didn't allocate anything in the first place (no NULL check, though that seems unlikely)
- you didn't allocate enough space, though you do have the right 'sizeof(type)' in there.
Like I said, you need to debug it yourself.
Or at least show us the results of what you've managed to figure out.
Even supplying your input data would help those who actually have the gsl library installed to at least try your code.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.