3 (closeto(value,compare,tol):=
6 abse:abs(value-compare),if(abse<tol) then true else abse),
15 atol: [1e-6, 1e-10, 1e-6];
16 [1.0*10^-6,1.0*10^-10,1.0*10^-6]$
21 f1: -.04*y1 + 1e4*y2*y3;
22 10000.0*y2*y3-0.04*y1$
25 fex: [f1, -f1-f3, f3];
26 [10000.0*y2*y3-0.04*y1,-10000.0*y2*y3-3.0*10^7*y2^2+0.04*y1,3.0*10^7*y2^2]$
33 (state : dlsode_init(fex, ['t,y1,y2,y3], mf),0);
37 result: dlsode_step(y, t, tout, rtol, atol, istate, state),
38 printf(true, "At t = ~12,4,2e y = ~{~14,6,2e~}~%", result[1], result[2]),
42 closeto(result[1],4.0*10^10,1e-10);
44 closeto(result[2][1],-7.170560923964532*10^-8,1e-10);
46 closeto(result[2][2],-2.868223874302304*10^-13,1e-10);
48 closeto(result[2][3],1.000000071705913,1e-10);
50 closeto(result[3],2,1e-10);