(%i1) batch(diffeq.max)
read and interpret file: /home/dennis/mastersource/mine/omnisode/diffeq.max
(%i2) load(stringproc)
(%o2) /usr/local/share/maxima/5.26.0/share/contrib/stringproc/stringproc.mac
(%i3) display_alot(iter) := block([abserr, analytic_val_y, ind_var,
numeric_val, relerr, term_no], if iter >= 0
then (ind_var : array_x , omniout_float(ALWAYS,
1
"x[1] ", 33, ind_var, 20, " "),
analytic_val_y : exact_soln_y(ind_var),
omniout_float(ALWAYS, "y[1] (analytic) ", 33, analytic_val_y,
20, " "), term_no : 1, numeric_val : array_y ,
term_no
abserr : omniabs(numeric_val - analytic_val_y),
omniout_float(ALWAYS, "y[1] (numeric) ", 33, numeric_val,
20, " "), if omniabs(analytic_val_y) # 0.0
abserr 100.0
then (relerr : -----------------------,
omniabs(analytic_val_y)
relerr
if relerr # 0.0 then glob_good_digits : - floor(log10(------))
100.0
else glob_good_digits : 16) else (relerr : - 1.0, glob_good_digits : - 1),
if glob_iter = 1 then array_1st_rel_error : relerr
1
else array_last_rel_error : relerr, omniout_float(ALWAYS,
1
"absolute error ", 4, abserr, 20, " "),
omniout_float(ALWAYS, "relative error ", 4, relerr, 20,
"%"), omniout_int(INFO, "Correct digits ", 32,
glob_good_digits, 4, " "), omniout_float(ALWAYS,
"h ", 4, glob_h, 20, " ")))
(%o3) display_alot(iter) := block([abserr, analytic_val_y, ind_var,
numeric_val, relerr, term_no], if iter >= 0
then (ind_var : array_x , omniout_float(ALWAYS,
1
"x[1] ", 33, ind_var, 20, " "),
analytic_val_y : exact_soln_y(ind_var),
omniout_float(ALWAYS, "y[1] (analytic) ", 33, analytic_val_y,
20, " "), term_no : 1, numeric_val : array_y ,
term_no
abserr : omniabs(numeric_val - analytic_val_y),
omniout_float(ALWAYS, "y[1] (numeric) ", 33, numeric_val,
20, " "), if omniabs(analytic_val_y) # 0.0
abserr 100.0
then (relerr : -----------------------,
omniabs(analytic_val_y)
relerr
if relerr # 0.0 then glob_good_digits : - floor(log10(------))
100.0
else glob_good_digits : 16) else (relerr : - 1.0, glob_good_digits : - 1),
if glob_iter = 1 then array_1st_rel_error : relerr
1
else array_last_rel_error : relerr, omniout_float(ALWAYS,
1
"absolute error ", 4, abserr, 20, " "),
omniout_float(ALWAYS, "relative error ", 4, relerr, 20,
"%"), omniout_int(INFO, "Correct digits ", 32,
glob_good_digits, 4, " "), omniout_float(ALWAYS,
"h ", 4, glob_h, 20, " ")))
(%i4) adjust_for_pole(h_param) := block([hnew, sz2, tmp],
block(hnew : h_param, glob_normmax : glob_small_float,
if omniabs(array_y_higher ) > glob_small_float
1, 1
then (tmp : omniabs(array_y_higher ),
1, 1
if tmp < glob_normmax then glob_normmax : tmp),
if glob_look_poles and (omniabs(array_pole ) > glob_small_float)
1
array_pole
1
and (array_pole # glob_large_float) then (sz2 : -----------,
1 10.0
if sz2 < hnew then (omniout_float(INFO, "glob_h adjusted to ", 20, h_param,
12, "due to singularity."), omniout_str(INFO, "Reached Optimal"),
return(hnew))), if not glob_reached_optimal_h
then (glob_reached_optimal_h : true, glob_curr_iter_when_opt :
glob_current_iter, glob_optimal_clock_start_sec : elapsed_time_seconds(),
glob_optimal_start : array_x ), hnew : sz2), return(hnew))
1
(%o4) adjust_for_pole(h_param) := block([hnew, sz2, tmp],
block(hnew : h_param, glob_normmax : glob_small_float,
if omniabs(array_y_higher ) > glob_small_float
1, 1
then (tmp : omniabs(array_y_higher ),
1, 1
if tmp < glob_normmax then glob_normmax : tmp),
if glob_look_poles and (omniabs(array_pole ) > glob_small_float)
1
array_pole
1
and (array_pole # glob_large_float) then (sz2 : -----------,
1 10.0
if sz2 < hnew then (omniout_float(INFO, "glob_h adjusted to ", 20, h_param,
12, "due to singularity."), omniout_str(INFO, "Reached Optimal"),
return(hnew))), if not glob_reached_optimal_h
then (glob_reached_optimal_h : true, glob_curr_iter_when_opt :
glob_current_iter, glob_optimal_clock_start_sec : elapsed_time_seconds(),
glob_optimal_start : array_x ), hnew : sz2), return(hnew))
1
(%i5) prog_report(x_start, x_end) := block([clock_sec, opt_clock_sec,
clock_sec1, expect_sec, left_sec, percent_done, total_clock_sec],
clock_sec1 : elapsed_time_seconds(), total_clock_sec :
convfloat(clock_sec1) - convfloat(glob_orig_start_sec),
glob_clock_sec : convfloat(clock_sec1) - convfloat(glob_clock_start_sec),
left_sec : - convfloat(clock_sec1) + convfloat(glob_orig_start_sec)
+ convfloat(glob_max_sec), expect_sec :
comp_expect_sec(convfloat(x_end), convfloat(x_start),
convfloat(glob_h) + convfloat(array_x ),
1
convfloat(clock_sec1) - convfloat(glob_orig_start_sec)),
opt_clock_sec : convfloat(clock_sec1)
- convfloat(glob_optimal_clock_start_sec),
glob_optimal_expect_sec : comp_expect_sec(convfloat(x_end),
convfloat(x_start), convfloat(glob_h) + convfloat(array_x ),
1
convfloat(opt_clock_sec)), percent_done :
comp_percent(convfloat(x_end), convfloat(x_start),
convfloat(glob_h) + convfloat(array_x )), glob_percent_done : percent_done,
1
omniout_str_noeol(INFO, "Total Elapsed Time "),
omniout_timestr(convfloat(total_clock_sec)),
omniout_str_noeol(INFO, "Elapsed Time(since restart) "),
omniout_timestr(convfloat(glob_clock_sec)),
if convfloat(percent_done) < convfloat(100.0)
then (omniout_str_noeol(INFO, "Expected Time Remaining "),
omniout_timestr(convfloat(expect_sec)),
omniout_str_noeol(INFO, "Optimized Time Remaining "),
omniout_timestr(convfloat(glob_optimal_expect_sec))),
omniout_str_noeol(INFO, "Time to Timeout "),
omniout_timestr(convfloat(left_sec)), omniout_float(INFO,
"Percent Done ", 33, percent_done, 4, "%"))
(%o5) prog_report(x_start, x_end) := block([clock_sec, opt_clock_sec,
clock_sec1, expect_sec, left_sec, percent_done, total_clock_sec],
clock_sec1 : elapsed_time_seconds(), total_clock_sec :
convfloat(clock_sec1) - convfloat(glob_orig_start_sec),
glob_clock_sec : convfloat(clock_sec1) - convfloat(glob_clock_start_sec),
left_sec : - convfloat(clock_sec1) + convfloat(glob_orig_start_sec)
+ convfloat(glob_max_sec), expect_sec :
comp_expect_sec(convfloat(x_end), convfloat(x_start),
convfloat(glob_h) + convfloat(array_x ),
1
convfloat(clock_sec1) - convfloat(glob_orig_start_sec)),
opt_clock_sec : convfloat(clock_sec1)
- convfloat(glob_optimal_clock_start_sec),
glob_optimal_expect_sec : comp_expect_sec(convfloat(x_end),
convfloat(x_start), convfloat(glob_h) + convfloat(array_x ),
1
convfloat(opt_clock_sec)), percent_done :
comp_percent(convfloat(x_end), convfloat(x_start),
convfloat(glob_h) + convfloat(array_x )), glob_percent_done : percent_done,
1
omniout_str_noeol(INFO, "Total Elapsed Time "),
omniout_timestr(convfloat(total_clock_sec)),
omniout_str_noeol(INFO, "Elapsed Time(since restart) "),
omniout_timestr(convfloat(glob_clock_sec)),
if convfloat(percent_done) < convfloat(100.0)
then (omniout_str_noeol(INFO, "Expected Time Remaining "),
omniout_timestr(convfloat(expect_sec)),
omniout_str_noeol(INFO, "Optimized Time Remaining "),
omniout_timestr(convfloat(glob_optimal_expect_sec))),
omniout_str_noeol(INFO, "Time to Timeout "),
omniout_timestr(convfloat(left_sec)), omniout_float(INFO,
"Percent Done ", 33, percent_done, 4, "%"))
(%i6) check_for_pole() := block([cnt, dr1, dr2, ds1, ds2, hdrc, m, n, nr1,
nr2, ord_no, rad_c, rcs, rm0, rm1, rm2, rm3, rm4, found], n : glob_max_terms,
m : - 1 - 2 + n, while (m >= 10) and ((omniabs(array_y_higher ) < glob_small_float)
1, m
or (omniabs(array_y_higher ) < glob_small_float)
1, m - 1
or (omniabs(array_y_higher ) < glob_small_float)) do m :
1, m - 2
array_y_higher
1, m
m - 1, if m > 10 then (rm0 : ----------------------,
array_y_higher
1, m - 1
array_y_higher
1, m - 1
rm1 : ----------------------, hdrc : convfloat(m - 1) rm0
array_y_higher
1, m - 2
- convfloat(m - 2) rm1, if omniabs(hdrc) > glob_small_float
glob_h convfloat(m - 1) rm0
then (rcs : ------, ord_no : 2.0 - convfloat(m) + --------------------,
hdrc hdrc
array_real_pole : rcs, array_real_pole : ord_no)
1, 1 1, 2
else (array_real_pole : glob_large_float,
1, 1
array_real_pole : glob_large_float))
1, 2
else (array_real_pole : glob_large_float,
1, 1
array_real_pole : glob_large_float), n : - 1 - 2 + glob_max_terms,
1, 2
cnt : 0, while (cnt < 5) and (n >= 10) do (if omniabs(array_y_higher ) >
1, n
glob_small_float then cnt : 1 + cnt else cnt : 0, n : n - 1), m : cnt + n,
if m <= 10 then (array_complex_pole : glob_large_float,
1, 1
array_complex_pole : glob_large_float)
1, 2
elseif (omniabs(array_y_higher ) >= glob_large_float)
1, m
or (omniabs(array_y_higher ) >= glob_large_float)
1, m - 1
or (omniabs(array_y_higher ) >= glob_large_float)
1, m - 2
or (omniabs(array_y_higher ) >= glob_large_float)
1, m - 3
or (omniabs(array_y_higher ) >= glob_large_float)
1, m - 4
or (omniabs(array_y_higher ) >= glob_large_float)
1, m - 5
then (array_complex_pole : glob_large_float,
1, 1
array_complex_pole : glob_large_float)
1, 2
array_y_higher array_y_higher
1, m 1, m - 1
else (rm0 : ----------------------, rm1 : ----------------------,
array_y_higher array_y_higher
1, m - 1 1, m - 2
array_y_higher array_y_higher
1, m - 2 1, m - 3
rm2 : ----------------------, rm3 : ----------------------,
array_y_higher array_y_higher
1, m - 3 1, m - 4
array_y_higher
1, m - 4
rm4 : ----------------------, nr1 : convfloat(m - 3) rm2
array_y_higher
1, m - 5
- 2.0 convfloat(m - 2) rm1 + convfloat(m - 1) rm0,
nr2 : convfloat(m - 4) rm3 - 2.0 convfloat(m - 3) rm2 + convfloat(m - 2) rm1,
- 1.0 2.0 - 1.0 - 1.0 2.0 - 1.0 5.0 8.0 3.0
dr1 : ----- + --- + -----, dr2 : ----- + --- + -----, ds1 : --- - --- + ---,
rm3 rm2 rm1 rm4 rm3 rm2 rm3 rm2 rm1
5.0 8.0 3.0
ds2 : --- - --- + ---, if (omniabs(nr1 dr2 - nr2 dr1) <= glob_small_float)
rm4 rm3 rm2
or (omniabs(dr1) <= glob_small_float) then (array_complex_pole :
1, 1
glob_large_float, array_complex_pole : glob_large_float)
1, 2
else (if omniabs(nr1 dr2 - nr2 dr1) > glob_small_float
dr1 dr2 - ds2 dr1 + ds1 dr2
then (rcs : ---------------------------,
nr1 dr2 - nr2 dr1
rcs nr1 - ds1 convfloat(m)
ord_no : ------------- - ------------,
2.0 dr1 2.0
if omniabs(rcs) > glob_small_float then (if rcs > 0.0
then rad_c : sqrt(rcs) glob_h else rad_c : glob_large_float)
else (rad_c : glob_large_float, ord_no : glob_large_float))
else (rad_c : glob_large_float, ord_no : glob_large_float)),
array_complex_pole : rad_c, array_complex_pole : ord_no),
1, 1 1, 2
found : false, if (not found) and ((array_real_pole = glob_large_float)
1, 1
or (array_real_pole = glob_large_float))
1, 2
and ((array_complex_pole # glob_large_float) and (array_complex_pole # glob_large_float))
1, 1 1, 2
and ((array_complex_pole > 0.0) and (array_complex_pole > 0.0))
1, 1 1, 2
then (array_poles : array_complex_pole ,
1, 1 1, 1
array_poles : array_complex_pole , found : true, array_type_pole : 2,
1, 2 1, 2 1
if glob_display_flag then omniout_str(ALWAYS,
"Complex estimate of poles used")), if (not found)
and ((array_real_pole # glob_large_float) and (array_real_pole # glob_large_float)
1, 1 1, 2
and (array_real_pole > 0.0) and (array_real_pole > 0.0)
1, 1 1, 2
and ((array_complex_pole = glob_large_float) or (array_complex_pole = glob_large_float) or (array_complex_pole <= 0.0) or (array_complex_pole <= 0.0)))
1, 1 1, 2 1, 1 1, 2
then (array_poles : array_real_pole ,
1, 1 1, 1
array_poles : array_real_pole , found : true, array_type_pole : 1,
1, 2 1, 2 1
if glob_display_flag then omniout_str(ALWAYS, "Real estimate of pole used")),
if (not found) and (((array_real_pole = glob_large_float)
1, 1
or (array_real_pole = glob_large_float))
1, 2
and ((array_complex_pole = glob_large_float) or (array_complex_pole = glob_large_float)))
1, 1 1, 2
then (array_poles : glob_large_float, array_poles : glob_large_float,
1, 1 1, 2
found : true, array_type_pole : 3, if glob_display_flag
1
then omniout_str(ALWAYS, "NO POLE")),
if (not found) and ((array_real_pole < array_complex_pole )
1, 1 1, 1
and (array_real_pole > 0.0) and (array_real_pole >
1, 1 1, 2
0.0))
then (array_poles : array_real_pole ,
1, 1 1, 1
array_poles : array_real_pole , found : true, array_type_pole : 1,
1, 2 1, 2 1
if glob_display_flag then omniout_str(ALWAYS, "Real estimate of pole used")),
if (not found) and ((array_complex_pole # glob_large_float)
1, 1
and (array_complex_pole # glob_large_float)
1, 2
and (array_complex_pole > 0.0) and (array_complex_pole >
1, 1 1, 2
0.0))
then (array_poles : array_complex_pole ,
1, 1 1, 1
array_poles : array_complex_pole , array_type_pole : 2, found : true,
1, 2 1, 2 1
if glob_display_flag then omniout_str(ALWAYS,
"Complex estimate of poles used")), if not found
then (array_poles : glob_large_float, array_poles : glob_large_float,
1, 1 1, 2
array_type_pole : 3, if glob_display_flag
1
then omniout_str(ALWAYS, "NO POLE")), array_pole : glob_large_float,
1
array_pole : glob_large_float, if array_pole > array_poles
2 1 1, 1
then (array_pole : array_poles , array_pole : array_poles ),
1 1, 1 2 1, 2
display_pole())
(%o6) check_for_pole() := block([cnt, dr1, dr2, ds1, ds2, hdrc, m, n, nr1,
nr2, ord_no, rad_c, rcs, rm0, rm1, rm2, rm3, rm4, found], n : glob_max_terms,
m : - 1 - 2 + n, while (m >= 10) and ((omniabs(array_y_higher ) < glob_small_float)
1, m
or (omniabs(array_y_higher ) < glob_small_float)
1, m - 1
or (omniabs(array_y_higher ) < glob_small_float)) do m :
1, m - 2
array_y_higher
1, m
m - 1, if m > 10 then (rm0 : ----------------------,
array_y_higher
1, m - 1
array_y_higher
1, m - 1
rm1 : ----------------------, hdrc : convfloat(m - 1) rm0
array_y_higher
1, m - 2
- convfloat(m - 2) rm1, if omniabs(hdrc) > glob_small_float
glob_h convfloat(m - 1) rm0
then (rcs : ------, ord_no : 2.0 - convfloat(m) + --------------------,
hdrc hdrc
array_real_pole : rcs, array_real_pole : ord_no)
1, 1 1, 2
else (array_real_pole : glob_large_float,
1, 1
array_real_pole : glob_large_float))
1, 2
else (array_real_pole : glob_large_float,
1, 1
array_real_pole : glob_large_float), n : - 1 - 2 + glob_max_terms,
1, 2
cnt : 0, while (cnt < 5) and (n >= 10) do (if omniabs(array_y_higher ) >
1, n
glob_small_float then cnt : 1 + cnt else cnt : 0, n : n - 1), m : cnt + n,
if m <= 10 then (array_complex_pole : glob_large_float,
1, 1
array_complex_pole : glob_large_float)
1, 2
elseif (omniabs(array_y_higher ) >= glob_large_float)
1, m
or (omniabs(array_y_higher ) >= glob_large_float)
1, m - 1
or (omniabs(array_y_higher ) >= glob_large_float)
1, m - 2
or (omniabs(array_y_higher ) >= glob_large_float)
1, m - 3
or (omniabs(array_y_higher ) >= glob_large_float)
1, m - 4
or (omniabs(array_y_higher ) >= glob_large_float)
1, m - 5
then (array_complex_pole : glob_large_float,
1, 1
array_complex_pole : glob_large_float)
1, 2
array_y_higher array_y_higher
1, m 1, m - 1
else (rm0 : ----------------------, rm1 : ----------------------,
array_y_higher array_y_higher
1, m - 1 1, m - 2
array_y_higher array_y_higher
1, m - 2 1, m - 3
rm2 : ----------------------, rm3 : ----------------------,
array_y_higher array_y_higher
1, m - 3 1, m - 4
array_y_higher
1, m - 4
rm4 : ----------------------, nr1 : convfloat(m - 3) rm2
array_y_higher
1, m - 5
- 2.0 convfloat(m - 2) rm1 + convfloat(m - 1) rm0,
nr2 : convfloat(m - 4) rm3 - 2.0 convfloat(m - 3) rm2 + convfloat(m - 2) rm1,
- 1.0 2.0 - 1.0 - 1.0 2.0 - 1.0 5.0 8.0 3.0
dr1 : ----- + --- + -----, dr2 : ----- + --- + -----, ds1 : --- - --- + ---,
rm3 rm2 rm1 rm4 rm3 rm2 rm3 rm2 rm1
5.0 8.0 3.0
ds2 : --- - --- + ---, if (omniabs(nr1 dr2 - nr2 dr1) <= glob_small_float)
rm4 rm3 rm2
or (omniabs(dr1) <= glob_small_float) then (array_complex_pole :
1, 1
glob_large_float, array_complex_pole : glob_large_float)
1, 2
else (if omniabs(nr1 dr2 - nr2 dr1) > glob_small_float
dr1 dr2 - ds2 dr1 + ds1 dr2
then (rcs : ---------------------------,
nr1 dr2 - nr2 dr1
rcs nr1 - ds1 convfloat(m)
ord_no : ------------- - ------------,
2.0 dr1 2.0
if omniabs(rcs) > glob_small_float then (if rcs > 0.0
then rad_c : sqrt(rcs) glob_h else rad_c : glob_large_float)
else (rad_c : glob_large_float, ord_no : glob_large_float))
else (rad_c : glob_large_float, ord_no : glob_large_float)),
array_complex_pole : rad_c, array_complex_pole : ord_no),
1, 1 1, 2
found : false, if (not found) and ((array_real_pole = glob_large_float)
1, 1
or (array_real_pole = glob_large_float))
1, 2
and ((array_complex_pole # glob_large_float) and (array_complex_pole # glob_large_float))
1, 1 1, 2
and ((array_complex_pole > 0.0) and (array_complex_pole > 0.0))
1, 1 1, 2
then (array_poles : array_complex_pole ,
1, 1 1, 1
array_poles : array_complex_pole , found : true, array_type_pole : 2,
1, 2 1, 2 1
if glob_display_flag then omniout_str(ALWAYS,
"Complex estimate of poles used")), if (not found)
and ((array_real_pole # glob_large_float) and (array_real_pole # glob_large_float)
1, 1 1, 2
and (array_real_pole > 0.0) and (array_real_pole > 0.0)
1, 1 1, 2
and ((array_complex_pole = glob_large_float) or (array_complex_pole = glob_large_float) or (array_complex_pole <= 0.0) or (array_complex_pole <= 0.0)))
1, 1 1, 2 1, 1 1, 2
then (array_poles : array_real_pole ,
1, 1 1, 1
array_poles : array_real_pole , found : true, array_type_pole : 1,
1, 2 1, 2 1
if glob_display_flag then omniout_str(ALWAYS, "Real estimate of pole used")),
if (not found) and (((array_real_pole = glob_large_float)
1, 1
or (array_real_pole = glob_large_float))
1, 2
and ((array_complex_pole = glob_large_float) or (array_complex_pole = glob_large_float)))
1, 1 1, 2
then (array_poles : glob_large_float, array_poles : glob_large_float,
1, 1 1, 2
found : true, array_type_pole : 3, if glob_display_flag
1
then omniout_str(ALWAYS, "NO POLE")),
if (not found) and ((array_real_pole < array_complex_pole )
1, 1 1, 1
and (array_real_pole > 0.0) and (array_real_pole >
1, 1 1, 2
0.0))
then (array_poles : array_real_pole ,
1, 1 1, 1
array_poles : array_real_pole , found : true, array_type_pole : 1,
1, 2 1, 2 1
if glob_display_flag then omniout_str(ALWAYS, "Real estimate of pole used")),
if (not found) and ((array_complex_pole # glob_large_float)
1, 1
and (array_complex_pole # glob_large_float)
1, 2
and (array_complex_pole > 0.0) and (array_complex_pole >
1, 1 1, 2
0.0))
then (array_poles : array_complex_pole ,
1, 1 1, 1
array_poles : array_complex_pole , array_type_pole : 2, found : true,
1, 2 1, 2 1
if glob_display_flag then omniout_str(ALWAYS,
"Complex estimate of poles used")), if not found
then (array_poles : glob_large_float, array_poles : glob_large_float,
1, 1 1, 2
array_type_pole : 3, if glob_display_flag
1
then omniout_str(ALWAYS, "NO POLE")), array_pole : glob_large_float,
1
array_pole : glob_large_float, if array_pole > array_poles
2 1 1, 1
then (array_pole : array_poles , array_pole : array_poles ),
1 1, 1 2 1, 2
display_pole())
(%i7) get_norms() := block([iii], if not glob_initial_pass
then (iii : 1, while iii <= glob_max_terms do (array_norms : 0.0,
iii
iii : 1 + iii), iii : 1, while iii <=
glob_max_terms do (if omniabs(array_y ) > array_norms
iii iii
then array_norms : omniabs(array_y ), iii : 1 + iii)))
iii iii
(%o7) get_norms() := block([iii], if not glob_initial_pass
then (iii : 1, while iii <= glob_max_terms do (array_norms : 0.0,
iii
iii : 1 + iii), iii : 1, while iii <=
glob_max_terms do (if omniabs(array_y ) > array_norms
iii iii
then array_norms : omniabs(array_y ), iii : 1 + iii)))
iii iii
(%i8) atomall() := block([kkk, order_d, adj2, temporary, term, temp, temp2],
array_tmp1 : array_y_higher , if not array_y_set_initial
1 2, 1 1, 3
then (if 1 <= glob_max_terms then (temporary :
array_tmp2 expt(glob_h, 2) factorial_3(0, 2), array_y : temporary,
1 3
temporary 2.0
array_y_higher : temporary, temporary : -------------,
1, 3 glob_h
temporary 3.0
array_y_higher : temporary, temporary : -------------,
2, 2 glob_h
array_y_higher : temporary)), kkk : 2, array_tmp1 : array_y_higher ,
3, 1 2 2, 2
if not array_y_set_initial then (if 2 <= glob_max_terms
1, 4
then (temporary : array_tmp2 expt(glob_h, 2) factorial_3(1, 3),
2
array_y : temporary, array_y_higher : temporary,
4 1, 4
temporary 2.0
temporary : -------------, array_y_higher : temporary,
glob_h 2, 3
temporary 3.0
temporary : -------------, array_y_higher : temporary)), kkk : 3,
glob_h 3, 2
array_tmp1 : array_y_higher , if not array_y_set_initial
3 2, 3 1, 5
then (if 3 <= glob_max_terms then (temporary :
array_tmp2 expt(glob_h, 2) factorial_3(2, 4), array_y : temporary,
3 5
temporary 2.0
array_y_higher : temporary, temporary : -------------,
1, 5 glob_h
temporary 3.0
array_y_higher : temporary, temporary : -------------,
2, 4 glob_h
array_y_higher : temporary)), kkk : 4, array_tmp1 : array_y_higher ,
3, 3 4 2, 4
if not array_y_set_initial then (if 4 <= glob_max_terms
1, 6
then (temporary : array_tmp2 expt(glob_h, 2) factorial_3(3, 5),
4
array_y : temporary, array_y_higher : temporary,
6 1, 6
temporary 2.0
temporary : -------------, array_y_higher : temporary,
glob_h 2, 5
temporary 3.0
temporary : -------------, array_y_higher : temporary)), kkk : 5,
glob_h 3, 4
array_tmp1 : array_y_higher , if not array_y_set_initial
5 2, 5 1, 7
then (if 5 <= glob_max_terms then (temporary :
array_tmp2 expt(glob_h, 2) factorial_3(4, 6), array_y : temporary,
5 7
temporary 2.0
array_y_higher : temporary, temporary : -------------,
1, 7 glob_h
temporary 3.0
array_y_higher : temporary, temporary : -------------,
2, 6 glob_h
array_y_higher : temporary)), kkk : 6,
3, 5
while kkk <= glob_max_terms do (array_tmp1 : array_y_higher ,
kkk 2, kkk
order_d : 2, if 1 + order_d + kkk <= glob_max_terms
then (if not array_y_set_initial
1, order_d + kkk
array_tmp2 expt(glob_h, order_d)
kkk
then (temporary : -----------------------------------------,
factorial_3(kkk - 1, - 1 + order_d + kkk)
array_y : temporary, array_y_higher : temporary,
order_d + kkk 1, order_d + kkk
term : - 1 + order_d + kkk, adj2 : 2, while (adj2 <= 1 + order_d)
temporary convfp(adj2)
and (term >= 1) do (temporary : ----------------------,
glob_h
array_y_higher : temporary, adj2 : 1 + adj2, term : term - 1))),
adj2, term
kkk : 1 + kkk))
(%o8) atomall() := block([kkk, order_d, adj2, temporary, term, temp, temp2],
array_tmp1 : array_y_higher , if not array_y_set_initial
1 2, 1 1, 3
then (if 1 <= glob_max_terms then (temporary :
array_tmp2 expt(glob_h, 2) factorial_3(0, 2), array_y : temporary,
1 3
temporary 2.0
array_y_higher : temporary, temporary : -------------,
1, 3 glob_h
temporary 3.0
array_y_higher : temporary, temporary : -------------,
2, 2 glob_h
array_y_higher : temporary)), kkk : 2, array_tmp1 : array_y_higher ,
3, 1 2 2, 2
if not array_y_set_initial then (if 2 <= glob_max_terms
1, 4
then (temporary : array_tmp2 expt(glob_h, 2) factorial_3(1, 3),
2
array_y : temporary, array_y_higher : temporary,
4 1, 4
temporary 2.0
temporary : -------------, array_y_higher : temporary,
glob_h 2, 3
temporary 3.0
temporary : -------------, array_y_higher : temporary)), kkk : 3,
glob_h 3, 2
array_tmp1 : array_y_higher , if not array_y_set_initial
3 2, 3 1, 5
then (if 3 <= glob_max_terms then (temporary :
array_tmp2 expt(glob_h, 2) factorial_3(2, 4), array_y : temporary,
3 5
temporary 2.0
array_y_higher : temporary, temporary : -------------,
1, 5 glob_h
temporary 3.0
array_y_higher : temporary, temporary : -------------,
2, 4 glob_h
array_y_higher : temporary)), kkk : 4, array_tmp1 : array_y_higher ,
3, 3 4 2, 4
if not array_y_set_initial then (if 4 <= glob_max_terms
1, 6
then (temporary : array_tmp2 expt(glob_h, 2) factorial_3(3, 5),
4
array_y : temporary, array_y_higher : temporary,
6 1, 6
temporary 2.0
temporary : -------------, array_y_higher : temporary,
glob_h 2, 5
temporary 3.0
temporary : -------------, array_y_higher : temporary)), kkk : 5,
glob_h 3, 4
array_tmp1 : array_y_higher , if not array_y_set_initial
5 2, 5 1, 7
then (if 5 <= glob_max_terms then (temporary :
array_tmp2 expt(glob_h, 2) factorial_3(4, 6), array_y : temporary,
5 7
temporary 2.0
array_y_higher : temporary, temporary : -------------,
1, 7 glob_h
temporary 3.0
array_y_higher : temporary, temporary : -------------,
2, 6 glob_h
array_y_higher : temporary)), kkk : 6,
3, 5
while kkk <= glob_max_terms do (array_tmp1 : array_y_higher ,
kkk 2, kkk
order_d : 2, if 1 + order_d + kkk <= glob_max_terms
then (if not array_y_set_initial
1, order_d + kkk
array_tmp2 expt(glob_h, order_d)
kkk
then (temporary : -----------------------------------------,
factorial_3(kkk - 1, - 1 + order_d + kkk)
array_y : temporary, array_y_higher : temporary,
order_d + kkk 1, order_d + kkk
term : - 1 + order_d + kkk, adj2 : 2, while (adj2 <= 1 + order_d)
temporary convfp(adj2)
and (term >= 1) do (temporary : ----------------------,
glob_h
array_y_higher : temporary, adj2 : 1 + adj2, term : term - 1))),
adj2, term
kkk : 1 + kkk))
log(x)
(%i9) log10(x) := ---------
log(10.0)
log(x)
(%o9) log10(x) := ---------
log(10.0)
(%i10) omniout_str(iolevel, str) := if glob_iolevel >= iolevel
then printf(true, "~a~%", string(str))
(%o10) omniout_str(iolevel, str) := if glob_iolevel >= iolevel
then printf(true, "~a~%", string(str))
(%i11) omniout_str_noeol(iolevel, str) :=
if glob_iolevel >= iolevel then printf(true, "~a", string(str))
(%o11) omniout_str_noeol(iolevel, str) :=
if glob_iolevel >= iolevel then printf(true, "~a", string(str))
(%i12) omniout_labstr(iolevel, label, str) :=
if glob_iolevel >= iolevel then printf(true, "~a = ~a~%", string(label),
string(str))
(%o12) omniout_labstr(iolevel, label, str) :=
if glob_iolevel >= iolevel then printf(true, "~a = ~a~%", string(label),
string(str))
(%i13) omniout_float(iolevel, prelabel, prelen, value, vallen, postlabel) :=
if glob_iolevel >= iolevel then (if vallen = 4
then printf(true, "~a = ~g ~s ~%", prelabel, value, postlabel)
else printf(true, "~a = ~g ~s ~%", prelabel, value, postlabel))
(%o13) omniout_float(iolevel, prelabel, prelen, value, vallen, postlabel) :=
if glob_iolevel >= iolevel then (if vallen = 4
then printf(true, "~a = ~g ~s ~%", prelabel, value, postlabel)
else printf(true, "~a = ~g ~s ~%", prelabel, value, postlabel))
(%i14) omniout_int(iolevel, prelabel, prelen, value, vallen, postlabel) :=
if glob_iolevel >= iolevel then (printf(true, "~a = ~d ~a~%", prelabel, value,
postlabel), newline())
(%o14) omniout_int(iolevel, prelabel, prelen, value, vallen, postlabel) :=
if glob_iolevel >= iolevel then (printf(true, "~a = ~d ~a~%", prelabel, value,
postlabel), newline())
(%i15) omniout_float_arr(iolevel, prelabel, elemnt, prelen, value, vallen,
postlabel) := if glob_iolevel >= iolevel
then (sprint(prelabel, "[", elemnt, "]=", value, postlabel), newline())
(%o15) omniout_float_arr(iolevel, prelabel, elemnt, prelen, value, vallen,
postlabel) := if glob_iolevel >= iolevel
then (sprint(prelabel, "[", elemnt, "]=", value, postlabel), newline())
(%i16) dump_series(iolevel, dump_label, series_name, array_series, numb) :=
block([i], if glob_iolevel >= iolevel then (i : 1,
while i <= numb do (sprint(dump_label, series_name, "i = ", i, "series = ",
array_series ), newline(), i : 1 + i)))
i
(%o16) dump_series(iolevel, dump_label, series_name, array_series, numb) :=
block([i], if glob_iolevel >= iolevel then (i : 1,
while i <= numb do (sprint(dump_label, series_name, "i = ", i, "series = ",
array_series ), newline(), i : 1 + i)))
i
(%i17) dump_series_2(iolevel, dump_label, series_name, array_series2, numb,
subnum) := block([i, sub, ts_term], if glob_iolevel >= iolevel
then (sub : 1, while sub <= subnum do (i : 1,
while i <= num do (sprint(dump_label, series_name, "sub = ", sub, "i = ", i,
"series2 = ", array_series2 ), i : 1 + i), sub : 1 + sub)))
sub, i
(%o17) dump_series_2(iolevel, dump_label, series_name, array_series2, numb,
subnum) := block([i, sub, ts_term], if glob_iolevel >= iolevel
then (sub : 1, while sub <= subnum do (i : 1,
while i <= num do (sprint(dump_label, series_name, "sub = ", sub, "i = ", i,
"series2 = ", array_series2 ), i : 1 + i), sub : 1 + sub)))
sub, i
(%i18) cs_info(iolevel, str) := if glob_iolevel >= iolevel
then sprint(concat("cs_info ", str, " glob_correct_start_flag = ",
glob_correct_start_flag, "glob_h := ", glob_h, "glob_reached_optimal_h := ",
glob_reached_optimal_h))
(%o18) cs_info(iolevel, str) := if glob_iolevel >= iolevel
then sprint(concat("cs_info ", str, " glob_correct_start_flag = ",
glob_correct_start_flag, "glob_h := ", glob_h, "glob_reached_optimal_h := ",
glob_reached_optimal_h))
(%i19) logitem_time(fd, secs_in) := block([cent_int, centuries, days,
days_int, hours, hours_int, millinium_int, milliniums, minutes, minutes_int,
sec_in_millinium, sec_int, seconds, secs, years, years_int], secs : secs_in,
printf(fd, "
"), if secs >= 0.0 then (sec_in_millinium :
sec_in_minute min_in_hour hours_in_day days_in_year years_in_century
secs
centuries_in_millinium, milliniums : ----------------,
sec_in_millinium
millinium_int : floor(milliniums), centuries :
(milliniums - millinium_int) centuries_in_millinium,
cent_int : floor(centuries), years : (centuries - cent_int) years_in_century,
years_int : floor(years), days : (years - years_int) days_in_year,
days_int : floor(days), hours : (days - days_int) hours_in_day,
hours_int : floor(hours), minutes : (hours - hours_int) min_in_hour,
minutes_int : floor(minutes), seconds : (minutes - minutes_int) sec_in_minute,
sec_int : floor(seconds), if millinium_int > 0 then printf(fd, "~d Millinia ~d\
Centuries ~d Years ~d Days ~d Hours ~d Minutes ~d Seconds", millinium_int,
cent_int, years_int, days_int, hours_int, minutes_int, sec_int)
elseif cent_int > 0 then printf(fd,
"~d Centuries ~d Years ~d Days ~d Hours ~d Minutes ~d Seconds", cent_int,
years_int, days_int, hours_int, minutes_int, sec_int) elseif years_int > 0
then printf(fd, "~d Years ~d Days ~d Hours ~d Minutes ~d Seconds", years_int,
days_int, hours_int, minutes_int, sec_int) elseif days_int > 0
then printf(fd, "~d Days ~d Hours ~d Minutes ~d Seconds", days_int,
hours_int, minutes_int, sec_int) elseif hours_int > 0
then printf(fd, "~d Hours ~d Minutes ~d Seconds", hours_int, minutes_int,
sec_int) elseif minutes_int > 0 then printf(fd, "~d Minutes ~d Seconds",
minutes_int, sec_int) else printf(fd, "~d Seconds", sec_int))
else printf(fd, "Unknown"), printf(fd, " | "))
(%o19) logitem_time(fd, secs_in) := block([cent_int, centuries, days,
days_int, hours, hours_int, millinium_int, milliniums, minutes, minutes_int,
sec_in_millinium, sec_int, seconds, secs, years, years_int], secs : secs_in,
printf(fd, ""), if secs >= 0.0 then (sec_in_millinium :
sec_in_minute min_in_hour hours_in_day days_in_year years_in_century
secs
centuries_in_millinium, milliniums : ----------------,
sec_in_millinium
millinium_int : floor(milliniums), centuries :
(milliniums - millinium_int) centuries_in_millinium,
cent_int : floor(centuries), years : (centuries - cent_int) years_in_century,
years_int : floor(years), days : (years - years_int) days_in_year,
days_int : floor(days), hours : (days - days_int) hours_in_day,
hours_int : floor(hours), minutes : (hours - hours_int) min_in_hour,
minutes_int : floor(minutes), seconds : (minutes - minutes_int) sec_in_minute,
sec_int : floor(seconds), if millinium_int > 0 then printf(fd, "~d Millinia ~d\
Centuries ~d Years ~d Days ~d Hours ~d Minutes ~d Seconds", millinium_int,
cent_int, years_int, days_int, hours_int, minutes_int, sec_int)
elseif cent_int > 0 then printf(fd,
"~d Centuries ~d Years ~d Days ~d Hours ~d Minutes ~d Seconds", cent_int,
years_int, days_int, hours_int, minutes_int, sec_int) elseif years_int > 0
then printf(fd, "~d Years ~d Days ~d Hours ~d Minutes ~d Seconds", years_int,
days_int, hours_int, minutes_int, sec_int) elseif days_int > 0
then printf(fd, "~d Days ~d Hours ~d Minutes ~d Seconds", days_int,
hours_int, minutes_int, sec_int) elseif hours_int > 0
then printf(fd, "~d Hours ~d Minutes ~d Seconds", hours_int, minutes_int,
sec_int) elseif minutes_int > 0 then printf(fd, "~d Minutes ~d Seconds",
minutes_int, sec_int) else printf(fd, "~d Seconds", sec_int))
else printf(fd, "Unknown"), printf(fd, " | "))
(%i20) omniout_timestr(secs_in) := block([cent_int, centuries, days, days_int,
hours, hours_int, millinium_int, milliniums, minutes, minutes_int,
sec_in_millinium, sec_int, seconds, secs, years, years_int],
secs : convfloat(secs_in), if secs >= convfloat(0.0)
then (sec_in_millinium : convfloat(sec_in_minute) convfloat(min_in_hour)
convfloat(hours_in_day) convfloat(days_in_year) convfloat(years_in_century)
secs
convfloat(centuries_in_millinium), milliniums : ---------------------------,
convfloat(sec_in_millinium)
millinium_int : floor(milliniums), centuries :
(milliniums - millinium_int) convfloat(centuries_in_millinium),
cent_int : floor(centuries), years : (centuries - cent_int)
convfloat(years_in_century), years_int : floor(years),
days : (years - years_int) convfloat(days_in_year), days_int : floor(days),
hours : (days - days_int) convfloat(hours_in_day), hours_int : floor(hours),
minutes : (hours - hours_int) convfloat(min_in_hour),
minutes_int : floor(minutes), seconds :
(minutes - minutes_int) convfloat(sec_in_minute), sec_int : floor(seconds),
if millinium_int > 0 then printf(true,
"= ~d Millinia ~d Centuries ~d Years ~d Days ~d Hours ~d Minutes ~d Seconds~%",
millinium_int, cent_int, years_int, days_int, hours_int, minutes_int, sec_int)
elseif cent_int > 0 then printf(true,
"= ~d Centuries ~d Years ~d Days ~d Hours ~d Minutes ~d Seconds~%", cent_int,
years_int, days_int, hours_int, minutes_int, sec_int) elseif years_int > 0
then printf(true, "= ~d Years ~d Days ~d Hours ~d Minutes ~d Seconds~%",
years_int, days_int, hours_int, minutes_int, sec_int) elseif days_int > 0
then printf(true, "= ~d Days ~d Hours ~d Minutes ~d Seconds~%", days_int,
hours_int, minutes_int, sec_int) elseif hours_int > 0
then printf(true, "= ~d Hours ~d Minutes ~d Seconds~%", hours_int,
minutes_int, sec_int) elseif minutes_int > 0
then printf(true, "= ~d Minutes ~d Seconds~%", minutes_int, sec_int)
else printf(true, "= ~d Seconds~%", sec_int)) else printf(true, " Unknown~%"))
(%o20) omniout_timestr(secs_in) := block([cent_int, centuries, days, days_int,
hours, hours_int, millinium_int, milliniums, minutes, minutes_int,
sec_in_millinium, sec_int, seconds, secs, years, years_int],
secs : convfloat(secs_in), if secs >= convfloat(0.0)
then (sec_in_millinium : convfloat(sec_in_minute) convfloat(min_in_hour)
convfloat(hours_in_day) convfloat(days_in_year) convfloat(years_in_century)
secs
convfloat(centuries_in_millinium), milliniums : ---------------------------,
convfloat(sec_in_millinium)
millinium_int : floor(milliniums), centuries :
(milliniums - millinium_int) convfloat(centuries_in_millinium),
cent_int : floor(centuries), years : (centuries - cent_int)
convfloat(years_in_century), years_int : floor(years),
days : (years - years_int) convfloat(days_in_year), days_int : floor(days),
hours : (days - days_int) convfloat(hours_in_day), hours_int : floor(hours),
minutes : (hours - hours_int) convfloat(min_in_hour),
minutes_int : floor(minutes), seconds :
(minutes - minutes_int) convfloat(sec_in_minute), sec_int : floor(seconds),
if millinium_int > 0 then printf(true,
"= ~d Millinia ~d Centuries ~d Years ~d Days ~d Hours ~d Minutes ~d Seconds~%",
millinium_int, cent_int, years_int, days_int, hours_int, minutes_int, sec_int)
elseif cent_int > 0 then printf(true,
"= ~d Centuries ~d Years ~d Days ~d Hours ~d Minutes ~d Seconds~%", cent_int,
years_int, days_int, hours_int, minutes_int, sec_int) elseif years_int > 0
then printf(true, "= ~d Years ~d Days ~d Hours ~d Minutes ~d Seconds~%",
years_int, days_int, hours_int, minutes_int, sec_int) elseif days_int > 0
then printf(true, "= ~d Days ~d Hours ~d Minutes ~d Seconds~%", days_int,
hours_int, minutes_int, sec_int) elseif hours_int > 0
then printf(true, "= ~d Hours ~d Minutes ~d Seconds~%", hours_int,
minutes_int, sec_int) elseif minutes_int > 0
then printf(true, "= ~d Minutes ~d Seconds~%", minutes_int, sec_int)
else printf(true, "= ~d Seconds~%", sec_int)) else printf(true, " Unknown~%"))
(%i21) ats(mmm_ats, array_a, array_b, jjj_ats) :=
block([iii_ats, lll_ats, ma_ats, ret_ats], ret_ats : 0.0,
if jjj_ats <= mmm_ats then (ma_ats : 1 + mmm_ats, iii_ats : jjj_ats,
while iii_ats <= mmm_ats do (lll_ats : ma_ats - iii_ats,
ret_ats : array_a array_b + ret_ats, iii_ats : 1 + iii_ats)),
iii_ats lll_ats
ret_ats)
(%o21) ats(mmm_ats, array_a, array_b, jjj_ats) :=
block([iii_ats, lll_ats, ma_ats, ret_ats], ret_ats : 0.0,
if jjj_ats <= mmm_ats then (ma_ats : 1 + mmm_ats, iii_ats : jjj_ats,
while iii_ats <= mmm_ats do (lll_ats : ma_ats - iii_ats,
ret_ats : array_a array_b + ret_ats, iii_ats : 1 + iii_ats)),
iii_ats lll_ats
ret_ats)
(%i22) att(mmm_att, array_aa, array_bb, jjj_att) :=
block([al_att, iii_att, lll_att, ma_att, ret_att], ret_att : 0.0,
if jjj_att <= mmm_att then (ma_att : 2 + mmm_att, iii_att : jjj_att,
while iii_att <= mmm_att do (lll_att : ma_att - iii_att,
al_att : lll_att - 1, if lll_att <= glob_max_terms
then ret_att : array_aa array_bb convfp(al_att) + ret_att,
iii_att lll_att
ret_att
iii_att : 1 + iii_att), ret_att : ---------------), ret_att)
convfp(mmm_att)
(%o22) att(mmm_att, array_aa, array_bb, jjj_att) :=
block([al_att, iii_att, lll_att, ma_att, ret_att], ret_att : 0.0,
if jjj_att <= mmm_att then (ma_att : 2 + mmm_att, iii_att : jjj_att,
while iii_att <= mmm_att do (lll_att : ma_att - iii_att,
al_att : lll_att - 1, if lll_att <= glob_max_terms
then ret_att : array_aa array_bb convfp(al_att) + ret_att,
iii_att lll_att
ret_att
iii_att : 1 + iii_att), ret_att : ---------------), ret_att)
convfp(mmm_att)
(%i23) display_pole() := if (array_pole # glob_large_float)
1
and (array_pole > 0.0) and (array_pole # glob_large_float)
1 2
and (array_pole > 0.0) and glob_display_flag
2
then (omniout_float(ALWAYS, "Radius of convergence ", 4,
array_pole , 4, " "), omniout_float(ALWAYS,
1
"Order of pole ", 4, array_pole , 4, " "))
2
(%o23) display_pole() := if (array_pole # glob_large_float)
1
and (array_pole > 0.0) and (array_pole # glob_large_float)
1 2
and (array_pole > 0.0) and glob_display_flag
2
then (omniout_float(ALWAYS, "Radius of convergence ", 4,
array_pole , 4, " "), omniout_float(ALWAYS,
1
"Order of pole ", 4, array_pole , 4, " "))
2
(%i24) logditto(file) := (printf(file, ""), printf(file, "ditto"),
printf(file, " | "))
(%o24) logditto(file) := (printf(file, ""), printf(file, "ditto"),
printf(file, " | "))
(%i25) logitem_integer(file, n) := (printf(file, ""),
printf(file, "~d", n), printf(file, " | "))
(%o25) logitem_integer(file, n) := (printf(file, ""),
printf(file, "~d", n), printf(file, " | "))
(%i26) logitem_str(file, str) := (printf(file, ""), printf(file, str),
printf(file, " | "))
(%o26) logitem_str(file, str) := (printf(file, ""), printf(file, str),
printf(file, " | "))
(%i27) logitem_good_digits(file, rel_error) :=
block([good_digits], printf(file, ""),
if rel_error # - 1.0 then (if rel_error # 0.0
rel_error
then (good_digits : - floor(log10(---------)),
100.0
printf(file, "~d", good_digits)) else (good_digits : 16,
printf(file, "~d", good_digits))) else printf(file, "Unknown"),
printf(file, " | "))
(%o27) logitem_good_digits(file, rel_error) :=
block([good_digits], printf(file, ""),
if rel_error # - 1.0 then (if rel_error # 0.0
rel_error
then (good_digits : - floor(log10(---------)),
100.0
printf(file, "~d", good_digits)) else (good_digits : 16,
printf(file, "~d", good_digits))) else printf(file, "Unknown"),
printf(file, " | "))
(%i28) log_revs(file, revs) := printf(file, revs)
(%o28) log_revs(file, revs) := printf(file, revs)
(%i29) logitem_float(file, x) := (printf(file, ""), printf(file, "~g", x),
printf(file, " | "))
(%o29) logitem_float(file, x) := (printf(file, ""), printf(file, "~g", x),
printf(file, " | "))
(%i30) logitem_pole(file, pole) := (printf(file, ""),
if pole = 0 then printf(file, "NA") elseif pole = 1 then printf(file, "Real")
elseif pole = 2 then printf(file, "Complex") else printf(file, "No Pole"),
printf(file, " | "))
(%o30) logitem_pole(file, pole) := (printf(file, ""),
if pole = 0 then printf(file, "NA") elseif pole = 1 then printf(file, "Real")
elseif pole = 2 then printf(file, "Complex") else printf(file, "No Pole"),
printf(file, " | "))
(%i31) logstart(file) := printf(file, "")
(%o31) logstart(file) := printf(file, "
")
(%i32) logend(file) := printf(file, "
~%")
(%o32) logend(file) := printf(file, "~%")
(%i33) chk_data() := block([errflag], errflag : false,
if (glob_max_terms < 15) or (glob_max_terms > 512)
then (omniout_str(ALWAYS, "Illegal max_terms = -- Using 30"),
glob_max_terms : 30), if glob_max_iter < 2
then (omniout_str(ALWAYS, "Illegal max_iter"), errflag : true),
if errflag then quit())
(%o33) chk_data() := block([errflag], errflag : false,
if (glob_max_terms < 15) or (glob_max_terms > 512)
then (omniout_str(ALWAYS, "Illegal max_terms = -- Using 30"),
glob_max_terms : 30), if glob_max_iter < 2
then (omniout_str(ALWAYS, "Illegal max_iter"), errflag : true),
if errflag then quit())
(%i34) comp_expect_sec(t_end2, t_start2, t2, clock_sec2) :=
block([ms2, rrr, sec_left, sub1, sub2], ms2 : clock_sec2,
sub1 : t_end2 - t_start2, sub2 : t2 - t_start2,
if sub1 = 0.0 then sec_left : 0.0 else (if sub2 > 0.0
sub1
then (rrr : ----, sec_left : rrr ms2 - ms2) else sec_left : 0.0), sec_left)
sub2
(%o34) comp_expect_sec(t_end2, t_start2, t2, clock_sec2) :=
block([ms2, rrr, sec_left, sub1, sub2], ms2 : clock_sec2,
sub1 : t_end2 - t_start2, sub2 : t2 - t_start2,
if sub1 = 0.0 then sec_left : 0.0 else (if sub2 > 0.0
sub1
then (rrr : ----, sec_left : rrr ms2 - ms2) else sec_left : 0.0), sec_left)
sub2
(%i35) comp_percent(t_end2, t_start2, t2) :=
block([rrr, sub1, sub2], sub1 : t_end2 - t_start2, sub2 : t2 - t_start2,
100.0 sub2
if sub2 > glob_small_float then rrr : ---------- else rrr : 0.0, rrr)
sub1
(%o35) comp_percent(t_end2, t_start2, t2) :=
block([rrr, sub1, sub2], sub1 : t_end2 - t_start2, sub2 : t2 - t_start2,
100.0 sub2
if sub2 > glob_small_float then rrr : ---------- else rrr : 0.0, rrr)
sub1
(%i36) factorial_2(nnn) := block([ret], ret : nnn!)
(%o36) factorial_2(nnn) := block([ret], ret : nnn!)
(%i37) factorial_1(nnn) := block([ret],
if nnn <= glob_max_terms then (if array_fact_1 = 0
nnn
then (ret : factorial_2(nnn), array_fact_1 : ret)
nnn
else ret : array_fact_1 ) else ret : factorial_2(nnn), ret)
nnn
(%o37) factorial_1(nnn) := block([ret],
if nnn <= glob_max_terms then (if array_fact_1 = 0
nnn
then (ret : factorial_2(nnn), array_fact_1 : ret)
nnn
else ret : array_fact_1 ) else ret : factorial_2(nnn), ret)
nnn
(%i38) factorial_3(mmm, nnn) := block([ret],
if (nnn <= glob_max_terms) and (mmm <= glob_max_terms)
factorial_1(mmm)
then (if array_fact_2 = 0 then (ret : ----------------,
mmm, nnn factorial_1(nnn)
array_fact_2 : ret) else ret : array_fact_2 )
mmm, nnn mmm, nnn
factorial_2(mmm)
else ret : ----------------, ret)
factorial_2(nnn)
(%o38) factorial_3(mmm, nnn) := block([ret],
if (nnn <= glob_max_terms) and (mmm <= glob_max_terms)
factorial_1(mmm)
then (if array_fact_2 = 0 then (ret : ----------------,
mmm, nnn factorial_1(nnn)
array_fact_2 : ret) else ret : array_fact_2 )
mmm, nnn mmm, nnn
factorial_2(mmm)
else ret : ----------------, ret)
factorial_2(nnn)
(%i39) convfp(mmm) := mmm
(%o39) convfp(mmm) := mmm
(%i40) convfloat(mmm) := mmm
(%o40) convfloat(mmm) := mmm
(%i41) elapsed_time_seconds() := block([t], t : elapsed_real_time(), t)
(%o41) elapsed_time_seconds() := block([t], t : elapsed_real_time(), t)
(%i42) arcsin(x) := asin(x)
(%o42) arcsin(x) := asin(x)
(%i43) arccos(x) := acos(x)
(%o43) arccos(x) := acos(x)
(%i44) arctan(x) := atan(x)
(%o44) arctan(x) := atan(x)
(%i45) omniabs(x) := abs(x)
(%o45) omniabs(x) := abs(x)
y
(%i46) expt(x, y) := x
y
(%o46) expt(x, y) := x
(%i47) exact_soln_y(x) := exp(x) + 1.0
(%o47) exact_soln_y(x) := exp(x) + 1.0
(%i48) exact_soln_yp(x) := exp(x)
(%o48) exact_soln_yp(x) := exp(x)
(%i49) main() := block([d1, d2, d3, d4, est_err_2, niii, done_once, term, ord,
order_diff, term_no, html_log_file, iiif, jjjf, rows, r_order, sub_iter,
calc_term, iii, temp_sum, current_iter, x_start, x_end, it, log10norm,
max_terms, opt_iter, tmp, subiter], define_variable(DEBUGL, 3, fixnum),
define_variable(ALWAYS, 1, fixnum), define_variable(glob_max_terms, 30,
fixnum), define_variable(DEBUGMASSIVE, 4, fixnum),
define_variable(INFO, 2, fixnum), define_variable(glob_iolevel, 5, fixnum),
define_variable(glob_curr_iter_when_opt, 0, fixnum),
define_variable(glob_max_hours, 0.0, float),
define_variable(glob_log10_abserr, 1.0E-11, float),
define_variable(glob_large_float, 9.0E+100, float),
define_variable(glob_initial_pass, true, boolean),
define_variable(glob_not_yet_finished, true, boolean),
define_variable(glob_good_digits, 0, fixnum),
define_variable(glob_optimal_expect_sec, 0.1, float),
define_variable(glob_max_sec, 10000.0, float),
define_variable(glob_optimal_clock_start_sec, 0.0, float),
define_variable(glob_abserr, 1.0E-11, float),
define_variable(glob_dump_analytic, false, boolean),
define_variable(years_in_century, 100, fixnum),
define_variable(hours_in_day, 24, fixnum),
define_variable(sec_in_minute, 60, fixnum),
define_variable(glob_max_minutes, 0.0, float),
define_variable(glob_log10abserr, 0.0, float),
define_variable(glob_orig_start_sec, 0.0, float),
define_variable(glob_warned, false, boolean),
define_variable(glob_hmin, 1.0E-11, float),
define_variable(glob_optimal_done, false, boolean),
define_variable(djd_debug, true, boolean),
define_variable(glob_normmax, 0.0, float),
define_variable(glob_optimal_start, 0.0, float),
define_variable(glob_no_eqs, 0, fixnum),
define_variable(glob_relerr, 1.0E-11, float),
define_variable(glob_disp_incr, 0.1, float),
define_variable(glob_clock_start_sec, 0.0, float),
define_variable(glob_look_poles, false, boolean),
define_variable(glob_hmin_init, 0.001, float),
define_variable(glob_hmax, 1.0, float), define_variable(glob_h, 0.1, float),
define_variable(centuries_in_millinium, 10, fixnum),
define_variable(glob_log10relerr, 0.0, float),
define_variable(glob_current_iter, 0, fixnum),
define_variable(glob_warned2, false, boolean),
define_variable(glob_max_trunc_err, 1.0E-11, float),
define_variable(glob_not_yet_start_msg, true, boolean),
define_variable(days_in_year, 365, fixnum),
define_variable(glob_max_opt_iter, 10, fixnum),
define_variable(glob_html_log, true, boolean),
define_variable(glob_iter, 0, fixnum),
define_variable(glob_smallish_float, 1.0E-101, float),
define_variable(glob_small_float, 1.0E-51, float),
define_variable(glob_log10_relerr, 1.0E-11, float),
define_variable(glob_reached_optimal_h, false, boolean),
define_variable(min_in_hour, 60, fixnum),
define_variable(glob_dump, false, boolean),
define_variable(glob_log10normmin, 0.1, float),
define_variable(glob_subiter_method, 3, fixnum),
define_variable(glob_percent_done, 0.0, float),
define_variable(glob_last_good_h, 0.1, float),
define_variable(glob_clock_sec, 0.0, float),
define_variable(glob_almost_1, 0.999, float),
define_variable(MAX_UNCHANGED, 10, fixnum),
define_variable(glob_max_rel_trunc_err, 1.0E-11, float),
define_variable(glob_display_flag, true, boolean),
define_variable(glob_start, 0, fixnum),
define_variable(glob_unchanged_h_cnt, 0, fixnum),
define_variable(glob_max_iter, 1000, fixnum),
define_variable(djd_debug2, true, boolean), ALWAYS : 1, INFO : 2, DEBUGL : 3,
DEBUGMASSIVE : 4, glob_iolevel : INFO,
glob_orig_start_sec : elapsed_time_seconds(), MAX_UNCHANGED : 10,
glob_curr_iter_when_opt : 0, glob_display_flag : true, glob_no_eqs : 1,
glob_iter : - 1, opt_iter : - 1, glob_max_iter : 50000, glob_max_hours : 0.0,
glob_max_minutes : 15.0, omniout_str(ALWAYS,
"##############ECHO OF PROBLEM#################"),
omniout_str(ALWAYS, "##############temp/diffpostode.ode#################"),
omniout_str(ALWAYS, "diff ( y , x , 2 ) = diff ( y , x , 1 ) ;"),
omniout_str(ALWAYS, "!"), omniout_str(ALWAYS,
"/* BEGIN FIRST INPUT BLOCK */"), omniout_str(ALWAYS, "Digits : 32,"),
omniout_str(ALWAYS, "max_terms : 30,"), omniout_str(ALWAYS, "!"),
omniout_str(ALWAYS, "/* END FIRST INPUT BLOCK */"),
omniout_str(ALWAYS, "/* BEGIN SECOND INPUT BLOCK */"),
omniout_str(ALWAYS, "x_start : -4.0,"), omniout_str(ALWAYS, "x_end : 1.0 ,"),
omniout_str(ALWAYS, "array_y_init[0 + 1] : exact_soln_y(x_start),"),
omniout_str(ALWAYS, "array_y_init[1 + 1] : exact_soln_yp(x_start),"),
omniout_str(ALWAYS, "glob_h : 0.00001 ,"),
omniout_str(ALWAYS, "glob_look_poles : true,"),
omniout_str(ALWAYS, "glob_max_iter : 10,"),
omniout_str(ALWAYS, "/* END SECOND INPUT BLOCK */"),
omniout_str(ALWAYS, "/* BEGIN OVERRIDE BLOCK */"),
omniout_str(ALWAYS, "glob_h : 0.00001 ,"),
omniout_str(ALWAYS, "glob_look_poles : true,"),
omniout_str(ALWAYS, "glob_max_iter : 100,"),
omniout_str(ALWAYS, "glob_max_minutes : 1,"),
omniout_str(ALWAYS, "/* END OVERRIDE BLOCK */"), omniout_str(ALWAYS, "!"),
omniout_str(ALWAYS, "/* BEGIN USER DEF BLOCK */"),
omniout_str(ALWAYS, "exact_soln_y (x) := ("),
omniout_str(ALWAYS, " (1.0 + exp(x)) "), omniout_str(ALWAYS, ");"),
omniout_str(ALWAYS, "exact_soln_yp (x) := ("),
omniout_str(ALWAYS, " (exp(x)) "), omniout_str(ALWAYS, ");"),
omniout_str(ALWAYS, ""), omniout_str(ALWAYS, "/* END USER DEF BLOCK */"),
omniout_str(ALWAYS, "#######END OF ECHO OF PROBLEM#################"),
glob_unchanged_h_cnt : 0, glob_warned : false, glob_warned2 : false,
glob_small_float : 1.0E-200, glob_smallish_float : 1.0E-64,
glob_large_float : 1.0E+100, glob_almost_1 : 0.99, glob_log10_abserr : - 8.0,
glob_log10_relerr : - 8.0, glob_hmax : 0.01, Digits : 32, max_terms : 30,
glob_max_terms : max_terms, glob_html_log : true,
array(array_fact_1, 1 + max_terms), array(array_norms, 1 + max_terms),
array(array_y, 1 + max_terms), array(array_x, 1 + max_terms),
array(array_tmp0, 1 + max_terms), array(array_tmp1, 1 + max_terms),
array(array_tmp2, 1 + max_terms), array(array_1st_rel_error, 1 + max_terms),
array(array_pole, 1 + max_terms), array(array_y_init, 1 + max_terms),
array(array_type_pole, 1 + max_terms),
array(array_last_rel_error, 1 + max_terms), array(array_m1, 1 + max_terms),
array(array_fact_2, 1 + max_terms, 1 + max_terms),
array(array_y_set_initial, 1 + 2, 1 + max_terms),
array(array_y_higher_work, 1 + 3, 1 + max_terms),
array(array_y_higher_work2, 1 + 3, 1 + max_terms),
array(array_y_higher, 1 + 3, 1 + max_terms),
array(array_real_pole, 1 + 1, 1 + 3), array(array_poles, 1 + 1, 1 + 3),
array(array_complex_pole, 1 + 1, 1 + 3), term : 1,
while term <= max_terms do (array_fact_1 : 0.0, term : 1 + term),
term
term : 1, while term <= max_terms do (array_norms : 0.0,
term
term : 1 + term), term : 1, while term <= max_terms do (array_y : 0.0,
term
term : 1 + term), term : 1, while term <= max_terms do (array_x : 0.0,
term
term : 1 + term), term : 1, while term <= max_terms do (array_tmp0 : 0.0,
term
term : 1 + term), term : 1, while term <= max_terms do (array_tmp1 : 0.0,
term
term : 1 + term), term : 1, while term <= max_terms do (array_tmp2 : 0.0,
term
term : 1 + term), term : 1, while term <=
max_terms do (array_1st_rel_error : 0.0, term : 1 + term), term : 1,
term
while term <= max_terms do (array_pole : 0.0, term : 1 + term), term : 1,
term
while term <= max_terms do (array_y_init : 0.0, term : 1 + term),
term
term : 1, while term <= max_terms do (array_type_pole : 0.0,
term
term : 1 + term), term : 1, while term <=
max_terms do (array_last_rel_error : 0.0, term : 1 + term), term : 1,
term
while term <= max_terms do (array_m1 : 0.0, term : 1 + term), ord : 1,
term
while ord <= max_terms do (term : 1, while term <=
max_terms do (array_fact_2 : 0.0, term : 1 + term), ord : 1 + ord),
ord, term
ord : 1, while ord <= 2 do (term : 1,
while term <= max_terms do (array_y_set_initial : 0.0,
ord, term
term : 1 + term), ord : 1 + ord), ord : 1,
while ord <= 3 do (term : 1, while term <=
max_terms do (array_y_higher_work : 0.0, term : 1 + term),
ord, term
ord : 1 + ord), ord : 1, while ord <= 3 do (term : 1,
while term <= max_terms do (array_y_higher_work2 : 0.0,
ord, term
term : 1 + term), ord : 1 + ord), ord : 1,
while ord <= 3 do (term : 1, while term <=
max_terms do (array_y_higher : 0.0, term : 1 + term), ord : 1 + ord),
ord, term
ord : 1, while ord <= 1 do (term : 1,
while term <= 3 do (array_real_pole : 0.0, term : 1 + term),
ord, term
ord : 1 + ord), ord : 1, while ord <= 1 do (term : 1,
while term <= 3 do (array_poles : 0.0, term : 1 + term),
ord, term
ord : 1 + ord), ord : 1, while ord <= 1 do (term : 1,
while term <= 3 do (array_complex_pole : 0.0, term : 1 + term),
ord, term
ord : 1 + ord), array(array_tmp2, 1 + 1 + max_terms), term : 1,
while term <= 1 + max_terms do (array_tmp2 : 0.0, term : 1 + term),
term
array(array_tmp1, 1 + 1 + max_terms), term : 1,
while term <= 1 + max_terms do (array_tmp1 : 0.0, term : 1 + term),
term
array(array_tmp0, 1 + 1 + max_terms), term : 1,
while term <= 1 + max_terms do (array_tmp0 : 0.0, term : 1 + term),
term
array(array_x, 1 + 1 + max_terms), term : 1,
while term <= 1 + max_terms do (array_x : 0.0, term : 1 + term),
term
array(array_y, 1 + 1 + max_terms), term : 1,
while term <= 1 + max_terms do (array_y : 0.0, term : 1 + term),
term
array(array_const_1, 1 + 1 + max_terms), term : 1,
while term <= 1 + max_terms do (array_const_1 : 0.0, term : 1 + term),
term
array_const_1 : 1, array(array_const_2, 1 + 1 + max_terms), term : 1,
1
while term <= 1 + max_terms do (array_const_2 : 0.0, term : 1 + term),
term
array_const_2 : 2, array(array_const_0D0, 1 + 1 + max_terms), term : 1,
1
while term <= 1 + max_terms do (array_const_0D0 : 0.0, term : 1 + term),
term
array_const_0D0 : 0.0, array(array_m1, 1 + 1 + max_terms), term : 1,
1
while term <= max_terms do (array_m1 : 0.0, term : 1 + term),
term
array_m1 : - 1.0, iiif : 0, while iiif <= glob_max_terms do (jjjf : 0,
1
while jjjf <= glob_max_terms do (array_fact_1 : 0,
iiif
array_fact_2 : 0, jjjf : 1 + jjjf), iiif : 1 + iiif),
iiif, jjjf
x_start : - 4.0, x_end : 1.0, array_y_init : exact_soln_y(x_start),
1 + 0
array_y_init : exact_soln_yp(x_start), glob_h : 1.0E-5,
1 + 1
glob_look_poles : true, glob_max_iter : 10, glob_h : 1.0E-5,
glob_look_poles : true, glob_max_iter : 100, glob_max_minutes : 1,
glob_last_good_h : glob_h, glob_max_terms : max_terms,
glob_max_sec : convfloat(3600.0) convfloat(glob_max_hours)
+ convfloat(60.0) convfloat(glob_max_minutes),
glob_abserr : expt(10.0, glob_log10_abserr),
glob_relerr : expt(10.0, glob_log10_relerr), chk_data(),
array_y_set_initial : true, array_y_set_initial : true,
1, 1 1, 2
array_y_set_initial : false, array_y_set_initial : false,
1, 3 1, 4
array_y_set_initial : false, array_y_set_initial : false,
1, 5 1, 6
array_y_set_initial : false, array_y_set_initial : false,
1, 7 1, 8
array_y_set_initial : false, array_y_set_initial : false,
1, 9 1, 10
array_y_set_initial : false, array_y_set_initial : false,
1, 11 1, 12
array_y_set_initial : false, array_y_set_initial : false,
1, 13 1, 14
array_y_set_initial : false, array_y_set_initial : false,
1, 15 1, 16
array_y_set_initial : false, array_y_set_initial : false,
1, 17 1, 18
array_y_set_initial : false, array_y_set_initial : false,
1, 19 1, 20
array_y_set_initial : false, array_y_set_initial : false,
1, 21 1, 22
array_y_set_initial : false, array_y_set_initial : false,
1, 23 1, 24
array_y_set_initial : false, array_y_set_initial : false,
1, 25 1, 26
array_y_set_initial : false, array_y_set_initial : false,
1, 27 1, 28
array_y_set_initial : false, array_y_set_initial : false,
1, 29 1, 30
if glob_html_log then html_log_file : openw("html/entry.html"),
omniout_str(ALWAYS, "START of Soultion"), array_x : x_start,
1
array_x : glob_h, order_diff : 2, term_no : 1,
2
while term_no <= order_diff do (array_y :
term_no
array_y_init expt(glob_h, term_no - 1)
term_no
---------------------------------------------, term_no : 1 + term_no),
factorial_1(term_no - 1)
rows : order_diff, r_order : 1, while r_order <= rows do (term_no : 1,
while term_no <= 1 - r_order + rows do (it : - 1 + r_order + term_no,
array_y_init expt(glob_h, term_no - 1)
it
array_y_higher : ----------------------------------------,
r_order, term_no factorial_1(term_no - 1)
term_no : 1 + term_no), r_order : 1 + r_order), current_iter : 1,
glob_clock_start_sec : elapsed_time_seconds(),
if omniabs(array_y_higher ) > glob_small_float
1, 1
then (tmp : omniabs(array_y_higher ), log10norm : log10(tmp),
1, 1
if log10norm < glob_log10normmin then glob_log10normmin : log10norm),
display_alot(current_iter), glob_clock_sec : elapsed_time_seconds(),
glob_current_iter : 0, glob_iter : 0, omniout_str(DEBUGL, " "),
glob_reached_optimal_h : true, glob_optimal_clock_start_sec :
elapsed_time_seconds(), while (glob_current_iter < glob_max_iter)
and (array_x <= x_end) and (convfloat(glob_clock_sec) - convfloat(glob_orig_start_sec) <
1
convfloat(glob_max_sec)) do (omniout_str
(INFO, " "), omniout_str(INFO, "TOP MAIN SOLVE Loop"),
glob_iter : 1 + glob_iter, glob_clock_sec : elapsed_time_seconds(),
glob_current_iter : 1 + glob_current_iter, atomall(),
if glob_look_poles then check_for_pole(), array_x : glob_h + array_x ,
1 1
array_x : glob_h, order_diff : 2, ord : 3, calc_term : 1,
2
iii : glob_max_terms, while iii >= calc_term do (array_y_higher_work :
3, iii
array_y_higher
3, iii
---------------------------
expt(glob_h, calc_term - 1)
-------------------------------------, iii : iii - 1), temp_sum : 0.0,
factorial_3(iii - calc_term, iii - 1)
ord : 3, calc_term : 1, iii : glob_max_terms,
while iii >= calc_term do (temp_sum : array_y_higher_work + temp_sum,
ord, iii
iii : iii - 1), array_y_higher_work2 :
ord, calc_term
temp_sum expt(glob_h, calc_term - 1)
------------------------------------, ord : 2, calc_term : 2,
factorial_1(calc_term - 1)
iii : glob_max_terms, while iii >= calc_term do (array_y_higher_work :
2, iii
array_y_higher
2, iii
---------------------------
expt(glob_h, calc_term - 1)
-------------------------------------, iii : iii - 1), temp_sum : 0.0,
factorial_3(iii - calc_term, iii - 1)
ord : 2, calc_term : 2, iii : glob_max_terms,
while iii >= calc_term do (temp_sum : array_y_higher_work + temp_sum,
ord, iii
iii : iii - 1), array_y_higher_work2 :
ord, calc_term
temp_sum expt(glob_h, calc_term - 1)
------------------------------------, ord : 2, calc_term : 1,
factorial_1(calc_term - 1)
iii : glob_max_terms, while iii >= calc_term do (array_y_higher_work :
2, iii
array_y_higher
2, iii
---------------------------
expt(glob_h, calc_term - 1)
-------------------------------------, iii : iii - 1), temp_sum : 0.0,
factorial_3(iii - calc_term, iii - 1)
ord : 2, calc_term : 1, iii : glob_max_terms,
while iii >= calc_term do (temp_sum : array_y_higher_work + temp_sum,
ord, iii
iii : iii - 1), array_y_higher_work2 :
ord, calc_term
temp_sum expt(glob_h, calc_term - 1)
------------------------------------, ord : 1, calc_term : 3,
factorial_1(calc_term - 1)
iii : glob_max_terms, while iii >= calc_term do (array_y_higher_work :
1, iii
array_y_higher
1, iii
---------------------------
expt(glob_h, calc_term - 1)
-------------------------------------, iii : iii - 1), temp_sum : 0.0,
factorial_3(iii - calc_term, iii - 1)
ord : 1, calc_term : 3, iii : glob_max_terms,
while iii >= calc_term do (temp_sum : array_y_higher_work + temp_sum,
ord, iii
iii : iii - 1), array_y_higher_work2 :
ord, calc_term
temp_sum expt(glob_h, calc_term - 1)
------------------------------------, ord : 1, calc_term : 2,
factorial_1(calc_term - 1)
iii : glob_max_terms, while iii >= calc_term do (array_y_higher_work :
1, iii
array_y_higher
1, iii
---------------------------
expt(glob_h, calc_term - 1)
-------------------------------------, iii : iii - 1), temp_sum : 0.0,
factorial_3(iii - calc_term, iii - 1)
ord : 1, calc_term : 2, iii : glob_max_terms,
while iii >= calc_term do (temp_sum : array_y_higher_work + temp_sum,
ord, iii
iii : iii - 1), array_y_higher_work2 :
ord, calc_term
temp_sum expt(glob_h, calc_term - 1)
------------------------------------, ord : 1, calc_term : 1,
factorial_1(calc_term - 1)
iii : glob_max_terms, while iii >= calc_term do (array_y_higher_work :
1, iii
array_y_higher
1, iii
---------------------------
expt(glob_h, calc_term - 1)
-------------------------------------, iii : iii - 1), temp_sum : 0.0,
factorial_3(iii - calc_term, iii - 1)
ord : 1, calc_term : 1, iii : glob_max_terms,
while iii >= calc_term do (temp_sum : array_y_higher_work + temp_sum,
ord, iii
iii : iii - 1), array_y_higher_work2 :
ord, calc_term
temp_sum expt(glob_h, calc_term - 1)
------------------------------------, term_no : glob_max_terms,
factorial_1(calc_term - 1)
while term_no >= 1 do (array_y : array_y_higher_work2 ,
term_no 1, term_no
ord : 1, while ord <= order_diff do (array_y_higher :
ord, term_no
array_y_higher_work2 , ord : 1 + ord), term_no : term_no - 1),
ord, term_no
display_alot(current_iter)), omniout_str(ALWAYS, "Finished!"),
if glob_iter >= glob_max_iter then omniout_str(ALWAYS,
"Maximum Iterations Reached before Solution Completed!"),
if elapsed_time_seconds() - convfloat(glob_orig_start_sec) >=
convfloat(glob_max_sec) then omniout_str(ALWAYS,
"Maximum Time Reached before Solution Completed!"),
glob_clock_sec : elapsed_time_seconds(),
omniout_str(INFO, "diff ( y , x , 2 ) = diff ( y , x , 1 ) ;"),
omniout_int(INFO, "Iterations ", 32, glob_iter, 4, " "),
prog_report(x_start, x_end), if glob_html_log
then (logstart(html_log_file), logitem_str(html_log_file,
"2012-09-02T21:24:17-05:00"), logitem_str(html_log_file, "Maxima"),
logitem_str(html_log_file, "diff"),
logitem_str(html_log_file, "diff ( y , x , 2 ) = diff ( y , x , 1 ) ;"),
logitem_float(html_log_file, x_start), logitem_float(html_log_file, x_end),
logitem_float(html_log_file, array_x ), logitem_float(html_log_file, glob_h),
1
logitem_str(html_log_file, "16"), logitem_good_digits(html_log_file,
array_last_rel_error ), logitem_integer(html_log_file, glob_max_terms),
1
logitem_float(html_log_file, array_1st_rel_error ),
1
logitem_float(html_log_file, array_last_rel_error ),
1
logitem_integer(html_log_file, glob_iter),
logitem_pole(html_log_file, array_type_pole ),
1
if (array_type_pole = 1) or (array_type_pole = 2)
1 1
then (logitem_float(html_log_file, array_pole ),
1
logitem_float(html_log_file, array_pole ), 0)
2
else (logitem_str(html_log_file, "NA"), logitem_str(html_log_file, "NA"), 0),
logitem_time(html_log_file, convfloat(glob_clock_sec)),
if glob_percent_done < 100.0 then (logitem_time(html_log_file,
convfloat(glob_optimal_expect_sec)), 0)
else (logitem_str(html_log_file, "Done"), 0),
log_revs(html_log_file, " 126 | "), logitem_str(html_log_file, "diff diffeq.max"), logitem_str(html_log_file, "diff maxima results"),
logitem_str(html_log_file, "c c++ Maple and Maxima"), logend(html_log_file)),
if glob_html_log then close(html_log_file))
(%o49) main() := block([d1, d2, d3, d4, est_err_2, niii, done_once, term, ord,
order_diff, term_no, html_log_file, iiif, jjjf, rows, r_order, sub_iter,
calc_term, iii, temp_sum, current_iter, x_start, x_end, it, log10norm,
max_terms, opt_iter, tmp, subiter], define_variable(DEBUGL, 3, fixnum),
define_variable(ALWAYS, 1, fixnum), define_variable(glob_max_terms, 30,
fixnum), define_variable(DEBUGMASSIVE, 4, fixnum),
define_variable(INFO, 2, fixnum), define_variable(glob_iolevel, 5, fixnum),
define_variable(glob_curr_iter_when_opt, 0, fixnum),
define_variable(glob_max_hours, 0.0, float),
define_variable(glob_log10_abserr, 1.0E-11, float),
define_variable(glob_large_float, 9.0E+100, float),
define_variable(glob_initial_pass, true, boolean),
define_variable(glob_not_yet_finished, true, boolean),
define_variable(glob_good_digits, 0, fixnum),
define_variable(glob_optimal_expect_sec, 0.1, float),
define_variable(glob_max_sec, 10000.0, float),
define_variable(glob_optimal_clock_start_sec, 0.0, float),
define_variable(glob_abserr, 1.0E-11, float),
define_variable(glob_dump_analytic, false, boolean),
define_variable(years_in_century, 100, fixnum),
define_variable(hours_in_day, 24, fixnum),
define_variable(sec_in_minute, 60, fixnum),
define_variable(glob_max_minutes, 0.0, float),
define_variable(glob_log10abserr, 0.0, float),
define_variable(glob_orig_start_sec, 0.0, float),
define_variable(glob_warned, false, boolean),
define_variable(glob_hmin, 1.0E-11, float),
define_variable(glob_optimal_done, false, boolean),
define_variable(djd_debug, true, boolean),
define_variable(glob_normmax, 0.0, float),
define_variable(glob_optimal_start, 0.0, float),
define_variable(glob_no_eqs, 0, fixnum),
define_variable(glob_relerr, 1.0E-11, float),
define_variable(glob_disp_incr, 0.1, float),
define_variable(glob_clock_start_sec, 0.0, float),
define_variable(glob_look_poles, false, boolean),
define_variable(glob_hmin_init, 0.001, float),
define_variable(glob_hmax, 1.0, float), define_variable(glob_h, 0.1, float),
define_variable(centuries_in_millinium, 10, fixnum),
define_variable(glob_log10relerr, 0.0, float),
define_variable(glob_current_iter, 0, fixnum),
define_variable(glob_warned2, false, boolean),
define_variable(glob_max_trunc_err, 1.0E-11, float),
define_variable(glob_not_yet_start_msg, true, boolean),
define_variable(days_in_year, 365, fixnum),
define_variable(glob_max_opt_iter, 10, fixnum),
define_variable(glob_html_log, true, boolean),
define_variable(glob_iter, 0, fixnum),
define_variable(glob_smallish_float, 1.0E-101, float),
define_variable(glob_small_float, 1.0E-51, float),
define_variable(glob_log10_relerr, 1.0E-11, float),
define_variable(glob_reached_optimal_h, false, boolean),
define_variable(min_in_hour, 60, fixnum),
define_variable(glob_dump, false, boolean),
define_variable(glob_log10normmin, 0.1, float),
define_variable(glob_subiter_method, 3, fixnum),
define_variable(glob_percent_done, 0.0, float),
define_variable(glob_last_good_h, 0.1, float),
define_variable(glob_clock_sec, 0.0, float),
define_variable(glob_almost_1, 0.999, float),
define_variable(MAX_UNCHANGED, 10, fixnum),
define_variable(glob_max_rel_trunc_err, 1.0E-11, float),
define_variable(glob_display_flag, true, boolean),
define_variable(glob_start, 0, fixnum),
define_variable(glob_unchanged_h_cnt, 0, fixnum),
define_variable(glob_max_iter, 1000, fixnum),
define_variable(djd_debug2, true, boolean), ALWAYS : 1, INFO : 2, DEBUGL : 3,
DEBUGMASSIVE : 4, glob_iolevel : INFO,
glob_orig_start_sec : elapsed_time_seconds(), MAX_UNCHANGED : 10,
glob_curr_iter_when_opt : 0, glob_display_flag : true, glob_no_eqs : 1,
glob_iter : - 1, opt_iter : - 1, glob_max_iter : 50000, glob_max_hours : 0.0,
glob_max_minutes : 15.0, omniout_str(ALWAYS,
"##############ECHO OF PROBLEM#################"),
omniout_str(ALWAYS, "##############temp/diffpostode.ode#################"),
omniout_str(ALWAYS, "diff ( y , x , 2 ) = diff ( y , x , 1 ) ;"),
omniout_str(ALWAYS, "!"), omniout_str(ALWAYS,
"/* BEGIN FIRST INPUT BLOCK */"), omniout_str(ALWAYS, "Digits : 32,"),
omniout_str(ALWAYS, "max_terms : 30,"), omniout_str(ALWAYS, "!"),
omniout_str(ALWAYS, "/* END FIRST INPUT BLOCK */"),
omniout_str(ALWAYS, "/* BEGIN SECOND INPUT BLOCK */"),
omniout_str(ALWAYS, "x_start : -4.0,"), omniout_str(ALWAYS, "x_end : 1.0 ,"),
omniout_str(ALWAYS, "array_y_init[0 + 1] : exact_soln_y(x_start),"),
omniout_str(ALWAYS, "array_y_init[1 + 1] : exact_soln_yp(x_start),"),
omniout_str(ALWAYS, "glob_h : 0.00001 ,"),
omniout_str(ALWAYS, "glob_look_poles : true,"),
omniout_str(ALWAYS, "glob_max_iter : 10,"),
omniout_str(ALWAYS, "/* END SECOND INPUT BLOCK */"),
omniout_str(ALWAYS, "/* BEGIN OVERRIDE BLOCK */"),
omniout_str(ALWAYS, "glob_h : 0.00001 ,"),
omniout_str(ALWAYS, "glob_look_poles : true,"),
omniout_str(ALWAYS, "glob_max_iter : 100,"),
omniout_str(ALWAYS, "glob_max_minutes : 1,"),
omniout_str(ALWAYS, "/* END OVERRIDE BLOCK */"), omniout_str(ALWAYS, "!"),
omniout_str(ALWAYS, "/* BEGIN USER DEF BLOCK */"),
omniout_str(ALWAYS, "exact_soln_y (x) := ("),
omniout_str(ALWAYS, " (1.0 + exp(x)) "), omniout_str(ALWAYS, ");"),
omniout_str(ALWAYS, "exact_soln_yp (x) := ("),
omniout_str(ALWAYS, " (exp(x)) "), omniout_str(ALWAYS, ");"),
omniout_str(ALWAYS, ""), omniout_str(ALWAYS, "/* END USER DEF BLOCK */"),
omniout_str(ALWAYS, "#######END OF ECHO OF PROBLEM#################"),
glob_unchanged_h_cnt : 0, glob_warned : false, glob_warned2 : false,
glob_small_float : 1.0E-200, glob_smallish_float : 1.0E-64,
glob_large_float : 1.0E+100, glob_almost_1 : 0.99, glob_log10_abserr : - 8.0,
glob_log10_relerr : - 8.0, glob_hmax : 0.01, Digits : 32, max_terms : 30,
glob_max_terms : max_terms, glob_html_log : true,
array(array_fact_1, 1 + max_terms), array(array_norms, 1 + max_terms),
array(array_y, 1 + max_terms), array(array_x, 1 + max_terms),
array(array_tmp0, 1 + max_terms), array(array_tmp1, 1 + max_terms),
array(array_tmp2, 1 + max_terms), array(array_1st_rel_error, 1 + max_terms),
array(array_pole, 1 + max_terms), array(array_y_init, 1 + max_terms),
array(array_type_pole, 1 + max_terms),
array(array_last_rel_error, 1 + max_terms), array(array_m1, 1 + max_terms),
array(array_fact_2, 1 + max_terms, 1 + max_terms),
array(array_y_set_initial, 1 + 2, 1 + max_terms),
array(array_y_higher_work, 1 + 3, 1 + max_terms),
array(array_y_higher_work2, 1 + 3, 1 + max_terms),
array(array_y_higher, 1 + 3, 1 + max_terms),
array(array_real_pole, 1 + 1, 1 + 3), array(array_poles, 1 + 1, 1 + 3),
array(array_complex_pole, 1 + 1, 1 + 3), term : 1,
while term <= max_terms do (array_fact_1 : 0.0, term : 1 + term),
term
term : 1, while term <= max_terms do (array_norms : 0.0,
term
term : 1 + term), term : 1, while term <= max_terms do (array_y : 0.0,
term
term : 1 + term), term : 1, while term <= max_terms do (array_x : 0.0,
term
term : 1 + term), term : 1, while term <= max_terms do (array_tmp0 : 0.0,
term
term : 1 + term), term : 1, while term <= max_terms do (array_tmp1 : 0.0,
term
term : 1 + term), term : 1, while term <= max_terms do (array_tmp2 : 0.0,
term
term : 1 + term), term : 1, while term <=
max_terms do (array_1st_rel_error : 0.0, term : 1 + term), term : 1,
term
while term <= max_terms do (array_pole : 0.0, term : 1 + term), term : 1,
term
while term <= max_terms do (array_y_init : 0.0, term : 1 + term),
term
term : 1, while term <= max_terms do (array_type_pole : 0.0,
term
term : 1 + term), term : 1, while term <=
max_terms do (array_last_rel_error : 0.0, term : 1 + term), term : 1,
term
while term <= max_terms do (array_m1 : 0.0, term : 1 + term), ord : 1,
term
while ord <= max_terms do (term : 1, while term <=
max_terms do (array_fact_2 : 0.0, term : 1 + term), ord : 1 + ord),
ord, term
ord : 1, while ord <= 2 do (term : 1,
while term <= max_terms do (array_y_set_initial : 0.0,
ord, term
term : 1 + term), ord : 1 + ord), ord : 1,
while ord <= 3 do (term : 1, while term <=
max_terms do (array_y_higher_work : 0.0, term : 1 + term),
ord, term
ord : 1 + ord), ord : 1, while ord <= 3 do (term : 1,
while term <= max_terms do (array_y_higher_work2 : 0.0,
ord, term
term : 1 + term), ord : 1 + ord), ord : 1,
while ord <= 3 do (term : 1, while term <=
max_terms do (array_y_higher : 0.0, term : 1 + term), ord : 1 + ord),
ord, term
ord : 1, while ord <= 1 do (term : 1,
while term <= 3 do (array_real_pole : 0.0, term : 1 + term),
ord, term
ord : 1 + ord), ord : 1, while ord <= 1 do (term : 1,
while term <= 3 do (array_poles : 0.0, term : 1 + term),
ord, term
ord : 1 + ord), ord : 1, while ord <= 1 do (term : 1,
while term <= 3 do (array_complex_pole : 0.0, term : 1 + term),
ord, term
ord : 1 + ord), array(array_tmp2, 1 + 1 + max_terms), term : 1,
while term <= 1 + max_terms do (array_tmp2 : 0.0, term : 1 + term),
term
array(array_tmp1, 1 + 1 + max_terms), term : 1,
while term <= 1 + max_terms do (array_tmp1 : 0.0, term : 1 + term),
term
array(array_tmp0, 1 + 1 + max_terms), term : 1,
while term <= 1 + max_terms do (array_tmp0 : 0.0, term : 1 + term),
term
array(array_x, 1 + 1 + max_terms), term : 1,
while term <= 1 + max_terms do (array_x : 0.0, term : 1 + term),
term
array(array_y, 1 + 1 + max_terms), term : 1,
while term <= 1 + max_terms do (array_y : 0.0, term : 1 + term),
term
array(array_const_1, 1 + 1 + max_terms), term : 1,
while term <= 1 + max_terms do (array_const_1 : 0.0, term : 1 + term),
term
array_const_1 : 1, array(array_const_2, 1 + 1 + max_terms), term : 1,
1
while term <= 1 + max_terms do (array_const_2 : 0.0, term : 1 + term),
term
array_const_2 : 2, array(array_const_0D0, 1 + 1 + max_terms), term : 1,
1
while term <= 1 + max_terms do (array_const_0D0 : 0.0, term : 1 + term),
term
array_const_0D0 : 0.0, array(array_m1, 1 + 1 + max_terms), term : 1,
1
while term <= max_terms do (array_m1 : 0.0, term : 1 + term),
term
array_m1 : - 1.0, iiif : 0, while iiif <= glob_max_terms do (jjjf : 0,
1
while jjjf <= glob_max_terms do (array_fact_1 : 0,
iiif
array_fact_2 : 0, jjjf : 1 + jjjf), iiif : 1 + iiif),
iiif, jjjf
x_start : - 4.0, x_end : 1.0, array_y_init : exact_soln_y(x_start),
1 + 0
array_y_init : exact_soln_yp(x_start), glob_h : 1.0E-5,
1 + 1
glob_look_poles : true, glob_max_iter : 10, glob_h : 1.0E-5,
glob_look_poles : true, glob_max_iter : 100, glob_max_minutes : 1,
glob_last_good_h : glob_h, glob_max_terms : max_terms,
glob_max_sec : convfloat(3600.0) convfloat(glob_max_hours)
+ convfloat(60.0) convfloat(glob_max_minutes),
glob_abserr : expt(10.0, glob_log10_abserr),
glob_relerr : expt(10.0, glob_log10_relerr), chk_data(),
array_y_set_initial : true, array_y_set_initial : true,
1, 1 1, 2
array_y_set_initial : false, array_y_set_initial : false,
1, 3 1, 4
array_y_set_initial : false, array_y_set_initial : false,
1, 5 1, 6
array_y_set_initial : false, array_y_set_initial : false,
1, 7 1, 8
array_y_set_initial : false, array_y_set_initial : false,
1, 9 1, 10
array_y_set_initial : false, array_y_set_initial : false,
1, 11 1, 12
array_y_set_initial : false, array_y_set_initial : false,
1, 13 1, 14
array_y_set_initial : false, array_y_set_initial : false,
1, 15 1, 16
array_y_set_initial : false, array_y_set_initial : false,
1, 17 1, 18
array_y_set_initial : false, array_y_set_initial : false,
1, 19 1, 20
array_y_set_initial : false, array_y_set_initial : false,
1, 21 1, 22
array_y_set_initial : false, array_y_set_initial : false,
1, 23 1, 24
array_y_set_initial : false, array_y_set_initial : false,
1, 25 1, 26
array_y_set_initial : false, array_y_set_initial : false,
1, 27 1, 28
array_y_set_initial : false, array_y_set_initial : false,
1, 29 1, 30
if glob_html_log then html_log_file : openw("html/entry.html"),
omniout_str(ALWAYS, "START of Soultion"), array_x : x_start,
1
array_x : glob_h, order_diff : 2, term_no : 1,
2
while term_no <= order_diff do (array_y :
term_no
array_y_init expt(glob_h, term_no - 1)
term_no
---------------------------------------------, term_no : 1 + term_no),
factorial_1(term_no - 1)
rows : order_diff, r_order : 1, while r_order <= rows do (term_no : 1,
while term_no <= 1 - r_order + rows do (it : - 1 + r_order + term_no,
array_y_init expt(glob_h, term_no - 1)
it
array_y_higher : ----------------------------------------,
r_order, term_no factorial_1(term_no - 1)
term_no : 1 + term_no), r_order : 1 + r_order), current_iter : 1,
glob_clock_start_sec : elapsed_time_seconds(),
if omniabs(array_y_higher ) > glob_small_float
1, 1
then (tmp : omniabs(array_y_higher ), log10norm : log10(tmp),
1, 1
if log10norm < glob_log10normmin then glob_log10normmin : log10norm),
display_alot(current_iter), glob_clock_sec : elapsed_time_seconds(),
glob_current_iter : 0, glob_iter : 0, omniout_str(DEBUGL, " "),
glob_reached_optimal_h : true, glob_optimal_clock_start_sec :
elapsed_time_seconds(), while (glob_current_iter < glob_max_iter)
and (array_x <= x_end) and (convfloat(glob_clock_sec) - convfloat(glob_orig_start_sec) <
1
convfloat(glob_max_sec)) do (omniout_str
(INFO, " "), omniout_str(INFO, "TOP MAIN SOLVE Loop"),
glob_iter : 1 + glob_iter, glob_clock_sec : elapsed_time_seconds(),
glob_current_iter : 1 + glob_current_iter, atomall(),
if glob_look_poles then check_for_pole(), array_x : glob_h + array_x ,
1 1
array_x : glob_h, order_diff : 2, ord : 3, calc_term : 1,
2
iii : glob_max_terms, while iii >= calc_term do (array_y_higher_work :
3, iii
array_y_higher
3, iii
---------------------------
expt(glob_h, calc_term - 1)
-------------------------------------, iii : iii - 1), temp_sum : 0.0,
factorial_3(iii - calc_term, iii - 1)
ord : 3, calc_term : 1, iii : glob_max_terms,
while iii >= calc_term do (temp_sum : array_y_higher_work + temp_sum,
ord, iii
iii : iii - 1), array_y_higher_work2 :
ord, calc_term
temp_sum expt(glob_h, calc_term - 1)
------------------------------------, ord : 2, calc_term : 2,
factorial_1(calc_term - 1)
iii : glob_max_terms, while iii >= calc_term do (array_y_higher_work :
2, iii
array_y_higher
2, iii
---------------------------
expt(glob_h, calc_term - 1)
-------------------------------------, iii : iii - 1), temp_sum : 0.0,
factorial_3(iii - calc_term, iii - 1)
ord : 2, calc_term : 2, iii : glob_max_terms,
while iii >= calc_term do (temp_sum : array_y_higher_work + temp_sum,
ord, iii
iii : iii - 1), array_y_higher_work2 :
ord, calc_term
temp_sum expt(glob_h, calc_term - 1)
------------------------------------, ord : 2, calc_term : 1,
factorial_1(calc_term - 1)
iii : glob_max_terms, while iii >= calc_term do (array_y_higher_work :
2, iii
array_y_higher
2, iii
---------------------------
expt(glob_h, calc_term - 1)
-------------------------------------, iii : iii - 1), temp_sum : 0.0,
factorial_3(iii - calc_term, iii - 1)
ord : 2, calc_term : 1, iii : glob_max_terms,
while iii >= calc_term do (temp_sum : array_y_higher_work + temp_sum,
ord, iii
iii : iii - 1), array_y_higher_work2 :
ord, calc_term
temp_sum expt(glob_h, calc_term - 1)
------------------------------------, ord : 1, calc_term : 3,
factorial_1(calc_term - 1)
iii : glob_max_terms, while iii >= calc_term do (array_y_higher_work :
1, iii
array_y_higher
1, iii
---------------------------
expt(glob_h, calc_term - 1)
-------------------------------------, iii : iii - 1), temp_sum : 0.0,
factorial_3(iii - calc_term, iii - 1)
ord : 1, calc_term : 3, iii : glob_max_terms,
while iii >= calc_term do (temp_sum : array_y_higher_work + temp_sum,
ord, iii
iii : iii - 1), array_y_higher_work2 :
ord, calc_term
temp_sum expt(glob_h, calc_term - 1)
------------------------------------, ord : 1, calc_term : 2,
factorial_1(calc_term - 1)
iii : glob_max_terms, while iii >= calc_term do (array_y_higher_work :
1, iii
array_y_higher
1, iii
---------------------------
expt(glob_h, calc_term - 1)
-------------------------------------, iii : iii - 1), temp_sum : 0.0,
factorial_3(iii - calc_term, iii - 1)
ord : 1, calc_term : 2, iii : glob_max_terms,
while iii >= calc_term do (temp_sum : array_y_higher_work + temp_sum,
ord, iii
iii : iii - 1), array_y_higher_work2 :
ord, calc_term
temp_sum expt(glob_h, calc_term - 1)
------------------------------------, ord : 1, calc_term : 1,
factorial_1(calc_term - 1)
iii : glob_max_terms, while iii >= calc_term do (array_y_higher_work :
1, iii
array_y_higher
1, iii
---------------------------
expt(glob_h, calc_term - 1)
-------------------------------------, iii : iii - 1), temp_sum : 0.0,
factorial_3(iii - calc_term, iii - 1)
ord : 1, calc_term : 1, iii : glob_max_terms,
while iii >= calc_term do (temp_sum : array_y_higher_work + temp_sum,
ord, iii
iii : iii - 1), array_y_higher_work2 :
ord, calc_term
temp_sum expt(glob_h, calc_term - 1)
------------------------------------, term_no : glob_max_terms,
factorial_1(calc_term - 1)
while term_no >= 1 do (array_y : array_y_higher_work2 ,
term_no 1, term_no
ord : 1, while ord <= order_diff do (array_y_higher :
ord, term_no
array_y_higher_work2 , ord : 1 + ord), term_no : term_no - 1),
ord, term_no
display_alot(current_iter)), omniout_str(ALWAYS, "Finished!"),
if glob_iter >= glob_max_iter then omniout_str(ALWAYS,
"Maximum Iterations Reached before Solution Completed!"),
if elapsed_time_seconds() - convfloat(glob_orig_start_sec) >=
convfloat(glob_max_sec) then omniout_str(ALWAYS,
"Maximum Time Reached before Solution Completed!"),
glob_clock_sec : elapsed_time_seconds(),
omniout_str(INFO, "diff ( y , x , 2 ) = diff ( y , x , 1 ) ;"),
omniout_int(INFO, "Iterations ", 32, glob_iter, 4, " "),
prog_report(x_start, x_end), if glob_html_log
then (logstart(html_log_file), logitem_str(html_log_file,
"2012-09-02T21:24:17-05:00"), logitem_str(html_log_file, "Maxima"),
logitem_str(html_log_file, "diff"),
logitem_str(html_log_file, "diff ( y , x , 2 ) = diff ( y , x , 1 ) ;"),
logitem_float(html_log_file, x_start), logitem_float(html_log_file, x_end),
logitem_float(html_log_file, array_x ), logitem_float(html_log_file, glob_h),
1
logitem_str(html_log_file, "16"), logitem_good_digits(html_log_file,
array_last_rel_error ), logitem_integer(html_log_file, glob_max_terms),
1
logitem_float(html_log_file, array_1st_rel_error ),
1
logitem_float(html_log_file, array_last_rel_error ),
1
logitem_integer(html_log_file, glob_iter),
logitem_pole(html_log_file, array_type_pole ),
1
if (array_type_pole = 1) or (array_type_pole = 2)
1 1
then (logitem_float(html_log_file, array_pole ),
1
logitem_float(html_log_file, array_pole ), 0)
2
else (logitem_str(html_log_file, "NA"), logitem_str(html_log_file, "NA"), 0),
logitem_time(html_log_file, convfloat(glob_clock_sec)),
if glob_percent_done < 100.0 then (logitem_time(html_log_file,
convfloat(glob_optimal_expect_sec)), 0)
else (logitem_str(html_log_file, "Done"), 0),
log_revs(html_log_file, " 126 | "), logitem_str(html_log_file, "diff diffeq.max"), logitem_str(html_log_file, "diff maxima results"),
logitem_str(html_log_file, "c c++ Maple and Maxima"), logend(html_log_file)),
if glob_html_log then close(html_log_file))
(%i50) main()
"##############ECHO OF PROBLEM#################"
"##############temp/diffpostode.ode#################"
"diff ( y , x , 2 ) = diff ( y , x , 1 ) ;"
"!"
"/* BEGIN FIRST INPUT BLOCK */"
"Digits : 32,"
"max_terms : 30,"
"!"
"/* END FIRST INPUT BLOCK */"
"/* BEGIN SECOND INPUT BLOCK */"
"x_start : -4.0,"
"x_end : 1.0 ,"
"array_y_init[0 + 1] : exact_soln_y(x_start),"
"array_y_init[1 + 1] : exact_soln_yp(x_start),"
"glob_h : 0.00001 ,"
"glob_look_poles : true,"
"glob_max_iter : 10,"
"/* END SECOND INPUT BLOCK */"
"/* BEGIN OVERRIDE BLOCK */"
"glob_h : 0.00001 ,"
"glob_look_poles : true,"
"glob_max_iter : 100,"
"glob_max_minutes : 1,"
"/* END OVERRIDE BLOCK */"
"!"
"/* BEGIN USER DEF BLOCK */"
"exact_soln_y (x) := ("
" (1.0 + exp(x)) "
");"
"exact_soln_yp (x) := ("
" (exp(x)) "
");"
""
"/* END USER DEF BLOCK */"
"#######END OF ECHO OF PROBLEM#################"
"START of Soultion"
x[1] = -4. " "
y[1] (analytic) = 1.0183156388887342 " "
y[1] (numeric) = 1.0183156388887342 " "
absolute error = 0.0 " "
relative error = 0.0 "%"
Correct digits = 16
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.99999 " "
y[1] (analytic) = 1.0183158220460389 " "
y[1] (numeric) = 1.0183158220451232 " "
absolute error = 9.1571195071082910000000000000E-13 " "
relative error = 8.99241601560256500000000000E-11 "%"
Correct digits = 13
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.99998 " "
y[1] (analytic) = 1.0183160052051752 " "
y[1] (numeric) = 1.018316005201512 " "
absolute error = 3.6630698474482415000000000000E-12 " "
relative error = 3.5971838100592250000000000E-10 "%"
Correct digits = 12
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.99997 " "
y[1] (analytic) = 1.018316188366143 " "
y[1] (numeric) = 1.018316188357901 " "
absolute error = 8.241851645607312000000000000E-12 " "
relative error = 8.0936076041677300000000000E-10 "%"
Correct digits = 12
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9999599999999997 " "
y[1] (analytic) = 1.0183163715289425 " "
y[1] (numeric) = 1.01831637151429 " "
absolute error = 1.46525014343978900000000000E-11 " "
relative error = 1.4388948114816238000000000E-9 "%"
Correct digits = 11
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9999499999999997 " "
y[1] (analytic) = 1.0183165546935735 " "
y[1] (numeric) = 1.018316554670679 " "
absolute error = 2.289457512461012800000000000E-11 " "
relative error = 2.2482768269930997000000000E-9 "%"
Correct digits = 11
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9999399999999996 " "
y[1] (analytic) = 1.0183167378600364 " "
y[1] (numeric) = 1.0183167378270679 " "
absolute error = 3.296851680545387400000000000E-11 " "
relative error = 3.237550320024815700000000E-9 "%"
Correct digits = 11
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9999299999999995 " "
y[1] (analytic) = 1.0183169210283307 " "
y[1] (numeric) = 1.0183169209834568 " "
absolute error = 4.48738823877192770000000000E-11 " "
relative error = 4.406671583381342500000000E-9 "%"
Correct digits = 11
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9999199999999995 " "
y[1] (analytic) = 1.018317104198457 " "
y[1] (numeric) = 1.0183171041398458 " "
absolute error = 5.86111159606161900000000000E-11 " "
relative error = 5.755684130116864000000000E-9 "%"
Correct digits = 11
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9999099999999994 " "
y[1] (analytic) = 1.0183172873704147 " "
y[1] (numeric) = 1.0183172872962347 " "
absolute error = 7.41799954795396800000000000E-11 " "
relative error = 7.284566058099000000000E-9 "%"
Correct digits = 11
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9998999999999993 " "
y[1] (analytic) = 1.0183174705442044 " "
y[1] (numeric) = 1.0183174704526237 " "
absolute error = 9.15807429890946900000000000E-11 " "
relative error = 8.993339075303554000000000E-9 "%"
Correct digits = 11
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9998899999999993 " "
y[1] (analytic) = 1.0183176537198255 " "
y[1] (numeric) = 1.0183176536090126 " "
absolute error = 1.10812914400071350000000000E-10 " "
relative error = 1.08819594745589900000000E-8 "%"
Correct digits = 10
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999879999999999 " "
y[1] (analytic) = 1.0183178368972787 " "
y[1] (numeric) = 1.0183178367654016 " "
absolute error = 1.31877175846284440000000000E-10 " "
relative error = 1.29504925739199600000000E-8 "%"
Correct digits = 10
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999869999999999 " "
y[1] (analytic) = 1.0183180200765636 " "
y[1] (numeric) = 1.0183180199217905 " "
absolute error = 1.54773083238524120000000000E-10 " "
relative error = 1.51988946662151100000000E-8 "%"
Correct digits = 10
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999859999999999 " "
y[1] (analytic) = 1.0183182032576803 " "
y[1] (numeric) = 1.0183182030781794 " "
absolute error = 1.7950085862139530000000000E-10 " "
relative error = 1.762718745939706500000000E-8 "%"
Correct digits = 10
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999849999999999 " "
y[1] (analytic) = 1.0183183864406287 " "
y[1] (numeric) = 1.0183183862345684 " "
absolute error = 2.06060279950293080000000000E-10 " "
relative error = 2.02353490513457500000000E-8 "%"
Correct digits = 10
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999839999999999 " "
y[1] (analytic) = 1.0183185696254091 " "
y[1] (numeric) = 1.0183185693909573 " "
absolute error = 2.3445179131442728000000000E-10 " "
relative error = 2.302342295502584600000000E-8 "%"
Correct digits = 10
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999829999999999 " "
y[1] (analytic) = 1.0183187528120212 " "
y[1] (numeric) = 1.0183187525473463 " "
absolute error = 2.64674948624588070000000000E-10 " "
relative error = 2.599136546328989500000000E-8 "%"
Correct digits = 10
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999819999999999 " "
y[1] (analytic) = 1.0183189360004654 " "
y[1] (numeric) = 1.0183189357037352 " "
absolute error = 2.9673019596998530000000000E-10 " "
relative error = 2.913922008908314000000000E-8 "%"
Correct digits = 10
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9998099999999988 " "
y[1] (analytic) = 1.0183191191907413 " "
y[1] (numeric) = 1.0183191188601242 " "
absolute error = 3.3061708926140910000000000E-10 " "
relative error = 3.24669431252700700000000E-8 "%"
Correct digits = 10
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9997999999999987 " "
y[1] (analytic) = 1.0183193023828492 " "
y[1] (numeric) = 1.018319302016513 " "
absolute error = 3.66336072588069330000000000E-10 " "
relative error = 3.59745780847764930000000E-8 "%"
Correct digits = 10
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9997899999999986 " "
y[1] (analytic) = 1.018319485576789 " "
y[1] (numeric) = 1.018319485172902 " "
absolute error = 4.03886923905361100000000000E-10 " "
relative error = 3.96621030654828800000000E-8 "%"
Correct digits = 10
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9997799999999986 " "
y[1] (analytic) = 1.0183196687725606 " "
y[1] (numeric) = 1.018319668329291 " "
absolute error = 4.4326964321328430000000000E-10 " "
relative error = 4.35295179702836100000000E-8 "%"
Correct digits = 10
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9997699999999985 " "
y[1] (analytic) = 1.0183198519701644 " "
y[1] (numeric) = 1.01831985148568 " "
absolute error = 4.844844525564440000000000E-10 " "
relative error = 4.7576844507067400000000E-8 "%"
Correct digits = 10
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9997599999999984 " "
y[1] (analytic) = 1.0183200351696 " "
y[1] (numeric) = 1.0183200346420689 " "
absolute error = 5.2753112989023520000000000E-10 " "
relative error = 5.18040607737208600000000E-8 "%"
Correct digits = 10
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9997499999999984 " "
y[1] (analytic) = 1.0183202183708677 " "
y[1] (numeric) = 1.0183202177984578 " "
absolute error = 5.7240989725926280000000000E-10 " "
relative error = 5.6211188478121100000000E-8 "%"
Correct digits = 10
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9997399999999983 " "
y[1] (analytic) = 1.0183204015739675 " "
y[1] (numeric) = 1.0183204009548468 " "
absolute error = 6.1912075466352690000000000E-10 " "
relative error = 6.07982275231432600000000E-8 "%"
Correct digits = 10
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9997299999999982 " "
y[1] (analytic) = 1.0183205847788992 " "
y[1] (numeric) = 1.0183205841112357 " "
absolute error = 6.6766348005842250000000000E-10 " "
relative error = 6.55651560066801100000000E-8 "%"
Correct digits = 10
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999719999999998 " "
y[1] (analytic) = 1.0183207679856632 " "
y[1] (numeric) = 1.0183207672676247 " "
absolute error = 7.1803851753315940000000000E-10 " "
relative error = 7.05120174415679300000000E-8 "%"
Correct digits = 10
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999709999999998 " "
y[1] (analytic) = 1.018320951194259 " "
y[1] (numeric) = 1.0183209504240136 " "
absolute error = 7.7024542299852780000000000E-10 " "
relative error = 7.56387681207192100000000E-8 "%"
Correct digits = 10
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999699999999998 " "
y[1] (analytic) = 1.018321134404687 " "
y[1] (numeric) = 1.0183211335804025 " "
absolute error = 8.2428441849913270000000000E-10 " "
relative error = 8.09454297519820600000000E-8 "%"
Correct digits = 10
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999689999999998 " "
y[1] (analytic) = 1.0183213176169472 " "
y[1] (numeric) = 1.0183213167367915 " "
absolute error = 8.8015572607957890000000000E-10 " "
relative error = 8.64320240431870400000000E-8 "%"
Correct digits = 10
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999679999999998 " "
y[1] (analytic) = 1.0183215008310393 " "
y[1] (numeric) = 1.0183214998931804 " "
absolute error = 9.3785890165065670000000000E-10 " "
relative error = 9.20985072872645600000000E-8 "%"
Correct digits = 10
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999669999999998 " "
y[1] (analytic) = 1.0183216840469638 " "
y[1] (numeric) = 1.0183216830495694 " "
absolute error = 9.9739438930157580000000000E-10 " "
relative error = 9.7944922997002300000000E-8 "%"
Correct digits = 10
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9996599999999978 " "
y[1] (analytic) = 1.0183218672647203 " "
y[1] (numeric) = 1.0183218662059583 " "
absolute error = 1.0587619669877313000000000E-9 " "
relative error = 1.03971249270295620000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9996499999999977 " "
y[1] (analytic) = 1.0183220504843091 " "
y[1] (numeric) = 1.0183220493623473 " "
absolute error = 1.1219618567537282000000000E-9 " "
relative error = 1.1017750781495190000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9996399999999976 " "
y[1] (analytic) = 1.01832223370573 " "
y[1] (numeric) = 1.0183222325187362 " "
absolute error = 1.1869938365549615000000000E-9 " "
relative error = 1.16563676728870620000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9996299999999976 " "
y[1] (analytic) = 1.0183224169289833 " "
y[1] (numeric) = 1.0183224156751252 " "
absolute error = 1.2538581284360362000000000E-9 " "
relative error = 1.23129777719847540000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9996199999999975 " "
y[1] (analytic) = 1.0183226001540686 " "
y[1] (numeric) = 1.018322598831514 " "
absolute error = 1.3225545103523473000000000E-9 " "
relative error = 1.29875788885786240000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9996099999999974 " "
y[1] (analytic) = 1.0183227833809863 " "
y[1] (numeric) = 1.018322781987903 " "
absolute error = 1.3930832043484997000000000E-9 " "
relative error = 1.36801731934470930000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9995999999999974 " "
y[1] (analytic) = 1.0183229666097362 " "
y[1] (numeric) = 1.018322965144292 " "
absolute error = 1.4654442104244936000000000E-9 " "
relative error = 1.43907606768738730000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9995899999999973 " "
y[1] (analytic) = 1.0183231498403185 " "
y[1] (numeric) = 1.018323148300681 " "
absolute error = 1.5396375285803288000000000E-9 " "
relative error = 1.5119341329142490000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9995799999999972 " "
y[1] (analytic) = 1.018323333072733 " "
y[1] (numeric) = 1.0183233314570699 " "
absolute error = 1.6156631588160053000000000E-9 " "
relative error = 1.58659151405362880000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999569999999997 " "
y[1] (analytic) = 1.01832351630698 " "
y[1] (numeric) = 1.0183235146134588 " "
absolute error = 1.6935211011315232000000000E-9 " "
relative error = 1.6630482101338420000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999559999999997 " "
y[1] (analytic) = 1.0183236995430591 " "
y[1] (numeric) = 1.0183236977698478 " "
absolute error = 1.7732113555268825000000000E-9 " "
relative error = 1.7413042201831850000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999549999999997 " "
y[1] (analytic) = 1.0183238827809709 " "
y[1] (numeric) = 1.0183238809262367 " "
absolute error = 1.854734144046688000000000E-9 " "
relative error = 1.82135976127903400000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999539999999997 " "
y[1] (analytic) = 1.018324066020715 " "
y[1] (numeric) = 1.0183240640826257 " "
absolute error = 1.938089244646335000000000E-9 " "
relative error = 1.90321461440047100000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999529999999997 " "
y[1] (analytic) = 1.0183242492622913 " "
y[1] (numeric) = 1.0183242472390146 " "
absolute error = 2.023276657325823200000000E-9 " "
relative error = 1.98686877857573720000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999519999999997 " "
y[1] (analytic) = 1.0183244325057002 " "
y[1] (numeric) = 1.0183244303954035 " "
absolute error = 2.1102966041297577000000000E-9 " "
relative error = 2.0723224708820340000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999509999999997 " "
y[1] (analytic) = 1.0183246157509414 " "
y[1] (numeric) = 1.0183246135517925 " "
absolute error = 2.1991488630135336000000000E-9 " "
relative error = 2.15957547229850580000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9994999999999967 " "
y[1] (analytic) = 1.018324798998015 " "
y[1] (numeric) = 1.0183247967081814 " "
absolute error = 2.289833656021755800000000E-9 " "
relative error = 2.24862799990223880000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9994899999999967 " "
y[1] (analytic) = 1.0183249822469214 " "
y[1] (numeric) = 1.0183249798645704 " "
absolute error = 2.3823509831544243000000000E-9 " "
relative error = 2.339480052721280000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9994799999999966 " "
y[1] (analytic) = 1.01832516549766 " "
y[1] (numeric) = 1.0183251630209593 " "
absolute error = 2.476700622366934000000000E-9 " "
relative error = 2.4321314117348360000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9994699999999965 " "
y[1] (analytic) = 1.0183253487502313 " "
y[1] (numeric) = 1.0183253461773483 " "
absolute error = 2.572883017748495000000000E-9 " "
relative error = 2.52658251206860250000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9994599999999965 " "
y[1] (analytic) = 1.0183255320046352 " "
y[1] (numeric) = 1.0183255293337372 " "
absolute error = 2.6708979472545025000000000E-9 " "
relative error = 2.6228331347017086000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9994499999999964 " "
y[1] (analytic) = 1.0183257152608713 " "
y[1] (numeric) = 1.0183257124901262 " "
absolute error = 2.770745188840351000000000E-9 " "
relative error = 2.7208830606134210000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9994399999999963 " "
y[1] (analytic) = 1.0183258985189403 " "
y[1] (numeric) = 1.018325895646515 " "
absolute error = 2.872425186595251000000000E-9 " "
relative error = 2.82073272492914600000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9994299999999963 " "
y[1] (analytic) = 1.0183260817788418 " "
y[1] (numeric) = 1.018326078802904 " "
absolute error = 2.975937718474597000000000E-9 " "
relative error = 2.92238190862807170000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999419999999996 " "
y[1] (analytic) = 1.0183262650405758 " "
y[1] (numeric) = 1.018326261959293 " "
absolute error = 3.0812827844783897000000000E-9 " "
relative error = 3.02583061073811550000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999409999999996 " "
y[1] (analytic) = 1.0183264483041425 " "
y[1] (numeric) = 1.018326445115682 " "
absolute error = 3.1884606066512333000000000E-9 " "
relative error = 3.1310790483357250000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999399999999996 " "
y[1] (analytic) = 1.018326631569542 " "
y[1] (numeric) = 1.0183266282720709 " "
absolute error = 3.297471184993128000000000E-9 " "
relative error = 3.238127220448660500000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999389999999996 " "
y[1] (analytic) = 1.018326814836774 " "
y[1] (numeric) = 1.0183268114284598 " "
absolute error = 3.4083140754148644000000000E-9 " "
relative error = 3.3469746900077240000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999379999999996 " "
y[1] (analytic) = 1.0183269981058387 " "
y[1] (numeric) = 1.0183269945848488 " "
absolute error = 3.5209899440502570000000000E-9 " "
relative error = 3.4576221101861690000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999369999999996 " "
y[1] (analytic) = 1.018327181376736 " "
y[1] (numeric) = 1.0183271777412377 " "
absolute error = 3.6354983468100954000000000E-9 " "
relative error = 3.5700690439147980000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999359999999996 " "
y[1] (analytic) = 1.0183273646494662 " "
y[1] (numeric) = 1.0183273608976267 " "
absolute error = 3.751839505738985300000000E-9 " "
relative error = 3.6843157082697690000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9993499999999957 " "
y[1] (analytic) = 1.018327547924029 " "
y[1] (numeric) = 1.0183275440540156 " "
absolute error = 3.870013420836926300000000E-9 " "
relative error = 3.8003621022787490000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9993399999999957 " "
y[1] (analytic) = 1.0183277312004246 " "
y[1] (numeric) = 1.0183277272104045 " "
absolute error = 3.990020092103918600000000E-9 " "
relative error = 3.91820822496938670000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9993299999999956 " "
y[1] (analytic) = 1.0183279144786532 " "
y[1] (numeric) = 1.0183279103667935 " "
absolute error = 4.111859741584567000000000E-9 " "
relative error = 4.03785429341754760000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9993199999999955 " "
y[1] (analytic) = 1.0183280977587144 " "
y[1] (numeric) = 1.0183280935231824 " "
absolute error = 4.235531925189661700000000E-9 " "
relative error = 4.1592998705543340000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9993099999999955 " "
y[1] (analytic) = 1.0183282810406082 " "
y[1] (numeric) = 1.0183282766795714 " "
absolute error = 4.361036864963807600000000E-9 " "
relative error = 4.2825451734556130000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9992999999999954 " "
y[1] (analytic) = 1.018328464324335 " "
y[1] (numeric) = 1.0183284598359603 " "
absolute error = 4.48837478295160960000000E-9 " "
relative error = 4.4075904191970750000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9992899999999953 " "
y[1] (analytic) = 1.0183286476098947 " "
y[1] (numeric) = 1.0183286429923493 " "
absolute error = 4.617545457108463000000000E-9 " "
relative error = 4.534435388758080000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9992799999999953 " "
y[1] (analytic) = 1.0183288308972873 " "
y[1] (numeric) = 1.0183288261487382 " "
absolute error = 4.748549109478972000000000E-9 " "
relative error = 4.66308029921420340000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999269999999995 " "
y[1] (analytic) = 1.0183290141865127 " "
y[1] (numeric) = 1.0183290093051272 " "
absolute error = 4.881385518018533000000000E-9 " "
relative error = 4.7935249315448447000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999259999999995 " "
y[1] (analytic) = 1.018329197477571 " "
y[1] (numeric) = 1.018329192461516 " "
absolute error = 5.0160549047717500000000000E-9 " "
relative error = 4.9257695028254644000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999249999999995 " "
y[1] (analytic) = 1.0183293807704623 " "
y[1] (numeric) = 1.018329375617905 " "
absolute error = 5.152557269738622000000000E-9 " "
relative error = 5.0598140120834250000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999239999999995 " "
y[1] (analytic) = 1.0183295640651866 " "
y[1] (numeric) = 1.018329558774294 " "
absolute error = 5.290892612919151000000000E-9 " "
relative error = 5.1956584583460690000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999229999999995 " "
y[1] (analytic) = 1.0183297473617436 " "
y[1] (numeric) = 1.018329741930683 " "
absolute error = 5.4310607122687320000000000E-9 " "
relative error = 5.3333026225928790000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999219999999995 " "
y[1] (analytic) = 1.0183299306601337 " "
y[1] (numeric) = 1.0183299250870719 " "
absolute error = 5.573061789831968000000000E-9 " "
relative error = 5.4727467218990830000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999209999999995 " "
y[1] (analytic) = 1.0183301139603569 " "
y[1] (numeric) = 1.0183301082434608 " "
absolute error = 5.716896067653465000000000E-9 " "
relative error = 5.6139909733397330000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9991999999999948 " "
y[1] (analytic) = 1.0183302972624129 " "
y[1] (numeric) = 1.0183302913998498 " "
absolute error = 5.862563101644014000000000E-9 " "
relative error = 5.757034939846529000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9991899999999947 " "
y[1] (analytic) = 1.018330480566302 " "
y[1] (numeric) = 1.0183304745562387 " "
absolute error = 6.0100633358928230000000000E-9 " "
relative error = 5.9018790565422120000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9991799999999946 " "
y[1] (analytic) = 1.0183306638720242 " "
y[1] (numeric) = 1.0183306577126277 " "
absolute error = 6.159396548355289000000000E-9 " "
relative error = 6.0485231044062460000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9991699999999946 " "
y[1] (analytic) = 1.0183308471795796 " "
y[1] (numeric) = 1.0183308408690166 " "
absolute error = 6.310562961076016000000000E-9 " "
relative error = 6.1969673005134520000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9991599999999945 " "
y[1] (analytic) = 1.018331030488968 " "
y[1] (numeric) = 1.0183310240254055 " "
absolute error = 6.463562352010399000000000E-9 " "
relative error = 6.3472114258433390000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9991499999999944 " "
y[1] (analytic) = 1.0183312138001894 " "
y[1] (numeric) = 1.0183312071817945 " "
absolute error = 6.618394943203043000000000E-9 " "
relative error = 6.4992556974706110000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9991399999999944 " "
y[1] (analytic) = 1.018331397113244 " "
y[1] (numeric) = 1.0183313903381834 " "
absolute error = 6.775060512609343000000000E-9 " "
relative error = 6.6530998963748140000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9991299999999943 " "
y[1] (analytic) = 1.0183315804281317 " "
y[1] (numeric) = 1.0183315734945724 " "
absolute error = 6.9335592822739050000000000E-9 " "
relative error = 6.8087442396305390000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9991199999999942 " "
y[1] (analytic) = 1.0183317637448526 " "
y[1] (numeric) = 1.0183317566509613 " "
absolute error = 7.093891252196727000000000E-9 " "
relative error = 6.9661887262647860000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999109999999994 " "
y[1] (analytic) = 1.0183319470634065 " "
y[1] (numeric) = 1.0183319398073503 " "
absolute error = 7.256056200333205000000000E-9 " "
relative error = 7.1254331372571640000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999099999999994 " "
y[1] (analytic) = 1.0183321303837938 " "
y[1] (numeric) = 1.0183321229637392 " "
absolute error = 7.42005457077255000000000E-9 " "
relative error = 7.2864779077294210000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999089999999994 " "
y[1] (analytic) = 1.0183323137060143 " "
y[1] (numeric) = 1.0183323061201282 " "
absolute error = 7.585886141470155000000000E-9 " "
relative error = 7.4493228186610890000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999079999999994 " "
y[1] (analytic) = 1.0183324970300678 " "
y[1] (numeric) = 1.018332489276517 " "
absolute error = 7.753550690381417000000000E-9 " "
relative error = 7.6139676510318430000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999069999999994 " "
y[1] (analytic) = 1.0183326803559547 " "
y[1] (numeric) = 1.018332672432906 " "
absolute error = 7.923048661595544000000000E-9 " "
relative error = 7.7804128399631340000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.999059999999994 " "
y[1] (analytic) = 1.018332863683675 " "
y[1] (numeric) = 1.018332855589295 " "
absolute error = 8.094380055112538000000000E-9 " "
relative error = 7.9486583844817340000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9990499999999938 " "
y[1] (analytic) = 1.0183330470132286 " "
y[1] (numeric) = 1.018333038745684 " "
absolute error = 8.267544648887792000000000E-9 " "
relative error = 8.1187040655672580000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9990399999999937 " "
y[1] (analytic) = 1.0183332303446153 " "
y[1] (numeric) = 1.0183332219020729 " "
absolute error = 8.442542442921308000000000E-9 " "
relative error = 8.2905498822465580000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9990299999999936 " "
y[1] (analytic) = 1.0183334136778355 " "
y[1] (numeric) = 1.0183334050584618 " "
absolute error = 8.61937365925769000000000E-9 " "
relative error = 8.4641960515935240000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9990199999999936 " "
y[1] (analytic) = 1.0183335970128888 " "
y[1] (numeric) = 1.0183335882148508 " "
absolute error = 8.798038075852332000000000E-9 " "
relative error = 8.6396423545878330000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9990099999999935 " "
y[1] (analytic) = 1.0183337803497756 " "
y[1] (numeric) = 1.0183337713712397 " "
absolute error = 8.978535914749841000000000E-9 " "
relative error = 8.8168890083032580000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
" "
"TOP MAIN SOLVE Loop"
"NO POLE"
x[1] = -3.9989999999999934 " "
y[1] (analytic) = 1.0183339636884958 " "
y[1] (numeric) = 1.0183339545276286 " "
absolute error = 9.160867175950216000000000E-9 " "
relative error = 8.9959360117664580000000E-7 "%"
Correct digits = 9
h = 1.00000E-5 " "
"Finished!"
"Maximum Iterations Reached before Solution Completed!"
"diff ( y , x , 2 ) = diff ( y , x , 1 ) ;"
Iterations = 100
"Total Elapsed Time "= 58 Seconds
"Elapsed Time(since restart) "= 57 Seconds
"Expected Time Remaining "= 3 Days 8 Hours 56 Minutes 9 Seconds
"Optimized Time Remaining "= 3 Days 7 Hours 34 Minutes 16 Seconds
"Time to Timeout "= 1 Seconds
Percent Done = 2.020000000013233400E-2 "%"
(%o50) true
(%o50) diffeq.max