Euler method: Difference between revisions
Content added Content deleted
(→{{header|Common Lisp}}: incf is not needed, it sets the variable - which is already done by DO) |
|||
Line 569: | Line 569: | ||
;; Set the initial values and increments of the iteration variables. |
;; Set the initial values and increments of the iteration variables. |
||
(do ((t a ( |
(do ((t a (+ t h)) |
||
(y y0 ( |
(y y0 (+ y (* h (funcall f t y))))) |
||
;; End the iteration when t reaches the end b of the time interval. |
;; End the iteration when t reaches the end b of the time interval. |