Panagiotis Papasotiriou wrote:
> Could you please replace rkf45_translated.mac with that one:
>
> https://sites.google.com/site/pjpapasot/maxima/temporary/rkf45_translated.ma
c?attredirects=0&d=1
>
> and run Test.mac again? In that version of rkf45_translated, most local
> variables are declared as "float" instead of "any" (which is correct.)
> However, in my system that gives the following error when I run Test.mac:
>
> Maxima encountered a Lisp error:
> Error in * [or a callee]: ((MLIST SIMP) 1.9999800000000002E-7) is not of
> type NUMBER.
>
I don't have this error, but i have an error coming from x_start=0 instead
of 0.0. Note that lisp is *very* strict about variable declarations.
Having changed that, the test runs to completion, and gives:
(%i3) x_start : 0.0
(%i4) d : 1.e-5
2
(%i5) x_end : -
d
(%i6) showtime : true
Evaluation took 0.0000 seconds (0.0000 elapsed) using 0 bytes.
2 3
(%i7) sol_stiff : rkf45(y - y , y, d, [x, x_start, x_end],
max_iterations =
40000)
Evaluation took 17.9030 seconds (18.0450 elapsed) using 4426.274 MB.
2 3
(%i8) odes(x, y) := y - y
Evaluation took 0.0000 seconds (0.0000 elapsed) using 0 bytes.
(%i9) translate(odes)
Evaluation took 0.0070 seconds (0.0070 elapsed) using 262.461 KB.
(%i10) sol_stiff : rkf45_translated(odes, y, d, [x, x_start, x_end],
max_iterations =
40000)
Evaluation took 15.5040 seconds (15.6190 elapsed) using 4600.577 MB.
The compilation gives a number of warnings which are interesting and show that
many variables remain of type "any" which means that no real compilation is
done.
(%i2) load(rkf45_translated.mac)
warning: variable atol (declared type float) assigned type any.
warning: variable save_steps (declared type boolean) assigned type any.
warning: variable maxit (declared type fixnum) assigned type any.
warning: variable show_report (declared type boolean) assigned type any.
warning: variable h (declared type float) assigned type any.
warning: variable xi (declared type float) assigned type any.
warning: encountered undefined variable numberp in translation.
warning: odes is a bound variable in odes(xi,yi), but it is used as a
function.
note: instead I'll translate it as: apply(odes,[xi,yi])
warning: odes is a bound variable in odes(xi,yi), but it is used as a
function.
note: instead I'll translate it as: apply(odes,[xi,yi])
warning: odes is a bound variable in odes(0.25*h+xi,0.25*k1+yi), but it is
used as a function.
note: instead I'll translate it as: apply(odes,[0.25*h+xi,0.25*k1+yi])
warning: odes is a bound variable in
odes(0.375*h+xi,0.28125*k2+0.09375*k1+yi), but it is used as a function.
note: instead I'll translate it as:
apply(odes,[0.375*h+xi,0.28125*k2+0.09375*k1+yi])
warning: odes is a bound variable in odes(.9230769230769231*h+xi,3.32089212562
5854*k3-3.277196176604461*k2+.8793809740555303*k1+yi),
but it is used as a function.
note: instead I'll translate it as: apply(odes,[.9230769230769231*h+xi,3.32089
2125625854*k3-3.277196176604461*k2+.8793809740555303*k1+yi])
warning: odes is a bound variable in odes(h+xi,-.2058966861598441*k4+7.1734892
78752437*k3-8*k2+2.032407407407407*k1+yi),
but it is used as a function.
note: instead I'll translate it as: apply(odes,[h+xi,-.2058966861598441*k4+7.1
73489278752437*k3-8*k2+2.032407407407407*k1+yi])
warning: odes is a bound variable in odes(0.5*h+xi,-0.275*k5+.4529727095516569
*k4-1.381676413255361*k3+2*k2-.2962962962962963*k1+yi),
but it is used as a function.
note: instead I'll translate it as: apply(odes,[0.5*h+xi,-0.275*k5+.4529727095
516569*k4-1.381676413255361*k3+2*k2-.2962962962962963*k1+yi])
warning: variable trunc_error (declared type float) assigned type any.
warning: variable h_optimal (declared type float) assigned type any.
warning: variable x_tiny (declared type float) assigned type any.
--
Michel Talon