Runge-Kutta method: Difference between revisions

Content deleted Content added
Grondilu (talk | contribs)
Grondilu (talk | contribs)
Line 458: Line 458:
which itself takes <math>(t, y)</math> as argument and returns the next <math>(t, y)</math>.
which itself takes <math>(t, y)</math> as argument and returns the next <math>(t, y)</math>.


Notice how we have use sprintf to deal with floating point rounding. See perlfaq4.
Notice how we have to use sprintf to deal with floating point rounding. See perlfaq4.
<lang perl>sub runge_kutta {
<lang perl>sub runge_kutta {
my ($yp, $dt) = @_;
my ($yp, $dt) = @_;