|\^/| Maple 11 (IBM INTEL LINUX)
._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2007
\ MAPLE / All rights reserved. Maple is a trademark of
<____ ____> Waterloo Maple Inc.
| Type ? for help.
> #BEGIN OUTFILE1
> # Begin Function number 3
> display_poles := proc()
> global ALWAYS,glob_display_flag, glob_large_float, array_pole, glob_type_given_pole,array_given_rad_poles,array_given_ord_poles, array_complex_poles,array_poles,array_real_poles,array_x ;
> local rad_given;
> if (glob_type_given_pole = 4) then # if number 1
> rad_given := sqrt(expt(array_x[1] - array_given_rad_poles[1,1],2.0) + expt(array_given_rad_poles[1,2],2.0)) ;
> omniout_float(ALWAYS,"Radius of convergence (given) for eq 1 ",4, rad_given,4," ");
> omniout_float(ALWAYS,"Order of pole (given) ",4, array_given_ord_poles[1,1],4," ");
> elif
> (glob_type_given_pole = 3) then # if number 2
> omniout_str(ALWAYS,"NO POLE (given) for Equation 1");
> else
> omniout_str(ALWAYS,"NO INFO (given) for Equation 1");
> fi;# end if 2;
> if (array_poles[1,1] <> glob_large_float) then # if number 2
> omniout_float(ALWAYS,"Radius of convergence (ratio test) for eq 1 ",4, array_poles[1,1],4," ");
> omniout_str(ALWAYS,"Order of pole (ratio test) Not computed");
> else
> omniout_str(ALWAYS,"NO POLE (ratio test) for Equation 1");
> fi;# end if 2;
> if ((array_real_poles[1,1] > 0.0) and (array_real_poles[1,1] <> glob_large_float)) then # if number 2
> omniout_float(ALWAYS,"Radius of convergence (three term test) for eq 1 ",4, array_real_poles[1,1],4," ");
> omniout_float(ALWAYS,"Order of pole (three term test) ",4, array_real_poles[1,2],4," ");
> else
> omniout_str(ALWAYS,"NO REAL POLE (three term test) for Equation 1");
> fi;# end if 2;
> if ((array_complex_poles[1,1] > 0.0) and (array_complex_poles[1,1] <> glob_large_float)) then # if number 2
> omniout_float(ALWAYS,"Radius of convergence (six term test) for eq 1 ",4, array_complex_poles[1,1],4," ");
> omniout_float(ALWAYS,"Order of pole (six term test) ",4, array_complex_poles[1,2],4," ");
> else
> omniout_str(ALWAYS,"NO COMPLEX POLE (six term test) for Equation 1");
> fi;# end if 2
> ;
> end;
display_poles := proc()
local rad_given;
global ALWAYS, glob_display_flag, glob_large_float, array_pole,
glob_type_given_pole, array_given_rad_poles, array_given_ord_poles,
array_complex_poles, array_poles, array_real_poles, array_x;
if glob_type_given_pole = 4 then
rad_given := sqrt(
expt(array_x[1] - array_given_rad_poles[1, 1], 2.0)
+ expt(array_given_rad_poles[1, 2], 2.0));
omniout_float(ALWAYS,
"Radius of convergence (given) for eq 1 ", 4,
rad_given, 4, " ");
omniout_float(ALWAYS,
"Order of pole (given) ", 4,
array_given_ord_poles[1, 1], 4, " ")
elif glob_type_given_pole = 3 then
omniout_str(ALWAYS, "NO POLE (given) for Equation 1")
else omniout_str(ALWAYS, "NO INFO (given) for Equation 1")
end if;
if array_poles[1, 1] <> glob_large_float then
omniout_float(ALWAYS,
"Radius of convergence (ratio test) for eq 1 ", 4,
array_poles[1, 1], 4, " ");
omniout_str(ALWAYS, "Order of pole (ratio test) \
Not computed")
else omniout_str(ALWAYS, "NO POLE (ratio test) for Equation 1")
end if;
if 0. < array_real_poles[1, 1] and
array_real_poles[1, 1] <> glob_large_float then
omniout_float(ALWAYS,
"Radius of convergence (three term test) for eq 1 ", 4,
array_real_poles[1, 1], 4, " ");
omniout_float(ALWAYS,
"Order of pole (three term test) ", 4,
array_real_poles[1, 2], 4, " ")
else omniout_str(ALWAYS,
"NO REAL POLE (three term test) for Equation 1")
end if;
if 0. < array_complex_poles[1, 1] and
array_complex_poles[1, 1] <> glob_large_float then
omniout_float(ALWAYS,
"Radius of convergence (six term test) for eq 1 ", 4,
array_complex_poles[1, 1], 4, " ");
omniout_float(ALWAYS,
"Order of pole (six term test) ", 4,
array_complex_poles[1, 2], 4, " ")
else omniout_str(ALWAYS,
"NO COMPLEX POLE (six term test) for Equation 1")
end if
end proc
> # End Function number 3
> # Begin Function number 4
> check_sign := proc( x0 ,xf)
> local ret;
> if (xf > x0) then # if number 2
> ret := 1.0;
> else
> ret := -1.0;
> fi;# end if 2;
> ret;;
> end;
check_sign := proc(x0, xf)
local ret;
if x0 < xf then ret := 1.0 else ret := -1.0 end if; ret
end proc
> # End Function number 4
> # Begin Function number 5
> est_size_answer := proc()
> global
> glob_max_terms,
> glob_iolevel,
> glob_yes_pole,
> glob_no_pole,
> glob_not_given,
> ALWAYS,
> INFO,
> DEBUGL,
> DEBUGMASSIVE,
> #Top Generate Globals Decl
> MAX_UNCHANGED,
> glob_check_sign,
> glob_desired_digits_correct,
> glob_max_estimated_step_error,
> glob_ratio_of_radius,
> glob_percent_done,
> glob_subiter_method,
> glob_total_exp_sec,
> glob_optimal_expect_sec,
> glob_html_log,
> glob_good_digits,
> glob_max_opt_iter,
> glob_dump,
> glob_djd_debug,
> glob_display_flag,
> glob_djd_debug2,
> glob_sec_in_minute,
> glob_min_in_hour,
> glob_hours_in_day,
> glob_days_in_year,
> glob_sec_in_hour,
> glob_sec_in_day,
> glob_sec_in_year,
> glob_almost_1,
> glob_clock_sec,
> glob_clock_start_sec,
> glob_not_yet_finished,
> glob_initial_pass,
> glob_not_yet_start_msg,
> glob_reached_optimal_h,
> glob_optimal_done,
> glob_disp_incr,
> glob_h,
> glob_max_h,
> glob_min_h,
> glob_type_given_pole,
> glob_large_float,
> glob_last_good_h,
> glob_look_poles,
> glob_neg_h,
> glob_display_interval,
> glob_next_display,
> glob_dump_analytic,
> glob_abserr,
> glob_relerr,
> glob_max_hours,
> glob_max_iter,
> glob_max_rel_trunc_err,
> glob_max_trunc_err,
> glob_no_eqs,
> glob_optimal_clock_start_sec,
> glob_optimal_start,
> glob_small_float,
> glob_smallish_float,
> glob_unchanged_h_cnt,
> glob_warned,
> glob_warned2,
> glob_max_sec,
> glob_orig_start_sec,
> glob_start,
> glob_curr_iter_when_opt,
> glob_current_iter,
> glob_iter,
> glob_normmax,
> glob_max_minutes,
> #Bottom Generate Globals Decl
> #BEGIN CONST
> array_const_1,
> array_const_0D0,
> array_const_1D0,
> #END CONST
> array_y_init,
> array_norms,
> array_fact_1,
> array_pole,
> array_real_pole,
> array_complex_pole,
> array_1st_rel_error,
> array_last_rel_error,
> array_type_pole,
> array_type_real_pole,
> array_type_complex_pole,
> array_y,
> array_x,
> array_tmp0,
> array_tmp1,
> array_tmp2_a1,
> array_tmp2_a2,
> array_tmp2_a3,
> array_tmp2,
> array_tmp3,
> array_m1,
> array_y_higher,
> array_y_higher_work,
> array_y_higher_work2,
> array_y_set_initial,
> array_poles,
> array_given_rad_poles,
> array_given_ord_poles,
> array_real_poles,
> array_complex_poles,
> array_fact_2,
> glob_last;
> local min_size;
> min_size := glob_large_float;
> if (omniabs(array_y[1]) < min_size) then # if number 2
> min_size := omniabs(array_y[1]);
> omniout_float(ALWAYS,"min_size",32,min_size,32,"");
> fi;# end if 2;
> if (min_size < 1.0) then # if number 2
> min_size := 1.0;
> omniout_float(ALWAYS,"min_size",32,min_size,32,"");
> fi;# end if 2;
> min_size;
> end;
est_size_answer := proc()
local min_size;
global glob_max_terms, glob_iolevel, glob_yes_pole, glob_no_pole,
glob_not_given, ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, MAX_UNCHANGED,
glob_check_sign, glob_desired_digits_correct, glob_max_estimated_step_error,
glob_ratio_of_radius, glob_percent_done, glob_subiter_method,
glob_total_exp_sec, glob_optimal_expect_sec, glob_html_log,
glob_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug,
glob_display_flag, glob_djd_debug2, glob_sec_in_minute, glob_min_in_hour,
glob_hours_in_day, glob_days_in_year, glob_sec_in_hour, glob_sec_in_day,
glob_sec_in_year, glob_almost_1, glob_clock_sec, glob_clock_start_sec,
glob_not_yet_finished, glob_initial_pass, glob_not_yet_start_msg,
glob_reached_optimal_h, glob_optimal_done, glob_disp_incr, glob_h,
glob_max_h, glob_min_h, glob_type_given_pole, glob_large_float,
glob_last_good_h, glob_look_poles, glob_neg_h, glob_display_interval,
glob_next_display, glob_dump_analytic, glob_abserr, glob_relerr,
glob_max_hours, glob_max_iter, glob_max_rel_trunc_err, glob_max_trunc_err,
glob_no_eqs, glob_optimal_clock_start_sec, glob_optimal_start,
glob_small_float, glob_smallish_float, glob_unchanged_h_cnt, glob_warned,
glob_warned2, glob_max_sec, glob_orig_start_sec, glob_start,
glob_curr_iter_when_opt, glob_current_iter, glob_iter, glob_normmax,
glob_max_minutes, array_const_1, array_const_0D0, array_const_1D0,
array_y_init, array_norms, array_fact_1, array_pole, array_real_pole,
array_complex_pole, array_1st_rel_error, array_last_rel_error,
array_type_pole, array_type_real_pole, array_type_complex_pole, array_y,
array_x, array_tmp0, array_tmp1, array_tmp2_a1, array_tmp2_a2,
array_tmp2_a3, array_tmp2, array_tmp3, array_m1, array_y_higher,
array_y_higher_work, array_y_higher_work2, array_y_set_initial, array_poles,
array_given_rad_poles, array_given_ord_poles, array_real_poles,
array_complex_poles, array_fact_2, glob_last;
min_size := glob_large_float;
if omniabs(array_y[1]) < min_size then
min_size := omniabs(array_y[1]);
omniout_float(ALWAYS, "min_size", 32, min_size, 32, "")
end if;
if min_size < 1.0 then
min_size := 1.0;
omniout_float(ALWAYS, "min_size", 32, min_size, 32, "")
end if;
min_size
end proc
> # End Function number 5
> # Begin Function number 6
> test_suggested_h := proc()
> global
> glob_max_terms,
> glob_iolevel,
> glob_yes_pole,
> glob_no_pole,
> glob_not_given,
> ALWAYS,
> INFO,
> DEBUGL,
> DEBUGMASSIVE,
> #Top Generate Globals Decl
> MAX_UNCHANGED,
> glob_check_sign,
> glob_desired_digits_correct,
> glob_max_estimated_step_error,
> glob_ratio_of_radius,
> glob_percent_done,
> glob_subiter_method,
> glob_total_exp_sec,
> glob_optimal_expect_sec,
> glob_html_log,
> glob_good_digits,
> glob_max_opt_iter,
> glob_dump,
> glob_djd_debug,
> glob_display_flag,
> glob_djd_debug2,
> glob_sec_in_minute,
> glob_min_in_hour,
> glob_hours_in_day,
> glob_days_in_year,
> glob_sec_in_hour,
> glob_sec_in_day,
> glob_sec_in_year,
> glob_almost_1,
> glob_clock_sec,
> glob_clock_start_sec,
> glob_not_yet_finished,
> glob_initial_pass,
> glob_not_yet_start_msg,
> glob_reached_optimal_h,
> glob_optimal_done,
> glob_disp_incr,
> glob_h,
> glob_max_h,
> glob_min_h,
> glob_type_given_pole,
> glob_large_float,
> glob_last_good_h,
> glob_look_poles,
> glob_neg_h,
> glob_display_interval,
> glob_next_display,
> glob_dump_analytic,
> glob_abserr,
> glob_relerr,
> glob_max_hours,
> glob_max_iter,
> glob_max_rel_trunc_err,
> glob_max_trunc_err,
> glob_no_eqs,
> glob_optimal_clock_start_sec,
> glob_optimal_start,
> glob_small_float,
> glob_smallish_float,
> glob_unchanged_h_cnt,
> glob_warned,
> glob_warned2,
> glob_max_sec,
> glob_orig_start_sec,
> glob_start,
> glob_curr_iter_when_opt,
> glob_current_iter,
> glob_iter,
> glob_normmax,
> glob_max_minutes,
> #Bottom Generate Globals Decl
> #BEGIN CONST
> array_const_1,
> array_const_0D0,
> array_const_1D0,
> #END CONST
> array_y_init,
> array_norms,
> array_fact_1,
> array_pole,
> array_real_pole,
> array_complex_pole,
> array_1st_rel_error,
> array_last_rel_error,
> array_type_pole,
> array_type_real_pole,
> array_type_complex_pole,
> array_y,
> array_x,
> array_tmp0,
> array_tmp1,
> array_tmp2_a1,
> array_tmp2_a2,
> array_tmp2_a3,
> array_tmp2,
> array_tmp3,
> array_m1,
> array_y_higher,
> array_y_higher_work,
> array_y_higher_work2,
> array_y_set_initial,
> array_poles,
> array_given_rad_poles,
> array_given_ord_poles,
> array_real_poles,
> array_complex_poles,
> array_fact_2,
> glob_last;
> local max_estimated_step_error,hn_div_ho,hn_div_ho_2,hn_div_ho_3,no_terms,est_tmp;
> max_estimated_step_error := 0.0;
> no_terms := glob_max_terms;
> hn_div_ho := 0.5;
> hn_div_ho_2 := 0.25;
> hn_div_ho_3 := 0.125;
> omniout_float(ALWAYS,"hn_div_ho",32,hn_div_ho,32,"");
> omniout_float(ALWAYS,"hn_div_ho_2",32,hn_div_ho_2,32,"");
> omniout_float(ALWAYS,"hn_div_ho_3",32,hn_div_ho_3,32,"");
> est_tmp := omniabs(array_y[no_terms-3] + array_y[no_terms - 2] * hn_div_ho + array_y[no_terms - 1] * hn_div_ho_2 + array_y[no_terms] * hn_div_ho_3);
> if (est_tmp >= max_estimated_step_error) then # if number 2
> max_estimated_step_error := est_tmp;
> fi;# end if 2;
> omniout_float(ALWAYS,"max_estimated_step_error",32,max_estimated_step_error,32,"");
> max_estimated_step_error;
> end;
test_suggested_h := proc()
local max_estimated_step_error, hn_div_ho, hn_div_ho_2, hn_div_ho_3,
no_terms, est_tmp;
global glob_max_terms, glob_iolevel, glob_yes_pole, glob_no_pole,
glob_not_given, ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, MAX_UNCHANGED,
glob_check_sign, glob_desired_digits_correct, glob_max_estimated_step_error,
glob_ratio_of_radius, glob_percent_done, glob_subiter_method,
glob_total_exp_sec, glob_optimal_expect_sec, glob_html_log,
glob_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug,
glob_display_flag, glob_djd_debug2, glob_sec_in_minute, glob_min_in_hour,
glob_hours_in_day, glob_days_in_year, glob_sec_in_hour, glob_sec_in_day,
glob_sec_in_year, glob_almost_1, glob_clock_sec, glob_clock_start_sec,
glob_not_yet_finished, glob_initial_pass, glob_not_yet_start_msg,
glob_reached_optimal_h, glob_optimal_done, glob_disp_incr, glob_h,
glob_max_h, glob_min_h, glob_type_given_pole, glob_large_float,
glob_last_good_h, glob_look_poles, glob_neg_h, glob_display_interval,
glob_next_display, glob_dump_analytic, glob_abserr, glob_relerr,
glob_max_hours, glob_max_iter, glob_max_rel_trunc_err, glob_max_trunc_err,
glob_no_eqs, glob_optimal_clock_start_sec, glob_optimal_start,
glob_small_float, glob_smallish_float, glob_unchanged_h_cnt, glob_warned,
glob_warned2, glob_max_sec, glob_orig_start_sec, glob_start,
glob_curr_iter_when_opt, glob_current_iter, glob_iter, glob_normmax,
glob_max_minutes, array_const_1, array_const_0D0, array_const_1D0,
array_y_init, array_norms, array_fact_1, array_pole, array_real_pole,
array_complex_pole, array_1st_rel_error, array_last_rel_error,
array_type_pole, array_type_real_pole, array_type_complex_pole, array_y,
array_x, array_tmp0, array_tmp1, array_tmp2_a1, array_tmp2_a2,
array_tmp2_a3, array_tmp2, array_tmp3, array_m1, array_y_higher,
array_y_higher_work, array_y_higher_work2, array_y_set_initial, array_poles,
array_given_rad_poles, array_given_ord_poles, array_real_poles,
array_complex_poles, array_fact_2, glob_last;
max_estimated_step_error := 0.;
no_terms := glob_max_terms;
hn_div_ho := 0.5;
hn_div_ho_2 := 0.25;
hn_div_ho_3 := 0.125;
omniout_float(ALWAYS, "hn_div_ho", 32, hn_div_ho, 32, "");
omniout_float(ALWAYS, "hn_div_ho_2", 32, hn_div_ho_2, 32, "");
omniout_float(ALWAYS, "hn_div_ho_3", 32, hn_div_ho_3, 32, "");
est_tmp := omniabs(array_y[no_terms - 3]
+ array_y[no_terms - 2]*hn_div_ho
+ array_y[no_terms - 1]*hn_div_ho_2
+ array_y[no_terms]*hn_div_ho_3);
if max_estimated_step_error <= est_tmp then
max_estimated_step_error := est_tmp
end if;
omniout_float(ALWAYS, "max_estimated_step_error", 32,
max_estimated_step_error, 32, "");
max_estimated_step_error
end proc
> # End Function number 6
> # Begin Function number 7
> reached_interval := proc()
> global
> glob_max_terms,
> glob_iolevel,
> glob_yes_pole,
> glob_no_pole,
> glob_not_given,
> ALWAYS,
> INFO,
> DEBUGL,
> DEBUGMASSIVE,
> #Top Generate Globals Decl
> MAX_UNCHANGED,
> glob_check_sign,
> glob_desired_digits_correct,
> glob_max_estimated_step_error,
> glob_ratio_of_radius,
> glob_percent_done,
> glob_subiter_method,
> glob_total_exp_sec,
> glob_optimal_expect_sec,
> glob_html_log,
> glob_good_digits,
> glob_max_opt_iter,
> glob_dump,
> glob_djd_debug,
> glob_display_flag,
> glob_djd_debug2,
> glob_sec_in_minute,
> glob_min_in_hour,
> glob_hours_in_day,
> glob_days_in_year,
> glob_sec_in_hour,
> glob_sec_in_day,
> glob_sec_in_year,
> glob_almost_1,
> glob_clock_sec,
> glob_clock_start_sec,
> glob_not_yet_finished,
> glob_initial_pass,
> glob_not_yet_start_msg,
> glob_reached_optimal_h,
> glob_optimal_done,
> glob_disp_incr,
> glob_h,
> glob_max_h,
> glob_min_h,
> glob_type_given_pole,
> glob_large_float,
> glob_last_good_h,
> glob_look_poles,
> glob_neg_h,
> glob_display_interval,
> glob_next_display,
> glob_dump_analytic,
> glob_abserr,
> glob_relerr,
> glob_max_hours,
> glob_max_iter,
> glob_max_rel_trunc_err,
> glob_max_trunc_err,
> glob_no_eqs,
> glob_optimal_clock_start_sec,
> glob_optimal_start,
> glob_small_float,
> glob_smallish_float,
> glob_unchanged_h_cnt,
> glob_warned,
> glob_warned2,
> glob_max_sec,
> glob_orig_start_sec,
> glob_start,
> glob_curr_iter_when_opt,
> glob_current_iter,
> glob_iter,
> glob_normmax,
> glob_max_minutes,
> #Bottom Generate Globals Decl
> #BEGIN CONST
> array_const_1,
> array_const_0D0,
> array_const_1D0,
> #END CONST
> array_y_init,
> array_norms,
> array_fact_1,
> array_pole,
> array_real_pole,
> array_complex_pole,
> array_1st_rel_error,
> array_last_rel_error,
> array_type_pole,
> array_type_real_pole,
> array_type_complex_pole,
> array_y,
> array_x,
> array_tmp0,
> array_tmp1,
> array_tmp2_a1,
> array_tmp2_a2,
> array_tmp2_a3,
> array_tmp2,
> array_tmp3,
> array_m1,
> array_y_higher,
> array_y_higher_work,
> array_y_higher_work2,
> array_y_set_initial,
> array_poles,
> array_given_rad_poles,
> array_given_ord_poles,
> array_real_poles,
> array_complex_poles,
> array_fact_2,
> glob_last;
> local ret;
> if (glob_check_sign * (array_x[1]) >= glob_check_sign * glob_next_display) then # if number 2
> ret := true;
> else
> ret := false;
> fi;# end if 2;
> return(ret);
> end;
reached_interval := proc()
local ret;
global glob_max_terms, glob_iolevel, glob_yes_pole, glob_no_pole,
glob_not_given, ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, MAX_UNCHANGED,
glob_check_sign, glob_desired_digits_correct, glob_max_estimated_step_error,
glob_ratio_of_radius, glob_percent_done, glob_subiter_method,
glob_total_exp_sec, glob_optimal_expect_sec, glob_html_log,
glob_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug,
glob_display_flag, glob_djd_debug2, glob_sec_in_minute, glob_min_in_hour,
glob_hours_in_day, glob_days_in_year, glob_sec_in_hour, glob_sec_in_day,
glob_sec_in_year, glob_almost_1, glob_clock_sec, glob_clock_start_sec,
glob_not_yet_finished, glob_initial_pass, glob_not_yet_start_msg,
glob_reached_optimal_h, glob_optimal_done, glob_disp_incr, glob_h,
glob_max_h, glob_min_h, glob_type_given_pole, glob_large_float,
glob_last_good_h, glob_look_poles, glob_neg_h, glob_display_interval,
glob_next_display, glob_dump_analytic, glob_abserr, glob_relerr,
glob_max_hours, glob_max_iter, glob_max_rel_trunc_err, glob_max_trunc_err,
glob_no_eqs, glob_optimal_clock_start_sec, glob_optimal_start,
glob_small_float, glob_smallish_float, glob_unchanged_h_cnt, glob_warned,
glob_warned2, glob_max_sec, glob_orig_start_sec, glob_start,
glob_curr_iter_when_opt, glob_current_iter, glob_iter, glob_normmax,
glob_max_minutes, array_const_1, array_const_0D0, array_const_1D0,
array_y_init, array_norms, array_fact_1, array_pole, array_real_pole,
array_complex_pole, array_1st_rel_error, array_last_rel_error,
array_type_pole, array_type_real_pole, array_type_complex_pole, array_y,
array_x, array_tmp0, array_tmp1, array_tmp2_a1, array_tmp2_a2,
array_tmp2_a3, array_tmp2, array_tmp3, array_m1, array_y_higher,
array_y_higher_work, array_y_higher_work2, array_y_set_initial, array_poles,
array_given_rad_poles, array_given_ord_poles, array_real_poles,
array_complex_poles, array_fact_2, glob_last;
if glob_check_sign*glob_next_display <= glob_check_sign*array_x[1] then
ret := true
else ret := false
end if;
return ret
end proc
> # End Function number 7
> # Begin Function number 8
> display_alot := proc(iter)
> global
> glob_max_terms,
> glob_iolevel,
> glob_yes_pole,
> glob_no_pole,
> glob_not_given,
> ALWAYS,
> INFO,
> DEBUGL,
> DEBUGMASSIVE,
> #Top Generate Globals Decl
> MAX_UNCHANGED,
> glob_check_sign,
> glob_desired_digits_correct,
> glob_max_estimated_step_error,
> glob_ratio_of_radius,
> glob_percent_done,
> glob_subiter_method,
> glob_total_exp_sec,
> glob_optimal_expect_sec,
> glob_html_log,
> glob_good_digits,
> glob_max_opt_iter,
> glob_dump,
> glob_djd_debug,
> glob_display_flag,
> glob_djd_debug2,
> glob_sec_in_minute,
> glob_min_in_hour,
> glob_hours_in_day,
> glob_days_in_year,
> glob_sec_in_hour,
> glob_sec_in_day,
> glob_sec_in_year,
> glob_almost_1,
> glob_clock_sec,
> glob_clock_start_sec,
> glob_not_yet_finished,
> glob_initial_pass,
> glob_not_yet_start_msg,
> glob_reached_optimal_h,
> glob_optimal_done,
> glob_disp_incr,
> glob_h,
> glob_max_h,
> glob_min_h,
> glob_type_given_pole,
> glob_large_float,
> glob_last_good_h,
> glob_look_poles,
> glob_neg_h,
> glob_display_interval,
> glob_next_display,
> glob_dump_analytic,
> glob_abserr,
> glob_relerr,
> glob_max_hours,
> glob_max_iter,
> glob_max_rel_trunc_err,
> glob_max_trunc_err,
> glob_no_eqs,
> glob_optimal_clock_start_sec,
> glob_optimal_start,
> glob_small_float,
> glob_smallish_float,
> glob_unchanged_h_cnt,
> glob_warned,
> glob_warned2,
> glob_max_sec,
> glob_orig_start_sec,
> glob_start,
> glob_curr_iter_when_opt,
> glob_current_iter,
> glob_iter,
> glob_normmax,
> glob_max_minutes,
> #Bottom Generate Globals Decl
> #BEGIN CONST
> array_const_1,
> array_const_0D0,
> array_const_1D0,
> #END CONST
> array_y_init,
> array_norms,
> array_fact_1,
> array_pole,
> array_real_pole,
> array_complex_pole,
> array_1st_rel_error,
> array_last_rel_error,
> array_type_pole,
> array_type_real_pole,
> array_type_complex_pole,
> array_y,
> array_x,
> array_tmp0,
> array_tmp1,
> array_tmp2_a1,
> array_tmp2_a2,
> array_tmp2_a3,
> array_tmp2,
> array_tmp3,
> array_m1,
> array_y_higher,
> array_y_higher_work,
> array_y_higher_work2,
> array_y_set_initial,
> array_poles,
> array_given_rad_poles,
> array_given_ord_poles,
> array_real_poles,
> array_complex_poles,
> array_fact_2,
> glob_last;
> local abserr, analytic_val_y, ind_var, numeric_val, relerr, term_no;
> #TOP DISPLAY ALOT
> if (reached_interval()) then # if number 2
> if (iter >= 0) then # if number 3
> ind_var := array_x[1];
> omniout_float(ALWAYS,"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) then # if number 4
> relerr := abserr*100.0/omniabs(analytic_val_y);
> if (relerr > 0.0000000000000000000000000000000001) then # if number 5
> glob_good_digits := -trunc(log10(relerr)) + 3;
> else
> glob_good_digits := Digits;
> fi;# end if 5;
> else
> relerr := -1.0 ;
> glob_good_digits := -1;
> fi;# end if 4;
> if (glob_iter = 1) then # if number 4
> array_1st_rel_error[1] := relerr;
> else
> array_last_rel_error[1] := relerr;
> fi;# end if 4;
> omniout_float(ALWAYS,"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," ");
> fi;# end if 3;
> #BOTTOM DISPLAY ALOT
> fi;# end if 2;
> end;
display_alot := proc(iter)
local abserr, analytic_val_y, ind_var, numeric_val, relerr, term_no;
global glob_max_terms, glob_iolevel, glob_yes_pole, glob_no_pole,
glob_not_given, ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, MAX_UNCHANGED,
glob_check_sign, glob_desired_digits_correct, glob_max_estimated_step_error,
glob_ratio_of_radius, glob_percent_done, glob_subiter_method,
glob_total_exp_sec, glob_optimal_expect_sec, glob_html_log,
glob_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug,
glob_display_flag, glob_djd_debug2, glob_sec_in_minute, glob_min_in_hour,
glob_hours_in_day, glob_days_in_year, glob_sec_in_hour, glob_sec_in_day,
glob_sec_in_year, glob_almost_1, glob_clock_sec, glob_clock_start_sec,
glob_not_yet_finished, glob_initial_pass, glob_not_yet_start_msg,
glob_reached_optimal_h, glob_optimal_done, glob_disp_incr, glob_h,
glob_max_h, glob_min_h, glob_type_given_pole, glob_large_float,
glob_last_good_h, glob_look_poles, glob_neg_h, glob_display_interval,
glob_next_display, glob_dump_analytic, glob_abserr, glob_relerr,
glob_max_hours, glob_max_iter, glob_max_rel_trunc_err, glob_max_trunc_err,
glob_no_eqs, glob_optimal_clock_start_sec, glob_optimal_start,
glob_small_float, glob_smallish_float, glob_unchanged_h_cnt, glob_warned,
glob_warned2, glob_max_sec, glob_orig_start_sec, glob_start,
glob_curr_iter_when_opt, glob_current_iter, glob_iter, glob_normmax,
glob_max_minutes, array_const_1, array_const_0D0, array_const_1D0,
array_y_init, array_norms, array_fact_1, array_pole, array_real_pole,
array_complex_pole, array_1st_rel_error, array_last_rel_error,
array_type_pole, array_type_real_pole, array_type_complex_pole, array_y,
array_x, array_tmp0, array_tmp1, array_tmp2_a1, array_tmp2_a2,
array_tmp2_a3, array_tmp2, array_tmp3, array_m1, array_y_higher,
array_y_higher_work, array_y_higher_work2, array_y_set_initial, array_poles,
array_given_rad_poles, array_given_ord_poles, array_real_poles,
array_complex_poles, array_fact_2, glob_last;
if reached_interval() then
if 0 <= iter then
ind_var := array_x[1];
omniout_float(ALWAYS, "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. then
relerr := abserr*100.0/omniabs(analytic_val_y);
if 0.1*10^(-33) < relerr then
glob_good_digits := -trunc(log10(relerr)) + 3
else glob_good_digits := Digits
end if
else relerr := -1.0; glob_good_digits := -1
end if;
if glob_iter = 1 then array_1st_rel_error[1] := relerr
else array_last_rel_error[1] := relerr
end if;
omniout_float(ALWAYS, "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, " ")
end if
end if
end proc
> # End Function number 8
> # Begin Function number 9
> adjust_for_pole := proc(h_param)
> global
> glob_max_terms,
> glob_iolevel,
> glob_yes_pole,
> glob_no_pole,
> glob_not_given,
> ALWAYS,
> INFO,
> DEBUGL,
> DEBUGMASSIVE,
> #Top Generate Globals Decl
> MAX_UNCHANGED,
> glob_check_sign,
> glob_desired_digits_correct,
> glob_max_estimated_step_error,
> glob_ratio_of_radius,
> glob_percent_done,
> glob_subiter_method,
> glob_total_exp_sec,
> glob_optimal_expect_sec,
> glob_html_log,
> glob_good_digits,
> glob_max_opt_iter,
> glob_dump,
> glob_djd_debug,
> glob_display_flag,
> glob_djd_debug2,
> glob_sec_in_minute,
> glob_min_in_hour,
> glob_hours_in_day,
> glob_days_in_year,
> glob_sec_in_hour,
> glob_sec_in_day,
> glob_sec_in_year,
> glob_almost_1,
> glob_clock_sec,
> glob_clock_start_sec,
> glob_not_yet_finished,
> glob_initial_pass,
> glob_not_yet_start_msg,
> glob_reached_optimal_h,
> glob_optimal_done,
> glob_disp_incr,
> glob_h,
> glob_max_h,
> glob_min_h,
> glob_type_given_pole,
> glob_large_float,
> glob_last_good_h,
> glob_look_poles,
> glob_neg_h,
> glob_display_interval,
> glob_next_display,
> glob_dump_analytic,
> glob_abserr,
> glob_relerr,
> glob_max_hours,
> glob_max_iter,
> glob_max_rel_trunc_err,
> glob_max_trunc_err,
> glob_no_eqs,
> glob_optimal_clock_start_sec,
> glob_optimal_start,
> glob_small_float,
> glob_smallish_float,
> glob_unchanged_h_cnt,
> glob_warned,
> glob_warned2,
> glob_max_sec,
> glob_orig_start_sec,
> glob_start,
> glob_curr_iter_when_opt,
> glob_current_iter,
> glob_iter,
> glob_normmax,
> glob_max_minutes,
> #Bottom Generate Globals Decl
> #BEGIN CONST
> array_const_1,
> array_const_0D0,
> array_const_1D0,
> #END CONST
> array_y_init,
> array_norms,
> array_fact_1,
> array_pole,
> array_real_pole,
> array_complex_pole,
> array_1st_rel_error,
> array_last_rel_error,
> array_type_pole,
> array_type_real_pole,
> array_type_complex_pole,
> array_y,
> array_x,
> array_tmp0,
> array_tmp1,
> array_tmp2_a1,
> array_tmp2_a2,
> array_tmp2_a3,
> array_tmp2,
> array_tmp3,
> array_m1,
> array_y_higher,
> array_y_higher_work,
> array_y_higher_work2,
> array_y_set_initial,
> array_poles,
> array_given_rad_poles,
> array_given_ord_poles,
> array_real_poles,
> array_complex_poles,
> array_fact_2,
> glob_last;
> local hnew, sz2, tmp;
> #TOP ADJUST FOR POLE
> hnew := h_param;
> glob_normmax := glob_small_float;
> if (omniabs(array_y_higher[1,1]) > glob_small_float) then # if number 2
> tmp := omniabs(array_y_higher[1,1]);
> if (tmp < glob_normmax) then # if number 3
> glob_normmax := tmp;
> fi;# end if 3
> fi;# end if 2;
> if (glob_look_poles and (omniabs(array_pole[1]) > glob_small_float) and (array_pole[1] <> glob_large_float)) then # if number 2
> sz2 := array_pole[1]/10.0;
> if (sz2 < hnew) then # if number 3
> omniout_float(INFO,"glob_h adjusted to ",20,h_param,12,"due to singularity.");
> omniout_str(INFO,"Reached Optimal");
> return(hnew);
> fi;# end if 3
> fi;# end if 2;
> if ( not glob_reached_optimal_h) then # if number 2
> 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[1];
> fi;# end if 2;
> hnew := sz2;
> ;#END block
> return(hnew);
> #BOTTOM ADJUST FOR POLE
> end;
adjust_for_pole := proc(h_param)
local hnew, sz2, tmp;
global glob_max_terms, glob_iolevel, glob_yes_pole, glob_no_pole,
glob_not_given, ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, MAX_UNCHANGED,
glob_check_sign, glob_desired_digits_correct, glob_max_estimated_step_error,
glob_ratio_of_radius, glob_percent_done, glob_subiter_method,
glob_total_exp_sec, glob_optimal_expect_sec, glob_html_log,
glob_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug,
glob_display_flag, glob_djd_debug2, glob_sec_in_minute, glob_min_in_hour,
glob_hours_in_day, glob_days_in_year, glob_sec_in_hour, glob_sec_in_day,
glob_sec_in_year, glob_almost_1, glob_clock_sec, glob_clock_start_sec,
glob_not_yet_finished, glob_initial_pass, glob_not_yet_start_msg,
glob_reached_optimal_h, glob_optimal_done, glob_disp_incr, glob_h,
glob_max_h, glob_min_h, glob_type_given_pole, glob_large_float,
glob_last_good_h, glob_look_poles, glob_neg_h, glob_display_interval,
glob_next_display, glob_dump_analytic, glob_abserr, glob_relerr,
glob_max_hours, glob_max_iter, glob_max_rel_trunc_err, glob_max_trunc_err,
glob_no_eqs, glob_optimal_clock_start_sec, glob_optimal_start,
glob_small_float, glob_smallish_float, glob_unchanged_h_cnt, glob_warned,
glob_warned2, glob_max_sec, glob_orig_start_sec, glob_start,
glob_curr_iter_when_opt, glob_current_iter, glob_iter, glob_normmax,
glob_max_minutes, array_const_1, array_const_0D0, array_const_1D0,
array_y_init, array_norms, array_fact_1, array_pole, array_real_pole,
array_complex_pole, array_1st_rel_error, array_last_rel_error,
array_type_pole, array_type_real_pole, array_type_complex_pole, array_y,
array_x, array_tmp0, array_tmp1, array_tmp2_a1, array_tmp2_a2,
array_tmp2_a3, array_tmp2, array_tmp3, array_m1, array_y_higher,
array_y_higher_work, array_y_higher_work2, array_y_set_initial, array_poles,
array_given_rad_poles, array_given_ord_poles, array_real_poles,
array_complex_poles, array_fact_2, glob_last;
hnew := h_param;
glob_normmax := glob_small_float;
if glob_small_float < omniabs(array_y_higher[1, 1]) then
tmp := omniabs(array_y_higher[1, 1]);
if tmp < glob_normmax then glob_normmax := tmp end if
end if;
if glob_look_poles and glob_small_float < omniabs(array_pole[1]) and
array_pole[1] <> glob_large_float then
sz2 := array_pole[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
end if
end if;
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[1]
end if;
hnew := sz2;
return hnew
end proc
> # End Function number 9
> # Begin Function number 10
> prog_report := proc(x_start,x_end)
> global
> glob_max_terms,
> glob_iolevel,
> glob_yes_pole,
> glob_no_pole,
> glob_not_given,
> ALWAYS,
> INFO,
> DEBUGL,
> DEBUGMASSIVE,
> #Top Generate Globals Decl
> MAX_UNCHANGED,
> glob_check_sign,
> glob_desired_digits_correct,
> glob_max_estimated_step_error,
> glob_ratio_of_radius,
> glob_percent_done,
> glob_subiter_method,
> glob_total_exp_sec,
> glob_optimal_expect_sec,
> glob_html_log,
> glob_good_digits,
> glob_max_opt_iter,
> glob_dump,
> glob_djd_debug,
> glob_display_flag,
> glob_djd_debug2,
> glob_sec_in_minute,
> glob_min_in_hour,
> glob_hours_in_day,
> glob_days_in_year,
> glob_sec_in_hour,
> glob_sec_in_day,
> glob_sec_in_year,
> glob_almost_1,
> glob_clock_sec,
> glob_clock_start_sec,
> glob_not_yet_finished,
> glob_initial_pass,
> glob_not_yet_start_msg,
> glob_reached_optimal_h,
> glob_optimal_done,
> glob_disp_incr,
> glob_h,
> glob_max_h,
> glob_min_h,
> glob_type_given_pole,
> glob_large_float,
> glob_last_good_h,
> glob_look_poles,
> glob_neg_h,
> glob_display_interval,
> glob_next_display,
> glob_dump_analytic,
> glob_abserr,
> glob_relerr,
> glob_max_hours,
> glob_max_iter,
> glob_max_rel_trunc_err,
> glob_max_trunc_err,
> glob_no_eqs,
> glob_optimal_clock_start_sec,
> glob_optimal_start,
> glob_small_float,
> glob_smallish_float,
> glob_unchanged_h_cnt,
> glob_warned,
> glob_warned2,
> glob_max_sec,
> glob_orig_start_sec,
> glob_start,
> glob_curr_iter_when_opt,
> glob_current_iter,
> glob_iter,
> glob_normmax,
> glob_max_minutes,
> #Bottom Generate Globals Decl
> #BEGIN CONST
> array_const_1,
> array_const_0D0,
> array_const_1D0,
> #END CONST
> array_y_init,
> array_norms,
> array_fact_1,
> array_pole,
> array_real_pole,
> array_complex_pole,
> array_1st_rel_error,
> array_last_rel_error,
> array_type_pole,
> array_type_real_pole,
> array_type_complex_pole,
> array_y,
> array_x,
> array_tmp0,
> array_tmp1,
> array_tmp2_a1,
> array_tmp2_a2,
> array_tmp2_a3,
> array_tmp2,
> array_tmp3,
> array_m1,
> array_y_higher,
> array_y_higher_work,
> array_y_higher_work2,
> array_y_set_initial,
> array_poles,
> array_given_rad_poles,
> array_given_ord_poles,
> array_real_poles,
> array_complex_poles,
> array_fact_2,
> glob_last;
> local clock_sec, opt_clock_sec, clock_sec1, expect_sec, left_sec, percent_done, total_clock_sec;
> #TOP PROGRESS REPORT
> 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(glob_max_sec) + convfloat(glob_orig_start_sec) - convfloat(clock_sec1);
> expect_sec := comp_expect_sec(convfloat(x_end),convfloat(x_start),convfloat(array_x[1]) + convfloat(glob_h) ,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(array_x[1]) +convfloat( glob_h) ,convfloat( opt_clock_sec));
> glob_total_exp_sec := glob_optimal_expect_sec + total_clock_sec;
> percent_done := comp_percent(convfloat(x_end),convfloat(x_start),convfloat(array_x[1]) + convfloat(glob_h));
> glob_percent_done := percent_done;
> 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 # if number 2
> 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,"Expected Total Time ");
> omniout_timestr(convfloat(glob_total_exp_sec));
> fi;# end if 2;
> omniout_str_noeol(INFO,"Time to Timeout ");
> omniout_timestr(convfloat(left_sec));
> omniout_float(INFO, "Percent Done ",33,percent_done,4,"%");
> #BOTTOM PROGRESS REPORT
> end;
prog_report := proc(x_start, x_end)
local clock_sec, opt_clock_sec, clock_sec1, expect_sec, left_sec,
percent_done, total_clock_sec;
global glob_max_terms, glob_iolevel, glob_yes_pole, glob_no_pole,
glob_not_given, ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, MAX_UNCHANGED,
glob_check_sign, glob_desired_digits_correct, glob_max_estimated_step_error,
glob_ratio_of_radius, glob_percent_done, glob_subiter_method,
glob_total_exp_sec, glob_optimal_expect_sec, glob_html_log,
glob_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug,
glob_display_flag, glob_djd_debug2, glob_sec_in_minute, glob_min_in_hour,
glob_hours_in_day, glob_days_in_year, glob_sec_in_hour, glob_sec_in_day,
glob_sec_in_year, glob_almost_1, glob_clock_sec, glob_clock_start_sec,
glob_not_yet_finished, glob_initial_pass, glob_not_yet_start_msg,
glob_reached_optimal_h, glob_optimal_done, glob_disp_incr, glob_h,
glob_max_h, glob_min_h, glob_type_given_pole, glob_large_float,
glob_last_good_h, glob_look_poles, glob_neg_h, glob_display_interval,
glob_next_display, glob_dump_analytic, glob_abserr, glob_relerr,
glob_max_hours, glob_max_iter, glob_max_rel_trunc_err, glob_max_trunc_err,
glob_no_eqs, glob_optimal_clock_start_sec, glob_optimal_start,
glob_small_float, glob_smallish_float, glob_unchanged_h_cnt, glob_warned,
glob_warned2, glob_max_sec, glob_orig_start_sec, glob_start,
glob_curr_iter_when_opt, glob_current_iter, glob_iter, glob_normmax,
glob_max_minutes, array_const_1, array_const_0D0, array_const_1D0,
array_y_init, array_norms, array_fact_1, array_pole, array_real_pole,
array_complex_pole, array_1st_rel_error, array_last_rel_error,
array_type_pole, array_type_real_pole, array_type_complex_pole, array_y,
array_x, array_tmp0, array_tmp1, array_tmp2_a1, array_tmp2_a2,
array_tmp2_a3, array_tmp2, array_tmp3, array_m1, array_y_higher,
array_y_higher_work, array_y_higher_work2, array_y_set_initial, array_poles,
array_given_rad_poles, array_given_ord_poles, array_real_poles,
array_complex_poles, array_fact_2, glob_last;
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(glob_max_sec) + convfloat(glob_orig_start_sec)
- convfloat(clock_sec1);
expect_sec := comp_expect_sec(convfloat(x_end), convfloat(x_start),
convfloat(array_x[1]) + convfloat(glob_h),
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(array_x[1]) + convfloat(glob_h),
convfloat(opt_clock_sec));
glob_total_exp_sec := glob_optimal_expect_sec + total_clock_sec;
percent_done := comp_percent(convfloat(x_end), convfloat(x_start),
convfloat(array_x[1]) + convfloat(glob_h));
glob_percent_done := percent_done;
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, "Expected Total Time ");
omniout_timestr(convfloat(glob_total_exp_sec))
end if;
omniout_str_noeol(INFO, "Time to Timeout ");
omniout_timestr(convfloat(left_sec));
omniout_float(INFO, "Percent Done ", 33,
percent_done, 4, "%")
end proc
> # End Function number 10
> # Begin Function number 11
> check_for_pole := proc()
> global
> glob_max_terms,
> glob_iolevel,
> glob_yes_pole,
> glob_no_pole,
> glob_not_given,
> ALWAYS,
> INFO,
> DEBUGL,
> DEBUGMASSIVE,
> #Top Generate Globals Decl
> MAX_UNCHANGED,
> glob_check_sign,
> glob_desired_digits_correct,
> glob_max_estimated_step_error,
> glob_ratio_of_radius,
> glob_percent_done,
> glob_subiter_method,
> glob_total_exp_sec,
> glob_optimal_expect_sec,
> glob_html_log,
> glob_good_digits,
> glob_max_opt_iter,
> glob_dump,
> glob_djd_debug,
> glob_display_flag,
> glob_djd_debug2,
> glob_sec_in_minute,
> glob_min_in_hour,
> glob_hours_in_day,
> glob_days_in_year,
> glob_sec_in_hour,
> glob_sec_in_day,
> glob_sec_in_year,
> glob_almost_1,
> glob_clock_sec,
> glob_clock_start_sec,
> glob_not_yet_finished,
> glob_initial_pass,
> glob_not_yet_start_msg,
> glob_reached_optimal_h,
> glob_optimal_done,
> glob_disp_incr,
> glob_h,
> glob_max_h,
> glob_min_h,
> glob_type_given_pole,
> glob_large_float,
> glob_last_good_h,
> glob_look_poles,
> glob_neg_h,
> glob_display_interval,
> glob_next_display,
> glob_dump_analytic,
> glob_abserr,
> glob_relerr,
> glob_max_hours,
> glob_max_iter,
> glob_max_rel_trunc_err,
> glob_max_trunc_err,
> glob_no_eqs,
> glob_optimal_clock_start_sec,
> glob_optimal_start,
> glob_small_float,
> glob_smallish_float,
> glob_unchanged_h_cnt,
> glob_warned,
> glob_warned2,
> glob_max_sec,
> glob_orig_start_sec,
> glob_start,
> glob_curr_iter_when_opt,
> glob_current_iter,
> glob_iter,
> glob_normmax,
> glob_max_minutes,
> #Bottom Generate Globals Decl
> #BEGIN CONST
> array_const_1,
> array_const_0D0,
> array_const_1D0,
> #END CONST
> array_y_init,
> array_norms,
> array_fact_1,
> array_pole,
> array_real_pole,
> array_complex_pole,
> array_1st_rel_error,
> array_last_rel_error,
> array_type_pole,
> array_type_real_pole,
> array_type_complex_pole,
> array_y,
> array_x,
> array_tmp0,
> array_tmp1,
> array_tmp2_a1,
> array_tmp2_a2,
> array_tmp2_a3,
> array_tmp2,
> array_tmp3,
> array_m1,
> array_y_higher,
> array_y_higher_work,
> array_y_higher_work2,
> array_y_set_initial,
> array_poles,
> array_given_rad_poles,
> array_given_ord_poles,
> array_real_poles,
> array_complex_poles,
> array_fact_2,
> glob_last;
> local cnt, dr1, dr2, ds1, ds2, hdrc, m, n, nr1, nr2, ord_no, rad_c, rcs, rm0, rm1, rm2, rm3, rm4, found_sing, h_new, ratio, term, local_test, tmp_rad, tmp_ratio, prev_tmp_rad;
> #TOP CHECK FOR POLE
> array_pole[1] := glob_large_float;
> array_pole[2] := glob_large_float;
> tmp_rad := glob_large_float;
> prev_tmp_rad := glob_large_float;
> tmp_ratio := glob_large_float;
> rad_c := glob_large_float;
> array_poles[1,1] := glob_large_float;
> array_poles[1,2] := glob_large_float;
> #TOP radius ratio test in Henrici1
> found_sing := 1;
> n := glob_max_terms - 1 - 10;
> cnt := 0;
> while ((cnt < 5) and (found_sing = 1)) do # do number 1
> if ((omniabs(array_y_higher[1,n]) = 0.0) or (omniabs(array_y_higher[1,n+1]) = 0.0)) then # if number 2
> found_sing := 0;
> else
> tmp_rad := omniabs(array_y_higher[1,n] * glob_h / array_y_higher[1,n + 1]);
> tmp_ratio := tmp_rad / prev_tmp_rad;
> if ((cnt > 0 ) and (tmp_ratio < 2.0) and (tmp_ratio > 0.5)) then # if number 3
> if (tmp_rad < rad_c) then # if number 4
> rad_c := tmp_rad;
> fi;# end if 4;
> elif
> (cnt = 0) then # if number 4
> if (tmp_rad < rad_c) then # if number 5
> rad_c := tmp_rad;
> fi;# end if 5;
> elif
> (cnt > 0) then # if number 5
> found_sing := 0;
> fi;# end if 5
> fi;# end if 4;
> prev_tmp_rad := tmp_rad;;
> cnt := cnt + 1;
> n := n + 1;
> od;# end do number 1;
> if (found_sing = 1) then # if number 4
> if (rad_c < array_pole[1]) then # if number 5
> array_pole[1] := rad_c;
> array_poles[1,1] := rad_c;
> fi;# end if 5;
> fi;# end if 4;
> #BOTTOM radius ratio test in Henrici1
> #IN RADII REAL EQ = 1
> #Computes radius of convergence and r_order of pole from 3 adjacent Taylor series terms. EQUATUON NUMBER 1
> #Applies to pole of arbitrary r_order on the real axis,
> #Due to Prof. George Corliss.
> n := glob_max_terms;
> m := n - 1 - 1;
> while ((m >= 10) and ((omniabs(array_y_higher[1,m]) = 0.0) or (omniabs(array_y_higher[1,m-1]) = 0.0) or (omniabs(array_y_higher[1,m-2]) = 0.0))) do # do number 1
> m := m - 1;
> od;# end do number 1;
> if (m > 10) then # if number 4
> rm0 := array_y_higher[1,m]/array_y_higher[1,m-1];
> rm1 := array_y_higher[1,m-1]/array_y_higher[1,m-2];
> hdrc := convfloat(m)*rm0-convfloat(m-1)*rm1;
> if (omniabs(hdrc) > 0.0) then # if number 5
> rcs := glob_h/hdrc;
> ord_no := (rm1*convfloat((m-2)*(m-2))-rm0*convfloat(m-3))/hdrc;
> array_real_poles[1,1] := rcs;
> array_real_poles[1,2] := ord_no;
> else
> array_real_poles[1,1] := glob_large_float;
> array_real_poles[1,2] := glob_large_float;
> fi;# end if 5
> else
> array_real_poles[1,1] := glob_large_float;
> array_real_poles[1,2] := glob_large_float;
> fi;# end if 4;
> #BOTTOM RADII REAL EQ = 1
> #TOP RADII COMPLEX EQ = 1
> #Computes radius of convergence for complex conjugate pair of poles.
> #from 6 adjacent Taylor series terms
> #Also computes r_order of poles.
> #Due to Manuel Prieto.
> #With a correction by Dennis J. Darland
> n := glob_max_terms - 1 - 1;
> cnt := 0;
> while ((cnt < 5) and (n >= 10)) do # do number 1
> if (omniabs(array_y_higher[1,n]) <> 0.0) then # if number 4
> cnt := cnt + 1;
> else
> cnt := 0;
> fi;# end if 4;
> n := n - 1;
> od;# end do number 1;
> m := n + cnt;
> if (m <= 10) then # if number 4
> rad_c := glob_large_float;
> ord_no := glob_large_float;
> else
> rm0 := (array_y_higher[1,m])/(array_y_higher[1,m-1]);
> rm1 := (array_y_higher[1,m-1])/(array_y_higher[1,m-2]);
> rm2 := (array_y_higher[1,m-2])/(array_y_higher[1,m-3]);
> rm3 := (array_y_higher[1,m-3])/(array_y_higher[1,m-4]);
> rm4 := (array_y_higher[1,m-4])/(array_y_higher[1,m-5]);
> nr1 := convfloat(m-1)*rm0 - 2.0*convfloat(m-2)*rm1 + convfloat(m-3)*rm2;
> nr2 := convfloat(m-2)*rm1 - 2.0*convfloat(m-3)*rm2 + convfloat(m-4)*rm3;
> dr1 := (-1.0)/rm1 + 2.0/rm2 - 1.0/rm3;
> dr2 := (-1.0)/rm2 + 2.0/rm3 - 1.0/rm4;
> ds1 := 3.0/rm1 - 8.0/rm2 + 5.0/rm3;
> ds2 := 3.0/rm2 - 8.0/rm3 + 5.0/rm4;
> if ((omniabs(nr1 * dr2 - nr2 * dr1) = 0.0) or (omniabs(dr1) = 0.0)) then # if number 5
> rad_c := glob_large_float;
> ord_no := glob_large_float;
> else
> if (omniabs(nr1*dr2 - nr2 * dr1) <> 0.0) then # if number 6
> rcs := ((ds1*dr2 - ds2*dr1 +dr1*dr2)/(nr1*dr2 - nr2 * dr1));
> #(Manuels) rcs := (ds1*dr2 - ds2*dr1)/(nr1*dr2 - nr2 * dr1)
> ord_no := (rcs*nr1 - ds1)/(2.0*dr1) -convfloat(m)/2.0;
> if (omniabs(rcs) <> 0.0) then # if number 7
> if (rcs > 0.0) then # if number 8
> rad_c := sqrt(rcs) * omniabs(glob_h);
> else
> rad_c := glob_large_float;
> fi;# end if 8
> else
> rad_c := glob_large_float;
> ord_no := glob_large_float;
> fi;# end if 7
> else
> rad_c := glob_large_float;
> ord_no := glob_large_float;
> fi;# end if 6
> fi;# end if 5;
> array_complex_poles[1,1] := rad_c;
> array_complex_poles[1,2] := ord_no;
> fi;# end if 4;
> #BOTTOM RADII COMPLEX EQ = 1
> #START ADJUST ALL SERIES
> if (array_pole[1] * glob_ratio_of_radius < omniabs(glob_h)) then # if number 4
> h_new := array_pole[1] * glob_ratio_of_radius;
> term := 1;
> ratio := 1.0;
> while (term <= glob_max_terms) do # do number 1
> array_y[term] := array_y[term]* ratio;
> array_y_higher[1,term] := array_y_higher[1,term]* ratio;
> array_x[term] := array_x[term]* ratio;
> ratio := ratio * h_new / omniabs(glob_h);
> term := term + 1;
> od;# end do number 1;
> glob_h := h_new;
> fi;# end if 4;
> #BOTTOM ADJUST ALL SERIES
> ;
> if (reached_interval()) then # if number 4
> display_poles();
> fi;# end if 4
> end;
check_for_pole := proc()
local cnt, dr1, dr2, ds1, ds2, hdrc, m, n, nr1, nr2, ord_no, rad_c, rcs,
rm0, rm1, rm2, rm3, rm4, found_sing, h_new, ratio, term, local_test,
tmp_rad, tmp_ratio, prev_tmp_rad;
global glob_max_terms, glob_iolevel, glob_yes_pole, glob_no_pole,
glob_not_given, ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, MAX_UNCHANGED,
glob_check_sign, glob_desired_digits_correct, glob_max_estimated_step_error,
glob_ratio_of_radius, glob_percent_done, glob_subiter_method,
glob_total_exp_sec, glob_optimal_expect_sec, glob_html_log,
glob_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug,
glob_display_flag, glob_djd_debug2, glob_sec_in_minute, glob_min_in_hour,
glob_hours_in_day, glob_days_in_year, glob_sec_in_hour, glob_sec_in_day,
glob_sec_in_year, glob_almost_1, glob_clock_sec, glob_clock_start_sec,
glob_not_yet_finished, glob_initial_pass, glob_not_yet_start_msg,
glob_reached_optimal_h, glob_optimal_done, glob_disp_incr, glob_h,
glob_max_h, glob_min_h, glob_type_given_pole, glob_large_float,
glob_last_good_h, glob_look_poles, glob_neg_h, glob_display_interval,
glob_next_display, glob_dump_analytic, glob_abserr, glob_relerr,
glob_max_hours, glob_max_iter, glob_max_rel_trunc_err, glob_max_trunc_err,
glob_no_eqs, glob_optimal_clock_start_sec, glob_optimal_start,
glob_small_float, glob_smallish_float, glob_unchanged_h_cnt, glob_warned,
glob_warned2, glob_max_sec, glob_orig_start_sec, glob_start,
glob_curr_iter_when_opt, glob_current_iter, glob_iter, glob_normmax,
glob_max_minutes, array_const_1, array_const_0D0, array_const_1D0,
array_y_init, array_norms, array_fact_1, array_pole, array_real_pole,
array_complex_pole, array_1st_rel_error, array_last_rel_error,
array_type_pole, array_type_real_pole, array_type_complex_pole, array_y,
array_x, array_tmp0, array_tmp1, array_tmp2_a1, array_tmp2_a2,
array_tmp2_a3, array_tmp2, array_tmp3, array_m1, array_y_higher,
array_y_higher_work, array_y_higher_work2, array_y_set_initial, array_poles,
array_given_rad_poles, array_given_ord_poles, array_real_poles,
array_complex_poles, array_fact_2, glob_last;
array_pole[1] := glob_large_float;
array_pole[2] := glob_large_float;
tmp_rad := glob_large_float;
prev_tmp_rad := glob_large_float;
tmp_ratio := glob_large_float;
rad_c := glob_large_float;
array_poles[1, 1] := glob_large_float;
array_poles[1, 2] := glob_large_float;
found_sing := 1;
n := glob_max_terms - 11;
cnt := 0;
while cnt < 5 and found_sing = 1 do
if omniabs(array_y_higher[1, n]) = 0. or
omniabs(array_y_higher[1, n + 1]) = 0. then found_sing := 0
else
tmp_rad := omniabs(
array_y_higher[1, n]*glob_h/array_y_higher[1, n + 1]);
tmp_ratio := tmp_rad/prev_tmp_rad;
if 0 < cnt and tmp_ratio < 2.0 and 0.5 < tmp_ratio then
if tmp_rad < rad_c then rad_c := tmp_rad end if
elif cnt = 0 then
if tmp_rad < rad_c then rad_c := tmp_rad end if
elif 0 < cnt then found_sing := 0
end if
end if;
prev_tmp_rad := tmp_rad;
cnt := cnt + 1;
n := n + 1
end do;
if found_sing = 1 then
if rad_c < array_pole[1] then
array_pole[1] := rad_c; array_poles[1, 1] := rad_c
end if
end if;
n := glob_max_terms;
m := n - 2;
while 10 <= m and (omniabs(array_y_higher[1, m]) = 0. or
omniabs(array_y_higher[1, m - 1]) = 0. or
omniabs(array_y_higher[1, m - 2]) = 0.) do m := m - 1
end do;
if 10 < m then
rm0 := array_y_higher[1, m]/array_y_higher[1, m - 1];
rm1 := array_y_higher[1, m - 1]/array_y_higher[1, m - 2];
hdrc := convfloat(m)*rm0 - convfloat(m - 1)*rm1;
if 0. < omniabs(hdrc) then
rcs := glob_h/hdrc;
ord_no := (
rm1*convfloat((m - 2)*(m - 2)) - rm0*convfloat(m - 3))/hdrc
;
array_real_poles[1, 1] := rcs;
array_real_poles[1, 2] := ord_no
else
array_real_poles[1, 1] := glob_large_float;
array_real_poles[1, 2] := glob_large_float
end if
else
array_real_poles[1, 1] := glob_large_float;
array_real_poles[1, 2] := glob_large_float
end if;
n := glob_max_terms - 2;
cnt := 0;
while cnt < 5 and 10 <= n do
if omniabs(array_y_higher[1, n]) <> 0. then cnt := cnt + 1
else cnt := 0
end if;
n := n - 1
end do;
m := n + cnt;
if m <= 10 then rad_c := glob_large_float; ord_no := glob_large_float
else
rm0 := array_y_higher[1, m]/array_y_higher[1, m - 1];
rm1 := array_y_higher[1, m - 1]/array_y_higher[1, m - 2];
rm2 := array_y_higher[1, m - 2]/array_y_higher[1, m - 3];
rm3 := array_y_higher[1, m - 3]/array_y_higher[1, m - 4];
rm4 := array_y_higher[1, m - 4]/array_y_higher[1, m - 5];
nr1 := convfloat(m - 1)*rm0 - 2.0*convfloat(m - 2)*rm1
+ convfloat(m - 3)*rm2;
nr2 := convfloat(m - 2)*rm1 - 2.0*convfloat(m - 3)*rm2
+ convfloat(m - 4)*rm3;
dr1 := (-1)*(1.0)/rm1 + 2.0/rm2 - 1.0/rm3;
dr2 := (-1)*(1.0)/rm2 + 2.0/rm3 - 1.0/rm4;
ds1 := 3.0/rm1 - 8.0/rm2 + 5.0/rm3;
ds2 := 3.0/rm2 - 8.0/rm3 + 5.0/rm4;
if omniabs(nr1*dr2 - nr2*dr1) = 0. or omniabs(dr1) = 0. then
rad_c := glob_large_float; ord_no := glob_large_float
else
if omniabs(nr1*dr2 - nr2*dr1) <> 0. then
rcs := (ds1*dr2 - ds2*dr1 + dr1*dr2)/(nr1*dr2 - nr2*dr1);
ord_no := (rcs*nr1 - ds1)/(2.0*dr1) - convfloat(m)/2.0;
if omniabs(rcs) <> 0. then
if 0. < rcs then rad_c := sqrt(rcs)*omniabs(glob_h)
else rad_c := glob_large_float
end if
else rad_c := glob_large_float; ord_no := glob_large_float
end if
else rad_c := glob_large_float; ord_no := glob_large_float
end if
end if;
array_complex_poles[1, 1] := rad_c;
array_complex_poles[1, 2] := ord_no
end if;
if array_pole[1]*glob_ratio_of_radius < omniabs(glob_h) then
h_new := array_pole[1]*glob_ratio_of_radius;
term := 1;
ratio := 1.0;
while term <= glob_max_terms do
array_y[term] := array_y[term]*ratio;
array_y_higher[1, term] := array_y_higher[1, term]*ratio;
array_x[term] := array_x[term]*ratio;
ratio := ratio*h_new/omniabs(glob_h);
term := term + 1
end do;
glob_h := h_new
end if;
if reached_interval() then display_poles() end if
end proc
> # End Function number 11
> # Begin Function number 12
> get_norms := proc()
> global
> glob_max_terms,
> glob_iolevel,
> glob_yes_pole,
> glob_no_pole,
> glob_not_given,
> ALWAYS,
> INFO,
> DEBUGL,
> DEBUGMASSIVE,
> #Top Generate Globals Decl
> MAX_UNCHANGED,
> glob_check_sign,
> glob_desired_digits_correct,
> glob_max_estimated_step_error,
> glob_ratio_of_radius,
> glob_percent_done,
> glob_subiter_method,
> glob_total_exp_sec,
> glob_optimal_expect_sec,
> glob_html_log,
> glob_good_digits,
> glob_max_opt_iter,
> glob_dump,
> glob_djd_debug,
> glob_display_flag,
> glob_djd_debug2,
> glob_sec_in_minute,
> glob_min_in_hour,
> glob_hours_in_day,
> glob_days_in_year,
> glob_sec_in_hour,
> glob_sec_in_day,
> glob_sec_in_year,
> glob_almost_1,
> glob_clock_sec,
> glob_clock_start_sec,
> glob_not_yet_finished,
> glob_initial_pass,
> glob_not_yet_start_msg,
> glob_reached_optimal_h,
> glob_optimal_done,
> glob_disp_incr,
> glob_h,
> glob_max_h,
> glob_min_h,
> glob_type_given_pole,
> glob_large_float,
> glob_last_good_h,
> glob_look_poles,
> glob_neg_h,
> glob_display_interval,
> glob_next_display,
> glob_dump_analytic,
> glob_abserr,
> glob_relerr,
> glob_max_hours,
> glob_max_iter,
> glob_max_rel_trunc_err,
> glob_max_trunc_err,
> glob_no_eqs,
> glob_optimal_clock_start_sec,
> glob_optimal_start,
> glob_small_float,
> glob_smallish_float,
> glob_unchanged_h_cnt,
> glob_warned,
> glob_warned2,
> glob_max_sec,
> glob_orig_start_sec,
> glob_start,
> glob_curr_iter_when_opt,
> glob_current_iter,
> glob_iter,
> glob_normmax,
> glob_max_minutes,
> #Bottom Generate Globals Decl
> #BEGIN CONST
> array_const_1,
> array_const_0D0,
> array_const_1D0,
> #END CONST
> array_y_init,
> array_norms,
> array_fact_1,
> array_pole,
> array_real_pole,
> array_complex_pole,
> array_1st_rel_error,
> array_last_rel_error,
> array_type_pole,
> array_type_real_pole,
> array_type_complex_pole,
> array_y,
> array_x,
> array_tmp0,
> array_tmp1,
> array_tmp2_a1,
> array_tmp2_a2,
> array_tmp2_a3,
> array_tmp2,
> array_tmp3,
> array_m1,
> array_y_higher,
> array_y_higher_work,
> array_y_higher_work2,
> array_y_set_initial,
> array_poles,
> array_given_rad_poles,
> array_given_ord_poles,
> array_real_poles,
> array_complex_poles,
> array_fact_2,
> glob_last;
> local iii;
> if ( not glob_initial_pass) then # if number 4
> iii := 1;
> while (iii <= glob_max_terms) do # do number 1
> array_norms[iii] := 0.0;
> iii := iii + 1;
> od;# end do number 1;
> #TOP GET NORMS
> iii := 1;
> while (iii <= glob_max_terms) do # do number 1
> if (omniabs(array_y[iii]) > array_norms[iii]) then # if number 5
> array_norms[iii] := omniabs(array_y[iii]);
> fi;# end if 5;
> iii := iii + 1;
> od;# end do number 1
> #BOTTOM GET NORMS
> ;
> fi;# end if 4;
> end;
get_norms := proc()
local iii;
global glob_max_terms, glob_iolevel, glob_yes_pole, glob_no_pole,
glob_not_given, ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, MAX_UNCHANGED,
glob_check_sign, glob_desired_digits_correct, glob_max_estimated_step_error,
glob_ratio_of_radius, glob_percent_done, glob_subiter_method,
glob_total_exp_sec, glob_optimal_expect_sec, glob_html_log,
glob_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug,
glob_display_flag, glob_djd_debug2, glob_sec_in_minute, glob_min_in_hour,
glob_hours_in_day, glob_days_in_year, glob_sec_in_hour, glob_sec_in_day,
glob_sec_in_year, glob_almost_1, glob_clock_sec, glob_clock_start_sec,
glob_not_yet_finished, glob_initial_pass, glob_not_yet_start_msg,
glob_reached_optimal_h, glob_optimal_done, glob_disp_incr, glob_h,
glob_max_h, glob_min_h, glob_type_given_pole, glob_large_float,
glob_last_good_h, glob_look_poles, glob_neg_h, glob_display_interval,
glob_next_display, glob_dump_analytic, glob_abserr, glob_relerr,
glob_max_hours, glob_max_iter, glob_max_rel_trunc_err, glob_max_trunc_err,
glob_no_eqs, glob_optimal_clock_start_sec, glob_optimal_start,
glob_small_float, glob_smallish_float, glob_unchanged_h_cnt, glob_warned,
glob_warned2, glob_max_sec, glob_orig_start_sec, glob_start,
glob_curr_iter_when_opt, glob_current_iter, glob_iter, glob_normmax,
glob_max_minutes, array_const_1, array_const_0D0, array_const_1D0,
array_y_init, array_norms, array_fact_1, array_pole, array_real_pole,
array_complex_pole, array_1st_rel_error, array_last_rel_error,
array_type_pole, array_type_real_pole, array_type_complex_pole, array_y,
array_x, array_tmp0, array_tmp1, array_tmp2_a1, array_tmp2_a2,
array_tmp2_a3, array_tmp2, array_tmp3, array_m1, array_y_higher,
array_y_higher_work, array_y_higher_work2, array_y_set_initial, array_poles,
array_given_rad_poles, array_given_ord_poles, array_real_poles,
array_complex_poles, array_fact_2, glob_last;
if not glob_initial_pass then
iii := 1;
while iii <= glob_max_terms do
array_norms[iii] := 0.; iii := iii + 1
end do;
iii := 1;
while iii <= glob_max_terms do
if array_norms[iii] < omniabs(array_y[iii]) then
array_norms[iii] := omniabs(array_y[iii])
end if;
iii := iii + 1
end do
end if
end proc
> # End Function number 12
> # Begin Function number 13
> atomall := proc()
> global
> glob_max_terms,
> glob_iolevel,
> glob_yes_pole,
> glob_no_pole,
> glob_not_given,
> ALWAYS,
> INFO,
> DEBUGL,
> DEBUGMASSIVE,
> #Top Generate Globals Decl
> MAX_UNCHANGED,
> glob_check_sign,
> glob_desired_digits_correct,
> glob_max_estimated_step_error,
> glob_ratio_of_radius,
> glob_percent_done,
> glob_subiter_method,
> glob_total_exp_sec,
> glob_optimal_expect_sec,
> glob_html_log,
> glob_good_digits,
> glob_max_opt_iter,
> glob_dump,
> glob_djd_debug,
> glob_display_flag,
> glob_djd_debug2,
> glob_sec_in_minute,
> glob_min_in_hour,
> glob_hours_in_day,
> glob_days_in_year,
> glob_sec_in_hour,
> glob_sec_in_day,
> glob_sec_in_year,
> glob_almost_1,
> glob_clock_sec,
> glob_clock_start_sec,
> glob_not_yet_finished,
> glob_initial_pass,
> glob_not_yet_start_msg,
> glob_reached_optimal_h,
> glob_optimal_done,
> glob_disp_incr,
> glob_h,
> glob_max_h,
> glob_min_h,
> glob_type_given_pole,
> glob_large_float,
> glob_last_good_h,
> glob_look_poles,
> glob_neg_h,
> glob_display_interval,
> glob_next_display,
> glob_dump_analytic,
> glob_abserr,
> glob_relerr,
> glob_max_hours,
> glob_max_iter,
> glob_max_rel_trunc_err,
> glob_max_trunc_err,
> glob_no_eqs,
> glob_optimal_clock_start_sec,
> glob_optimal_start,
> glob_small_float,
> glob_smallish_float,
> glob_unchanged_h_cnt,
> glob_warned,
> glob_warned2,
> glob_max_sec,
> glob_orig_start_sec,
> glob_start,
> glob_curr_iter_when_opt,
> glob_current_iter,
> glob_iter,
> glob_normmax,
> glob_max_minutes,
> #Bottom Generate Globals Decl
> #BEGIN CONST
> array_const_1,
> array_const_0D0,
> array_const_1D0,
> #END CONST
> array_y_init,
> array_norms,
> array_fact_1,
> array_pole,
> array_real_pole,
> array_complex_pole,
> array_1st_rel_error,
> array_last_rel_error,
> array_type_pole,
> array_type_real_pole,
> array_type_complex_pole,
> array_y,
> array_x,
> array_tmp0,
> array_tmp1,
> array_tmp2_a1,
> array_tmp2_a2,
> array_tmp2_a3,
> array_tmp2,
> array_tmp3,
> array_m1,
> array_y_higher,
> array_y_higher_work,
> array_y_higher_work2,
> array_y_set_initial,
> array_poles,
> array_given_rad_poles,
> array_given_ord_poles,
> array_real_poles,
> array_complex_poles,
> array_fact_2,
> glob_last;
> local kkk, order_d, adj2, adj3 , temporary, term;
> #TOP ATOMALL
> #END OUTFILE1
> #BEGIN ATOMHDR1
> #emit pre add LINEAR - CONST $eq_no = 1 i = 1
> array_tmp1[1] := array_x[1] + array_const_1D0[1];
> #emit pre Si ID_LINEAR iii = 1 $eq_no = 1
> #emit pre Si 1 $eq_no = 1
> array_tmp2[1] := Si(array_tmp1[1]);
> array_tmp2_a1[1] := sin(array_tmp1[1]);
> array_tmp2_a2[1] := cos(array_tmp1[1]);
> array_tmp2_a3[1] := array_tmp2_a1[1] / array_tmp1[1];
> #emit pre add CONST FULL $eq_no = 1 i = 1
> array_tmp3[1] := array_const_0D0[1] + array_tmp2[1];
> #emit pre assign xxx $eq_no = 1 i = 1 $min_hdrs = 5
> if ( not array_y_set_initial[1,2]) then # if number 1
> if (1 <= glob_max_terms) then # if number 2
> temporary := array_tmp3[1] * expt(glob_h , (1)) * factorial_3(0,1);
> array_y[2] := temporary;
> array_y_higher[1,2] := temporary;
> temporary := temporary / glob_h * (1.0);
> array_y_higher[2,1] := temporary;
> fi;# end if 2;
> fi;# end if 1;
> kkk := 2;
> #END ATOMHDR1
> #BEGIN ATOMHDR2
> #emit pre add LINEAR - CONST $eq_no = 1 i = 2
> array_tmp1[2] := array_x[2];
> #emit pre Si ID_LINEAR iii = 2 $eq_no = 1
> array_tmp2_a1[2] := array_tmp2_a2[1] * array_tmp1[2] / 1;
> array_tmp2_a2[2] := - array_tmp2_a1[1] * array_tmp1[2] / 1;
> array_tmp2_a3[2] := (array_tmp2_a1[2] - array_tmp2_a3[1] * array_tmp1[2]) / array_tmp1[1];
> array_tmp2[2] := array_tmp2_a3[1] * array_tmp1[2] / 1;
> #emit pre add CONST FULL $eq_no = 1 i = 2
> array_tmp3[2] := array_tmp2[2];
> #emit pre assign xxx $eq_no = 1 i = 2 $min_hdrs = 5
> if ( not array_y_set_initial[1,3]) then # if number 1
> if (2 <= glob_max_terms) then # if number 2
> temporary := array_tmp3[2] * expt(glob_h , (1)) * factorial_3(1,2);
> array_y[3] := temporary;
> array_y_higher[1,3] := temporary;
> temporary := temporary / glob_h * (2.0);
> array_y_higher[2,2] := temporary;
> fi;# end if 2;
> fi;# end if 1;
> kkk := 3;
> #END ATOMHDR2
> #BEGIN ATOMHDR3
> #emit pre Si ID_LINEAR iii = 3 $eq_no = 1
> array_tmp2_a1[3] := array_tmp2_a2[2] * array_tmp1[2] / 2;
> array_tmp2_a2[3] := - array_tmp2_a1[2] * array_tmp1[2] / 2;
> array_tmp2_a3[3] := (array_tmp2_a1[3] - array_tmp2_a3[2] * array_tmp1[2]) / array_tmp1[1];
> array_tmp2[3] := array_tmp2_a3[2] * array_tmp1[2] / 2;
> #emit pre add CONST FULL $eq_no = 1 i = 3
> array_tmp3[3] := array_tmp2[3];
> #emit pre assign xxx $eq_no = 1 i = 3 $min_hdrs = 5
> if ( not array_y_set_initial[1,4]) then # if number 1
> if (3 <= glob_max_terms) then # if number 2
> temporary := array_tmp3[3] * expt(glob_h , (1)) * factorial_3(2,3);
> array_y[4] := temporary;
> array_y_higher[1,4] := temporary;
> temporary := temporary / glob_h * (3.0);
> array_y_higher[2,3] := temporary;
> fi;# end if 2;
> fi;# end if 1;
> kkk := 4;
> #END ATOMHDR3
> #BEGIN ATOMHDR4
> #emit pre Si ID_LINEAR iii = 4 $eq_no = 1
> array_tmp2_a1[4] := array_tmp2_a2[3] * array_tmp1[2] / 3;
> array_tmp2_a2[4] := - array_tmp2_a1[3] * array_tmp1[2] / 3;
> array_tmp2_a3[4] := (array_tmp2_a1[4] - array_tmp2_a3[3] * array_tmp1[2]) / array_tmp1[1];
> array_tmp2[4] := array_tmp2_a3[3] * array_tmp1[2] / 3;
> #emit pre add CONST FULL $eq_no = 1 i = 4
> array_tmp3[4] := array_tmp2[4];
> #emit pre assign xxx $eq_no = 1 i = 4 $min_hdrs = 5
> if ( not array_y_set_initial[1,5]) then # if number 1
> if (4 <= glob_max_terms) then # if number 2
> temporary := array_tmp3[4] * expt(glob_h , (1)) * factorial_3(3,4);
> array_y[5] := temporary;
> array_y_higher[1,5] := temporary;
> temporary := temporary / glob_h * (4.0);
> array_y_higher[2,4] := temporary;
> fi;# end if 2;
> fi;# end if 1;
> kkk := 5;
> #END ATOMHDR4
> #BEGIN ATOMHDR5
> #emit pre Si ID_LINEAR iii = 5 $eq_no = 1
> array_tmp2_a1[5] := array_tmp2_a2[4] * array_tmp1[2] / 4;
> array_tmp2_a2[5] := - array_tmp2_a1[4] * array_tmp1[2] / 4;
> array_tmp2_a3[5] := (array_tmp2_a1[5] - array_tmp2_a3[4] * array_tmp1[2]) / array_tmp1[1];
> array_tmp2[5] := array_tmp2_a3[4] * array_tmp1[2] / 4;
> #emit pre add CONST FULL $eq_no = 1 i = 5
> array_tmp3[5] := array_tmp2[5];
> #emit pre assign xxx $eq_no = 1 i = 5 $min_hdrs = 5
> if ( not array_y_set_initial[1,6]) then # if number 1
> if (5 <= glob_max_terms) then # if number 2
> temporary := array_tmp3[5] * expt(glob_h , (1)) * factorial_3(4,5);
> array_y[6] := temporary;
> array_y_higher[1,6] := temporary;
> temporary := temporary / glob_h * (5.0);
> array_y_higher[2,5] := temporary;
> fi;# end if 2;
> fi;# end if 1;
> kkk := 6;
> #END ATOMHDR5
> #BEGIN OUTFILE3
> #Top Atomall While Loop-- outfile3
> while (kkk <= glob_max_terms) do # do number 1
> #END OUTFILE3
> #BEGIN OUTFILE4
> #emit pre Si ID_LINEAR $eq_no = 1
> array_tmp2_a1[kkk] := array_tmp2_a2[kkk-1] * array_tmp1[2] / 2.0;
> array_tmp2_a2[kkk] := -array_tmp2_a1[kkk-1] * array_tmp1[2]/ (kkk-1);
> array_tmp2_a3[kkk] := (array_tmp2_a1[kkk] - array_tmp2_a3[kkk-1] * array_tmp1[2]) / array_tmp1[1];
> array_tmp2[kkk] := array_tmp2_a3[kkk-1] * array_tmp1[2] / (kkk-1);
> #emit NOT FULL - FULL add $eq_no = 1
> array_tmp3[kkk] := array_tmp2[kkk];
> #emit assign $eq_no = 1
> order_d := 1;
> if (kkk + order_d < glob_max_terms) then # if number 1
> if ( not array_y_set_initial[1,kkk + order_d]) then # if number 2
> temporary := array_tmp3[kkk] * expt(glob_h , (order_d)) * factorial_3((kkk - 1),(kkk + order_d - 1));
> array_y[kkk + order_d] := temporary;
> array_y_higher[1,kkk + order_d] := temporary;
> term := kkk + order_d - 1;
> adj2 := kkk + order_d - 1;
> adj3 := 2;
> while (term >= 1) do # do number 1
> if (adj3 <= order_d + 1) then # if number 3
> if (adj2 > 0) then # if number 4
> temporary := temporary / glob_h * convfp(adj2);
> else
> temporary := temporary;
> fi;# end if 4;
> array_y_higher[adj3,term] := temporary;
> fi;# end if 3;
> term := term - 1;
> adj2 := adj2 - 1;
> adj3 := adj3 + 1;
> od;# end do number 1
> fi;# end if 2
> fi;# end if 1;
> kkk := kkk + 1;
> od;# end do number 1;
> #BOTTOM ATOMALL
> #END OUTFILE4
> #BEGIN OUTFILE5
> #BOTTOM ATOMALL ???
> end;
atomall := proc()
local kkk, order_d, adj2, adj3, temporary, term;
global glob_max_terms, glob_iolevel, glob_yes_pole, glob_no_pole,
glob_not_given, ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, MAX_UNCHANGED,
glob_check_sign, glob_desired_digits_correct, glob_max_estimated_step_error,
glob_ratio_of_radius, glob_percent_done, glob_subiter_method,
glob_total_exp_sec, glob_optimal_expect_sec, glob_html_log,
glob_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug,
glob_display_flag, glob_djd_debug2, glob_sec_in_minute, glob_min_in_hour,
glob_hours_in_day, glob_days_in_year, glob_sec_in_hour, glob_sec_in_day,
glob_sec_in_year, glob_almost_1, glob_clock_sec, glob_clock_start_sec,
glob_not_yet_finished, glob_initial_pass, glob_not_yet_start_msg,
glob_reached_optimal_h, glob_optimal_done, glob_disp_incr, glob_h,
glob_max_h, glob_min_h, glob_type_given_pole, glob_large_float,
glob_last_good_h, glob_look_poles, glob_neg_h, glob_display_interval,
glob_next_display, glob_dump_analytic, glob_abserr, glob_relerr,
glob_max_hours, glob_max_iter, glob_max_rel_trunc_err, glob_max_trunc_err,
glob_no_eqs, glob_optimal_clock_start_sec, glob_optimal_start,
glob_small_float, glob_smallish_float, glob_unchanged_h_cnt, glob_warned,
glob_warned2, glob_max_sec, glob_orig_start_sec, glob_start,
glob_curr_iter_when_opt, glob_current_iter, glob_iter, glob_normmax,
glob_max_minutes, array_const_1, array_const_0D0, array_const_1D0,
array_y_init, array_norms, array_fact_1, array_pole, array_real_pole,
array_complex_pole, array_1st_rel_error, array_last_rel_error,
array_type_pole, array_type_real_pole, array_type_complex_pole, array_y,
array_x, array_tmp0, array_tmp1, array_tmp2_a1, array_tmp2_a2,
array_tmp2_a3, array_tmp2, array_tmp3, array_m1, array_y_higher,
array_y_higher_work, array_y_higher_work2, array_y_set_initial, array_poles,
array_given_rad_poles, array_given_ord_poles, array_real_poles,
array_complex_poles, array_fact_2, glob_last;
array_tmp1[1] := array_x[1] + array_const_1D0[1];
array_tmp2[1] := Si(array_tmp1[1]);
array_tmp2_a1[1] := sin(array_tmp1[1]);
array_tmp2_a2[1] := cos(array_tmp1[1]);
array_tmp2_a3[1] := array_tmp2_a1[1]/array_tmp1[1];
array_tmp3[1] := array_const_0D0[1] + array_tmp2[1];
if not array_y_set_initial[1, 2] then
if 1 <= glob_max_terms then
temporary := array_tmp3[1]*expt(glob_h, 1)*factorial_3(0, 1);
array_y[2] := temporary;
array_y_higher[1, 2] := temporary;
temporary := temporary*1.0/glob_h;
array_y_higher[2, 1] := temporary
end if
end if;
kkk := 2;
array_tmp1[2] := array_x[2];
array_tmp2_a1[2] := array_tmp2_a2[1]*array_tmp1[2];
array_tmp2_a2[2] := -array_tmp2_a1[1]*array_tmp1[2];
array_tmp2_a3[2] :=
(array_tmp2_a1[2] - array_tmp2_a3[1]*array_tmp1[2])/array_tmp1[1];
array_tmp2[2] := array_tmp2_a3[1]*array_tmp1[2];
array_tmp3[2] := array_tmp2[2];
if not array_y_set_initial[1, 3] then
if 2 <= glob_max_terms then
temporary := array_tmp3[2]*expt(glob_h, 1)*factorial_3(1, 2);
array_y[3] := temporary;
array_y_higher[1, 3] := temporary;
temporary := temporary*2.0/glob_h;
array_y_higher[2, 2] := temporary
end if
end if;
kkk := 3;
array_tmp2_a1[3] := 1/2*array_tmp2_a2[2]*array_tmp1[2];
array_tmp2_a2[3] := -1/2*array_tmp2_a1[2]*array_tmp1[2];
array_tmp2_a3[3] :=
(array_tmp2_a1[3] - array_tmp2_a3[2]*array_tmp1[2])/array_tmp1[1];
array_tmp2[3] := 1/2*array_tmp2_a3[2]*array_tmp1[2];
array_tmp3[3] := array_tmp2[3];
if not array_y_set_initial[1, 4] then
if 3 <= glob_max_terms then
temporary := array_tmp3[3]*expt(glob_h, 1)*factorial_3(2, 3);
array_y[4] := temporary;
array_y_higher[1, 4] := temporary;
temporary := temporary*3.0/glob_h;
array_y_higher[2, 3] := temporary
end if
end if;
kkk := 4;
array_tmp2_a1[4] := 1/3*array_tmp2_a2[3]*array_tmp1[2];
array_tmp2_a2[4] := -1/3*array_tmp2_a1[3]*array_tmp1[2];
array_tmp2_a3[4] :=
(array_tmp2_a1[4] - array_tmp2_a3[3]*array_tmp1[2])/array_tmp1[1];
array_tmp2[4] := 1/3*array_tmp2_a3[3]*array_tmp1[2];
array_tmp3[4] := array_tmp2[4];
if not array_y_set_initial[1, 5] then
if 4 <= glob_max_terms then
temporary := array_tmp3[4]*expt(glob_h, 1)*factorial_3(3, 4);
array_y[5] := temporary;
array_y_higher[1, 5] := temporary;
temporary := temporary*4.0/glob_h;
array_y_higher[2, 4] := temporary
end if
end if;
kkk := 5;
array_tmp2_a1[5] := 1/4*array_tmp2_a2[4]*array_tmp1[2];
array_tmp2_a2[5] := -1/4*array_tmp2_a1[4]*array_tmp1[2];
array_tmp2_a3[5] :=
(array_tmp2_a1[5] - array_tmp2_a3[4]*array_tmp1[2])/array_tmp1[1];
array_tmp2[5] := 1/4*array_tmp2_a3[4]*array_tmp1[2];
array_tmp3[5] := array_tmp2[5];
if not array_y_set_initial[1, 6] then
if 5 <= glob_max_terms then
temporary := array_tmp3[5]*expt(glob_h, 1)*factorial_3(4, 5);
array_y[6] := temporary;
array_y_higher[1, 6] := temporary;
temporary := temporary*5.0/glob_h;
array_y_higher[2, 5] := temporary
end if
end if;
kkk := 6;
while kkk <= glob_max_terms do
array_tmp2_a1[kkk] := array_tmp2_a2[kkk - 1]*array_tmp1[2]/2.0;
array_tmp2_a2[kkk] :=
-array_tmp2_a1[kkk - 1]*array_tmp1[2]/(kkk - 1);
array_tmp2_a3[kkk] := (
array_tmp2_a1[kkk] - array_tmp2_a3[kkk - 1]*array_tmp1[2])/
array_tmp1[1];
array_tmp2[kkk] := array_tmp2_a3[kkk - 1]*array_tmp1[2]/(kkk - 1);
array_tmp3[kkk] := array_tmp2[kkk];
order_d := 1;
if kkk + order_d < glob_max_terms then
if not array_y_set_initial[1, kkk + order_d] then
temporary := array_tmp3[kkk]*expt(glob_h, order_d)*
factorial_3(kkk - 1, kkk + order_d - 1);
array_y[kkk + order_d] := temporary;
array_y_higher[1, kkk + order_d] := temporary;
term := kkk + order_d - 1;
adj2 := kkk + order_d - 1;
adj3 := 2;
while 1 <= term do
if adj3 <= order_d + 1 then
if 0 < adj2 then
temporary := temporary*convfp(adj2)/glob_h
else temporary := temporary
end if;
array_y_higher[adj3, term] := temporary
end if;
term := term - 1;
adj2 := adj2 - 1;
adj3 := adj3 + 1
end do
end if
end if;
kkk := kkk + 1
end do
end proc
> # End Function number 13
> #BEGIN ATS LIBRARY BLOCK
> # Begin Function number 2
> omniout_str := proc(iolevel,str)
> global glob_iolevel;
> if (glob_iolevel >= iolevel) then # if number 1
> printf("%s\n",str);
> fi;# end if 1;
> end;
omniout_str := proc(iolevel, str)
global glob_iolevel;
if iolevel <= glob_iolevel then printf("%s
", str)
end if
end proc
> # End Function number 2
> # Begin Function number 3
> omniout_str_noeol := proc(iolevel,str)
> global glob_iolevel;
> if (glob_iolevel >= iolevel) then # if number 1
> printf("%s",str);
> fi;# end if 1;
> end;
omniout_str_noeol := proc(iolevel, str)
global glob_iolevel;
if iolevel <= glob_iolevel then printf("%s", str) end if
end proc
> # End Function number 3
> # Begin Function number 4
> omniout_labstr := proc(iolevel,label,str)
> global glob_iolevel;
> if (glob_iolevel >= iolevel) then # if number 1
> print(label,str);
> fi;# end if 1;
> end;
omniout_labstr := proc(iolevel, label, str)
global glob_iolevel;
if iolevel <= glob_iolevel then print(label, str) end if
end proc
> # End Function number 4
> # Begin Function number 5
> omniout_float := proc(iolevel,prelabel,prelen,value,vallen,postlabel)
> global glob_iolevel;
> if (glob_iolevel >= iolevel) then # if number 1
> if vallen = 4 then
> printf("%-30s = %-42.4g %s \n",prelabel,value, postlabel);
> else
> printf("%-30s = %-42.32g %s \n",prelabel,value, postlabel);
> fi;# end if 1;
> fi;# end if 0;
> end;
omniout_float := proc(iolevel, prelabel, prelen, value, vallen, postlabel)
global glob_iolevel;
if iolevel <= glob_iolevel then
if vallen = 4 then printf("%-30s = %-42.4g %s
", prelabel, value, postlabel)
else printf("%-30s = %-42.32g %s
", prelabel, value, postlabel)
end if
end if
end proc
> # End Function number 5
> # Begin Function number 6
> omniout_int := proc(iolevel,prelabel,prelen,value,vallen,postlabel)
> global glob_iolevel;
> if (glob_iolevel >= iolevel) then # if number 0
> if vallen = 5 then # if number 1
> printf("%-30s = %-32d %s\n",prelabel,value, postlabel);
> else
> printf("%-30s = %-32d %s \n",prelabel,value, postlabel);
> fi;# end if 1;
> fi;# end if 0;
> end;
omniout_int := proc(iolevel, prelabel, prelen, value, vallen, postlabel)
global glob_iolevel;
if iolevel <= glob_iolevel then
if vallen = 5 then printf("%-30s = %-32d %s
", prelabel, value, postlabel)
else printf("%-30s = %-32d %s
", prelabel, value, postlabel)
end if
end if
end proc
> # End Function number 6
> # Begin Function number 7
> omniout_float_arr := proc(iolevel,prelabel,elemnt,prelen,value,vallen,postlabel)
> global glob_iolevel;
> if (glob_iolevel >= iolevel) then # if number 0
> print(prelabel,"[",elemnt,"]",value, postlabel);
> fi;# end if 0;
> end;
omniout_float_arr := proc(
iolevel, prelabel, elemnt, prelen, value, vallen, postlabel)
global glob_iolevel;
if iolevel <= glob_iolevel then
print(prelabel, "[", elemnt, "]", value, postlabel)
end if
end proc
> # End Function number 7
> # Begin Function number 8
> dump_series := proc(iolevel,dump_label,series_name,arr_series,numb)
> global glob_iolevel;
> local i;
> if (glob_iolevel >= iolevel) then # if number 0
> i := 1;
> while (i <= numb) do # do number 1
> print(dump_label,series_name
> ,i,arr_series[i]);
> i := i + 1;
> od;# end do number 1
> fi;# end if 0
> end;
dump_series := proc(iolevel, dump_label, series_name, arr_series, numb)
local i;
global glob_iolevel;
if iolevel <= glob_iolevel then
i := 1;
while i <= numb do
print(dump_label, series_name, i, arr_series[i]); i := i + 1
end do
end if
end proc
> # End Function number 8
> # Begin Function number 9
> dump_series_2 := proc(iolevel,dump_label,series_name2,arr_series2,numb,subnum,arr_x)
> global glob_iolevel;
> local i,sub,ts_term;
> if (glob_iolevel >= iolevel) then # if number 0
> sub := 1;
> while (sub <= subnum) do # do number 1
> i := 1;
> while (i <= numb) do # do number 2
> print(dump_label,series_name2,sub,i,arr_series2[sub,i]);
> od;# end do number 2;
> sub := sub + 1;
> od;# end do number 1;
> fi;# end if 0;
> end;
dump_series_2 := proc(
iolevel, dump_label, series_name2, arr_series2, numb, subnum, arr_x)
local i, sub, ts_term;
global glob_iolevel;
if iolevel <= glob_iolevel then
sub := 1;
while sub <= subnum do
i := 1;
while i <= numb do print(dump_label, series_name2, sub, i,
arr_series2[sub, i])
end do;
sub := sub + 1
end do
end if
end proc
> # End Function number 9
> # Begin Function number 10
> cs_info := proc(iolevel,str)
> global glob_iolevel,glob_correct_start_flag,glob_h,glob_reached_optimal_h;
> if (glob_iolevel >= iolevel) then # if number 0
> print("cs_info " , str , " glob_correct_start_flag = " , glob_correct_start_flag , "glob_h := " , glob_h , "glob_reached_optimal_h := " , glob_reached_optimal_h)
> fi;# end if 0;
> end;
cs_info := proc(iolevel, str)
global
glob_iolevel, glob_correct_start_flag, glob_h, glob_reached_optimal_h;
if iolevel <= glob_iolevel then print("cs_info ", str,
" glob_correct_start_flag = ", glob_correct_start_flag,
"glob_h := ", glob_h, "glob_reached_optimal_h := ",
glob_reached_optimal_h)
end if
end proc
> # End Function number 10
> # Begin Function number 11
> logitem_time := proc(fd,secs_in)
> global glob_sec_in_day, glob_sec_in_hour, glob_sec_in_minute, glob_sec_in_year;
> local days_int, hours_int,minutes_int, sec_int, sec_temp, years_int;
> fprintf(fd,"
");
> if (secs_in >= 0) then # if number 0
> years_int := trunc(secs_in / glob_sec_in_year);
> sec_temp := (trunc(secs_in) mod trunc(glob_sec_in_year));
> days_int := trunc(sec_temp / glob_sec_in_day) ;
> sec_temp := (sec_temp mod trunc(glob_sec_in_day)) ;
> hours_int := trunc(sec_temp / glob_sec_in_hour);
> sec_temp := (sec_temp mod trunc(glob_sec_in_hour));
> minutes_int := trunc(sec_temp / glob_sec_in_minute);
> sec_int := (sec_temp mod trunc(glob_sec_in_minute));
> if (years_int > 0) then # if number 1
> fprintf(fd,"%d Years %d Days %d Hours %d Minutes %d Seconds",years_int,days_int,hours_int,minutes_int,sec_int);
> elif
> (days_int > 0) then # if number 2
> fprintf(fd,"%d Days %d Hours %d Minutes %d Seconds",days_int,hours_int,minutes_int,sec_int);
> elif
> (hours_int > 0) then # if number 3
> fprintf(fd,"%d Hours %d Minutes %d Seconds",hours_int,minutes_int,sec_int);
> elif
> (minutes_int > 0) then # if number 4
> fprintf(fd,"%d Minutes %d Seconds",minutes_int,sec_int);
> else
> fprintf(fd,"%d Seconds",sec_int);
> fi;# end if 4
> else
> fprintf(fd," Unknown");
> fi;# end if 3
> fprintf(fd," | \n");
> end;
logitem_time := proc(fd, secs_in)
local days_int, hours_int, minutes_int, sec_int, sec_temp, years_int;
global
glob_sec_in_day, glob_sec_in_hour, glob_sec_in_minute, glob_sec_in_year;
fprintf(fd, "");
if 0 <= secs_in then
years_int := trunc(secs_in/glob_sec_in_year);
sec_temp := trunc(secs_in) mod trunc(glob_sec_in_year);
days_int := trunc(sec_temp/glob_sec_in_day);
sec_temp := sec_temp mod trunc(glob_sec_in_day);
hours_int := trunc(sec_temp/glob_sec_in_hour);
sec_temp := sec_temp mod trunc(glob_sec_in_hour);
minutes_int := trunc(sec_temp/glob_sec_in_minute);
sec_int := sec_temp mod trunc(glob_sec_in_minute);
if 0 < years_int then fprintf(fd,
"%d Years %d Days %d Hours %d Minutes %d Seconds", years_int,
days_int, hours_int, minutes_int, sec_int)
elif 0 < days_int then fprintf(fd,
"%d Days %d Hours %d Minutes %d Seconds", days_int, hours_int,
minutes_int, sec_int)
elif 0 < hours_int then fprintf(fd,
"%d Hours %d Minutes %d Seconds", hours_int, minutes_int,
sec_int)
elif 0 < minutes_int then
fprintf(fd, "%d Minutes %d Seconds", minutes_int, sec_int)
else fprintf(fd, "%d Seconds", sec_int)
end if
else fprintf(fd, " Unknown")
end if;
fprintf(fd, " |
")
end proc
> # End Function number 11
> # Begin Function number 12
> omniout_timestr := proc(secs_in)
> global glob_sec_in_day, glob_sec_in_hour, glob_sec_in_minute, glob_sec_in_year;
> local days_int, hours_int,minutes_int, sec_int, sec_temp, years_int;
> if (secs_in >= 0) then # if number 3
> years_int := trunc(secs_in / glob_sec_in_year);
> sec_temp := (trunc(secs_in) mod trunc(glob_sec_in_year));
> days_int := trunc(sec_temp / glob_sec_in_day) ;
> sec_temp := (sec_temp mod trunc(glob_sec_in_day)) ;
> hours_int := trunc(sec_temp / glob_sec_in_hour);
> sec_temp := (sec_temp mod trunc(glob_sec_in_hour));
> minutes_int := trunc(sec_temp / glob_sec_in_minute);
> sec_int := (sec_temp mod trunc(glob_sec_in_minute));
> if (years_int > 0) then # if number 4
> printf(" = %d Years %d Days %d Hours %d Minutes %d Seconds\n",years_int,days_int,hours_int,minutes_int,sec_int);
> elif
> (days_int > 0) then # if number 5
> printf(" = %d Days %d Hours %d Minutes %d Seconds\n",days_int,hours_int,minutes_int,sec_int);
> elif
> (hours_int > 0) then # if number 6
> printf(" = %d Hours %d Minutes %d Seconds\n",hours_int,minutes_int,sec_int);
> elif
> (minutes_int > 0) then # if number 7
> printf(" = %d Minutes %d Seconds\n",minutes_int,sec_int);
> else
> printf(" = %d Seconds\n",sec_int);
> fi;# end if 7
> else
> printf(" Unknown\n");
> fi;# end if 6
> end;
omniout_timestr := proc(secs_in)
local days_int, hours_int, minutes_int, sec_int, sec_temp, years_int;
global
glob_sec_in_day, glob_sec_in_hour, glob_sec_in_minute, glob_sec_in_year;
if 0 <= secs_in then
years_int := trunc(secs_in/glob_sec_in_year);
sec_temp := trunc(secs_in) mod trunc(glob_sec_in_year);
days_int := trunc(sec_temp/glob_sec_in_day);
sec_temp := sec_temp mod trunc(glob_sec_in_day);
hours_int := trunc(sec_temp/glob_sec_in_hour);
sec_temp := sec_temp mod trunc(glob_sec_in_hour);
minutes_int := trunc(sec_temp/glob_sec_in_minute);
sec_int := sec_temp mod trunc(glob_sec_in_minute);
if 0 < years_int then printf(" = %d Years %d Days %d Hours %d Mi\
nutes %d Seconds
", years_int, days_int, hours_int, minutes_int, sec_int)
elif 0 < days_int then printf(" = %d Days %d Hours %d Minutes %d\
Seconds
", days_int, hours_int, minutes_int, sec_int)
elif 0 < hours_int then printf(" = %d Hours %d Minutes %d Second\
s
", hours_int, minutes_int, sec_int)
elif 0 < minutes_int then printf(" = %d Minutes %d Seconds
", minutes_int, sec_int)
else printf(" = %d Seconds
", sec_int)
end if
else printf(" Unknown
")
end if
end proc
> # End Function number 12
> # Begin Function number 13
> ats := proc(mmm_ats,arr_a,arr_b,jjj_ats)
> local iii_ats, lll_ats,ma_ats, ret_ats;
> ret_ats := 0.0;
> if (jjj_ats <= mmm_ats) then # if number 6
> ma_ats := mmm_ats + 1;
> iii_ats := jjj_ats;
> while (iii_ats <= mmm_ats) do # do number 1
> lll_ats := ma_ats - iii_ats;
> ret_ats := ret_ats + arr_a[iii_ats]*arr_b[lll_ats];
> iii_ats := iii_ats + 1;
> od;# end do number 1
> fi;# end if 6;
> ret_ats;
> end;
ats := proc(mmm_ats, arr_a, arr_b, jjj_ats)
local iii_ats, lll_ats, ma_ats, ret_ats;
ret_ats := 0.;
if jjj_ats <= mmm_ats then
ma_ats := mmm_ats + 1;
iii_ats := jjj_ats;
while iii_ats <= mmm_ats do
lll_ats := ma_ats - iii_ats;
ret_ats := ret_ats + arr_a[iii_ats]*arr_b[lll_ats];
iii_ats := iii_ats + 1
end do
end if;
ret_ats
end proc
> # End Function number 13
> # Begin Function number 14
> att := proc(mmm_att,arr_aa,arr_bb,jjj_att)
> global glob_max_terms;
> local al_att, iii_att,lll_att, ma_att, ret_att;
> ret_att := 0.0;
> if (jjj_att <= mmm_att) then # if number 6
> ma_att := mmm_att + 2;
> iii_att := jjj_att;
> while (iii_att <= mmm_att) do # do number 1
> lll_att := ma_att - iii_att;
> al_att := (lll_att - 1);
> if (lll_att <= glob_max_terms) then # if number 7
> ret_att := ret_att + arr_aa[iii_att]*arr_bb[lll_att]* convfp(al_att);
> fi;# end if 7;
> iii_att := iii_att + 1;
> od;# end do number 1;
> ret_att := ret_att / convfp(mmm_att) ;
> fi;# end if 6;
> ret_att;
> end;
att := proc(mmm_att, arr_aa, arr_bb, jjj_att)
local al_att, iii_att, lll_att, ma_att, ret_att;
global glob_max_terms;
ret_att := 0.;
if jjj_att <= mmm_att then
ma_att := mmm_att + 2;
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 :=
ret_att + arr_aa[iii_att]*arr_bb[lll_att]*convfp(al_att)
end if;
iii_att := iii_att + 1
end do;
ret_att := ret_att/convfp(mmm_att)
end if;
ret_att
end proc
> # End Function number 14
> # Begin Function number 15
> display_pole_debug := proc(typ,m,radius,order2)
> global ALWAYS,glob_display_flag, glob_large_float, array_pole;
> if (typ = 1) then # if number 6
> omniout_str(ALWAYS,"Real");
> else
> omniout_str(ALWAYS,"Complex");
> fi;# end if 6;
> omniout_int(ALWAYS,"m",4, m ,4," ");
> omniout_float(ALWAYS,"DBG Radius of convergence ",4, radius,4," ");
> omniout_float(ALWAYS,"DBG Order of pole ",4, order2,4," ");
> end;
display_pole_debug := proc(typ, m, radius, order2)
global ALWAYS, glob_display_flag, glob_large_float, array_pole;
if typ = 1 then omniout_str(ALWAYS, "Real")
else omniout_str(ALWAYS, "Complex")
end if;
omniout_int(ALWAYS, "m", 4, m, 4, " ");
omniout_float(ALWAYS, "DBG Radius of convergence ", 4, radius, 4,
" ");
omniout_float(ALWAYS, "DBG Order of pole ", 4, order2, 4,
" ")
end proc
> # End Function number 15
> # Begin Function number 16
> logditto := proc(file)
> fprintf(file,"");
> fprintf(file,"ditto");
> fprintf(file," | ");
> end;
logditto := proc(file)
fprintf(file, ""); fprintf(file, "ditto"); fprintf(file, " | ")
end proc
> # End Function number 16
> # Begin Function number 17
> logitem_integer := proc(file,n)
> fprintf(file,"");
> fprintf(file,"%d",n);
> fprintf(file," | ");
> end;
logitem_integer := proc(file, n)
fprintf(file, ""); fprintf(file, "%d", n); fprintf(file, " | ")
end proc
> # End Function number 17
> # Begin Function number 18
> logitem_str := proc(file,str)
> fprintf(file,"");
> fprintf(file,str);
> fprintf(file," | ");
> end;
logitem_str := proc(file, str)
fprintf(file, ""); fprintf(file, str); fprintf(file, " | ")
end proc
> # End Function number 18
> # Begin Function number 19
> logitem_good_digits := proc(file,rel_error)
> global glob_small_float;
> local good_digits;
> fprintf(file,"");
> if (rel_error <> -1.0) then # if number 6
> if (rel_error > + 0.0000000000000000000000000000000001) then # if number 7
> good_digits := 1-trunc(log10(rel_error));
> fprintf(file,"%d",good_digits);
> else
> good_digits := Digits;
> fprintf(file,"%d",good_digits);
> fi;# end if 7;
> else
> fprintf(file,"Unknown");
> fi;# end if 6;
> fprintf(file," | ");
> end;
logitem_good_digits := proc(file, rel_error)
local good_digits;
global glob_small_float;
fprintf(file, "");
if rel_error <> -1.0 then
if 0.1*10^(-33) < rel_error then
good_digits := 1 - trunc(log10(rel_error));
fprintf(file, "%d", good_digits)
else good_digits := Digits; fprintf(file, "%d", good_digits)
end if
else fprintf(file, "Unknown")
end if;
fprintf(file, " | ")
end proc
> # End Function number 19
> # Begin Function number 20
> log_revs := proc(file,revs)
> fprintf(file,revs);
> end;
log_revs := proc(file, revs) fprintf(file, revs) end proc
> # End Function number 20
> # Begin Function number 21
> logitem_float := proc(file,x)
> fprintf(file,"");
> fprintf(file,"%g",x);
> fprintf(file," | ");
> end;
logitem_float := proc(file, x)
fprintf(file, ""); fprintf(file, "%g", x); fprintf(file, " | ")
end proc
> # End Function number 21
> # Begin Function number 22
> logitem_pole := proc(file,pole)
> fprintf(file,"");
> if (pole = 0) then # if number 6
> fprintf(file,"NA");
> elif
> (pole = 1) then # if number 7
> fprintf(file,"Real");
> elif
> (pole = 2) then # if number 8
> fprintf(file,"Complex");
> elif
> (pole = 4) then # if number 9
> fprintf(file,"Yes");
> else
> fprintf(file,"No");
> fi;# end if 9
> fprintf(file," | ");
> end;
logitem_pole := proc(file, pole)
fprintf(file, "");
if pole = 0 then fprintf(file, "NA")
elif pole = 1 then fprintf(file, "Real")
elif pole = 2 then fprintf(file, "Complex")
elif pole = 4 then fprintf(file, "Yes")
else fprintf(file, "No")
end if;
fprintf(file, " | ")
end proc
> # End Function number 22
> # Begin Function number 23
> logstart := proc(file)
> fprintf(file,"");
> end;
logstart := proc(file) fprintf(file, "
") end proc
> # End Function number 23
> # Begin Function number 24
> logend := proc(file)
> fprintf(file,"
\n");
> end;
logend := proc(file)
fprintf(file, "
")
end proc
> # End Function number 24
> # Begin Function number 25
> chk_data := proc()
> global glob_max_iter,ALWAYS, glob_max_terms;
> local errflag;
> errflag := false;
> if ((glob_max_terms < 15) or (glob_max_terms > 512)) then # if number 9
> omniout_str(ALWAYS,"Illegal max_terms = -- Using 30");
> glob_max_terms := 30;
> fi;# end if 9;
> if (glob_max_iter < 2) then # if number 9
> omniout_str(ALWAYS,"Illegal max_iter");
> errflag := true;
> fi;# end if 9;
> if (errflag) then # if number 9
> quit;
> fi;# end if 9
> end;
chk_data := proc()
local errflag;
global glob_max_iter, ALWAYS, glob_max_terms;
errflag := false;
if glob_max_terms < 15 or 512 < glob_max_terms then
omniout_str(ALWAYS, "Illegal max_terms = -- Using 30");
glob_max_terms := 30
end if;
if glob_max_iter < 2 then
omniout_str(ALWAYS, "Illegal max_iter"); errflag := true
end if;
if errflag then quit end if
end proc
> # End Function number 25
> # Begin Function number 26
> comp_expect_sec := proc(t_end2,t_start2,t2,clock_sec2)
> global glob_small_float;
> local ms2, rrr, sec_left, sub1, sub2;
> ;
> ms2 := clock_sec2;
> sub1 := (t_end2-t_start2);
> sub2 := (t2-t_start2);
> if (sub1 = 0.0) then # if number 9
> sec_left := 0.0;
> else
> if (sub2 > 0.0) then # if number 10
> rrr := (sub1/sub2);
> sec_left := rrr * ms2 - ms2;
> else
> sec_left := 0.0;
> fi;# end if 10
> fi;# end if 9;
> sec_left;
> end;
comp_expect_sec := proc(t_end2, t_start2, t2, clock_sec2)
local ms2, rrr, sec_left, sub1, sub2;
global glob_small_float;
ms2 := clock_sec2;
sub1 := t_end2 - t_start2;
sub2 := t2 - t_start2;
if sub1 = 0. then sec_left := 0.
else
if 0. < sub2 then rrr := sub1/sub2; sec_left := rrr*ms2 - ms2
else sec_left := 0.
end if
end if;
sec_left
end proc
> # End Function number 26
> # Begin Function number 27
> comp_percent := proc(t_end2,t_start2, t2)
> global glob_small_float;
> local rrr, sub1, sub2;
> sub1 := (t_end2-t_start2);
> sub2 := (t2-t_start2);
> if (sub2 > glob_small_float) then # if number 9
> rrr := (100.0*sub2)/sub1;
> else
> rrr := 0.0;
> fi;# end if 9;
> rrr;
> end;
comp_percent := proc(t_end2, t_start2, t2)
local rrr, sub1, sub2;
global glob_small_float;
sub1 := t_end2 - t_start2;
sub2 := t2 - t_start2;
if glob_small_float < sub2 then rrr := 100.0*sub2/sub1
else rrr := 0.
end if;
rrr
end proc
> # End Function number 27
> # Begin Function number 28
> factorial_2 := proc(nnn)
> nnn!;
> end;
factorial_2 := proc(nnn) nnn! end proc
> # End Function number 28
> # Begin Function number 29
> factorial_1 := proc(nnn)
> global glob_max_terms,array_fact_1;
> local ret;
> if (nnn <= glob_max_terms) then # if number 9
> if (array_fact_1[nnn] = 0) then # if number 10
> ret := factorial_2(nnn);
> array_fact_1[nnn] := ret;
> else
> ret := array_fact_1[nnn];
> fi;# end if 10;
> else
> ret := factorial_2(nnn);
> fi;# end if 9;
> ret;
> end;
factorial_1 := proc(nnn)
local ret;
global glob_max_terms, array_fact_1;
if nnn <= glob_max_terms then
if array_fact_1[nnn] = 0 then
ret := factorial_2(nnn); array_fact_1[nnn] := ret
else ret := array_fact_1[nnn]
end if
else ret := factorial_2(nnn)
end if;
ret
end proc
> # End Function number 29
> # Begin Function number 30
> factorial_3 := proc(mmm,nnn)
> global glob_max_terms,array_fact_2;
> local ret;
> if ((nnn <= glob_max_terms) and (mmm <= glob_max_terms)) then # if number 9
> if (array_fact_2[mmm,nnn] = 0) then # if number 10
> ret := factorial_1(mmm)/factorial_1(nnn);
> array_fact_2[mmm,nnn] := ret;
> else
> ret := array_fact_2[mmm,nnn];
> fi;# end if 10;
> else
> ret := factorial_2(mmm)/factorial_2(nnn);
> fi;# end if 9;
> ret;
> end;
factorial_3 := proc(mmm, nnn)
local ret;
global glob_max_terms, array_fact_2;
if nnn <= glob_max_terms and mmm <= glob_max_terms then
if array_fact_2[mmm, nnn] = 0 then
ret := factorial_1(mmm)/factorial_1(nnn);
array_fact_2[mmm, nnn] := ret
else ret := array_fact_2[mmm, nnn]
end if
else ret := factorial_2(mmm)/factorial_2(nnn)
end if;
ret
end proc
> # End Function number 30
> # Begin Function number 31
> convfp := proc(mmm)
> (mmm);
> end;
convfp := proc(mmm) mmm end proc
> # End Function number 31
> # Begin Function number 32
> convfloat := proc(mmm)
> (mmm);
> end;
convfloat := proc(mmm) mmm end proc
> # End Function number 32
> # Begin Function number 33
> elapsed_time_seconds := proc()
> time();
> end;
elapsed_time_seconds := proc() time() end proc
> # End Function number 33
> # Begin Function number 34
> omniabs := proc(x)
> abs(x);
> end;
omniabs := proc(x) abs(x) end proc
> # End Function number 34
> # Begin Function number 35
> expt := proc(x,y)
> (x^y);
> end;
expt := proc(x, y) x^y end proc
> # End Function number 35
> # Begin Function number 36
> estimated_needed_step_error := proc(x_start,x_end,estimated_h,estimated_answer)
> local desired_abs_gbl_error,range,estimated_steps,step_error;
> global glob_desired_digits_correct,ALWAYS;
> omniout_float(ALWAYS,"glob_desired_digits_correct",32,glob_desired_digits_correct,32,"");
> desired_abs_gbl_error := expt(10.0, -glob_desired_digits_correct) * omniabs(estimated_answer);
> omniout_float(ALWAYS,"desired_abs_gbl_error",32,desired_abs_gbl_error,32,"");
> range := (x_end - x_start);
> omniout_float(ALWAYS,"range",32,range,32,"");
> estimated_steps := range / estimated_h;
> omniout_float(ALWAYS,"estimated_steps",32,estimated_steps,32,"");
> step_error := omniabs(desired_abs_gbl_error / estimated_steps);
> omniout_float(ALWAYS,"step_error",32,step_error,32,"");
> (step_error);;
> end;
estimated_needed_step_error := proc(
x_start, x_end, estimated_h, estimated_answer)
local desired_abs_gbl_error, range, estimated_steps, step_error;
global glob_desired_digits_correct, ALWAYS;
omniout_float(ALWAYS, "glob_desired_digits_correct", 32,
glob_desired_digits_correct, 32, "");
desired_abs_gbl_error :=
expt(10.0, -glob_desired_digits_correct)*omniabs(estimated_answer);
omniout_float(ALWAYS, "desired_abs_gbl_error", 32,
desired_abs_gbl_error, 32, "");
range := x_end - x_start;
omniout_float(ALWAYS, "range", 32, range, 32, "");
estimated_steps := range/estimated_h;
omniout_float(ALWAYS, "estimated_steps", 32, estimated_steps, 32, "");
step_error := omniabs(desired_abs_gbl_error/estimated_steps);
omniout_float(ALWAYS, "step_error", 32, step_error, 32, "");
step_error
end proc
> # End Function number 36
> #END ATS LIBRARY BLOCK
> #BEGIN USER DEF BLOCK
> #BEGIN USER DEF BLOCK
> ## Comment 5
> exact_soln_y := proc(x)
> ## Comment 6
> return((x+1.0) * Si(x+1.0) + cos(x+1.0));
> ## Comment 7
> end;
exact_soln_y := proc(x) return (x + 1.0)*Si(x + 1.0) + cos(x + 1.0) end proc
> #END USER DEF BLOCK
> #END USER DEF BLOCK
> #END OUTFILE5
> # Begin Function number 2
> main := proc()
> #BEGIN OUTFIEMAIN
> local 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, max_terms, opt_iter, tmp,subiter, est_needed_step_err,estimated_step_error,min_value,est_answer,best_h,found_h,repeat_it;
> global
> glob_max_terms,
> glob_iolevel,
> glob_yes_pole,
> glob_no_pole,
> glob_not_given,
> ALWAYS,
> INFO,
> DEBUGL,
> DEBUGMASSIVE,
> #Top Generate Globals Decl
> MAX_UNCHANGED,
> glob_check_sign,
> glob_desired_digits_correct,
> glob_max_estimated_step_error,
> glob_ratio_of_radius,
> glob_percent_done,
> glob_subiter_method,
> glob_total_exp_sec,
> glob_optimal_expect_sec,
> glob_html_log,
> glob_good_digits,
> glob_max_opt_iter,
> glob_dump,
> glob_djd_debug,
> glob_display_flag,
> glob_djd_debug2,
> glob_sec_in_minute,
> glob_min_in_hour,
> glob_hours_in_day,
> glob_days_in_year,
> glob_sec_in_hour,
> glob_sec_in_day,
> glob_sec_in_year,
> glob_almost_1,
> glob_clock_sec,
> glob_clock_start_sec,
> glob_not_yet_finished,
> glob_initial_pass,
> glob_not_yet_start_msg,
> glob_reached_optimal_h,
> glob_optimal_done,
> glob_disp_incr,
> glob_h,
> glob_max_h,
> glob_min_h,
> glob_type_given_pole,
> glob_large_float,
> glob_last_good_h,
> glob_look_poles,
> glob_neg_h,
> glob_display_interval,
> glob_next_display,
> glob_dump_analytic,
> glob_abserr,
> glob_relerr,
> glob_max_hours,
> glob_max_iter,
> glob_max_rel_trunc_err,
> glob_max_trunc_err,
> glob_no_eqs,
> glob_optimal_clock_start_sec,
> glob_optimal_start,
> glob_small_float,
> glob_smallish_float,
> glob_unchanged_h_cnt,
> glob_warned,
> glob_warned2,
> glob_max_sec,
> glob_orig_start_sec,
> glob_start,
> glob_curr_iter_when_opt,
> glob_current_iter,
> glob_iter,
> glob_normmax,
> glob_max_minutes,
> #Bottom Generate Globals Decl
> #BEGIN CONST
> array_const_1,
> array_const_0D0,
> array_const_1D0,
> #END CONST
> array_y_init,
> array_norms,
> array_fact_1,
> array_pole,
> array_real_pole,
> array_complex_pole,
> array_1st_rel_error,
> array_last_rel_error,
> array_type_pole,
> array_type_real_pole,
> array_type_complex_pole,
> array_y,
> array_x,
> array_tmp0,
> array_tmp1,
> array_tmp2_a1,
> array_tmp2_a2,
> array_tmp2_a3,
> array_tmp2,
> array_tmp3,
> array_m1,
> array_y_higher,
> array_y_higher_work,
> array_y_higher_work2,
> array_y_set_initial,
> array_poles,
> array_given_rad_poles,
> array_given_ord_poles,
> array_real_poles,
> array_complex_poles,
> array_fact_2,
> glob_last;
> glob_last;
> ALWAYS := 1;
> INFO := 2;
> DEBUGL := 3;
> DEBUGMASSIVE := 4;
> glob_iolevel := INFO;
> glob_max_terms := 30;
> glob_iolevel := 5;
> glob_yes_pole := 4;
> glob_no_pole := 3;
> glob_not_given := 0;
> ALWAYS := 1;
> INFO := 2;
> DEBUGL := 3;
> DEBUGMASSIVE := 4;
> MAX_UNCHANGED := 10;
> glob_check_sign := 1.0;
> glob_desired_digits_correct := 8.0;
> glob_max_estimated_step_error := 0.0;
> glob_ratio_of_radius := 0.1;
> glob_percent_done := 0.0;
> glob_subiter_method := 3;
> glob_total_exp_sec := 0.1;
> glob_optimal_expect_sec := 0.1;
> glob_html_log := true;
> glob_good_digits := 0;
> glob_max_opt_iter := 10;
> glob_dump := false;
> glob_djd_debug := true;
> glob_display_flag := true;
> glob_djd_debug2 := true;
> glob_sec_in_minute := 60;
> glob_min_in_hour := 60;
> glob_hours_in_day := 24;
> glob_days_in_year := 365;
> glob_sec_in_hour := 3600;
> glob_sec_in_day := 86400;
> glob_sec_in_year := 31536000;
> glob_almost_1 := 0.9990;
> glob_clock_sec := 0.0;
> glob_clock_start_sec := 0.0;
> glob_not_yet_finished := true;
> glob_initial_pass := true;
> glob_not_yet_start_msg := true;
> glob_reached_optimal_h := false;
> glob_optimal_done := false;
> glob_disp_incr := 0.1;
> glob_h := 0.1;
> glob_max_h := 0.1;
> glob_min_h := 0.000001;
> glob_type_given_pole := 0;
> glob_large_float := 9.0e100;
> glob_last_good_h := 0.1;
> glob_look_poles := false;
> glob_neg_h := false;
> glob_display_interval := 0.0;
> glob_next_display := 0.0;
> glob_dump_analytic := false;
> glob_abserr := 0.1e-10;
> glob_relerr := 0.1e-10;
> glob_max_hours := 0.0;
> glob_max_iter := 1000;
> glob_max_rel_trunc_err := 0.1e-10;
> glob_max_trunc_err := 0.1e-10;
> glob_no_eqs := 0;
> glob_optimal_clock_start_sec := 0.0;
> glob_optimal_start := 0.0;
> glob_small_float := 0.0;
> glob_smallish_float := 0.0;
> glob_unchanged_h_cnt := 0;
> glob_warned := false;
> glob_warned2 := false;
> glob_max_sec := 10000.0;
> glob_orig_start_sec := 0.0;
> glob_start := 0;
> glob_curr_iter_when_opt := 0;
> glob_current_iter := 0;
> glob_iter := 0;
> glob_normmax := 0.0;
> glob_max_minutes := 0.0;
> #Write Set Defaults
> 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/Si_linpostode.ode#################");
> omniout_str(ALWAYS,"diff ( y , x , 1 ) = Si( x + 1.0 );");
> omniout_str(ALWAYS,"!");
> omniout_str(ALWAYS,"#BEGIN FIRST INPUT BLOCK");
> omniout_str(ALWAYS,"## Comment 1");
> omniout_str(ALWAYS,"Digits:=32;");
> omniout_str(ALWAYS,"max_terms:=30;");
> omniout_str(ALWAYS,"## Comment 2");
> omniout_str(ALWAYS,"!");
> omniout_str(ALWAYS,"#END FIRST INPUT BLOCK");
> omniout_str(ALWAYS,"#BEGIN SECOND INPUT BLOCK");
> omniout_str(ALWAYS,"## Comment 3");
> omniout_str(ALWAYS,"x_start := 0.1;");
> omniout_str(ALWAYS,"x_end := 1.0 ;");
> omniout_str(ALWAYS,"array_y_init[0 + 1] := exact_soln_y(x_start);");
> omniout_str(ALWAYS,"glob_look_poles := true;");
> omniout_str(ALWAYS,"glob_max_iter := 1000000;");
> omniout_str(ALWAYS,"## Comment 4");
> omniout_str(ALWAYS,"#END SECOND INPUT BLOCK");
> omniout_str(ALWAYS,"#BEGIN OVERRIDE BLOCK");
> omniout_str(ALWAYS,"glob_desired_digits_correct:=10;");
> omniout_str(ALWAYS,"glob_display_interval:=0.01;");
> omniout_str(ALWAYS,"glob_look_poles:=true;");
> omniout_str(ALWAYS,"glob_max_iter:=10000000;");
> omniout_str(ALWAYS,"glob_max_minutes:=3;");
> omniout_str(ALWAYS,"glob_subiter_method:=3;");
> omniout_str(ALWAYS,"#END OVERRIDE BLOCK");
> omniout_str(ALWAYS,"!");
> omniout_str(ALWAYS,"#BEGIN USER DEF BLOCK");
> omniout_str(ALWAYS,"## Comment 5");
> omniout_str(ALWAYS,"exact_soln_y := proc(x)");
> omniout_str(ALWAYS,"## Comment 6");
> omniout_str(ALWAYS,"return((x+1.0) * Si(x+1.0) + cos(x+1.0));");
> omniout_str(ALWAYS,"## Comment 7");
> omniout_str(ALWAYS,"end;");
> 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 := 0.0;
> glob_smallish_float := 0.0;
> glob_large_float := 1.0e100;
> glob_almost_1 := 0.99;
> #BEGIN FIRST INPUT BLOCK
> #BEGIN FIRST INPUT BLOCK
> ## Comment 1
> Digits:=32;
> max_terms:=30;
> ## Comment 2
> #END FIRST INPUT BLOCK
> #START OF INITS AFTER INPUT BLOCK
> glob_max_terms := max_terms;
> glob_html_log := true;
> #END OF INITS AFTER INPUT BLOCK
> array_y_init:= Array(0..(max_terms + 1),[]);
> array_norms:= Array(0..(max_terms + 1),[]);
> array_fact_1:= Array(0..(max_terms + 1),[]);
> array_pole:= Array(0..(4 + 1),[]);
> array_real_pole:= Array(0..(4 + 1),[]);
> array_complex_pole:= Array(0..(4 + 1),[]);
> array_1st_rel_error:= Array(0..(2 + 1),[]);
> array_last_rel_error:= Array(0..(2 + 1),[]);
> array_type_pole:= Array(0..(2 + 1),[]);
> array_type_real_pole:= Array(0..(2 + 1),[]);
> array_type_complex_pole:= Array(0..(2 + 1),[]);
> array_y:= Array(0..(max_terms + 1),[]);
> array_x:= Array(0..(max_terms + 1),[]);
> array_tmp0:= Array(0..(max_terms + 1),[]);
> array_tmp1:= Array(0..(max_terms + 1),[]);
> array_tmp2_a1:= Array(0..(max_terms + 1),[]);
> array_tmp2_a2:= Array(0..(max_terms + 1),[]);
> array_tmp2_a3:= Array(0..(max_terms + 1),[]);
> array_tmp2:= Array(0..(max_terms + 1),[]);
> array_tmp3:= Array(0..(max_terms + 1),[]);
> array_m1:= Array(0..(max_terms + 1),[]);
> array_y_higher := Array(0..(2+ 1) ,(0..max_terms+ 1),[]);
> array_y_higher_work := Array(0..(2+ 1) ,(0..max_terms+ 1),[]);
> array_y_higher_work2 := Array(0..(2+ 1) ,(0..max_terms+ 1),[]);
> array_y_set_initial := Array(0..(2+ 1) ,(0..max_terms+ 1),[]);
> array_poles := Array(0..(2+ 1) ,(0..3+ 1),[]);
> array_given_rad_poles := Array(0..(2+ 1) ,(0..3+ 1),[]);
> array_given_ord_poles := Array(0..(2+ 1) ,(0..3+ 1),[]);
> array_real_poles := Array(0..(2+ 1) ,(0..3+ 1),[]);
> array_complex_poles := Array(0..(2+ 1) ,(0..3+ 1),[]);
> array_fact_2 := Array(0..(max_terms+ 1) ,(0..max_terms+ 1),[]);
> term := 1;
> while (term <= max_terms) do # do number 1
> array_y_init[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= max_terms) do # do number 1
> array_norms[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= max_terms) do # do number 1
> array_fact_1[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 4) do # do number 1
> array_pole[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 4) do # do number 1
> array_real_pole[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 4) do # do number 1
> array_complex_pole[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 2) do # do number 1
> array_1st_rel_error[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 2) do # do number 1
> array_last_rel_error[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 2) do # do number 1
> array_type_pole[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 2) do # do number 1
> array_type_real_pole[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 2) do # do number 1
> array_type_complex_pole[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= max_terms) do # do number 1
> array_y[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= max_terms) do # do number 1
> array_x[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= max_terms) do # do number 1
> array_tmp0[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= max_terms) do # do number 1
> array_tmp1[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= max_terms) do # do number 1
> array_tmp2_a1[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= max_terms) do # do number 1
> array_tmp2_a2[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= max_terms) do # do number 1
> array_tmp2_a3[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= max_terms) do # do number 1
> array_tmp2[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= max_terms) do # do number 1
> array_tmp3[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= max_terms) do # do number 1
> array_m1[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> ord := 1;
> while (ord <=2) do # do number 1
> term := 1;
> while (term <= max_terms) do # do number 2
> array_y_higher[ord,term] := 0.0;
> term := term + 1;
> od;# end do number 2;
> ord := ord + 1;
> od;# end do number 1;
> ord := 1;
> while (ord <=2) do # do number 1
> term := 1;
> while (term <= max_terms) do # do number 2
> array_y_higher_work[ord,term] := 0.0;
> term := term + 1;
> od;# end do number 2;
> ord := ord + 1;
> od;# end do number 1;
> ord := 1;
> while (ord <=2) do # do number 1
> term := 1;
> while (term <= max_terms) do # do number 2
> array_y_higher_work2[ord,term] := 0.0;
> term := term + 1;
> od;# end do number 2;
> ord := ord + 1;
> od;# end do number 1;
> ord := 1;
> while (ord <=2) do # do number 1
> term := 1;
> while (term <= max_terms) do # do number 2
> array_y_set_initial[ord,term] := 0.0;
> term := term + 1;
> od;# end do number 2;
> ord := ord + 1;
> od;# end do number 1;
> ord := 1;
> while (ord <=2) do # do number 1
> term := 1;
> while (term <= 3) do # do number 2
> array_poles[ord,term] := 0.0;
> term := term + 1;
> od;# end do number 2;
> ord := ord + 1;
> od;# end do number 1;
> ord := 1;
> while (ord <=2) do # do number 1
> term := 1;
> while (term <= 3) do # do number 2
> array_given_rad_poles[ord,term] := 0.0;
> term := term + 1;
> od;# end do number 2;
> ord := ord + 1;
> od;# end do number 1;
> ord := 1;
> while (ord <=2) do # do number 1
> term := 1;
> while (term <= 3) do # do number 2
> array_given_ord_poles[ord,term] := 0.0;
> term := term + 1;
> od;# end do number 2;
> ord := ord + 1;
> od;# end do number 1;
> ord := 1;
> while (ord <=2) do # do number 1
> term := 1;
> while (term <= 3) do # do number 2
> array_real_poles[ord,term] := 0.0;
> term := term + 1;
> od;# end do number 2;
> ord := ord + 1;
> od;# end do number 1;
> ord := 1;
> while (ord <=2) do # do number 1
> term := 1;
> while (term <= 3) do # do number 2
> array_complex_poles[ord,term] := 0.0;
> term := term + 1;
> od;# end do number 2;
> ord := ord + 1;
> od;# end do number 1;
> ord := 1;
> while (ord <=max_terms) do # do number 1
> term := 1;
> while (term <= max_terms) do # do number 2
> array_fact_2[ord,term] := 0.0;
> term := term + 1;
> od;# end do number 2;
> ord := ord + 1;
> od;# end do number 1;
> #BEGIN ARRAYS DEFINED AND INITIALIZATED
> array_y := Array(1..(max_terms+1 + 1),[]);
> term := 1;
> while (term <= max_terms + 1) do # do number 1
> array_y[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> array_x := Array(1..(max_terms+1 + 1),[]);
> term := 1;
> while (term <= max_terms + 1) do # do number 1
> array_x[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> array_tmp0 := Array(1..(max_terms+1 + 1),[]);
> term := 1;
> while (term <= max_terms + 1) do # do number 1
> array_tmp0[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> array_tmp1 := Array(1..(max_terms+1 + 1),[]);
> term := 1;
> while (term <= max_terms + 1) do # do number 1
> array_tmp1[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> array_tmp2_a1 := Array(1..(max_terms+1 + 1),[]);
> term := 1;
> while (term <= max_terms + 1) do # do number 1
> array_tmp2_a1[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> array_tmp2_a2 := Array(1..(max_terms+1 + 1),[]);
> term := 1;
> while (term <= max_terms + 1) do # do number 1
> array_tmp2_a2[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> array_tmp2_a3 := Array(1..(max_terms+1 + 1),[]);
> term := 1;
> while (term <= max_terms + 1) do # do number 1
> array_tmp2_a3[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> array_tmp2 := Array(1..(max_terms+1 + 1),[]);
> term := 1;
> while (term <= max_terms + 1) do # do number 1
> array_tmp2[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> array_tmp3 := Array(1..(max_terms+1 + 1),[]);
> term := 1;
> while (term <= max_terms + 1) do # do number 1
> array_tmp3[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> array_m1 := Array(1..(max_terms+1 + 1),[]);
> term := 1;
> while (term <= max_terms + 1) do # do number 1
> array_m1[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> array_const_1 := Array(1..(max_terms+1 + 1),[]);
> term := 1;
> while (term <= max_terms + 1) do # do number 1
> array_const_1[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> array_const_1[1] := 1;
> array_const_0D0 := Array(1..(max_terms+1 + 1),[]);
> term := 1;
> while (term <= max_terms + 1) do # do number 1
> array_const_0D0[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> array_const_0D0[1] := 0.0;
> array_const_1D0 := Array(1..(max_terms+1 + 1),[]);
> term := 1;
> while (term <= max_terms + 1) do # do number 1
> array_const_1D0[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> array_const_1D0[1] := 1.0;
> array_m1 := Array(1..(max_terms+1 + 1),[]);
> term := 1;
> while (term <= max_terms) do # do number 1
> array_m1[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> array_m1[1] := -1.0;
> #END ARRAYS DEFINED AND INITIALIZATED
> #Initing Factorial Tables
> iiif := 0;
> while (iiif <= glob_max_terms) do # do number 1
> jjjf := 0;
> while (jjjf <= glob_max_terms) do # do number 2
> array_fact_1[iiif] := 0;
> array_fact_2[iiif,jjjf] := 0;
> jjjf := jjjf + 1;
> od;# end do number 2;
> iiif := iiif + 1;
> od;# end do number 1;
> #Done Initing Factorial Tables
> #TOP SECOND INPUT BLOCK
> #BEGIN SECOND INPUT BLOCK
> #END FIRST INPUT BLOCK
> #BEGIN SECOND INPUT BLOCK
> ## Comment 3
> x_start := 0.1;
> x_end := 1.0 ;
> array_y_init[0 + 1] := exact_soln_y(x_start);
> glob_look_poles := true;
> glob_max_iter := 1000000;
> ## Comment 4
> #END SECOND INPUT BLOCK
> #BEGIN OVERRIDE BLOCK
> glob_desired_digits_correct:=10;
> glob_display_interval:=0.01;
> glob_look_poles:=true;
> glob_max_iter:=10000000;
> glob_max_minutes:=3;
> glob_subiter_method:=3;
> #END OVERRIDE BLOCK
> #END SECOND INPUT BLOCK
> #BEGIN INITS AFTER SECOND INPUT BLOCK
> glob_last_good_h := glob_h;
> glob_max_terms := max_terms;
> glob_max_sec := convfloat(60.0) * convfloat(glob_max_minutes) + convfloat(3600.0) * convfloat(glob_max_hours);
> if (glob_h > 0.0) then # if number 1
> glob_neg_h := false;
> glob_display_interval := omniabs(glob_display_interval);
> else
> glob_neg_h := true;
> glob_display_interval := -omniabs(glob_display_interval);
> fi;# end if 1;
> chk_data();
> #AFTER INITS AFTER SECOND INPUT BLOCK
> array_y_set_initial[1,1] := true;
> array_y_set_initial[1,2] := false;
> array_y_set_initial[1,3] := false;
> array_y_set_initial[1,4] := false;
> array_y_set_initial[1,5] := false;
> array_y_set_initial[1,6] := false;
> array_y_set_initial[1,7] := false;
> array_y_set_initial[1,8] := false;
> array_y_set_initial[1,9] := false;
> array_y_set_initial[1,10] := false;
> array_y_set_initial[1,11] := false;
> array_y_set_initial[1,12] := false;
> array_y_set_initial[1,13] := false;
> array_y_set_initial[1,14] := false;
> array_y_set_initial[1,15] := false;
> array_y_set_initial[1,16] := false;
> array_y_set_initial[1,17] := false;
> array_y_set_initial[1,18] := false;
> array_y_set_initial[1,19] := false;
> array_y_set_initial[1,20] := false;
> array_y_set_initial[1,21] := false;
> array_y_set_initial[1,22] := false;
> array_y_set_initial[1,23] := false;
> array_y_set_initial[1,24] := false;
> array_y_set_initial[1,25] := false;
> array_y_set_initial[1,26] := false;
> array_y_set_initial[1,27] := false;
> array_y_set_initial[1,28] := false;
> array_y_set_initial[1,29] := false;
> array_y_set_initial[1,30] := false;
> #BEGIN OPTIMIZE CODE
> omniout_str(ALWAYS,"START of Optimize");
> #Start Series -- INITIALIZE FOR OPTIMIZE
> glob_check_sign := check_sign(x_start,x_end);
> glob_h := check_sign(x_start,x_end);
> found_h := false;
> glob_h := glob_min_h;
> if (glob_max_h < glob_h) then # if number 4
> glob_h := glob_max_h;
> fi;# end if 4;
> if (glob_display_interval < glob_h) then # if number 4
> glob_h := glob_display_interval;
> fi;# end if 4;
> best_h := glob_h;
> min_value := glob_large_float;
> est_answer := est_size_answer();
> opt_iter := 1;
> est_needed_step_err := estimated_needed_step_error(x_start,x_end,glob_h,est_answer);
> omniout_float(ALWAYS,"est_needed_step_err",32,est_needed_step_err,16,"");
> estimated_step_error := 0.0;
> while ((opt_iter <= 100) and ( not found_h)) do # do number 1
> omniout_int(ALWAYS,"opt_iter",32,opt_iter,4,"");
> array_x[1] := x_start;
> array_x[2] := glob_h;
> glob_next_display := x_start;
> order_diff := 1;
> #Start Series array_y
> term_no := 1;
> while (term_no <= order_diff) do # do number 2
> array_y[term_no] := array_y_init[term_no] * expt(glob_h , (term_no - 1)) / factorial_1(term_no - 1);
> term_no := term_no + 1;
> od;# end do number 2;
> rows := order_diff;
> r_order := 1;
> while (r_order <= rows) do # do number 2
> term_no := 1;
> while (term_no <= (rows - r_order + 1)) do # do number 3
> it := term_no + r_order - 1;
> array_y_higher[r_order,term_no] := array_y_init[it]* expt(glob_h , (term_no - 1)) / ((factorial_1(term_no - 1)));
> term_no := term_no + 1;
> od;# end do number 3;
> r_order := r_order + 1;
> od;# end do number 2
> ;
> atomall();
> estimated_step_error := test_suggested_h();
> omniout_float(ALWAYS,"estimated_step_error",32,estimated_step_error,32,"");
> if (((estimated_step_error > est_needed_step_err) and (opt_iter = 1)) or (glob_h >= glob_max_h )) then # if number 4
> found_h := true;
> glob_h := glob_max_h;
> best_h := glob_h;
> elif
> ((estimated_step_error > est_needed_step_err) and ( not found_h)) then # if number 5
> glob_h := glob_h/2.0;
> best_h := glob_h;
> found_h := true;
> else
> glob_h := glob_h*2.0;
> best_h := glob_h;
> fi;# end if 5;
> omniout_float(ALWAYS,"best_h",32,best_h,32,"");
> opt_iter := opt_iter + 1;
> od;# end do number 1;
> if (( not found_h) and (opt_iter = 1)) then # if number 5
> omniout_str(ALWAYS,"Beginning glob_h too large.");
> found_h := false;
> fi;# end if 5;
> if (opt_iter > 100) then # if number 5
> glob_h := glob_max_h;
> found_h := false;
> fi;# end if 5;
> if (glob_display_interval < glob_h) then # if number 5
> glob_h := glob_display_interval;
> fi;# end if 5;
> #END OPTIMIZE CODE
> if (glob_html_log) then # if number 5
> html_log_file := fopen("entry.html",WRITE,TEXT);
> fi;# end if 5;
> #BEGIN SOLUTION CODE
> if (found_h) then # if number 5
> omniout_str(ALWAYS,"START of Soultion");
> #Start Series -- INITIALIZE FOR SOLUTION
> array_x[1] := x_start;
> array_x[2] := glob_h;
> glob_next_display := x_start;
> order_diff := 1;
> #Start Series array_y
> term_no := 1;
> while (term_no <= order_diff) do # do number 1
> array_y[term_no] := array_y_init[term_no] * expt(glob_h , (term_no - 1)) / factorial_1(term_no - 1);
> term_no := term_no + 1;
> od;# end do number 1;
> rows := order_diff;
> r_order := 1;
> while (r_order <= rows) do # do number 1
> term_no := 1;
> while (term_no <= (rows - r_order + 1)) do # do number 2
> it := term_no + r_order - 1;
> array_y_higher[r_order,term_no] := array_y_init[it]* expt(glob_h , (term_no - 1)) / ((factorial_1(term_no - 1)));
> term_no := term_no + 1;
> od;# end do number 2;
> r_order := r_order + 1;
> od;# end do number 1
> ;
> current_iter := 1;
> glob_clock_start_sec := elapsed_time_seconds();
> 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 ((glob_check_sign * array_x[1]) < (glob_check_sign * x_end )) and ((convfloat(glob_clock_sec) - convfloat(glob_orig_start_sec)) < convfloat(glob_max_sec))) do # do number 1
> #left paren 0001C
> if (reached_interval()) then # if number 6
> omniout_str(INFO," ");
> omniout_str(INFO,"TOP MAIN SOLVE Loop");
> fi;# end if 6;
> glob_iter := glob_iter + 1;
> glob_clock_sec := elapsed_time_seconds();
> glob_current_iter := glob_current_iter + 1;
> atomall();
> display_alot(current_iter);
> if (glob_look_poles) then # if number 6
> #left paren 0004C
> check_for_pole();
> fi;# end if 6;#was right paren 0004C
> if (reached_interval()) then # if number 6
> glob_next_display := glob_next_display + glob_display_interval;
> fi;# end if 6;
> array_x[1] := array_x[1] + glob_h;
> array_x[2] := glob_h;
> #Jump Series array_y;
> order_diff := 2;
> #START PART 1 SUM AND ADJUST
> #START SUM AND ADJUST EQ =1
> #sum_and_adjust array_y
> #BEFORE ADJUST SUBSERIES EQ =1
> ord := 2;
> calc_term := 1;
> #adjust_subseriesarray_y
> iii := glob_max_terms;
> while (iii >= calc_term) do # do number 2
> array_y_higher_work[2,iii] := array_y_higher[2,iii] / expt(glob_h , (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1);
> iii := iii - 1;
> od;# end do number 2;
> #AFTER ADJUST SUBSERIES EQ =1
> #BEFORE SUM SUBSERIES EQ =1
> temp_sum := 0.0;
> ord := 2;
> calc_term := 1;
> #sum_subseriesarray_y
> iii := glob_max_terms;
> while (iii >= calc_term) do # do number 2
> temp_sum := temp_sum + array_y_higher_work[ord,iii];
> iii := iii - 1;
> od;# end do number 2;
> array_y_higher_work2[ord,calc_term] := temp_sum * expt(glob_h , (calc_term - 1)) / (factorial_1(calc_term - 1));
> #AFTER SUM SUBSERIES EQ =1
> #BEFORE ADJUST SUBSERIES EQ =1
> ord := 1;
> calc_term := 2;
> #adjust_subseriesarray_y
> iii := glob_max_terms;
> while (iii >= calc_term) do # do number 2
> array_y_higher_work[1,iii] := array_y_higher[1,iii] / expt(glob_h , (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1);
> iii := iii - 1;
> od;# end do number 2;
> #AFTER ADJUST SUBSERIES EQ =1
> #BEFORE SUM SUBSERIES EQ =1
> temp_sum := 0.0;
> ord := 1;
> calc_term := 2;
> #sum_subseriesarray_y
> iii := glob_max_terms;
> while (iii >= calc_term) do # do number 2
> temp_sum := temp_sum + array_y_higher_work[ord,iii];
> iii := iii - 1;
> od;# end do number 2;
> array_y_higher_work2[ord,calc_term] := temp_sum * expt(glob_h , (calc_term - 1)) / (factorial_1(calc_term - 1));
> #AFTER SUM SUBSERIES EQ =1
> #BEFORE ADJUST SUBSERIES EQ =1
> ord := 1;
> calc_term := 1;
> #adjust_subseriesarray_y
> iii := glob_max_terms;
> while (iii >= calc_term) do # do number 2
> array_y_higher_work[1,iii] := array_y_higher[1,iii] / expt(glob_h , (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1);
> iii := iii - 1;
> od;# end do number 2;
> #AFTER ADJUST SUBSERIES EQ =1
> #BEFORE SUM SUBSERIES EQ =1
> temp_sum := 0.0;
> ord := 1;
> calc_term := 1;
> #sum_subseriesarray_y
> iii := glob_max_terms;
> while (iii >= calc_term) do # do number 2
> temp_sum := temp_sum + array_y_higher_work[ord,iii];
> iii := iii - 1;
> od;# end do number 2;
> array_y_higher_work2[ord,calc_term] := temp_sum * expt(glob_h , (calc_term - 1)) / (factorial_1(calc_term - 1));
> #AFTER SUM SUBSERIES EQ =1
> #END SUM AND ADJUST EQ =1
> #END PART 1
> #START PART 2 MOVE TERMS to REGULAR Array
> term_no := glob_max_terms;
> while (term_no >= 1) do # do number 2
> array_y[term_no] := array_y_higher_work2[1,term_no];
> ord := 1;
> while (ord <= order_diff) do # do number 3
> array_y_higher[ord,term_no] := array_y_higher_work2[ord,term_no];
> ord := ord + 1;
> od;# end do number 3;
> term_no := term_no - 1;
> od;# end do number 2;
> #END PART 2 HEVE MOVED TERMS to REGULAR Array
> ;
> od;# end do number 1;#right paren 0001C
> omniout_str(ALWAYS,"Finished!");
> if (glob_iter >= glob_max_iter) then # if number 6
> omniout_str(ALWAYS,"Maximum Iterations Reached before Solution Completed!");
> fi;# end if 6;
> if (elapsed_time_seconds() - convfloat(glob_orig_start_sec) >= convfloat(glob_max_sec )) then # if number 6
> omniout_str(ALWAYS,"Maximum Time Reached before Solution Completed!");
> fi;# end if 6;
> glob_clock_sec := elapsed_time_seconds();
> omniout_str(INFO,"diff ( y , x , 1 ) = Si( x + 1.0 );");
> omniout_int(INFO,"Iterations ",32,glob_iter,4," ")
> ;
> prog_report(x_start,x_end);
> if (glob_html_log) then # if number 6
> logstart(html_log_file);
> logitem_str(html_log_file,"2013-05-26T05:47:07-05:00")
> ;
> logitem_str(html_log_file,"Maple")
> ;
> logitem_str(html_log_file,"Si_lin")
> ;
> logitem_str(html_log_file,"diff ( y , x , 1 ) = Si( x + 1.0 );")
> ;
> logitem_float(html_log_file,x_start)
> ;
> logitem_float(html_log_file,x_end)
> ;
> logitem_float(html_log_file,array_x[1])
> ;
> logitem_float(html_log_file,glob_h)
> ;
> logitem_integer(html_log_file,Digits)
> ;
> ;
> logitem_good_digits(html_log_file,array_last_rel_error[1])
> ;
> logitem_integer(html_log_file,glob_max_terms)
> ;
> 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_time(html_log_file,convfloat(glob_clock_sec))
> ;
> if (glob_percent_done < 100.0) then # if number 7
> logitem_time(html_log_file,convfloat(glob_total_exp_sec))
> ;
> 0;
> else
> logitem_str(html_log_file,"Done")
> ;
> 0;
> fi;# end if 7;
> log_revs(html_log_file," 189 | ")
> ;
> logitem_str(html_log_file,"Si_lin diffeq.mxt")
> ;
> logitem_str(html_log_file,"Si_lin maple results")
> ;
> logitem_str(html_log_file,"Maple - Si")
> ;
> logend(html_log_file)
> ;
> ;
> fi;# end if 6;
> if (glob_html_log) then # if number 6
> fclose(html_log_file);
> fi;# end if 6
> ;
> ;;
> fi;# end if 5
> #END OUTFILEMAIN
> end;
main := proc()
local 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, max_terms, opt_iter, tmp,
subiter, est_needed_step_err, estimated_step_error, min_value, est_answer,
best_h, found_h, repeat_it;
global glob_max_terms, glob_iolevel, glob_yes_pole, glob_no_pole,
glob_not_given, ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, MAX_UNCHANGED,
glob_check_sign, glob_desired_digits_correct, glob_max_estimated_step_error,
glob_ratio_of_radius, glob_percent_done, glob_subiter_method,
glob_total_exp_sec, glob_optimal_expect_sec, glob_html_log,
glob_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug,
glob_display_flag, glob_djd_debug2, glob_sec_in_minute, glob_min_in_hour,
glob_hours_in_day, glob_days_in_year, glob_sec_in_hour, glob_sec_in_day,
glob_sec_in_year, glob_almost_1, glob_clock_sec, glob_clock_start_sec,
glob_not_yet_finished, glob_initial_pass, glob_not_yet_start_msg,
glob_reached_optimal_h, glob_optimal_done, glob_disp_incr, glob_h,
glob_max_h, glob_min_h, glob_type_given_pole, glob_large_float,
glob_last_good_h, glob_look_poles, glob_neg_h, glob_display_interval,
glob_next_display, glob_dump_analytic, glob_abserr, glob_relerr,
glob_max_hours, glob_max_iter, glob_max_rel_trunc_err, glob_max_trunc_err,
glob_no_eqs, glob_optimal_clock_start_sec, glob_optimal_start,
glob_small_float, glob_smallish_float, glob_unchanged_h_cnt, glob_warned,
glob_warned2, glob_max_sec, glob_orig_start_sec, glob_start,
glob_curr_iter_when_opt, glob_current_iter, glob_iter, glob_normmax,
glob_max_minutes, array_const_1, array_const_0D0, array_const_1D0,
array_y_init, array_norms, array_fact_1, array_pole, array_real_pole,
array_complex_pole, array_1st_rel_error, array_last_rel_error,
array_type_pole, array_type_real_pole, array_type_complex_pole, array_y,
array_x, array_tmp0, array_tmp1, array_tmp2_a1, array_tmp2_a2,
array_tmp2_a3, array_tmp2, array_tmp3, array_m1, array_y_higher,
array_y_higher_work, array_y_higher_work2, array_y_set_initial, array_poles,
array_given_rad_poles, array_given_ord_poles, array_real_poles,
array_complex_poles, array_fact_2, glob_last;
glob_last;
ALWAYS := 1;
INFO := 2;
DEBUGL := 3;
DEBUGMASSIVE := 4;
glob_iolevel := INFO;
glob_max_terms := 30;
glob_iolevel := 5;
glob_yes_pole := 4;
glob_no_pole := 3;
glob_not_given := 0;
ALWAYS := 1;
INFO := 2;
DEBUGL := 3;
DEBUGMASSIVE := 4;
MAX_UNCHANGED := 10;
glob_check_sign := 1.0;
glob_desired_digits_correct := 8.0;
glob_max_estimated_step_error := 0.;
glob_ratio_of_radius := 0.1;
glob_percent_done := 0.;
glob_subiter_method := 3;
glob_total_exp_sec := 0.1;
glob_optimal_expect_sec := 0.1;
glob_html_log := true;
glob_good_digits := 0;
glob_max_opt_iter := 10;
glob_dump := false;
glob_djd_debug := true;
glob_display_flag := true;
glob_djd_debug2 := true;
glob_sec_in_minute := 60;
glob_min_in_hour := 60;
glob_hours_in_day := 24;
glob_days_in_year := 365;
glob_sec_in_hour := 3600;
glob_sec_in_day := 86400;
glob_sec_in_year := 31536000;
glob_almost_1 := 0.9990;
glob_clock_sec := 0.;
glob_clock_start_sec := 0.;
glob_not_yet_finished := true;
glob_initial_pass := true;
glob_not_yet_start_msg := true;
glob_reached_optimal_h := false;
glob_optimal_done := false;
glob_disp_incr := 0.1;
glob_h := 0.1;
glob_max_h := 0.1;
glob_min_h := 0.1*10^(-5);
glob_type_given_pole := 0;
glob_large_float := 0.90*10^101;
glob_last_good_h := 0.1;
glob_look_poles := false;
glob_neg_h := false;
glob_display_interval := 0.;
glob_next_display := 0.;
glob_dump_analytic := false;
glob_abserr := 0.1*10^(-10);
glob_relerr := 0.1*10^(-10);
glob_max_hours := 0.;
glob_max_iter := 1000;
glob_max_rel_trunc_err := 0.1*10^(-10);
glob_max_trunc_err := 0.1*10^(-10);
glob_no_eqs := 0;
glob_optimal_clock_start_sec := 0.;
glob_optimal_start := 0.;
glob_small_float := 0.;
glob_smallish_float := 0.;
glob_unchanged_h_cnt := 0;
glob_warned := false;
glob_warned2 := false;
glob_max_sec := 10000.0;
glob_orig_start_sec := 0.;
glob_start := 0;
glob_curr_iter_when_opt := 0;
glob_current_iter := 0;
glob_iter := 0;
glob_normmax := 0.;
glob_max_minutes := 0.;
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.;
glob_max_minutes := 15.0;
omniout_str(ALWAYS, "##############ECHO OF PROBLEM#################");
omniout_str(ALWAYS,
"##############temp/Si_linpostode.ode#################");
omniout_str(ALWAYS, "diff ( y , x , 1 ) = Si( x + 1.0 );");
omniout_str(ALWAYS, "!");
omniout_str(ALWAYS, "#BEGIN FIRST INPUT BLOCK");
omniout_str(ALWAYS, "## Comment 1");
omniout_str(ALWAYS, "Digits:=32;");
omniout_str(ALWAYS, "max_terms:=30;");
omniout_str(ALWAYS, "## Comment 2");
omniout_str(ALWAYS, "!");
omniout_str(ALWAYS, "#END FIRST INPUT BLOCK");
omniout_str(ALWAYS, "#BEGIN SECOND INPUT BLOCK");
omniout_str(ALWAYS, "## Comment 3");
omniout_str(ALWAYS, "x_start := 0.1;");
omniout_str(ALWAYS, "x_end := 1.0 ;");
omniout_str(ALWAYS, "array_y_init[0 + 1] := exact_soln_y(x_start);");
omniout_str(ALWAYS, "glob_look_poles := true;");
omniout_str(ALWAYS, "glob_max_iter := 1000000;");
omniout_str(ALWAYS, "## Comment 4");
omniout_str(ALWAYS, "#END SECOND INPUT BLOCK");
omniout_str(ALWAYS, "#BEGIN OVERRIDE BLOCK");
omniout_str(ALWAYS, "glob_desired_digits_correct:=10;");
omniout_str(ALWAYS, "glob_display_interval:=0.01;");
omniout_str(ALWAYS, "glob_look_poles:=true;");
omniout_str(ALWAYS, "glob_max_iter:=10000000;");
omniout_str(ALWAYS, "glob_max_minutes:=3;");
omniout_str(ALWAYS, "glob_subiter_method:=3;");
omniout_str(ALWAYS, "#END OVERRIDE BLOCK");
omniout_str(ALWAYS, "!");
omniout_str(ALWAYS, "#BEGIN USER DEF BLOCK");
omniout_str(ALWAYS, "## Comment 5");
omniout_str(ALWAYS, "exact_soln_y := proc(x)");
omniout_str(ALWAYS, "## Comment 6");
omniout_str(ALWAYS, "return((x+1.0) * Si(x+1.0) + cos(x+1.0));");
omniout_str(ALWAYS, "## Comment 7");
omniout_str(ALWAYS, "end;");
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 := 0.;
glob_smallish_float := 0.;
glob_large_float := 0.10*10^101;
glob_almost_1 := 0.99;
Digits := 32;
max_terms := 30;
glob_max_terms := max_terms;
glob_html_log := true;
array_y_init := Array(0 .. max_terms + 1, []);
array_norms := Array(0 .. max_terms + 1, []);
array_fact_1 := Array(0 .. max_terms + 1, []);
array_pole := Array(0 .. 5, []);
array_real_pole := Array(0 .. 5, []);
array_complex_pole := Array(0 .. 5, []);
array_1st_rel_error := Array(0 .. 3, []);
array_last_rel_error := Array(0 .. 3, []);
array_type_pole := Array(0 .. 3, []);
array_type_real_pole := Array(0 .. 3, []);
array_type_complex_pole := Array(0 .. 3, []);
array_y := Array(0 .. max_terms + 1, []);
array_x := Array(0 .. max_terms + 1, []);
array_tmp0 := Array(0 .. max_terms + 1, []);
array_tmp1 := Array(0 .. max_terms + 1, []);
array_tmp2_a1 := Array(0 .. max_terms + 1, []);
array_tmp2_a2 := Array(0 .. max_terms + 1, []);
array_tmp2_a3 := Array(0 .. max_terms + 1, []);
array_tmp2 := Array(0 .. max_terms + 1, []);
array_tmp3 := Array(0 .. max_terms + 1, []);
array_m1 := Array(0 .. max_terms + 1, []);
array_y_higher := Array(0 .. 3, 0 .. max_terms + 1, []);
array_y_higher_work := Array(0 .. 3, 0 .. max_terms + 1, []);
array_y_higher_work2 := Array(0 .. 3, 0 .. max_terms + 1, []);
array_y_set_initial := Array(0 .. 3, 0 .. max_terms + 1, []);
array_poles := Array(0 .. 3, 0 .. 4, []);
array_given_rad_poles := Array(0 .. 3, 0 .. 4, []);
array_given_ord_poles := Array(0 .. 3, 0 .. 4, []);
array_real_poles := Array(0 .. 3, 0 .. 4, []);
array_complex_poles := Array(0 .. 3, 0 .. 4, []);
array_fact_2 := Array(0 .. max_terms + 1, 0 .. max_terms + 1, []);
term := 1;
while term <= max_terms do array_y_init[term] := 0.; term := term + 1
end do;
term := 1;
while term <= max_terms do array_norms[term] := 0.; term := term + 1
end do;
term := 1;
while term <= max_terms do array_fact_1[term] := 0.; term := term + 1
end do;
term := 1;
while term <= 4 do array_pole[term] := 0.; term := term + 1 end do;
term := 1;
while term <= 4 do array_real_pole[term] := 0.; term := term + 1 end do
;
term := 1;
while term <= 4 do array_complex_pole[term] := 0.; term := term + 1
end do;
term := 1;
while term <= 2 do array_1st_rel_error[term] := 0.; term := term + 1
end do;
term := 1;
while term <= 2 do array_last_rel_error[term] := 0.; term := term + 1
end do;
term := 1;
while term <= 2 do array_type_pole[term] := 0.; term := term + 1 end do
;
term := 1;
while term <= 2 do array_type_real_pole[term] := 0.; term := term + 1
end do;
term := 1;
while term <= 2 do
array_type_complex_pole[term] := 0.; term := term + 1
end do;
term := 1;
while term <= max_terms do array_y[term] := 0.; term := term + 1 end do
;
term := 1;
while term <= max_terms do array_x[term] := 0.; term := term + 1 end do
;
term := 1;
while term <= max_terms do array_tmp0[term] := 0.; term := term + 1
end do;
term := 1;
while term <= max_terms do array_tmp1[term] := 0.; term := term + 1
end do;
term := 1;
while term <= max_terms do array_tmp2_a1[term] := 0.; term := term + 1
end do;
term := 1;
while term <= max_terms do array_tmp2_a2[term] := 0.; term := term + 1
end do;
term := 1;
while term <= max_terms do array_tmp2_a3[term] := 0.; term := term + 1
end do;
term := 1;
while term <= max_terms do array_tmp2[term] := 0.; term := term + 1
end do;
term := 1;
while term <= max_terms do array_tmp3[term] := 0.; term := term + 1
end do;
term := 1;
while term <= max_terms do array_m1[term] := 0.; term := term + 1
end do;
ord := 1;
while ord <= 2 do
term := 1;
while term <= max_terms do
array_y_higher[ord, term] := 0.; term := term + 1
end do;
ord := ord + 1
end do;
ord := 1;
while ord <= 2 do
term := 1;
while term <= max_terms do
array_y_higher_work[ord, term] := 0.; term := term + 1
end do;
ord := ord + 1
end do;
ord := 1;
while ord <= 2 do
term := 1;
while term <= max_terms do
array_y_higher_work2[ord, term] := 0.; term := term + 1
end do;
ord := ord + 1
end do;
ord := 1;
while ord <= 2 do
term := 1;
while term <= max_terms do
array_y_set_initial[ord, term] := 0.; term := term + 1
end do;
ord := ord + 1
end do;
ord := 1;
while ord <= 2 do
term := 1;
while term <= 3 do array_poles[ord, term] := 0.; term := term + 1
end do;
ord := ord + 1
end do;
ord := 1;
while ord <= 2 do
term := 1;
while term <= 3 do
array_given_rad_poles[ord, term] := 0.; term := term + 1
end do;
ord := ord + 1
end do;
ord := 1;
while ord <= 2 do
term := 1;
while term <= 3 do
array_given_ord_poles[ord, term] := 0.; term := term + 1
end do;
ord := ord + 1
end do;
ord := 1;
while ord <= 2 do
term := 1;
while term <= 3 do
array_real_poles[ord, term] := 0.; term := term + 1
end do;
ord := ord + 1
end do;
ord := 1;
while ord <= 2 do
term := 1;
while term <= 3 do
array_complex_poles[ord, term] := 0.; term := term + 1
end do;
ord := ord + 1
end do;
ord := 1;
while ord <= max_terms do
term := 1;
while term <= max_terms do
array_fact_2[ord, term] := 0.; term := term + 1
end do;
ord := ord + 1
end do;
array_y := Array(1 .. max_terms + 2, []);
term := 1;
while term <= max_terms + 1 do array_y[term] := 0.; term := term + 1
end do;
array_x := Array(1 .. max_terms + 2, []);
term := 1;
while term <= max_terms + 1 do array_x[term] := 0.; term := term + 1
end do;
array_tmp0 := Array(1 .. max_terms + 2, []);
term := 1;
while term <= max_terms + 1 do array_tmp0[term] := 0.; term := term + 1
end do;
array_tmp1 := Array(1 .. max_terms + 2, []);
term := 1;
while term <= max_terms + 1 do array_tmp1[term] := 0.; term := term + 1
end do;
array_tmp2_a1 := Array(1 .. max_terms + 2, []);
term := 1;
while term <= max_terms + 1 do
array_tmp2_a1[term] := 0.; term := term + 1
end do;
array_tmp2_a2 := Array(1 .. max_terms + 2, []);
term := 1;
while term <= max_terms + 1 do
array_tmp2_a2[term] := 0.; term := term + 1
end do;
array_tmp2_a3 := Array(1 .. max_terms + 2, []);
term := 1;
while term <= max_terms + 1 do
array_tmp2_a3[term] := 0.; term := term + 1
end do;
array_tmp2 := Array(1 .. max_terms + 2, []);
term := 1;
while term <= max_terms + 1 do array_tmp2[term] := 0.; term := term + 1
end do;
array_tmp3 := Array(1 .. max_terms + 2, []);
term := 1;
while term <= max_terms + 1 do array_tmp3[term] := 0.; term := term + 1
end do;
array_m1 := Array(1 .. max_terms + 2, []);
term := 1;
while term <= max_terms + 1 do array_m1[term] := 0.; term := term + 1
end do;
array_const_1 := Array(1 .. max_terms + 2, []);
term := 1;
while term <= max_terms + 1 do
array_const_1[term] := 0.; term := term + 1
end do;
array_const_1[1] := 1;
array_const_0D0 := Array(1 .. max_terms + 2, []);
term := 1;
while term <= max_terms + 1 do
array_const_0D0[term] := 0.; term := term + 1
end do;
array_const_0D0[1] := 0.;
array_const_1D0 := Array(1 .. max_terms + 2, []);
term := 1;
while term <= max_terms + 1 do
array_const_1D0[term] := 0.; term := term + 1
end do;
array_const_1D0[1] := 1.0;
array_m1 := Array(1 .. max_terms + 2, []);
term := 1;
while term <= max_terms do array_m1[term] := 0.; term := term + 1
end do;
array_m1[1] := -1.0;
iiif := 0;
while iiif <= glob_max_terms do
jjjf := 0;
while jjjf <= glob_max_terms do
array_fact_1[iiif] := 0;
array_fact_2[iiif, jjjf] := 0;
jjjf := jjjf + 1
end do;
iiif := iiif + 1
end do;
x_start := 0.1;
x_end := 1.0;
array_y_init[1] := exact_soln_y(x_start);
glob_look_poles := true;
glob_max_iter := 1000000;
glob_desired_digits_correct := 10;
glob_display_interval := 0.01;
glob_look_poles := true;
glob_max_iter := 10000000;
glob_max_minutes := 3;
glob_subiter_method := 3;
glob_last_good_h := glob_h;
glob_max_terms := max_terms;
glob_max_sec := convfloat(60.0)*convfloat(glob_max_minutes)
+ convfloat(3600.0)*convfloat(glob_max_hours);
if 0. < glob_h then
glob_neg_h := false;
glob_display_interval := omniabs(glob_display_interval)
else
glob_neg_h := true;
glob_display_interval := -omniabs(glob_display_interval)
end if;
chk_data();
array_y_set_initial[1, 1] := true;
array_y_set_initial[1, 2] := false;
array_y_set_initial[1, 3] := false;
array_y_set_initial[1, 4] := false;
array_y_set_initial[1, 5] := false;
array_y_set_initial[1, 6] := false;
array_y_set_initial[1, 7] := false;
array_y_set_initial[1, 8] := false;
array_y_set_initial[1, 9] := false;
array_y_set_initial[1, 10] := false;
array_y_set_initial[1, 11] := false;
array_y_set_initial[1, 12] := false;
array_y_set_initial[1, 13] := false;
array_y_set_initial[1, 14] := false;
array_y_set_initial[1, 15] := false;
array_y_set_initial[1, 16] := false;
array_y_set_initial[1, 17] := false;
array_y_set_initial[1, 18] := false;
array_y_set_initial[1, 19] := false;
array_y_set_initial[1, 20] := false;
array_y_set_initial[1, 21] := false;
array_y_set_initial[1, 22] := false;
array_y_set_initial[1, 23] := false;
array_y_set_initial[1, 24] := false;
array_y_set_initial[1, 25] := false;
array_y_set_initial[1, 26] := false;
array_y_set_initial[1, 27] := false;
array_y_set_initial[1, 28] := false;
array_y_set_initial[1, 29] := false;
array_y_set_initial[1, 30] := false;
omniout_str(ALWAYS, "START of Optimize");
glob_check_sign := check_sign(x_start, x_end);
glob_h := check_sign(x_start, x_end);
found_h := false;
glob_h := glob_min_h;
if glob_max_h < glob_h then glob_h := glob_max_h end if;
if glob_display_interval < glob_h then glob_h := glob_display_interval
end if;
best_h := glob_h;
min_value := glob_large_float;
est_answer := est_size_answer();
opt_iter := 1;
est_needed_step_err :=
estimated_needed_step_error(x_start, x_end, glob_h, est_answer);
omniout_float(ALWAYS, "est_needed_step_err", 32, est_needed_step_err,
16, "");
estimated_step_error := 0.;
while opt_iter <= 100 and not found_h do
omniout_int(ALWAYS, "opt_iter", 32, opt_iter, 4, "");
array_x[1] := x_start;
array_x[2] := glob_h;
glob_next_display := x_start;
order_diff := 1;
term_no := 1;
while term_no <= order_diff do
array_y[term_no] := array_y_init[term_no]*
expt(glob_h, term_no - 1)/factorial_1(term_no - 1);
term_no := term_no + 1
end do;
rows := order_diff;
r_order := 1;
while r_order <= rows do
term_no := 1;
while term_no <= rows - r_order + 1 do
it := term_no + r_order - 1;
array_y_higher[r_order, term_no] := array_y_init[it]*
expt(glob_h, term_no - 1)/factorial_1(term_no - 1);
term_no := term_no + 1
end do;
r_order := r_order + 1
end do;
atomall();
estimated_step_error := test_suggested_h();
omniout_float(ALWAYS, "estimated_step_error", 32,
estimated_step_error, 32, "");
if est_needed_step_err < estimated_step_error and opt_iter = 1 or
glob_max_h <= glob_h then
found_h := true; glob_h := glob_max_h; best_h := glob_h
elif est_needed_step_err < estimated_step_error and not found_h
then glob_h := glob_h/2.0; best_h := glob_h; found_h := true
else glob_h := glob_h*2.0; best_h := glob_h
end if;
omniout_float(ALWAYS, "best_h", 32, best_h, 32, "");
opt_iter := opt_iter + 1
end do;
if not found_h and opt_iter = 1 then
omniout_str(ALWAYS, "Beginning glob_h too large.");
found_h := false
end if;
if 100 < opt_iter then glob_h := glob_max_h; found_h := false end if;
if glob_display_interval < glob_h then glob_h := glob_display_interval
end if;
if glob_html_log then html_log_file := fopen("entry.html", WRITE, TEXT)
end if;
if found_h then
omniout_str(ALWAYS, "START of Soultion");
array_x[1] := x_start;
array_x[2] := glob_h;
glob_next_display := x_start;
order_diff := 1;
term_no := 1;
while term_no <= order_diff do
array_y[term_no] := array_y_init[term_no]*
expt(glob_h, term_no - 1)/factorial_1(term_no - 1);
term_no := term_no + 1
end do;
rows := order_diff;
r_order := 1;
while r_order <= rows do
term_no := 1;
while term_no <= rows - r_order + 1 do
it := term_no + r_order - 1;
array_y_higher[r_order, term_no] := array_y_init[it]*
expt(glob_h, term_no - 1)/factorial_1(term_no - 1);
term_no := term_no + 1
end do;
r_order := r_order + 1
end do;
current_iter := 1;
glob_clock_start_sec := elapsed_time_seconds();
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
glob_check_sign*array_x[1] < glob_check_sign*x_end and
convfloat(glob_clock_sec) - convfloat(glob_orig_start_sec) <
convfloat(glob_max_sec) do
if reached_interval() then
omniout_str(INFO, " ");
omniout_str(INFO, "TOP MAIN SOLVE Loop")
end if;
glob_iter := glob_iter + 1;
glob_clock_sec := elapsed_time_seconds();
glob_current_iter := glob_current_iter + 1;
atomall();
display_alot(current_iter);
if glob_look_poles then check_for_pole() end if;
if reached_interval() then glob_next_display :=
glob_next_display + glob_display_interval
end if;
array_x[1] := array_x[1] + glob_h;
array_x[2] := glob_h;
order_diff := 2;
ord := 2;
calc_term := 1;
iii := glob_max_terms;
while calc_term <= iii do
array_y_higher_work[2, iii] := array_y_higher[2, iii]/(
expt(glob_h, calc_term - 1)*
factorial_3(iii - calc_term, iii - 1));
iii := iii - 1
end do;
temp_sum := 0.;
ord := 2;
calc_term := 1;
iii := glob_max_terms;
while calc_term <= iii do
temp_sum := temp_sum + array_y_higher_work[ord, iii];
iii := iii - 1
end do;
array_y_higher_work2[ord, calc_term] := temp_sum*
expt(glob_h, calc_term - 1)/factorial_1(calc_term - 1);
ord := 1;
calc_term := 2;
iii := glob_max_terms;
while calc_term <= iii do
array_y_higher_work[1, iii] := array_y_higher[1, iii]/(
expt(glob_h, calc_term - 1)*
factorial_3(iii - calc_term, iii - 1));
iii := iii - 1
end do;
temp_sum := 0.;
ord := 1;
calc_term := 2;
iii := glob_max_terms;
while calc_term <= iii do
temp_sum := temp_sum + array_y_higher_work[ord, iii];
iii := iii - 1
end do;
array_y_higher_work2[ord, calc_term] := temp_sum*
expt(glob_h, calc_term - 1)/factorial_1(calc_term - 1);
ord := 1;
calc_term := 1;
iii := glob_max_terms;
while calc_term <= iii do
array_y_higher_work[1, iii] := array_y_higher[1, iii]/(
expt(glob_h, calc_term - 1)*
factorial_3(iii - calc_term, iii - 1));
iii := iii - 1
end do;
temp_sum := 0.;
ord := 1;
calc_term := 1;
iii := glob_max_terms;
while calc_term <= iii do
temp_sum := temp_sum + array_y_higher_work[ord, iii];
iii := iii - 1
end do;
array_y_higher_work2[ord, calc_term] := temp_sum*
expt(glob_h, calc_term - 1)/factorial_1(calc_term - 1);
term_no := glob_max_terms;
while 1 <= term_no do
array_y[term_no] := array_y_higher_work2[1, term_no];
ord := 1;
while ord <= order_diff do
array_y_higher[ord, term_no] :=
array_y_higher_work2[ord, term_no];
ord := ord + 1
end do;
term_no := term_no - 1
end do
end do;
omniout_str(ALWAYS, "Finished!");
if glob_max_iter <= glob_iter then omniout_str(ALWAYS,
"Maximum Iterations Reached before Solution Completed!")
end if;
if convfloat(glob_max_sec) <=
elapsed_time_seconds() - convfloat(glob_orig_start_sec) then
omniout_str(ALWAYS,
"Maximum Time Reached before Solution Completed!")
end if;
glob_clock_sec := elapsed_time_seconds();
omniout_str(INFO, "diff ( y , x , 1 ) = Si( x + 1.0 );");
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, "2013-05-26T05:47:07-05:00");
logitem_str(html_log_file, "Maple");
logitem_str(html_log_file,
"Si_lin");
logitem_str(html_log_file,
"diff ( y , x , 1 ) = Si( x + 1.0 );");
logitem_float(html_log_file, x_start);
logitem_float(html_log_file, x_end);
logitem_float(html_log_file, array_x[1]);
logitem_float(html_log_file, glob_h);
logitem_integer(html_log_file, Digits);
logitem_good_digits(html_log_file, array_last_rel_error[1]);
logitem_integer(html_log_file, glob_max_terms);
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_time(html_log_file, convfloat(glob_clock_sec));
if glob_percent_done < 100.0 then
logitem_time(html_log_file, convfloat(glob_total_exp_sec));
0
else logitem_str(html_log_file, "Done"); 0
end if;
log_revs(html_log_file, " 189 | ");
logitem_str(html_log_file,
"Si_lin diffeq.mxt");
logitem_str(html_log_file,
"Si_lin maple results")
;
logitem_str(html_log_file, "Maple - Si");
logend(html_log_file)
end if;
if glob_html_log then fclose(html_log_file) end if
end if
end proc
> # End Function number 13
> main();
##############ECHO OF PROBLEM#################
##############temp/Si_linpostode.ode#################
diff ( y , x , 1 ) = Si( x + 1.0 );
!
#BEGIN FIRST INPUT BLOCK
## Comment 1
Digits:=32;
max_terms:=30;
## Comment 2
!
#END FIRST INPUT BLOCK
#BEGIN SECOND INPUT BLOCK
## Comment 3
x_start := 0.1;
x_end := 1.0 ;
array_y_init[0 + 1] := exact_soln_y(x_start);
glob_look_poles := true;
glob_max_iter := 1000000;
## Comment 4
#END SECOND INPUT BLOCK
#BEGIN OVERRIDE BLOCK
glob_desired_digits_correct:=10;
glob_display_interval:=0.01;
glob_look_poles:=true;
glob_max_iter:=10000000;
glob_max_minutes:=3;
glob_subiter_method:=3;
#END OVERRIDE BLOCK
!
#BEGIN USER DEF BLOCK
## Comment 5
exact_soln_y := proc(x)
## Comment 6
return((x+1.0) * Si(x+1.0) + cos(x+1.0));
## Comment 7
end;
#END USER DEF BLOCK
#######END OF ECHO OF PROBLEM#################
START of Optimize
min_size = 0
min_size = 1
glob_desired_digits_correct = 10
desired_abs_gbl_error = 1.0000000000000000000000000000000e-10
range = 0.9
estimated_steps = 900000
step_error = 1.1111111111111111111111111111111e-16
est_needed_step_err = 1.1111111111111111111111111111111e-16
opt_iter = 1
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 1.6725137248399542246944931979920e-162
estimated_step_error = 1.6725137248399542246944931979920e-162
best_h = 2.0e-06
opt_iter = 2
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 1.1224044885919180927491061322660e-154
estimated_step_error = 1.1224044885919180927491061322660e-154
best_h = 4.00e-06
opt_iter = 3
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 7.5323226774568869483615270184590e-147
estimated_step_error = 7.5323226774568869483615270184590e-147
best_h = 8.000e-06
opt_iter = 4
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 5.0548476718255848378096050932745e-139
estimated_step_error = 5.0548476718255848378096050932745e-139
best_h = 1.60000e-05
opt_iter = 5
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 3.3922394278498100447187727477444e-131
estimated_step_error = 3.3922394278498100447187727477444e-131
best_h = 3.200000e-05
opt_iter = 6
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 2.2764780144759479756976040823312e-123
estimated_step_error = 2.2764780144759479756976040823312e-123
best_h = 6.4000000e-05
opt_iter = 7
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 1.5276979599473674381889679273371e-115
estimated_step_error = 1.5276979599473674381889679273371e-115
best_h = 0.000128
opt_iter = 8
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 1.0251931323923494110397447273749e-107
estimated_step_error = 1.0251931323923494110397447273749e-107
best_h = 0.000256
opt_iter = 9
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 6.8795840523660683512787341626992e-100
estimated_step_error = 6.8795840523660683512787341626992e-100
best_h = 0.000512
opt_iter = 10
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 4.6163133789859280927571987561641e-92
estimated_step_error = 4.6163133789859280927571987561641e-92
best_h = 0.001024
opt_iter = 11
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 3.0972881834567332651091968126891e-84
estimated_step_error = 3.0972881834567332651091968126891e-84
best_h = 0.002048
opt_iter = 12
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 2.0776598825000642018572551535442e-76
estimated_step_error = 2.0776598825000642018572551535442e-76
best_h = 0.004096
opt_iter = 13
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 1.3930942126590798379219446919755e-68
estimated_step_error = 1.3930942126590798379219446919755e-68
best_h = 0.008192
opt_iter = 14
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 9.3328363381115839189899068769767e-61
estimated_step_error = 9.3328363381115839189899068769767e-61
best_h = 0.016384
opt_iter = 15
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 6.2417165667096958017802126314854e-53
estimated_step_error = 6.2417165667096958017802126314854e-53
best_h = 0.032768
opt_iter = 16
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 4.1602652744354300988142527618215e-45
estimated_step_error = 4.1602652744354300988142527618215e-45
best_h = 0.065536
opt_iter = 17
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 2.7544916286017261556324184949880e-37
estimated_step_error = 2.7544916286017261556324184949880e-37
best_h = 0.131072
opt_iter = 18
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 1.8004641233377348407494808479451e-29
estimated_step_error = 1.8004641233377348407494808479451e-29
best_h = 0.1
START of Soultion
TOP MAIN SOLVE Loop
x[1] = 0.1
y[1] (analytic) = 1.5851498619666842620062748845715
y[1] (numeric) = 1.5851498619666842620062748845715
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.205
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
Radius of convergence (six term test) for eq 1 = 0.916
Order of pole (six term test) = -0.5
TOP MAIN SOLVE Loop
x[1] = 0.11
y[1] (analytic) = 1.5954771694578960838626986308936
y[1] (numeric) = 1.5954771694578960850776526051699
absolute error = 1.2149539742763e-18
relative error = 7.6149881523476233124205716400207e-17 %
Correct digits = 19
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.216
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
Radius of convergence (six term test) for eq 1 = 0.8467
Order of pole (six term test) = -0.5
TOP MAIN SOLVE Loop
x[1] = 0.12
y[1] (analytic) = 1.6058851703419980941184574972212
y[1] (numeric) = 1.6058851703419980965136783743681
absolute error = 2.3952208771469e-18
relative error = 1.4915268671649795820102773971572e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.227
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
Radius of convergence (six term test) for eq 1 = 0.7695
Order of pole (six term test) = -0.5
bytes used=4000440, alloc=3079628, time=0.14
TOP MAIN SOLVE Loop
x[1] = 0.13
y[1] (analytic) = 1.6163735371562086846444074262605
y[1] (numeric) = 1.6163735371562086881857064501151
absolute error = 3.5412990238546e-18
relative error = 2.1908914879199508464072286008921e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.238
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
Radius of convergence (six term test) for eq 1 = 0.6817
Order of pole (six term test) = -0.5
TOP MAIN SOLVE Loop
x[1] = 0.14
y[1] (analytic) = 1.6269419402681614709497320180322
y[1] (numeric) = 1.6269419402681614756034079564165
absolute error = 4.6536759383843e-18
relative error = 2.8603823057246011332268592727967e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.249
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
Radius of convergence (six term test) for eq 1 = 0.5783
Order of pole (six term test) = -0.5
TOP MAIN SOLVE Loop
x[1] = 0.15
y[1] (analytic) = 1.6375900478951777441859228561095
y[1] (numeric) = 1.6375900478951777499187515970013
absolute error = 5.7328287408918e-18
relative error = 3.5007716053601461412665587691466e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.26
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
Radius of convergence (six term test) for eq 1 = 0.4487
Order of pole (six term test) = -0.5
TOP MAIN SOLVE Loop
x[1] = 0.16
y[1] (analytic) = 1.6483175261236550046872374267135
y[1] (numeric) = 1.6483175261236550114664619448795
absolute error = 6.7792245181660e-18
relative error = 4.1128146796501573335270845741950e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.27
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
Radius of convergence (six term test) for eq 1 = 0.2556
Order of pole (six term test) = -0.5
TOP MAIN SOLVE Loop
x[1] = 0.17
y[1] (analytic) = 1.6591240389285702125108013136204
y[1] (numeric) = 1.659124038928570220304121991614
absolute error = 7.7933206779936e-18
relative error = 4.6972501724623155686809894269530e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.281
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.18
y[1] (analytic) = 1.6700092481930963827572251306048
y[1] (numeric) = 1.6700092481930963915327904188512
absolute error = 8.7755652882464e-18
relative error = 5.2548004136751445390847077133242e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.292
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.19
y[1] (analytic) = 1.6809728137283311458760130945652
y[1] (numeric) = 1.6809728137283311556024104960266
absolute error = 9.7263974014614e-18
relative error = 5.7861717465189907872843220447129e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.303
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.2
y[1] (analytic) = 1.6920143932931358856897131628665
y[1] (numeric) = 1.6920143932931358963359605285062
absolute error = 1.06462473656397e-17
relative error = 6.2920548476653962655868204732811e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.314
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.21
y[1] (analytic) = 1.7031336426140840605072535388056
y[1] (numeric) = 1.7031336426140840720427906607544
absolute error = 1.15355371219488e-17
relative error = 6.7731250404068595533406767078092e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.325
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.22
y[1] (analytic) = 1.7143302154055173054407736911475
y[1] (numeric) = 1.7143302154055173178354541811184
absolute error = 1.23946804899709e-17
relative error = 7.2300426012377041409866791549600e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.336
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.23
y[1] (analytic) = 1.7256037633897079068920277164933
y[1] (numeric) = 1.7256037633897079201161111576014
absolute error = 1.32240834411081e-17
relative error = 7.6634530601226973265323593224747e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.347
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.24
y[1] (analytic) = 1.7369539363171262331346430108653
y[1] (numeric) = 1.7369539363171262471587873715804
absolute error = 1.40241443607151e-17
relative error = 8.0739874947119074085945128928801e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.358
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.25
y[1] (analytic) = 1.7483803819868116979876781164402
y[1] (numeric) = 1.7483803819868117127829324159414
absolute error = 1.47952542995012e-17
relative error = 8.4622628187398655436075372431932e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.369
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.26
y[1] (analytic) = 1.759882746266845827754551730052
y[1] (numeric) = 1.7598827462668458432923489447665
absolute error = 1.55377972147145e-17
relative error = 8.8288820648273743898980321227881e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.38
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.27
y[1] (analytic) = 1.7714606731149259948900127728974
y[1] (numeric) = 1.7714606731149260111421629744871
absolute error = 1.62521502015897e-17
relative error = 9.1744346618838650159125372055579e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.391
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.28
y[1] (analytic) = 1.7831138045990383752568827690083
y[1] (numeric) = 1.7831138045990383921955664845241
absolute error = 1.69386837155158e-17
relative error = 9.4994967072921818548748017617258e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.402
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.29
y[1] (analytic) = 1.7948417809182286793443112401302
y[1] (numeric) = 1.7948417809182286969420730254865
absolute error = 1.75977617853563e-17
relative error = 9.8046312340430399444494070465929e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.413
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.3
y[1] (analytic) = 1.8066442404234692014407180686608
y[1] (numeric) = 1.8066442404234692196704602869915
absolute error = 1.82297422183307e-17
relative error = 1.0090388472972261130461307625277e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.424
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.31
y[1] (analytic) = 1.8185208196386207244879204383425
y[1] (numeric) = 1.8185208196386207433228972351844
absolute error = 1.88349767968419e-17
relative error = 1.0357306110240088303402211232261e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.435
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.32
y[1] (analytic) = 1.8304711532814878121886135860892
y[1] (numeric) = 1.8304711532814878316024250537078
absolute error = 1.94138114676186e-17
relative error = 1.0605909540183376889995401379785e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.446
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.33
y[1] (analytic) = 1.8424948742849660138978426251133
y[1] (numeric) = 1.8424948742849660338644291486297
absolute error = 1.99665865235164e-17
relative error = 1.0836712113657856149461643406036e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.457
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
bytes used=8004736, alloc=4324584, time=0.28
TOP MAIN SOLVE Loop
x[1] = 0.34
y[1] (analytic) = 1.8545916138182795019008064175956
y[1] (numeric) = 1.8545916138182795223944431959044
absolute error = 2.04936367783088e-17
relative error = 1.1050215381981583058811924483529e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.468
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.35
y[1] (analytic) = 1.8667610013083076548647039893182
y[1] (numeric) = 1.8667610013083076758599957240958
absolute error = 2.09952917347776e-17
relative error = 1.1246909336579874135673094260648e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.479
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.36
y[1] (analytic) = 1.879002664460999095551790176823
y[1] (numeric) = 1.8790026644609991170236659232235
absolute error = 2.14718757464005e-17
relative error = 1.1427272644426936079264371325427e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.49
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.37
y[1] (analytic) = 1.8913162292828716852947617180984
y[1] (numeric) = 1.8913162292828717072184698910128
absolute error = 2.19237081729144e-17
relative error = 1.1591772879370462838691352734043e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.5
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.38
y[1] (analytic) = 1.9037013201025969722644501973434
y[1] (numeric) = 1.9037013201025969946155537273648
absolute error = 2.23511035300214e-17
relative error = 1.1740866749420976721153426791898e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.511
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.39
y[1] (analytic) = 1.9161575595926675852039471772442
y[1] (numeric) = 1.9161575595926676079583188107352
absolute error = 2.27543716334910e-17
relative error = 1.1875000320082275779076859210227e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.522
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.4
y[1] (analytic) = 1.9286845687911460590631131996908
y[1] (numeric) = 1.9286845687911460821969309375878
absolute error = 2.31338177378970e-17
relative error = 1.1994609233793336482320199729916e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.533
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.41
y[1] (analytic) = 1.9412819671234935738433004367136
y[1] (numeric) = 1.9412819671234935973330431069336
absolute error = 2.34897426702200e-17
relative error = 1.2100118925550042504441019559845e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.544
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.42
y[1] (analytic) = 1.95394937242447708295441355513
y[1] (numeric) = 1.9539493724244771067768565136586
absolute error = 2.38224429585286e-17
relative error = 1.2191944834767908623681877355457e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.555
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.43
y[1] (analytic) = 1.9666864009601533024955003191601
y[1] (numeric) = 1.9666864009601533266277112751103
absolute error = 2.41322109559502e-17
relative error = 1.2270492613448003705090581106898e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.566
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.44
y[1] (analytic) = 1.9794926674499280280962486368995
y[1] (numeric) = 1.9794926674499280525155835970239
absolute error = 2.44193349601244e-17
relative error = 1.2336158330701215276583033651368e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.577
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.45
y[1] (analytic) = 1.9923677850886892413004067179354
y[1] (numeric) = 1.992367785088689265984506046262
absolute error = 2.46840993283266e-17
relative error = 1.2389328673685516271138391913386e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.588
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.46
y[1] (analytic) = 2.005311365569012462933564801063
y[1] (numeric) = 2.0053113655690124878603493895045
absolute error = 2.49267845884415e-17
relative error = 1.2430381145009098479564757047574e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.599
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.47
y[1] (analytic) = 2.0183230191034368064772580502545
y[1] (numeric) = 2.0183230191034368316249255962078
absolute error = 2.51476675459533e-17
relative error = 1.2459684256647974171857455622755e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.61
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.48
y[1] (analytic) = 2.0314023544468101801692786637542
y[1] (numeric) = 2.0314023544468102055163000508705
absolute error = 2.53470213871163e-17
relative error = 1.2477597720427364590154486195683e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.621
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.49
y[1] (analytic) = 2.0445489789187020823667193750011
y[1] (numeric) = 2.0445489789187021078918351534587
absolute error = 2.55251157784576e-17
relative error = 1.2484472635112431624453794210140e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.632
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.5
y[1] (analytic) = 2.0577624984258824306438991217471
y[1] (numeric) = 2.0577624984258824563261160845081
absolute error = 2.56822169627610e-17
relative error = 1.2480651670154846864496903029781e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.643
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.51
y[1] (analytic) = 2.0710425174848648611522238735752
y[1] (numeric) = 2.0710425174848648869708117252456
absolute error = 2.58185878516704e-17
relative error = 1.2466469246138536478878366496120e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.654
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.52
y[1] (analytic) = 2.0843886392445129309434809451391
y[1] (numeric) = 2.0843886392445129568779690601855
absolute error = 2.59344881150464e-17
relative error = 1.2442251711967860407422895659471e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.665
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.53
y[1] (analytic) = 2.0978004655087076522523134248005
y[1] (numeric) = 2.097800465508707678282487692004
absolute error = 2.60301742672035e-17
relative error = 1.2408317518840522292757422500050e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.676
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.54
y[1] (analytic) = 2.1112775967590747841479227735512
y[1] (numeric) = 2.1112775967590748102538225237013
absolute error = 2.61058997501501e-17
relative error = 1.2364977391047045173067340643932e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.687
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
bytes used=12006256, alloc=4455632, time=0.43
x[1] = 0.55
y[1] (analytic) = 2.1248196321777703034996426521161
y[1] (numeric) = 2.1248196321777703296615576660631
absolute error = 2.61619150139470e-17
relative error = 1.2312534493637527256344663620275e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.698
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.56
y[1] (analytic) = 2.1384261696703224738561463496657
y[1] (numeric) = 2.1384261696703225000546139439606
absolute error = 2.61984675942949e-17
relative error = 1.2251284596995870658476788881360e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.709
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.57
y[1] (analytic) = 2.1520968058885289276139148134165
y[1] (numeric) = 2.1520968058885289538297170008735
absolute error = 2.62158021874570e-17
relative error = 1.2181516238361485063408743906331e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.72
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.58
y[1] (analytic) = 2.1658311362534071737474134595251
y[1] (numeric) = 2.165831136253407199961574182144
absolute error = 2.62141607226189e-17
relative error = 1.2103510880338449209270378391680e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.73
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.59
y[1] (analytic) = 2.1796287549781969403914051591181
y[1] (numeric) = 2.1796287549781969665851875909
absolute error = 2.61937824317819e-17
relative error = 1.2017543066431016692944230810853e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.741
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.6
y[1] (analytic) = 2.1934892550914127587051557338946
y[1] (numeric) = 2.1934892550914127848600596511766
absolute error = 2.61549039172820e-17
relative error = 1.1923880573644298605097274477760e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.752
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.61
y[1] (analytic) = 2.2074122284599451917091488626933
y[1] (numeric) = 2.2074122284599452178069080797171
absolute error = 2.60977592170238e-17
relative error = 1.1822784562189154951083266139156e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.763
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.62
y[1] (analytic) = 2.2213972658122091091674915846814
y[1] (numeric) = 2.2213972658122091351900714521953
absolute error = 2.60225798675139e-17
relative error = 1.1714509722329773595941028308734e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.774
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.63
y[1] (analytic) = 2.2354439567613374070936218572673
y[1] (numeric) = 2.2354439567613374330232168220429
absolute error = 2.59295949647756e-17
relative error = 1.1599304418412633042989217520937e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.785
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.64
y[1] (analytic) = 2.2495518898284185680833783272907
y[1] (numeric) = 2.2495518898284185939024095505115
absolute error = 2.58190312232208e-17
relative error = 1.1477410830114308047780286758304e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.796
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.65
y[1] (analytic) = 2.2637206524657764564281022011001
y[1] (numeric) = 2.2637206524657764821192152336554
absolute error = 2.56911130325553e-17
relative error = 1.1349065090947084171482299002859e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.807
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.66
y[1] (analytic) = 2.2779498310802907398313446008667
y[1] (numeric) = 2.2779498310802907653774071136552
absolute error = 2.55460625127885e-17
relative error = 1.1214497424060292970071776269927e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.818
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.67
y[1] (analytic) = 2.2922390110567563275460729598948
y[1] (numeric) = 2.2922390110567563529301725273107
absolute error = 2.53840995674159e-17
relative error = 1.1073932275375355381104177232310e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.829
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.68
y[1] (analytic) = 2.3065877767812802128651198610406
y[1] (numeric) = 2.306587776781280238070561795878
absolute error = 2.52054419348374e-17
relative error = 1.0927588444091317066920028565319e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.84
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.69
y[1] (analytic) = 2.3209957116647141061361004082817
y[1] (numeric) = 2.320995711664714131146405646361
absolute error = 2.50103052380793e-17
relative error = 1.0775679210600899738377871938917e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.851
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.7
y[1] (analytic) = 2.3354623981661212428332330110332
y[1] (numeric) = 2.3354623981661212676321360439087
absolute error = 2.47989030328755e-17
relative error = 1.0618412461852685381972543535394e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.862
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.71
y[1] (analytic) = 2.3499874178162757497025167381182
y[1] (numeric) = 2.3499874178162757742739635922849
absolute error = 2.45714468541667e-17
relative error = 1.0455990814197507789999498935275e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.873
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.72
y[1] (analytic) = 2.3645703512411929506036196583336
y[1] (numeric) = 2.3645703512411929749317659194099
absolute error = 2.43281462610763e-17
relative error = 1.0288611733757952113609960697804e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.884
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.73
y[1] (analytic) = 2.379210778185688992401680429473
y[1] (numeric) = 2.3792107781856890164708893098843
absolute error = 2.40692088804113e-17
relative error = 1.0116467654356256162941102527259e-15 %
Correct digits = 17
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.895
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.74
y[1] (analytic) = 2.3939082775369681701150735341089
y[1] (numeric) = 2.393908277536968193909913982851
absolute error = 2.37948404487421e-17
relative error = 9.9397460930391247103793399661631e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.906
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.75
y[1] (analytic) = 2.4086624273482363295010807976695
y[1] (numeric) = 2.408662427348236353006325650781
absolute error = 2.35052448531115e-17
relative error = 9.7586297632371340138359285780550e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.917
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.76
y[1] (analytic) = 2.4234728048623387243603820731336
y[1] (numeric) = 2.4234728048623387475610062435493
absolute error = 2.32006241704157e-17
relative error = 9.5732966855939496436046821740758e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.928
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
bytes used=16008016, alloc=4455632, time=0.58
TOP MAIN SOLVE Loop
x[1] = 0.77
y[1] (analytic) = 2.4383389865354207050633502490468
y[1] (numeric) = 2.4383389865354207279445289545536
absolute error = 2.28811787055068e-17
relative error = 9.3839202965040295585002510272901e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.939
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.78
y[1] (analytic) = 2.4532605480606096141463241474621
y[1] (numeric) = 2.4532605480606096366934311755205
absolute error = 2.25471070280584e-17
relative error = 9.1906695543947405722360990265001e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.95
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.79
y[1] (analytic) = 2.468237064391716264294341642986
y[1] (numeric) = 2.4682370643917162864929476512226
absolute error = 2.21986060082366e-17
relative error = 8.9937090437896519210589417075277e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.96
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.8
y[1] (analytic) = 2.4832681097669543736182387760557
y[1] (numeric) = 2.4832681097669543954541096272708
absolute error = 2.18358708512151e-17
relative error = 8.7931990771887762803199623622254e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.971
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.81
y[1] (analytic) = 2.4983532577326763328485431841225
y[1] (numeric) = 2.4983532577326763543076383146984
absolute error = 2.14590951305759e-17
relative error = 8.5892957948030990780389277440671e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.982
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.82
y[1] (analytic) = 2.5134920811671236789061863772843
y[1] (numeric) = 2.5134920811671236999746571979147
absolute error = 2.10684708206304e-17
relative error = 8.3821512621783923750172394070246e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 1.993
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.83
y[1] (analytic) = 2.5286841523041906492706939009435
y[1] (numeric) = 2.5286841523041906699348822286411
absolute error = 2.06641883276976e-17
relative error = 8.1719135657444418968511045937736e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 2.004
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.84
y[1] (analytic) = 2.5439290427571991916501400408531
y[1] (numeric) = 2.543929042757199211896576561227
absolute error = 2.02464365203739e-17
relative error = 7.9587269063252269832635993427070e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 2.015
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.85
y[1] (analytic) = 2.5592263235426838036637193480814
y[1] (numeric) = 2.5592263235426838234791221069079
absolute error = 1.98154027588265e-17
relative error = 7.7427316906448702994890309407573e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 2.026
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.86
y[1] (analytic) = 2.5745755651041845775772259418641
y[1] (numeric) = 2.5745755651041845969484988650093
absolute error = 1.93712729231452e-17
relative error = 7.5240646208655011863329702259423e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 2.037
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.87
y[1] (analytic) = 2.5899763373360468255839684801854
y[1] (numeric) = 2.5899763373360468444981999209645
absolute error = 1.89142314407791e-17
relative error = 7.3028587821901005609677934350996e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 2.048
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.88
y[1] (analytic) = 2.6054282096072256616985992174483
y[1] (numeric) = 2.6054282096072256801430605305399
absolute error = 1.84444613130916e-17
relative error = 7.0792437285662709820593975889173e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 2.059
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.89
y[1] (analytic) = 2.6209307507850939170289052047736
y[1] (numeric) = 2.6209307507850939349910493458345
absolute error = 1.79621441410609e-17
relative error = 6.8533455665245562418711576818266e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 2.07
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.9
y[1] (analytic) = 2.6364835292592517660106941134747
y[1] (numeric) = 2.6364835292592517834781542636264
absolute error = 1.74674601501517e-17
relative error = 6.6252870371844764273822873736746e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 2.081
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.91
y[1] (analytic) = 2.6520861129653364421333922427912
y[1] (numeric) = 2.6520861129653364590939804571786
absolute error = 1.69605882143874e-17
relative error = 6.3951875964628905529500819738153e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 2.092
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.92
y[1] (analytic) = 2.6677380694088304227487340723406
y[1] (numeric) = 2.6677380694088304391904399519872
absolute error = 1.64417058796466e-17
relative error = 6.1631634935172157876027940373809e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 2.103
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.93
y[1] (analytic) = 2.6834389656888664637418275107832
y[1] (numeric) = 2.6834389656888664796528168969929
absolute error = 1.59109893862097e-17
relative error = 5.9293278474568117830682554779272e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 2.114
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.94
y[1] (analytic) = 2.6991883685220278661527832710148
y[1] (numeric) = 2.6991883685220278815213969615922
absolute error = 1.53686136905774e-17
relative error = 5.6937907223543142428394100388633e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 2.125
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.95
y[1] (analytic) = 2.7149858442661423582678473027183
y[1] (numeric) = 2.714985844266142373082599789305
absolute error = 1.48147524865867e-17
relative error = 5.4566592005900903887331675176787e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 2.136
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.96
y[1] (analytic) = 2.730830958944067978251408922465
y[1] (numeric) = 2.7308309589440679925009871483082
absolute error = 1.42495782258432e-17
relative error = 5.2180374545603851067199777876418e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 2.147
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.97
y[1] (analytic) = 2.746723278267469344064201456225
y[1] (numeric) = 2.7467232782674693577374635937202
absolute error = 1.36732621374952e-17
relative error = 4.9780268167821346991115708854980e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 2.158
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
bytes used=20010692, alloc=4521156, time=0.74
x[1] = 0.98
y[1] (analytic) = 2.7626623676605826992082843919958
y[1] (numeric) = 2.7626623676605827122942586393616
absolute error = 1.30859742473658e-17
relative error = 4.7367258484238804754524323225352e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 2.169
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 0.99
y[1] (analytic) = 2.7786477922839681247558040782599
y[1] (numeric) = 2.7786477922839681372436874747257
absolute error = 1.24878833964658e-17
relative error = 4.4942304062945383253179230174978e-16 %
Correct digits = 18
h = 0.01
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 2.18
Order of pole (ratio test) Not computed
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
Finished!
diff ( y , x , 1 ) = Si( x + 1.0 );
Iterations = 90
Total Elapsed Time = 0 Seconds
Elapsed Time(since restart) = 0 Seconds
Time to Timeout = 2 Minutes 59 Seconds
Percent Done = 101.1 %
> quit
bytes used=20331300, alloc=4521156, time=0.75