Skip to content

Commit

Permalink
Tue Mar 28 09:36:23 2023 Jiri (George) Lebl <jirka@5z.com>
Browse files Browse the repository at this point in the history
	* examples/euler-method-graphs-exp.gel: Make sure we do computations
	  with floats to avoid running out of memory with something like
	  g(x,y)=y^2
  • Loading branch information
jirilebl committed Mar 28, 2023
1 parent 5337058 commit 68da841
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Tue Mar 28 09:36:23 2023 Jiri (George) Lebl <jirka@5z.com>

* examples/euler-method-graphs-exp.gel: Make sure we do computations
with floats to avoid running out of memory with something like
g(x,y)=y^2

Tue Mar 28 09:30:30 2023 Jiri (George) Lebl <jirka@5z.com>

* examples/euler-method-graphs-exp.gel: Improve and make more
Expand Down
2 changes: 1 addition & 1 deletion examples/eulers-method-graphs-exp.gel
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ h=1;
x0=0;
y0=1;

xx=[x0];yy=[y0];
xx=[float(x0)];yy=[float(y0)];
for j=2 to (xend/h)+1 do (
xx@(j) = xx@(j-1)+h;
yy@(j) = yy@(j-1)+g(xx@(j-1),yy@(j-1))*h;
Expand Down

0 comments on commit 68da841

Please sign in to comment.