Jan 10, 2005 02:30
Turns out the iterative method I was using to do that math is innacurate unless delta-T was so small... well, lets just say there won't be any 200 Ghz computers for awhile, so it's a little impractical.
So I've spent the last few hours teaching myself linear differential equations. They're pretty snazzy once you get the hang of it! The process should be able to compute the constants of integration, and then be able to use the equations to compute the curves. Should actually be significantly FASTER, the e^(x) calculations WOULD be slow except.... it's ALWAYS e^(-rt/l), so we can precompute it, since T will only be a short list of values, that will not change during program execution. Meaning... this thing will take 10% the CPU time it used to, and be as accurate as 32-bit floats allow!