|\^/| 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_diff_ord_fm, glob_diff_ord_fmm1, glob_diff_ord_fmm2, glob_diff_rc_fm, glob_diff_rc_fmm1, glob_diff_rc_fmm2, glob_guess_error_ord, glob_guess_error_rc, 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_float(ALWAYS,"Order of pole (ratio test) ",4, array_poles[1,2],4," ");
> 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," ");
> omniout_float(ALWAYS,"Derivative of radius w.r.t nth term ",4,glob_diff_rc_fm,4," ");
> omniout_float(ALWAYS,"Derivative of order w.r.t nth term ",4,glob_diff_ord_fm,4," ");
> omniout_float(ALWAYS,"Derivative of radius w.r.t (n-1)th term ",4,glob_diff_rc_fmm1,4," ");
> omniout_float(ALWAYS,"Derivative of order w.r.t (n-1)th term ",4,glob_diff_ord_fmm1,4," ");
> omniout_float(ALWAYS,"Derivative of radius w.r.t (n-2)th term ",4,glob_diff_rc_fmm2,4," ");
> omniout_float(ALWAYS,"Derivative of order w.r.t (n-2)th term ",4,glob_diff_ord_fmm2,4," ");
> omniout_str(ALWAYS,"Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).");
> omniout_float(ALWAYS,"Guess error in radius ",4,glob_guess_error_rc,4," ");
> omniout_float(ALWAYS,"Guess error in order ",4,glob_guess_error_ord,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
> ;
> if (glob_type_given_pole = 4) then # if number 2
> rad_given := sqrt(expt(array_x[1] - array_given_rad_poles[2,1],2.0) + expt(array_given_rad_poles[2,2],2.0)) ;
> omniout_float(ALWAYS,"Radius of convergence (given) for eq 2 ",4, rad_given,4," ");
> omniout_float(ALWAYS,"Order of pole (given) ",4, array_given_ord_poles[2,1],4," ");
> elif
> (glob_type_given_pole = 3) then # if number 3
> omniout_str(ALWAYS,"NO POLE (given) for Equation 2");
> else
> omniout_str(ALWAYS,"NO INFO (given) for Equation 2");
> fi;# end if 3;
> if (array_poles[2,1] <> glob_large_float) then # if number 3
> omniout_float(ALWAYS,"Radius of convergence (ratio test) for eq 2 ",4, array_poles[2,1],4," ");
> omniout_float(ALWAYS,"Order of pole (ratio test) ",4, array_poles[2,2],4," ");
> else
> omniout_str(ALWAYS,"NO POLE (ratio test) for Equation 2");
> fi;# end if 3;
> if ((array_real_poles[2,1] > 0.0) and (array_real_poles[2,1] <> glob_large_float)) then # if number 3
> omniout_float(ALWAYS,"Radius of convergence (three term test) for eq 2 ",4, array_real_poles[2,1],4," ");
> omniout_float(ALWAYS,"Order of pole (three term test) ",4, array_real_poles[2,2],4," ");
> omniout_float(ALWAYS,"Derivative of radius w.r.t nth term ",4,glob_diff_rc_fm,4," ");
> omniout_float(ALWAYS,"Derivative of order w.r.t nth term ",4,glob_diff_ord_fm,4," ");
> omniout_float(ALWAYS,"Derivative of radius w.r.t (n-1)th term ",4,glob_diff_rc_fmm1,4," ");
> omniout_float(ALWAYS,"Derivative of order w.r.t (n-1)th term ",4,glob_diff_ord_fmm1,4," ");
> omniout_float(ALWAYS,"Derivative of radius w.r.t (n-2)th term ",4,glob_diff_rc_fmm2,4," ");
> omniout_float(ALWAYS,"Derivative of order w.r.t (n-2)th term ",4,glob_diff_ord_fmm2,4," ");
> omniout_str(ALWAYS,"Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).");
> omniout_float(ALWAYS,"Guess error in radius ",4,glob_guess_error_rc,4," ");
> omniout_float(ALWAYS,"Guess error in order ",4,glob_guess_error_ord,4," ");
> else
> omniout_str(ALWAYS,"NO REAL POLE (three term test) for Equation 2");
> fi;# end if 3;
> if ((array_complex_poles[2,1] > 0.0) and (array_complex_poles[2,1] <> glob_large_float)) then # if number 3
> omniout_float(ALWAYS,"Radius of convergence (six term test) for eq 2 ",4, array_complex_poles[2,1],4," ");
> omniout_float(ALWAYS,"Order of pole (six term test) ",4, array_complex_poles[2,2],4," ");
> else
> omniout_str(ALWAYS,"NO COMPLEX POLE (six term test) for Equation 2");
> fi;# end if 3
> ;
> end;
display_poles := proc()
local rad_given;
global ALWAYS, glob_display_flag, glob_large_float, array_pole,
glob_diff_ord_fm, glob_diff_ord_fmm1, glob_diff_ord_fmm2, glob_diff_rc_fm,
glob_diff_rc_fmm1, glob_diff_rc_fmm2, glob_guess_error_ord,
glob_guess_error_rc, 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_float(ALWAYS,
"Order of pole (ratio test) ", 4,
array_poles[1, 2], 4, " ")
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, " ");
omniout_float(ALWAYS,
"Derivative of radius w.r.t nth term ", 4,
glob_diff_rc_fm, 4, " ");
omniout_float(ALWAYS,
"Derivative of order w.r.t nth term ", 4,
glob_diff_ord_fm, 4, " ");
omniout_float(ALWAYS,
"Derivative of radius w.r.t (n-1)th term ", 4,
glob_diff_rc_fmm1, 4, " ");
omniout_float(ALWAYS,
"Derivative of order w.r.t (n-1)th term ", 4,
glob_diff_ord_fmm1, 4, " ");
omniout_float(ALWAYS,
"Derivative of radius w.r.t (n-2)th term ", 4,
glob_diff_rc_fmm2, 4, " ");
omniout_float(ALWAYS,
"Derivative of order w.r.t (n-2)th term ", 4,
glob_diff_ord_fmm2, 4, " ");
omniout_str(ALWAYS, "Guess at Error should be multiplied by ratio\
of error in relevant terms (I used value of term instead of\
error in term).");
omniout_float(ALWAYS,
"Guess error in radius ", 4,
glob_guess_error_rc, 4, " ");
omniout_float(ALWAYS,
"Guess error in order ", 4,
glob_guess_error_ord, 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;
if glob_type_given_pole = 4 then
rad_given := sqrt(
expt(array_x[1] - array_given_rad_poles[2, 1], 2.0)
+ expt(array_given_rad_poles[2, 2], 2.0));
omniout_float(ALWAYS,
"Radius of convergence (given) for eq 2 ", 4,
rad_given, 4, " ");
omniout_float(ALWAYS,
"Order of pole (given) ", 4,
array_given_ord_poles[2, 1], 4, " ")
elif glob_type_given_pole = 3 then
omniout_str(ALWAYS, "NO POLE (given) for Equation 2")
else omniout_str(ALWAYS, "NO INFO (given) for Equation 2")
end if;
if array_poles[2, 1] <> glob_large_float then
omniout_float(ALWAYS,
"Radius of convergence (ratio test) for eq 2 ", 4,
array_poles[2, 1], 4, " ");
omniout_float(ALWAYS,
"Order of pole (ratio test) ", 4,
array_poles[2, 2], 4, " ")
else omniout_str(ALWAYS, "NO POLE (ratio test) for Equation 2")
end if;
if 0. < array_real_poles[2, 1] and
array_real_poles[2, 1] <> glob_large_float then
omniout_float(ALWAYS,
"Radius of convergence (three term test) for eq 2 ", 4,
array_real_poles[2, 1], 4, " ");
omniout_float(ALWAYS,
"Order of pole (three term test) ", 4,
array_real_poles[2, 2], 4, " ");
omniout_float(ALWAYS,
"Derivative of radius w.r.t nth term ", 4,
glob_diff_rc_fm, 4, " ");
omniout_float(ALWAYS,
"Derivative of order w.r.t nth term ", 4,
glob_diff_ord_fm, 4, " ");
omniout_float(ALWAYS,
"Derivative of radius w.r.t (n-1)th term ", 4,
glob_diff_rc_fmm1, 4, " ");
omniout_float(ALWAYS,
"Derivative of order w.r.t (n-1)th term ", 4,
glob_diff_ord_fmm1, 4, " ");
omniout_float(ALWAYS,
"Derivative of radius w.r.t (n-2)th term ", 4,
glob_diff_rc_fmm2, 4, " ");
omniout_float(ALWAYS,
"Derivative of order w.r.t (n-2)th term ", 4,
glob_diff_ord_fmm2, 4, " ");
omniout_str(ALWAYS, "Guess at Error should be multiplied by ratio\
of error in relevant terms (I used value of term instead of\
error in term).");
omniout_float(ALWAYS,
"Guess error in radius ", 4,
glob_guess_error_rc, 4, " ");
omniout_float(ALWAYS,
"Guess error in order ", 4,
glob_guess_error_ord, 4, " ")
else omniout_str(ALWAYS,
"NO REAL POLE (three term test) for Equation 2")
end if;
if 0. < array_complex_poles[2, 1] and
array_complex_poles[2, 1] <> glob_large_float then
omniout_float(ALWAYS,
"Radius of convergence (six term test) for eq 2 ", 4,
array_complex_poles[2, 1], 4, " ");
omniout_float(ALWAYS,
"Order of pole (six term test) ", 4,
array_complex_poles[2, 2], 4, " ")
else omniout_str(ALWAYS,
"NO COMPLEX POLE (six term test) for Equation 2")
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 3
> ret := 1.0;
> else
> ret := -1.0;
> fi;# end if 3;
> 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_diff_rc_fm,
> glob_diff_rc_fmm1,
> glob_diff_rc_fmm2,
> glob_diff_ord_fm,
> glob_diff_ord_fmm1,
> glob_diff_ord_fmm2,
> glob_guess_error_rc,
> glob_guess_error_ord,
> 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_2,
> #END CONST
> array_y1_init,
> array_y2_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_y1,
> array_x,
> array_y2,
> array_tmp0,
> array_tmp1,
> array_tmp2,
> array_tmp3,
> array_tmp4,
> array_m1,
> array_y1_higher,
> array_y1_higher_work,
> array_y1_higher_work2,
> array_y1_set_initial,
> array_y2_higher,
> array_y2_higher_work,
> array_y2_higher_work2,
> array_y2_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_y1[1]) < min_size) then # if number 3
> min_size := omniabs(array_y1[1]);
> omniout_float(ALWAYS,"min_size",32,min_size,32,"");
> fi;# end if 3;
> if (omniabs(array_y2[1]) < min_size) then # if number 3
> min_size := omniabs(array_y2[1]);
> omniout_float(ALWAYS,"min_size",32,min_size,32,"");
> fi;# end if 3;
> if (min_size < 1.0) then # if number 3
> min_size := 1.0;
> omniout_float(ALWAYS,"min_size",32,min_size,32,"");
> fi;# end if 3;
> 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_diff_rc_fm, glob_diff_rc_fmm1, glob_diff_rc_fmm2, glob_diff_ord_fm,
glob_diff_ord_fmm1, glob_diff_ord_fmm2, glob_guess_error_rc,
glob_guess_error_ord, 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_2, array_y1_init, array_y2_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_y1, array_x, array_y2, array_tmp0,
array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_m1, array_y1_higher,
array_y1_higher_work, array_y1_higher_work2, array_y1_set_initial,
array_y2_higher, array_y2_higher_work, array_y2_higher_work2,
array_y2_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_y1[1]) < min_size then
min_size := omniabs(array_y1[1]);
omniout_float(ALWAYS, "min_size", 32, min_size, 32, "")
end if;
if omniabs(array_y2[1]) < min_size then
min_size := omniabs(array_y2[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_diff_rc_fm,
> glob_diff_rc_fmm1,
> glob_diff_rc_fmm2,
> glob_diff_ord_fm,
> glob_diff_ord_fmm1,
> glob_diff_ord_fmm2,
> glob_guess_error_rc,
> glob_guess_error_ord,
> 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_2,
> #END CONST
> array_y1_init,
> array_y2_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_y1,
> array_x,
> array_y2,
> array_tmp0,
> array_tmp1,
> array_tmp2,
> array_tmp3,
> array_tmp4,
> array_m1,
> array_y1_higher,
> array_y1_higher_work,
> array_y1_higher_work2,
> array_y1_set_initial,
> array_y2_higher,
> array_y2_higher_work,
> array_y2_higher_work2,
> array_y2_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_y1[no_terms-3] + array_y1[no_terms - 2] * hn_div_ho + array_y1[no_terms - 1] * hn_div_ho_2 + array_y1[no_terms] * hn_div_ho_3);
> if (est_tmp >= max_estimated_step_error) then # if number 3
> max_estimated_step_error := est_tmp;
> fi;# end if 3;
> est_tmp := omniabs(array_y2[no_terms-3] + array_y2[no_terms - 2] * hn_div_ho + array_y2[no_terms - 1] * hn_div_ho_2 + array_y2[no_terms] * hn_div_ho_3);
> if (est_tmp >= max_estimated_step_error) then # if number 3
> max_estimated_step_error := est_tmp;
> fi;# end if 3;
> 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_diff_rc_fm, glob_diff_rc_fmm1, glob_diff_rc_fmm2, glob_diff_ord_fm,
glob_diff_ord_fmm1, glob_diff_ord_fmm2, glob_guess_error_rc,
glob_guess_error_ord, 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_2, array_y1_init, array_y2_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_y1, array_x, array_y2, array_tmp0,
array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_m1, array_y1_higher,
array_y1_higher_work, array_y1_higher_work2, array_y1_set_initial,
array_y2_higher, array_y2_higher_work, array_y2_higher_work2,
array_y2_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_y1[no_terms - 3]
+ array_y1[no_terms - 2]*hn_div_ho
+ array_y1[no_terms - 1]*hn_div_ho_2
+ array_y1[no_terms]*hn_div_ho_3);
if max_estimated_step_error <= est_tmp then
max_estimated_step_error := est_tmp
end if;
est_tmp := omniabs(array_y2[no_terms - 3]
+ array_y2[no_terms - 2]*hn_div_ho
+ array_y2[no_terms - 1]*hn_div_ho_2
+ array_y2[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_diff_rc_fm,
> glob_diff_rc_fmm1,
> glob_diff_rc_fmm2,
> glob_diff_ord_fm,
> glob_diff_ord_fmm1,
> glob_diff_ord_fmm2,
> glob_guess_error_rc,
> glob_guess_error_ord,
> 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_2,
> #END CONST
> array_y1_init,
> array_y2_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_y1,
> array_x,
> array_y2,
> array_tmp0,
> array_tmp1,
> array_tmp2,
> array_tmp3,
> array_tmp4,
> array_m1,
> array_y1_higher,
> array_y1_higher_work,
> array_y1_higher_work2,
> array_y1_set_initial,
> array_y2_higher,
> array_y2_higher_work,
> array_y2_higher_work2,
> array_y2_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 3
> ret := true;
> else
> ret := false;
> fi;# end if 3;
> 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_diff_rc_fm, glob_diff_rc_fmm1, glob_diff_rc_fmm2, glob_diff_ord_fm,
glob_diff_ord_fmm1, glob_diff_ord_fmm2, glob_guess_error_rc,
glob_guess_error_ord, 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_2, array_y1_init, array_y2_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_y1, array_x, array_y2, array_tmp0,
array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_m1, array_y1_higher,
array_y1_higher_work, array_y1_higher_work2, array_y1_set_initial,
array_y2_higher, array_y2_higher_work, array_y2_higher_work2,
array_y2_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_diff_rc_fm,
> glob_diff_rc_fmm1,
> glob_diff_rc_fmm2,
> glob_diff_ord_fm,
> glob_diff_ord_fmm1,
> glob_diff_ord_fmm2,
> glob_guess_error_rc,
> glob_guess_error_ord,
> 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_2,
> #END CONST
> array_y1_init,
> array_y2_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_y1,
> array_x,
> array_y2,
> array_tmp0,
> array_tmp1,
> array_tmp2,
> array_tmp3,
> array_tmp4,
> array_m1,
> array_y1_higher,
> array_y1_higher_work,
> array_y1_higher_work2,
> array_y1_set_initial,
> array_y2_higher,
> array_y2_higher_work,
> array_y2_higher_work2,
> array_y2_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 3
> if (iter >= 0) then # if number 4
> ind_var := array_x[1];
> omniout_float(ALWAYS,"x[1] ",33,ind_var,20," ");
> analytic_val_y := exact_soln_y1(ind_var);
> omniout_float(ALWAYS,"y1[1] (analytic) ",33,analytic_val_y,20," ");
> term_no := 1;
> numeric_val := array_y1[term_no];
> abserr := omniabs(numeric_val - analytic_val_y);
> omniout_float(ALWAYS,"y1[1] (numeric) ",33,numeric_val,20," ");
> if (omniabs(analytic_val_y) <> 0.0) then # if number 5
> relerr := abserr*100.0/omniabs(analytic_val_y);
> if (relerr > 0.0000000000000000000000000000000001) then # if number 6
> glob_good_digits := -trunc(log10(relerr)) + 3;
> else
> glob_good_digits := Digits;
> fi;# end if 6;
> else
> relerr := -1.0 ;
> glob_good_digits := -1;
> fi;# end if 5;
> if (glob_iter = 1) then # if number 5
> array_1st_rel_error[1] := relerr;
> else
> array_last_rel_error[1] := relerr;
> fi;# end if 5;
> 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," ");
> ;
> analytic_val_y := exact_soln_y2(ind_var);
> omniout_float(ALWAYS,"y2[1] (analytic) ",33,analytic_val_y,20," ");
> term_no := 1;
> numeric_val := array_y2[term_no];
> abserr := omniabs(numeric_val - analytic_val_y);
> omniout_float(ALWAYS,"y2[1] (numeric) ",33,numeric_val,20," ");
> if (omniabs(analytic_val_y) <> 0.0) then # if number 5
> relerr := abserr*100.0/omniabs(analytic_val_y);
> if (relerr > 0.0000000000000000000000000000000001) then # if number 6
> glob_good_digits := -trunc(log10(relerr)) + 3;
> else
> glob_good_digits := Digits;
> fi;# end if 6;
> else
> relerr := -1.0 ;
> glob_good_digits := -1;
> fi;# end if 5;
> if (glob_iter = 1) then # if number 5
> array_1st_rel_error[2] := relerr;
> else
> array_last_rel_error[2] := relerr;
> fi;# end if 5;
> 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 4;
> #BOTTOM DISPLAY ALOT
> fi;# end if 3;
> 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_diff_rc_fm, glob_diff_rc_fmm1, glob_diff_rc_fmm2, glob_diff_ord_fm,
glob_diff_ord_fmm1, glob_diff_ord_fmm2, glob_guess_error_rc,
glob_guess_error_ord, 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_2, array_y1_init, array_y2_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_y1, array_x, array_y2, array_tmp0,
array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_m1, array_y1_higher,
array_y1_higher_work, array_y1_higher_work2, array_y1_set_initial,
array_y2_higher, array_y2_higher_work, array_y2_higher_work2,
array_y2_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_y1(ind_var);
omniout_float(ALWAYS, "y1[1] (analytic) ", 33,
analytic_val_y, 20, " ");
term_no := 1;
numeric_val := array_y1[term_no];
abserr := omniabs(numeric_val - analytic_val_y);
omniout_float(ALWAYS, "y1[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, " ");
analytic_val_y := exact_soln_y2(ind_var);
omniout_float(ALWAYS, "y2[1] (analytic) ", 33,
analytic_val_y, 20, " ");
term_no := 1;
numeric_val := array_y2[term_no];
abserr := omniabs(numeric_val - analytic_val_y);
omniout_float(ALWAYS, "y2[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[2] := relerr
else array_last_rel_error[2] := 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_diff_rc_fm,
> glob_diff_rc_fmm1,
> glob_diff_rc_fmm2,
> glob_diff_ord_fm,
> glob_diff_ord_fmm1,
> glob_diff_ord_fmm2,
> glob_guess_error_rc,
> glob_guess_error_ord,
> 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_2,
> #END CONST
> array_y1_init,
> array_y2_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_y1,
> array_x,
> array_y2,
> array_tmp0,
> array_tmp1,
> array_tmp2,
> array_tmp3,
> array_tmp4,
> array_m1,
> array_y1_higher,
> array_y1_higher_work,
> array_y1_higher_work2,
> array_y1_set_initial,
> array_y2_higher,
> array_y2_higher_work,
> array_y2_higher_work2,
> array_y2_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_y1_higher[1,1]) > glob_small_float) then # if number 3
> tmp := omniabs(array_y1_higher[1,1]);
> if (tmp < glob_normmax) then # if number 4
> glob_normmax := tmp;
> fi;# end if 4
> fi;# end if 3;
> if (omniabs(array_y2_higher[1,1]) > glob_small_float) then # if number 3
> tmp := omniabs(array_y2_higher[1,1]);
> if (tmp < glob_normmax) then # if number 4
> glob_normmax := tmp;
> fi;# end if 4
> fi;# end if 3;
> if (glob_look_poles and (omniabs(array_pole[1]) > glob_small_float) and (array_pole[1] <> glob_large_float)) then # if number 3
> sz2 := array_pole[1]/10.0;
> if (sz2 < hnew) then # if number 4
> omniout_float(INFO,"glob_h adjusted to ",20,h_param,12,"due to singularity.");
> omniout_str(INFO,"Reached Optimal");
> return(hnew);
> fi;# end if 4
> fi;# end if 3;
> if ( not glob_reached_optimal_h) then # if number 3
> 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 3;
> 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_diff_rc_fm, glob_diff_rc_fmm1, glob_diff_rc_fmm2, glob_diff_ord_fm,
glob_diff_ord_fmm1, glob_diff_ord_fmm2, glob_guess_error_rc,
glob_guess_error_ord, 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_2, array_y1_init, array_y2_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_y1, array_x, array_y2, array_tmp0,
array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_m1, array_y1_higher,
array_y1_higher_work, array_y1_higher_work2, array_y1_set_initial,
array_y2_higher, array_y2_higher_work, array_y2_higher_work2,
array_y2_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_y1_higher[1, 1]) then
tmp := omniabs(array_y1_higher[1, 1]);
if tmp < glob_normmax then glob_normmax := tmp end if
end if;
if glob_small_float < omniabs(array_y2_higher[1, 1]) then
tmp := omniabs(array_y2_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_diff_rc_fm,
> glob_diff_rc_fmm1,
> glob_diff_rc_fmm2,
> glob_diff_ord_fm,
> glob_diff_ord_fmm1,
> glob_diff_ord_fmm2,
> glob_guess_error_rc,
> glob_guess_error_ord,
> 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_2,
> #END CONST
> array_y1_init,
> array_y2_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_y1,
> array_x,
> array_y2,
> array_tmp0,
> array_tmp1,
> array_tmp2,
> array_tmp3,
> array_tmp4,
> array_m1,
> array_y1_higher,
> array_y1_higher_work,
> array_y1_higher_work2,
> array_y1_set_initial,
> array_y2_higher,
> array_y2_higher_work,
> array_y2_higher_work2,
> array_y2_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 3
> 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 3;
> 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_diff_rc_fm, glob_diff_rc_fmm1, glob_diff_rc_fmm2, glob_diff_ord_fm,
glob_diff_ord_fmm1, glob_diff_ord_fmm2, glob_guess_error_rc,
glob_guess_error_ord, 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_2, array_y1_init, array_y2_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_y1, array_x, array_y2, array_tmp0,
array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_m1, array_y1_higher,
array_y1_higher_work, array_y1_higher_work2, array_y1_set_initial,
array_y2_higher, array_y2_higher_work, array_y2_higher_work2,
array_y2_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_diff_rc_fm,
> glob_diff_rc_fmm1,
> glob_diff_rc_fmm2,
> glob_diff_ord_fm,
> glob_diff_ord_fmm1,
> glob_diff_ord_fmm2,
> glob_guess_error_rc,
> glob_guess_error_ord,
> 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_2,
> #END CONST
> array_y1_init,
> array_y2_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_y1,
> array_x,
> array_y2,
> array_tmp0,
> array_tmp1,
> array_tmp2,
> array_tmp3,
> array_tmp4,
> array_m1,
> array_y1_higher,
> array_y1_higher_work,
> array_y1_higher_work2,
> array_y1_set_initial,
> array_y2_higher,
> array_y2_higher_work,
> array_y2_higher_work2,
> array_y2_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, term1, term2, term3, part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, rad_c, rcs, rm0, rm1, rm2, rm3, rm4, found_sing, h_new, ratio, term, local_test, tmp_rad,tmp_ord, 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_y1_higher[1,n]) = 0.0) or (omniabs(array_y1_higher[1,n+1]) = 0.0)) then # if number 3
> found_sing := 0;
> else
> tmp_rad := omniabs(array_y1_higher[1,n] * glob_h / array_y1_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 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
> if (tmp_rad < rad_c) then # if number 6
> rad_c := tmp_rad;
> fi;# end if 6;
> elif
> (cnt > 0) then # if number 6
> found_sing := 0;
> fi;# end if 6
> fi;# end if 5;
> prev_tmp_rad := tmp_rad;;
> cnt := cnt + 1;
> n := n + 1;
> od;# end do number 1;
> if (found_sing = 1) then # if number 5
> if (rad_c < array_pole[1]) then # if number 6
> array_pole[1] := rad_c;
> array_poles[1,1] := rad_c;
> tmp_ord := 1.0 + (ln(omniabs(array_y1_higher[1,n+1 ])/expt(omniabs(glob_h),n)) + n * rad_c) / ln(n);
> array_pole[2] := tmp_ord;
> array_poles[1,2] := tmp_ord;
> fi;# end if 6;
> fi;# end if 5;
> #BOTTOM radius ratio test in Henrici1
> tmp_rad := glob_large_float;
> prev_tmp_rad := glob_large_float;
> tmp_ratio := glob_large_float;
> rad_c := glob_large_float;
> array_poles[2,1] := glob_large_float;
> array_poles[2,2] := glob_large_float;
> #TOP radius ratio test in Henrici2
> found_sing := 1;
> n := glob_max_terms - 2 - 10;
> cnt := 0;
> while ((cnt < 5) and (found_sing = 1)) do # do number 1
> if ((omniabs(array_y2_higher[1,n]) = 0.0) or (omniabs(array_y2_higher[1,n+1]) = 0.0)) then # if number 5
> found_sing := 0;
> else
> tmp_rad := omniabs(array_y2_higher[1,n] * glob_h / array_y2_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 6
> if (tmp_rad < rad_c) then # if number 7
> rad_c := tmp_rad;
> fi;# end if 7;
> elif
> (cnt = 0) then # if number 7
> if (tmp_rad < rad_c) then # if number 8
> rad_c := tmp_rad;
> fi;# end if 8;
> elif
> (cnt > 0) then # if number 8
> found_sing := 0;
> fi;# end if 8
> fi;# end if 7;
> prev_tmp_rad := tmp_rad;;
> cnt := cnt + 1;
> n := n + 1;
> od;# end do number 1;
> if (found_sing = 1) then # if number 7
> if (rad_c < array_pole[1]) then # if number 8
> array_pole[1] := rad_c;
> array_poles[2,1] := rad_c;
> tmp_ord := 1.0 + (ln(omniabs(array_y2_higher[1,n+1 ])/expt(omniabs(glob_h),n)) + n * rad_c) / ln(n);
> array_pole[2] := tmp_ord;
> array_poles[2,2] := tmp_ord;
> fi;# end if 8;
> fi;# end if 7;
> #BOTTOM radius ratio test in Henrici2
> #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_y1_higher[1,m]) = 0.0) or (omniabs(array_y1_higher[1,m-1]) = 0.0) or (omniabs(array_y1_higher[1,m-2]) = 0.0))) do # do number 1
> m := m - 1;
> od;# end do number 1;
> if (m > 10) then # if number 7
> term1 := convfloat(2) * array_y1_higher[1,m-1] * array_y1_higher[1,m-1] + convfloat(m) * array_y1_higher[1,m-2] * array_y1_higher[1,m] - convfloat(m) * array_y1_higher[1,m-1] * array_y1_higher[1,m-1] - array_y1_higher[1,m] * array_y1_higher[1,m-2];
> term2 := glob_h * array_y1_higher[1,m-1] * array_y1_higher[1,m-2];
> term3 := array_y1_higher[1,m-2] * array_y1_higher[1,m] + convfloat(4 * m) * array_y1_higher[1,m-1] * array_y1_higher[1,m-1] + convfloat(m*m) * array_y1_higher[1,m-2] * array_y1_higher[1,m] - convfloat(2*m) * array_y1_higher[1,m-2] * array_y1_higher[1,m] - convfloat(4) * array_y1_higher[1,m-1] * array_y1_higher[1,m-1] - convfloat(m*m) * array_y1_higher[1,m-1] * array_y1_higher[1,m-1];
> rcs := term2/term1;
> ord_no := term3/term1;
> if (rcs > 0.0) then # if number 8
> part1 := (-array_y1_higher[1,m-1] * array_y1_higher[1,m-1] * convfloat(m) + 2.0 * array_y1_higher[1,m-1] * array_y1_higher[1,m-1] + array_y1_higher[1,m-2] * array_y1_higher[1,m] * convfloat(m) - array_y1_higher[1,m-2] * array_y1_higher[1,m]);
> part2 := part1 * part1;
> part3 := (array_y1_higher[1,m-1] * glob_h * array_y1_higher[1,m-2] * (array_y1_higher[1,m-2] * convfloat(m) - array_y1_higher[1,m-2]));
> part4 := -2.0 * array_y1_higher[1,m-2] * convfloat(m) + array_y1_higher[1,m-2] + array_y1_higher[1,m-2] * convfloat(m*m);
> part5 := (-2.0 * array_y1_higher[1,m-2] * array_y1_higher[1,m] * convfloat(m) + array_y1_higher[1,m-2] * array_y1_higher[1,m] - array_y1_higher[1,m-1] * array_y1_higher[1,m-1]* convfloat(m * m) + 4.0 * array_y1_higher[1,m-1] * array_y1_higher[1,m-1] * convfloat(m) + array_y1_higher[1,m-2] * array_y1_higher[1,m] * convfloat(m * m) - 4.0 * array_y1_higher[1,m-1] * array_y1_higher[1,m-1]) * (array_y1_higher[1,m-2] * convfloat(m) - array_y1_higher[1,m-2]);
> part6 := 2.0 * array_y1_higher[1,m-1] * convfloat(m * m )- 8.0 * convfloat(m) * array_y1_higher[1,m-1] + 8.0 * array_y1_higher[1,m-1];
> part7 := (-2.0 * array_y1_higher[1,m-2] * array_y1_higher[1,m] * convfloat(m) + array_y1_higher[1,m-1] * array_y1_higher[1,m-1] * convfloat(m * m) - array_y1_higher[1,m-1] * array_y1_higher[1,m-1] * convfloat(4 * m) - array_y1_higher[1,m-2] * array_y1_higher[1,m] * convfloat(m * m) + array_y1_higher[1,m-1] * array_y1_higher[1,m-1] * convfloat(4));
> part8 := 2.0 * array_y1_higher[1,m-1] * convfloat(m) - 4.0 * array_y1_higher[1,m-1];
> part9 := glob_h * array_y1_higher[1,m-2];
> part10 := glob_h * array_y1_higher[1,m-1] * array_y1_higher[1,m-2] * ( convfloat(2 * m) *array_y1_higher[1,m-1] - 4.0 * array_y1_higher[1,m-1]);
> part11 := 2.0 * array_y1_higher[1,m] * convfloat(m) - array_y1_higher[1,m] - array_y1_higher[1,m] * convfloat(m * m);
> part12 := (2.0 * array_y1_higher[1,m-2] * array_y1_higher[1,m] * convfloat(m) - array_y1_higher[1,m-2] * array_y1_higher[1,m] * convfloat(m * m) * array_y1_higher[1,m-1] * array_y1_higher[1,m-1] - convfloat(4 * m) - array_y1_higher[1,m-1] * array_y1_higher[1,m-1] - convfloat(m * m) + array_y1_higher[1,m-2] * array_y1_higher[1,m] + 4.0 * array_y1_higher[1,m-1] * array_y1_higher[1,m-1]) * ( - array_y1_higher[1,m] * convfloat(m)+ array_y1_higher[1,m]);
> part13 := glob_h * array_y1_higher[1,m-1];
> part14 := glob_h * array_y1_higher[1,m-1] * array_y1_higher[1,m-2] * ( convfloat(-m) * array_y1_higher[1,m] + array_y1_higher[1,m]);
> glob_diff_rc_fm := part3/part2;
> glob_diff_ord_fm := part4/part1 - part5/part2;
> glob_diff_rc_fmm1 := part9/part1 + part10/part2;
> glob_diff_ord_fmm1 := part6/part1 - part7*part8/part2;
> glob_diff_rc_fmm2 := part13/part1 + part14/part2;
> glob_diff_ord_fmm2 := part11/part1 - part12/part2;
> glob_guess_error_rc := glob_diff_rc_fm * array_y1_higher[1,m] + glob_diff_rc_fmm1 * array_y1_higher[1,m-1] + glob_diff_rc_fmm2 * array_y1_higher[1,m-2];
> glob_guess_error_ord := glob_diff_ord_fm * array_y1_higher[1,m] + glob_diff_ord_fm * array_y1_higher[1,m] + glob_diff_ord_fm * array_y1_higher[1,m];
> 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 8
> else
> array_real_poles[1,1] := glob_large_float;
> array_real_poles[1,2] := glob_large_float;
> fi;# end if 7;
> #BOTTOM RADII REAL EQ = 1
> #IN RADII REAL EQ = 2
> #Computes radius of convergence and r_order of pole from 3 adjacent Taylor series terms. EQUATUON NUMBER 2
> #Applies to pole of arbitrary r_order on the real axis,
> #Due to Prof. George Corliss.
> n := glob_max_terms;
> m := n - 2 - 1;
> while ((m >= 10) and ((omniabs(array_y2_higher[1,m]) = 0.0) or (omniabs(array_y2_higher[1,m-1]) = 0.0) or (omniabs(array_y2_higher[1,m-2]) = 0.0))) do # do number 1
> m := m - 1;
> od;# end do number 1;
> if (m > 10) then # if number 7
> term1 := convfloat(2) * array_y2_higher[1,m-1] * array_y2_higher[1,m-1] + convfloat(m) * array_y2_higher[1,m-2] * array_y2_higher[1,m] - convfloat(m) * array_y2_higher[1,m-1] * array_y2_higher[1,m-1] - array_y2_higher[1,m] * array_y2_higher[1,m-2];
> term2 := glob_h * array_y2_higher[1,m-1] * array_y2_higher[1,m-2];
> term3 := array_y2_higher[1,m-2] * array_y2_higher[1,m] + convfloat(4 * m) * array_y2_higher[1,m-1] * array_y2_higher[1,m-1] + convfloat(m*m) * array_y2_higher[1,m-2] * array_y2_higher[1,m] - convfloat(2*m) * array_y2_higher[1,m-2] * array_y2_higher[1,m] - convfloat(4) * array_y2_higher[1,m-1] * array_y2_higher[1,m-1] - convfloat(m*m) * array_y2_higher[1,m-1] * array_y2_higher[1,m-1];
> rcs := term2/term1;
> ord_no := term3/term1;
> if (rcs > 0.0) then # if number 8
> part1 := (-array_y2_higher[1,m-1] * array_y2_higher[1,m-1] * convfloat(m) + 2.0 * array_y2_higher[1,m-1] * array_y2_higher[1,m-1] + array_y2_higher[1,m-2] * array_y2_higher[1,m] * convfloat(m) - array_y2_higher[1,m-2] * array_y2_higher[1,m]);
> part2 := part1 * part1;
> part3 := (array_y2_higher[1,m-1] * glob_h * array_y2_higher[1,m-2] * (array_y2_higher[1,m-2] * convfloat(m) - array_y2_higher[1,m-2]));
> part4 := -2.0 * array_y2_higher[1,m-2] * convfloat(m) + array_y2_higher[1,m-2] + array_y2_higher[1,m-2] * convfloat(m*m);
> part5 := (-2.0 * array_y2_higher[1,m-2] * array_y2_higher[1,m] * convfloat(m) + array_y2_higher[1,m-2] * array_y2_higher[1,m] - array_y2_higher[1,m-1] * array_y2_higher[1,m-1]* convfloat(m * m) + 4.0 * array_y2_higher[1,m-1] * array_y2_higher[1,m-1] * convfloat(m) + array_y2_higher[1,m-2] * array_y2_higher[1,m] * convfloat(m * m) - 4.0 * array_y2_higher[1,m-1] * array_y2_higher[1,m-1]) * (array_y2_higher[1,m-2] * convfloat(m) - array_y2_higher[1,m-2]);
> part6 := 2.0 * array_y2_higher[1,m-1] * convfloat(m * m )- 8.0 * convfloat(m) * array_y2_higher[1,m-1] + 8.0 * array_y2_higher[1,m-1];
> part7 := (-2.0 * array_y2_higher[1,m-2] * array_y2_higher[1,m] * convfloat(m) + array_y2_higher[1,m-1] * array_y2_higher[1,m-1] * convfloat(m * m) - array_y2_higher[1,m-1] * array_y2_higher[1,m-1] * convfloat(4 * m) - array_y2_higher[1,m-2] * array_y2_higher[1,m] * convfloat(m * m) + array_y2_higher[1,m-1] * array_y2_higher[1,m-1] * convfloat(4));
> part8 := 2.0 * array_y2_higher[1,m-1] * convfloat(m) - 4.0 * array_y2_higher[1,m-1];
> part9 := glob_h * array_y2_higher[1,m-2];
> part10 := glob_h * array_y2_higher[1,m-1] * array_y2_higher[1,m-2] * ( convfloat(2 * m) *array_y2_higher[1,m-1] - 4.0 * array_y2_higher[1,m-1]);
> part11 := 2.0 * array_y2_higher[1,m] * convfloat(m) - array_y2_higher[1,m] - array_y2_higher[1,m] * convfloat(m * m);
> part12 := (2.0 * array_y2_higher[1,m-2] * array_y2_higher[1,m] * convfloat(m) - array_y2_higher[1,m-2] * array_y2_higher[1,m] * convfloat(m * m) * array_y2_higher[1,m-1] * array_y2_higher[1,m-1] - convfloat(4 * m) - array_y2_higher[1,m-1] * array_y2_higher[1,m-1] - convfloat(m * m) + array_y2_higher[1,m-2] * array_y2_higher[1,m] + 4.0 * array_y2_higher[1,m-1] * array_y2_higher[1,m-1]) * ( - array_y2_higher[1,m] * convfloat(m)+ array_y2_higher[1,m]);
> part13 := glob_h * array_y2_higher[1,m-1];
> part14 := glob_h * array_y2_higher[1,m-1] * array_y2_higher[1,m-2] * ( convfloat(-m) * array_y2_higher[1,m] + array_y2_higher[1,m]);
> glob_diff_rc_fm := part3/part2;
> glob_diff_ord_fm := part4/part1 - part5/part2;
> glob_diff_rc_fmm1 := part9/part1 + part10/part2;
> glob_diff_ord_fmm1 := part6/part1 - part7*part8/part2;
> glob_diff_rc_fmm2 := part13/part1 + part14/part2;
> glob_diff_ord_fmm2 := part11/part1 - part12/part2;
> glob_guess_error_rc := glob_diff_rc_fm * array_y2_higher[1,m] + glob_diff_rc_fmm1 * array_y2_higher[1,m-1] + glob_diff_rc_fmm2 * array_y2_higher[1,m-2];
> glob_guess_error_ord := glob_diff_ord_fm * array_y2_higher[1,m] + glob_diff_ord_fm * array_y2_higher[1,m] + glob_diff_ord_fm * array_y2_higher[1,m];
> array_real_poles[2,1] := rcs;
> array_real_poles[2,2] := ord_no;
> else
> array_real_poles[2,1] := glob_large_float;
> array_real_poles[2,2] := glob_large_float;
> fi;# end if 8
> else
> array_real_poles[2,1] := glob_large_float;
> array_real_poles[2,2] := glob_large_float;
> fi;# end if 7;
> #BOTTOM RADII REAL EQ = 2
> #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_y1_higher[1,n]) <> 0.0) then # if number 7
> cnt := cnt + 1;
> else
> cnt := 0;
> fi;# end if 7;
> n := n - 1;
> od;# end do number 1;
> m := n + cnt;
> if (m <= 10) then # if number 7
> rad_c := glob_large_float;
> ord_no := glob_large_float;
> else
> rm0 := (array_y1_higher[1,m])/(array_y1_higher[1,m-1]);
> rm1 := (array_y1_higher[1,m-1])/(array_y1_higher[1,m-2]);
> rm2 := (array_y1_higher[1,m-2])/(array_y1_higher[1,m-3]);
> rm3 := (array_y1_higher[1,m-3])/(array_y1_higher[1,m-4]);
> rm4 := (array_y1_higher[1,m-4])/(array_y1_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 8
> rad_c := glob_large_float;
> ord_no := glob_large_float;
> else
> if (omniabs(nr1*dr2 - nr2 * dr1) <> 0.0) then # if number 9
> 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 10
> if (rcs > 0.0) then # if number 11
> rad_c := sqrt(rcs) * omniabs(glob_h);
> else
> rad_c := glob_large_float;
> fi;# end if 11
> else
> rad_c := glob_large_float;
> ord_no := glob_large_float;
> fi;# end if 10
> else
> rad_c := glob_large_float;
> ord_no := glob_large_float;
> fi;# end if 9
> fi;# end if 8;
> array_complex_poles[1,1] := rad_c;
> array_complex_poles[1,2] := ord_no;
> fi;# end if 7;
> #BOTTOM RADII COMPLEX EQ = 1
> #TOP RADII COMPLEX EQ = 2
> #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 - 2 - 1;
> cnt := 0;
> while ((cnt < 5) and (n >= 10)) do # do number 1
> if (omniabs(array_y2_higher[1,n]) <> 0.0) then # if number 7
> cnt := cnt + 1;
> else
> cnt := 0;
> fi;# end if 7;
> n := n - 1;
> od;# end do number 1;
> m := n + cnt;
> if (m <= 10) then # if number 7
> rad_c := glob_large_float;
> ord_no := glob_large_float;
> else
> rm0 := (array_y2_higher[1,m])/(array_y2_higher[1,m-1]);
> rm1 := (array_y2_higher[1,m-1])/(array_y2_higher[1,m-2]);
> rm2 := (array_y2_higher[1,m-2])/(array_y2_higher[1,m-3]);
> rm3 := (array_y2_higher[1,m-3])/(array_y2_higher[1,m-4]);
> rm4 := (array_y2_higher[1,m-4])/(array_y2_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 8
> rad_c := glob_large_float;
> ord_no := glob_large_float;
> else
> if (omniabs(nr1*dr2 - nr2 * dr1) <> 0.0) then # if number 9
> 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 10
> if (rcs > 0.0) then # if number 11
> rad_c := sqrt(rcs) * omniabs(glob_h);
> else
> rad_c := glob_large_float;
> fi;# end if 11
> else
> rad_c := glob_large_float;
> ord_no := glob_large_float;
> fi;# end if 10
> else
> rad_c := glob_large_float;
> ord_no := glob_large_float;
> fi;# end if 9
> fi;# end if 8;
> array_complex_poles[2,1] := rad_c;
> array_complex_poles[2,2] := ord_no;
> fi;# end if 7;
> #BOTTOM RADII COMPLEX EQ = 2
> #START ADJUST ALL SERIES
> if (array_pole[1] * glob_ratio_of_radius < omniabs(glob_h)) then # if number 7
> h_new := array_pole[1] * glob_ratio_of_radius;
> term := 1;
> ratio := 1.0;
> while (term <= glob_max_terms) do # do number 1
> array_y1[term] := array_y1[term]* ratio;
> array_y1_higher[1,term] := array_y1_higher[1,term]* ratio;
> array_x[term] := array_x[term]* ratio;
> array_y2[term] := array_y2[term]* ratio;
> array_y2_higher[1,term] := array_y2_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 7;
> #BOTTOM ADJUST ALL SERIES
> ;
> if (reached_interval()) then # if number 7
> display_poles();
> fi;# end if 7
> end;
check_for_pole := proc()
local cnt, dr1, dr2, ds1, ds2, hdrc, m, n, nr1, nr2, ord_no, term1, term2,
term3, part1, part2, part3, part4, part5, part6, part7, part8, part9,
part10, part11, part12, part13, part14, rad_c, rcs, rm0, rm1, rm2, rm3, rm4,
found_sing, h_new, ratio, term, local_test, tmp_rad, tmp_ord, 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_diff_rc_fm, glob_diff_rc_fmm1, glob_diff_rc_fmm2, glob_diff_ord_fm,
glob_diff_ord_fmm1, glob_diff_ord_fmm2, glob_guess_error_rc,
glob_guess_error_ord, 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_2, array_y1_init, array_y2_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_y1, array_x, array_y2, array_tmp0,
array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_m1, array_y1_higher,
array_y1_higher_work, array_y1_higher_work2, array_y1_set_initial,
array_y2_higher, array_y2_higher_work, array_y2_higher_work2,
array_y2_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_y1_higher[1, n]) = 0. or
omniabs(array_y1_higher[1, n + 1]) = 0. then found_sing := 0
else
tmp_rad := omniabs(
array_y1_higher[1, n]*glob_h/array_y1_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;
tmp_ord := 1.0 + (ln(
omniabs(array_y1_higher[1, n + 1])/expt(omniabs(glob_h), n))
+ n*rad_c)/ln(n);
array_pole[2] := tmp_ord;
array_poles[1, 2] := tmp_ord
end if
end if;
tmp_rad := glob_large_float;
prev_tmp_rad := glob_large_float;
tmp_ratio := glob_large_float;
rad_c := glob_large_float;
array_poles[2, 1] := glob_large_float;
array_poles[2, 2] := glob_large_float;
found_sing := 1;
n := glob_max_terms - 12;
cnt := 0;
while cnt < 5 and found_sing = 1 do
if omniabs(array_y2_higher[1, n]) = 0. or
omniabs(array_y2_higher[1, n + 1]) = 0. then found_sing := 0
else
tmp_rad := omniabs(
array_y2_higher[1, n]*glob_h/array_y2_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[2, 1] := rad_c;
tmp_ord := 1.0 + (ln(
omniabs(array_y2_higher[1, n + 1])/expt(omniabs(glob_h), n))
+ n*rad_c)/ln(n);
array_pole[2] := tmp_ord;
array_poles[2, 2] := tmp_ord
end if
end if;
n := glob_max_terms;
m := n - 2;
while 10 <= m and (omniabs(array_y1_higher[1, m]) = 0. or
omniabs(array_y1_higher[1, m - 1]) = 0. or
omniabs(array_y1_higher[1, m - 2]) = 0.) do m := m - 1
end do;
if 10 < m then
term1 := convfloat(2)*array_y1_higher[1, m - 1]*
array_y1_higher[1, m - 1]
+ convfloat(m)*array_y1_higher[1, m - 2]*array_y1_higher[1, m]
- convfloat(m)*array_y1_higher[1, m - 1]*
array_y1_higher[1, m - 1]
- array_y1_higher[1, m]*array_y1_higher[1, m - 2];
term2 := glob_h*array_y1_higher[1, m - 1]*array_y1_higher[1, m - 2]
;
term3 := array_y1_higher[1, m]*array_y1_higher[1, m - 2] +
convfloat(4*m)*array_y1_higher[1, m - 1]*
array_y1_higher[1, m - 1] +
convfloat(m*m)*array_y1_higher[1, m - 2]*array_y1_higher[1, m]
-
convfloat(2*m)*array_y1_higher[1, m - 2]*array_y1_higher[1, m]
- convfloat(4)*array_y1_higher[1, m - 1]*
array_y1_higher[1, m - 1] - convfloat(m*m)*
array_y1_higher[1, m - 1]*array_y1_higher[1, m - 1];
rcs := term2/term1;
ord_no := term3/term1;
if 0. < rcs then
part1 := -array_y1_higher[1, m - 1]*array_y1_higher[1, m - 1]*
convfloat(m)
+ 2.0*array_y1_higher[1, m - 1]*array_y1_higher[1, m - 1]
+ convfloat(m)*array_y1_higher[1, m - 2]*
array_y1_higher[1, m]
- array_y1_higher[1, m]*array_y1_higher[1, m - 2];
part2 := part1*part1;
part3 := array_y1_higher[1, m - 1]*glob_h*
array_y1_higher[1, m - 2]*(
array_y1_higher[1, m - 2]*convfloat(m)
- array_y1_higher[1, m - 2]);
part4 := -2.0*array_y1_higher[1, m - 2]*convfloat(m)
+ array_y1_higher[1, m - 2]
+ array_y1_higher[1, m - 2]*convfloat(m*m);
part5 := (-2.0*array_y1_higher[1, m - 2]*array_y1_higher[1, m]*
convfloat(m)
+ array_y1_higher[1, m]*array_y1_higher[1, m - 2] -
array_y1_higher[1, m - 1]*array_y1_higher[1, m - 1]*
convfloat(m*m) + 4.0*array_y1_higher[1, m - 1]*
array_y1_higher[1, m - 1]*convfloat(m) +
array_y1_higher[1, m - 2]*array_y1_higher[1, m]*
convfloat(m*m)
- 4.0*array_y1_higher[1, m - 1]*array_y1_higher[1, m - 1])
*(array_y1_higher[1, m - 2]*convfloat(m)
- array_y1_higher[1, m - 2]);
part6 := 2.0*array_y1_higher[1, m - 1]*convfloat(m*m)
- 8.0*convfloat(m)*array_y1_higher[1, m - 1]
+ 8.0*array_y1_higher[1, m - 1];
part7 := -2.0*array_y1_higher[1, m - 2]*array_y1_higher[1, m]*
convfloat(m) + array_y1_higher[1, m - 1]*
array_y1_higher[1, m - 1]*convfloat(m*m) -
array_y1_higher[1, m - 1]*array_y1_higher[1, m - 1]*
convfloat(4*m) - array_y1_higher[1, m - 2]*
array_y1_higher[1, m]*convfloat(m*m) +
array_y1_higher[1, m - 1]*array_y1_higher[1, m - 1]*
convfloat(4);
part8 := 2.0*array_y1_higher[1, m - 1]*convfloat(m)
- 4.0*array_y1_higher[1, m - 1];
part9 := glob_h*array_y1_higher[1, m - 2];
part10 := glob_h*array_y1_higher[1, m - 1]*
array_y1_higher[1, m - 2]*(
convfloat(2*m)*array_y1_higher[1, m - 1]
- 4.0*array_y1_higher[1, m - 1]);
part11 := 2.0*array_y1_higher[1, m]*convfloat(m)
- array_y1_higher[1, m]
- array_y1_higher[1, m]*convfloat(m*m);
part12 := (2.0*array_y1_higher[1, m - 2]*array_y1_higher[1, m]*
convfloat(m) - array_y1_higher[1, m - 2]*
array_y1_higher[1, m]*convfloat(m*m)*
array_y1_higher[1, m - 1]*array_y1_higher[1, m - 1]
- convfloat(4*m)
- array_y1_higher[1, m - 1]*array_y1_higher[1, m - 1]
- convfloat(m*m)
+ array_y1_higher[1, m]*array_y1_higher[1, m - 2]
+ 4.0*array_y1_higher[1, m - 1]*array_y1_higher[1, m - 1])
*(
-array_y1_higher[1, m]*convfloat(m) + array_y1_higher[1, m]
);
part13 := glob_h*array_y1_higher[1, m - 1];
part14 := glob_h*array_y1_higher[1, m - 1]*
array_y1_higher[1, m - 2]*(
convfloat(-m)*array_y1_higher[1, m] + array_y1_higher[1, m]
);
glob_diff_rc_fm := part3/part2;
glob_diff_ord_fm := part4/part1 - part5/part2;
glob_diff_rc_fmm1 := part9/part1 + part10/part2;
glob_diff_ord_fmm1 := part6/part1 - part7*part8/part2;
glob_diff_rc_fmm2 := part13/part1 + part14/part2;
glob_diff_ord_fmm2 := part11/part1 - part12/part2;
glob_guess_error_rc := glob_diff_rc_fm*array_y1_higher[1, m]
+ glob_diff_rc_fmm1*array_y1_higher[1, m - 1]
+ glob_diff_rc_fmm2*array_y1_higher[1, m - 2];
glob_guess_error_ord :=
3*glob_diff_ord_fm*array_y1_higher[1, m];
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;
m := n - 3;
while 10 <= m and (omniabs(array_y2_higher[1, m]) = 0. or
omniabs(array_y2_higher[1, m - 1]) = 0. or
omniabs(array_y2_higher[1, m - 2]) = 0.) do m := m - 1
end do;
if 10 < m then
term1 := convfloat(2)*array_y2_higher[1, m - 1]*
array_y2_higher[1, m - 1]
+ convfloat(m)*array_y2_higher[1, m - 2]*array_y2_higher[1, m]
- convfloat(m)*array_y2_higher[1, m - 1]*
array_y2_higher[1, m - 1]
- array_y2_higher[1, m]*array_y2_higher[1, m - 2];
term2 := glob_h*array_y2_higher[1, m - 1]*array_y2_higher[1, m - 2]
;
term3 := array_y2_higher[1, m]*array_y2_higher[1, m - 2] +
convfloat(4*m)*array_y2_higher[1, m - 1]*
array_y2_higher[1, m - 1] +
convfloat(m*m)*array_y2_higher[1, m - 2]*array_y2_higher[1, m]
-
convfloat(2*m)*array_y2_higher[1, m - 2]*array_y2_higher[1, m]
- convfloat(4)*array_y2_higher[1, m - 1]*
array_y2_higher[1, m - 1] - convfloat(m*m)*
array_y2_higher[1, m - 1]*array_y2_higher[1, m - 1];
rcs := term2/term1;
ord_no := term3/term1;
if 0. < rcs then
part1 := -array_y2_higher[1, m - 1]*array_y2_higher[1, m - 1]*
convfloat(m)
+ 2.0*array_y2_higher[1, m - 1]*array_y2_higher[1, m - 1]
+ convfloat(m)*array_y2_higher[1, m - 2]*
array_y2_higher[1, m]
- array_y2_higher[1, m]*array_y2_higher[1, m - 2];
part2 := part1*part1;
part3 := array_y2_higher[1, m - 1]*glob_h*
array_y2_higher[1, m - 2]*(
array_y2_higher[1, m - 2]*convfloat(m)
- array_y2_higher[1, m - 2]);
part4 := -2.0*array_y2_higher[1, m - 2]*convfloat(m)
+ array_y2_higher[1, m - 2]
+ array_y2_higher[1, m - 2]*convfloat(m*m);
part5 := (-2.0*array_y2_higher[1, m - 2]*array_y2_higher[1, m]*
convfloat(m)
+ array_y2_higher[1, m]*array_y2_higher[1, m - 2] -
array_y2_higher[1, m - 1]*array_y2_higher[1, m - 1]*
convfloat(m*m) + 4.0*array_y2_higher[1, m - 1]*
array_y2_higher[1, m - 1]*convfloat(m) +
array_y2_higher[1, m - 2]*array_y2_higher[1, m]*
convfloat(m*m)
- 4.0*array_y2_higher[1, m - 1]*array_y2_higher[1, m - 1])
*(array_y2_higher[1, m - 2]*convfloat(m)
- array_y2_higher[1, m - 2]);
part6 := 2.0*array_y2_higher[1, m - 1]*convfloat(m*m)
- 8.0*convfloat(m)*array_y2_higher[1, m - 1]
+ 8.0*array_y2_higher[1, m - 1];
part7 := -2.0*array_y2_higher[1, m - 2]*array_y2_higher[1, m]*
convfloat(m) + array_y2_higher[1, m - 1]*
array_y2_higher[1, m - 1]*convfloat(m*m) -
array_y2_higher[1, m - 1]*array_y2_higher[1, m - 1]*
convfloat(4*m) - array_y2_higher[1, m - 2]*
array_y2_higher[1, m]*convfloat(m*m) +
array_y2_higher[1, m - 1]*array_y2_higher[1, m - 1]*
convfloat(4);
part8 := 2.0*array_y2_higher[1, m - 1]*convfloat(m)
- 4.0*array_y2_higher[1, m - 1];
part9 := glob_h*array_y2_higher[1, m - 2];
part10 := glob_h*array_y2_higher[1, m - 1]*
array_y2_higher[1, m - 2]*(
convfloat(2*m)*array_y2_higher[1, m - 1]
- 4.0*array_y2_higher[1, m - 1]);
part11 := 2.0*array_y2_higher[1, m]*convfloat(m)
- array_y2_higher[1, m]
- array_y2_higher[1, m]*convfloat(m*m);
part12 := (2.0*array_y2_higher[1, m - 2]*array_y2_higher[1, m]*
convfloat(m) - array_y2_higher[1, m - 2]*
array_y2_higher[1, m]*convfloat(m*m)*
array_y2_higher[1, m - 1]*array_y2_higher[1, m - 1]
- convfloat(4*m)
- array_y2_higher[1, m - 1]*array_y2_higher[1, m - 1]
- convfloat(m*m)
+ array_y2_higher[1, m]*array_y2_higher[1, m - 2]
+ 4.0*array_y2_higher[1, m - 1]*array_y2_higher[1, m - 1])
*(
-array_y2_higher[1, m]*convfloat(m) + array_y2_higher[1, m]
);
part13 := glob_h*array_y2_higher[1, m - 1];
part14 := glob_h*array_y2_higher[1, m - 1]*
array_y2_higher[1, m - 2]*(
convfloat(-m)*array_y2_higher[1, m] + array_y2_higher[1, m]
);
glob_diff_rc_fm := part3/part2;
glob_diff_ord_fm := part4/part1 - part5/part2;
glob_diff_rc_fmm1 := part9/part1 + part10/part2;
glob_diff_ord_fmm1 := part6/part1 - part7*part8/part2;
glob_diff_rc_fmm2 := part13/part1 + part14/part2;
glob_diff_ord_fmm2 := part11/part1 - part12/part2;
glob_guess_error_rc := glob_diff_rc_fm*array_y2_higher[1, m]
+ glob_diff_rc_fmm1*array_y2_higher[1, m - 1]
+ glob_diff_rc_fmm2*array_y2_higher[1, m - 2];
glob_guess_error_ord :=
3*glob_diff_ord_fm*array_y2_higher[1, m];
array_real_poles[2, 1] := rcs;
array_real_poles[2, 2] := ord_no
else
array_real_poles[2, 1] := glob_large_float;
array_real_poles[2, 2] := glob_large_float
end if
else
array_real_poles[2, 1] := glob_large_float;
array_real_poles[2, 2] := glob_large_float
end if;
n := glob_max_terms - 2;
cnt := 0;
while cnt < 5 and 10 <= n do
if omniabs(array_y1_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_y1_higher[1, m]/array_y1_higher[1, m - 1];
rm1 := array_y1_higher[1, m - 1]/array_y1_higher[1, m - 2];
rm2 := array_y1_higher[1, m - 2]/array_y1_higher[1, m - 3];
rm3 := array_y1_higher[1, m - 3]/array_y1_higher[1, m - 4];
rm4 := array_y1_higher[1, m - 4]/array_y1_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;
n := glob_max_terms - 3;
cnt := 0;
while cnt < 5 and 10 <= n do
if omniabs(array_y2_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_y2_higher[1, m]/array_y2_higher[1, m - 1];
rm1 := array_y2_higher[1, m - 1]/array_y2_higher[1, m - 2];
rm2 := array_y2_higher[1, m - 2]/array_y2_higher[1, m - 3];
rm3 := array_y2_higher[1, m - 3]/array_y2_higher[1, m - 4];
rm4 := array_y2_higher[1, m - 4]/array_y2_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[2, 1] := rad_c;
array_complex_poles[2, 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_y1[term] := array_y1[term]*ratio;
array_y1_higher[1, term] := array_y1_higher[1, term]*ratio;
array_x[term] := array_x[term]*ratio;
array_y2[term] := array_y2[term]*ratio;
array_y2_higher[1, term] := array_y2_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_diff_rc_fm,
> glob_diff_rc_fmm1,
> glob_diff_rc_fmm2,
> glob_diff_ord_fm,
> glob_diff_ord_fmm1,
> glob_diff_ord_fmm2,
> glob_guess_error_rc,
> glob_guess_error_ord,
> 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_2,
> #END CONST
> array_y1_init,
> array_y2_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_y1,
> array_x,
> array_y2,
> array_tmp0,
> array_tmp1,
> array_tmp2,
> array_tmp3,
> array_tmp4,
> array_m1,
> array_y1_higher,
> array_y1_higher_work,
> array_y1_higher_work2,
> array_y1_set_initial,
> array_y2_higher,
> array_y2_higher_work,
> array_y2_higher_work2,
> array_y2_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 7
> 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_y1[iii]) > array_norms[iii]) then # if number 8
> array_norms[iii] := omniabs(array_y1[iii]);
> fi;# end if 8;
> iii := iii + 1;
> od;# end do number 1
> ;
> iii := 1;
> while (iii <= glob_max_terms) do # do number 1
> if (omniabs(array_y2[iii]) > array_norms[iii]) then # if number 8
> array_norms[iii] := omniabs(array_y2[iii]);
> fi;# end if 8;
> iii := iii + 1;
> od;# end do number 1
> #BOTTOM GET NORMS
> ;
> fi;# end if 7;
> 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_diff_rc_fm, glob_diff_rc_fmm1, glob_diff_rc_fmm2, glob_diff_ord_fm,
glob_diff_ord_fmm1, glob_diff_ord_fmm2, glob_guess_error_rc,
glob_guess_error_ord, 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_2, array_y1_init, array_y2_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_y1, array_x, array_y2, array_tmp0,
array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_m1, array_y1_higher,
array_y1_higher_work, array_y1_higher_work2, array_y1_set_initial,
array_y2_higher, array_y2_higher_work, array_y2_higher_work2,
array_y2_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_y1[iii]) then
array_norms[iii] := omniabs(array_y1[iii])
end if;
iii := iii + 1
end do;
iii := 1;
while iii <= glob_max_terms do
if array_norms[iii] < omniabs(array_y2[iii]) then
array_norms[iii] := omniabs(array_y2[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_diff_rc_fm,
> glob_diff_rc_fmm1,
> glob_diff_rc_fmm2,
> glob_diff_ord_fm,
> glob_diff_ord_fmm1,
> glob_diff_ord_fmm2,
> glob_guess_error_rc,
> glob_guess_error_ord,
> 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_2,
> #END CONST
> array_y1_init,
> array_y2_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_y1,
> array_x,
> array_y2,
> array_tmp0,
> array_tmp1,
> array_tmp2,
> array_tmp3,
> array_tmp4,
> array_m1,
> array_y1_higher,
> array_y1_higher_work,
> array_y1_higher_work2,
> array_y1_set_initial,
> array_y2_higher,
> array_y2_higher_work,
> array_y2_higher_work2,
> array_y2_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 mult FULL FULL $eq_no = 1 i = 1
> array_tmp1[1] := (array_m1[1] * (array_y2[1]));
> #emit pre add CONST FULL $eq_no = 1 i = 1
> array_tmp2[1] := array_const_0D0[1] + array_tmp1[1];
> #emit pre assign xxx $eq_no = 1 i = 1 $min_hdrs = 5
> if ( not array_y1_set_initial[1,2]) then # if number 1
> if (1 <= glob_max_terms) then # if number 2
> temporary := array_tmp2[1] * expt(glob_h , (1)) * factorial_3(0,1);
> array_y1[2] := temporary;
> array_y1_higher[1,2] := temporary;
> temporary := temporary / glob_h * (1.0);
> array_y1_higher[2,1] := temporary;
> fi;# end if 2;
> fi;# end if 1;
> kkk := 2;
> #emit pre diff $eq_no = 2 i = 1 order_d = 1
> array_tmp4[1] := array_y1_higher[2,1];
> #emit pre assign xxx $eq_no = 2 i = 1 $min_hdrs = 5
> if ( not array_y2_set_initial[2,3]) then # if number 1
> if (1 <= glob_max_terms) then # if number 2
> temporary := array_tmp4[1] * expt(glob_h , (2)) * factorial_3(0,2);
> array_y2[3] := temporary;
> array_y2_higher[1,3] := temporary;
> temporary := temporary / glob_h * (2.0);
> array_y2_higher[2,2] := temporary;
> temporary := temporary / glob_h * (1.0);
> array_y2_higher[3,1] := temporary;
> fi;# end if 2;
> fi;# end if 1;
> kkk := 2;
> #END ATOMHDR1
> #BEGIN ATOMHDR2
> # emit pre mult FULL FULL $eq_no = 1 i = 2
> array_tmp1[2] := ats(2,array_m1,array_y2,1);
> #emit pre add CONST FULL $eq_no = 1 i = 2
> array_tmp2[2] := array_tmp1[2];
> #emit pre assign xxx $eq_no = 1 i = 2 $min_hdrs = 5
> if ( not array_y1_set_initial[1,3]) then # if number 1
> if (2 <= glob_max_terms) then # if number 2
> temporary := array_tmp2[2] * expt(glob_h , (1)) * factorial_3(1,2);
> array_y1[3] := temporary;
> array_y1_higher[1,3] := temporary;
> temporary := temporary / glob_h * (2.0);
> array_y1_higher[2,2] := temporary;
> fi;# end if 2;
> fi;# end if 1;
> kkk := 3;
> #emit pre diff $eq_no = 2 i = 2 order_d = 1
> array_tmp4[2] := array_y1_higher[2,2];
> #emit pre assign xxx $eq_no = 2 i = 2 $min_hdrs = 5
> if ( not array_y2_set_initial[2,4]) then # if number 1
> if (2 <= glob_max_terms) then # if number 2
> temporary := array_tmp4[2] * expt(glob_h , (2)) * factorial_3(1,3);
> array_y2[4] := temporary;
> array_y2_higher[1,4] := temporary;
> temporary := temporary / glob_h * (3.0);
> array_y2_higher[2,3] := temporary;
> temporary := temporary / glob_h * (2.0);
> array_y2_higher[3,2] := temporary;
> fi;# end if 2;
> fi;# end if 1;
> kkk := 3;
> #END ATOMHDR2
> #BEGIN ATOMHDR3
> # emit pre mult FULL FULL $eq_no = 1 i = 3
> array_tmp1[3] := ats(3,array_m1,array_y2,1);
> #emit pre add CONST FULL $eq_no = 1 i = 3
> array_tmp2[3] := array_tmp1[3];
> #emit pre assign xxx $eq_no = 1 i = 3 $min_hdrs = 5
> if ( not array_y1_set_initial[1,4]) then # if number 1
> if (3 <= glob_max_terms) then # if number 2
> temporary := array_tmp2[3] * expt(glob_h , (1)) * factorial_3(2,3);
> array_y1[4] := temporary;
> array_y1_higher[1,4] := temporary;
> temporary := temporary / glob_h * (3.0);
> array_y1_higher[2,3] := temporary;
> fi;# end if 2;
> fi;# end if 1;
> kkk := 4;
> #emit pre diff $eq_no = 2 i = 3 order_d = 1
> array_tmp4[3] := array_y1_higher[2,3];
> #emit pre assign xxx $eq_no = 2 i = 3 $min_hdrs = 5
> if ( not array_y2_set_initial[2,5]) then # if number 1
> if (3 <= glob_max_terms) then # if number 2
> temporary := array_tmp4[3] * expt(glob_h , (2)) * factorial_3(2,4);
> array_y2[5] := temporary;
> array_y2_higher[1,5] := temporary;
> temporary := temporary / glob_h * (4.0);
> array_y2_higher[2,4] := temporary;
> temporary := temporary / glob_h * (3.0);
> array_y2_higher[3,3] := temporary;
> fi;# end if 2;
> fi;# end if 1;
> kkk := 4;
> #END ATOMHDR3
> #BEGIN ATOMHDR4
> # emit pre mult FULL FULL $eq_no = 1 i = 4
> array_tmp1[4] := ats(4,array_m1,array_y2,1);
> #emit pre add CONST FULL $eq_no = 1 i = 4
> array_tmp2[4] := array_tmp1[4];
> #emit pre assign xxx $eq_no = 1 i = 4 $min_hdrs = 5
> if ( not array_y1_set_initial[1,5]) then # if number 1
> if (4 <= glob_max_terms) then # if number 2
> temporary := array_tmp2[4] * expt(glob_h , (1)) * factorial_3(3,4);
> array_y1[5] := temporary;
> array_y1_higher[1,5] := temporary;
> temporary := temporary / glob_h * (4.0);
> array_y1_higher[2,4] := temporary;
> fi;# end if 2;
> fi;# end if 1;
> kkk := 5;
> #emit pre diff $eq_no = 2 i = 4 order_d = 1
> array_tmp4[4] := array_y1_higher[2,4];
> #emit pre assign xxx $eq_no = 2 i = 4 $min_hdrs = 5
> if ( not array_y2_set_initial[2,6]) then # if number 1
> if (4 <= glob_max_terms) then # if number 2
> temporary := array_tmp4[4] * expt(glob_h , (2)) * factorial_3(3,5);
> array_y2[6] := temporary;
> array_y2_higher[1,6] := temporary;
> temporary := temporary / glob_h * (5.0);
> array_y2_higher[2,5] := temporary;
> temporary := temporary / glob_h * (4.0);
> array_y2_higher[3,4] := temporary;
> fi;# end if 2;
> fi;# end if 1;
> kkk := 5;
> #END ATOMHDR4
> #BEGIN ATOMHDR5
> # emit pre mult FULL FULL $eq_no = 1 i = 5
> array_tmp1[5] := ats(5,array_m1,array_y2,1);
> #emit pre add CONST FULL $eq_no = 1 i = 5
> array_tmp2[5] := array_tmp1[5];
> #emit pre assign xxx $eq_no = 1 i = 5 $min_hdrs = 5
> if ( not array_y1_set_initial[1,6]) then # if number 1
> if (5 <= glob_max_terms) then # if number 2
> temporary := array_tmp2[5] * expt(glob_h , (1)) * factorial_3(4,5);
> array_y1[6] := temporary;
> array_y1_higher[1,6] := temporary;
> temporary := temporary / glob_h * (5.0);
> array_y1_higher[2,5] := temporary;
> fi;# end if 2;
> fi;# end if 1;
> kkk := 6;
> #emit pre diff $eq_no = 2 i = 5 order_d = 1
> array_tmp4[5] := array_y1_higher[2,5];
> #emit pre assign xxx $eq_no = 2 i = 5 $min_hdrs = 5
> if ( not array_y2_set_initial[2,7]) then # if number 1
> if (5 <= glob_max_terms) then # if number 2
> temporary := array_tmp4[5] * expt(glob_h , (2)) * factorial_3(4,6);
> array_y2[7] := temporary;
> array_y2_higher[1,7] := temporary;
> temporary := temporary / glob_h * (6.0);
> array_y2_higher[2,6] := temporary;
> temporary := temporary / glob_h * (5.0);
> array_y2_higher[3,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 mult FULL FULL $eq_no = 1
> array_tmp1[kkk] := ats(kkk,array_m1,array_y2,1);
> #emit NOT FULL - FULL add $eq_no = 1
> array_tmp2[kkk] := array_tmp1[kkk];
> #emit assign $eq_no = 1
> order_d := 1;
> if (kkk + order_d < glob_max_terms) then # if number 1
> if ( not array_y1_set_initial[1,kkk + order_d]) then # if number 2
> temporary := array_tmp2[kkk] * expt(glob_h , (order_d)) * factorial_3((kkk - 1),(kkk + order_d - 1));
> array_y1[kkk + order_d] := temporary;
> array_y1_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_y1_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;
> #emit diff $eq_no = 2
> array_tmp4[kkk] := array_y1_higher[2,kkk];
> #emit assign $eq_no = 2
> order_d := 2;
> if (kkk + order_d < glob_max_terms) then # if number 1
> if ( not array_y2_set_initial[2,kkk + order_d]) then # if number 2
> temporary := array_tmp4[kkk] * expt(glob_h , (order_d)) * factorial_3((kkk - 1),(kkk + order_d - 1));
> array_y2[kkk + order_d] := temporary;
> array_y2_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_y2_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_diff_rc_fm, glob_diff_rc_fmm1, glob_diff_rc_fmm2, glob_diff_ord_fm,
glob_diff_ord_fmm1, glob_diff_ord_fmm2, glob_guess_error_rc,
glob_guess_error_ord, 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_2, array_y1_init, array_y2_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_y1, array_x, array_y2, array_tmp0,
array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_m1, array_y1_higher,
array_y1_higher_work, array_y1_higher_work2, array_y1_set_initial,
array_y2_higher, array_y2_higher_work, array_y2_higher_work2,
array_y2_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_m1[1]*array_y2[1];
array_tmp2[1] := array_const_0D0[1] + array_tmp1[1];
if not array_y1_set_initial[1, 2] then
if 1 <= glob_max_terms then
temporary := array_tmp2[1]*expt(glob_h, 1)*factorial_3(0, 1);
array_y1[2] := temporary;
array_y1_higher[1, 2] := temporary;
temporary := temporary*1.0/glob_h;
array_y1_higher[2, 1] := temporary
end if
end if;
kkk := 2;
array_tmp4[1] := array_y1_higher[2, 1];
if not array_y2_set_initial[2, 3] then
if 1 <= glob_max_terms then
temporary := array_tmp4[1]*expt(glob_h, 2)*factorial_3(0, 2);
array_y2[3] := temporary;
array_y2_higher[1, 3] := temporary;
temporary := temporary*2.0/glob_h;
array_y2_higher[2, 2] := temporary;
temporary := temporary*1.0/glob_h;
array_y2_higher[3, 1] := temporary
end if
end if;
kkk := 2;
array_tmp1[2] := ats(2, array_m1, array_y2, 1);
array_tmp2[2] := array_tmp1[2];
if not array_y1_set_initial[1, 3] then
if 2 <= glob_max_terms then
temporary := array_tmp2[2]*expt(glob_h, 1)*factorial_3(1, 2);
array_y1[3] := temporary;
array_y1_higher[1, 3] := temporary;
temporary := temporary*2.0/glob_h;
array_y1_higher[2, 2] := temporary
end if
end if;
kkk := 3;
array_tmp4[2] := array_y1_higher[2, 2];
if not array_y2_set_initial[2, 4] then
if 2 <= glob_max_terms then
temporary := array_tmp4[2]*expt(glob_h, 2)*factorial_3(1, 3);
array_y2[4] := temporary;
array_y2_higher[1, 4] := temporary;
temporary := temporary*3.0/glob_h;
array_y2_higher[2, 3] := temporary;
temporary := temporary*2.0/glob_h;
array_y2_higher[3, 2] := temporary
end if
end if;
kkk := 3;
array_tmp1[3] := ats(3, array_m1, array_y2, 1);
array_tmp2[3] := array_tmp1[3];
if not array_y1_set_initial[1, 4] then
if 3 <= glob_max_terms then
temporary := array_tmp2[3]*expt(glob_h, 1)*factorial_3(2, 3);
array_y1[4] := temporary;
array_y1_higher[1, 4] := temporary;
temporary := temporary*3.0/glob_h;
array_y1_higher[2, 3] := temporary
end if
end if;
kkk := 4;
array_tmp4[3] := array_y1_higher[2, 3];
if not array_y2_set_initial[2, 5] then
if 3 <= glob_max_terms then
temporary := array_tmp4[3]*expt(glob_h, 2)*factorial_3(2, 4);
array_y2[5] := temporary;
array_y2_higher[1, 5] := temporary;
temporary := temporary*4.0/glob_h;
array_y2_higher[2, 4] := temporary;
temporary := temporary*3.0/glob_h;
array_y2_higher[3, 3] := temporary
end if
end if;
kkk := 4;
array_tmp1[4] := ats(4, array_m1, array_y2, 1);
array_tmp2[4] := array_tmp1[4];
if not array_y1_set_initial[1, 5] then
if 4 <= glob_max_terms then
temporary := array_tmp2[4]*expt(glob_h, 1)*factorial_3(3, 4);
array_y1[5] := temporary;
array_y1_higher[1, 5] := temporary;
temporary := temporary*4.0/glob_h;
array_y1_higher[2, 4] := temporary
end if
end if;
kkk := 5;
array_tmp4[4] := array_y1_higher[2, 4];
if not array_y2_set_initial[2, 6] then
if 4 <= glob_max_terms then
temporary := array_tmp4[4]*expt(glob_h, 2)*factorial_3(3, 5);
array_y2[6] := temporary;
array_y2_higher[1, 6] := temporary;
temporary := temporary*5.0/glob_h;
array_y2_higher[2, 5] := temporary;
temporary := temporary*4.0/glob_h;
array_y2_higher[3, 4] := temporary
end if
end if;
kkk := 5;
array_tmp1[5] := ats(5, array_m1, array_y2, 1);
array_tmp2[5] := array_tmp1[5];
if not array_y1_set_initial[1, 6] then
if 5 <= glob_max_terms then
temporary := array_tmp2[5]*expt(glob_h, 1)*factorial_3(4, 5);
array_y1[6] := temporary;
array_y1_higher[1, 6] := temporary;
temporary := temporary*5.0/glob_h;
array_y1_higher[2, 5] := temporary
end if
end if;
kkk := 6;
array_tmp4[5] := array_y1_higher[2, 5];
if not array_y2_set_initial[2, 7] then
if 5 <= glob_max_terms then
temporary := array_tmp4[5]*expt(glob_h, 2)*factorial_3(4, 6);
array_y2[7] := temporary;
array_y2_higher[1, 7] := temporary;
temporary := temporary*6.0/glob_h;
array_y2_higher[2, 6] := temporary;
temporary := temporary*5.0/glob_h;
array_y2_higher[3, 5] := temporary
end if
end if;
kkk := 6;
while kkk <= glob_max_terms do
array_tmp1[kkk] := ats(kkk, array_m1, array_y2, 1);
array_tmp2[kkk] := array_tmp1[kkk];
order_d := 1;
if kkk + order_d < glob_max_terms then
if not array_y1_set_initial[1, kkk + order_d] then
temporary := array_tmp2[kkk]*expt(glob_h, order_d)*
factorial_3(kkk - 1, kkk + order_d - 1);
array_y1[kkk + order_d] := temporary;
array_y1_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_y1_higher[adj3, term] := temporary
end if;
term := term - 1;
adj2 := adj2 - 1;
adj3 := adj3 + 1
end do
end if
end if;
array_tmp4[kkk] := array_y1_higher[2, kkk];
order_d := 2;
if kkk + order_d < glob_max_terms then
if not array_y2_set_initial[2, kkk + order_d] then
temporary := array_tmp4[kkk]*expt(glob_h, order_d)*
factorial_3(kkk - 1, kkk + order_d - 1);
array_y2[kkk + order_d] := temporary;
array_y2_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_y2_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
> exact_soln_y1 := proc(x)
> return( - cos(x));
> end;
exact_soln_y1 := proc(x) return -cos(x) end proc
> exact_soln_y2 := proc(x)
> return( - sin(x));
> end;
exact_soln_y2 := proc(x) return -sin(x) end proc
> exact_soln_y2p := proc(x)
> return( - cos(x));
> end;
exact_soln_y2p := proc(x) return -cos(x) 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_diff_rc_fm,
> glob_diff_rc_fmm1,
> glob_diff_rc_fmm2,
> glob_diff_ord_fm,
> glob_diff_ord_fmm1,
> glob_diff_ord_fmm2,
> glob_guess_error_rc,
> glob_guess_error_ord,
> 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_2,
> #END CONST
> array_y1_init,
> array_y2_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_y1,
> array_x,
> array_y2,
> array_tmp0,
> array_tmp1,
> array_tmp2,
> array_tmp3,
> array_tmp4,
> array_m1,
> array_y1_higher,
> array_y1_higher_work,
> array_y1_higher_work2,
> array_y1_set_initial,
> array_y2_higher,
> array_y2_higher_work,
> array_y2_higher_work2,
> array_y2_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_diff_rc_fm := 0.1;
> glob_diff_rc_fmm1 := 0.1;
> glob_diff_rc_fmm2 := 0.1;
> glob_diff_ord_fm := 0.1;
> glob_diff_ord_fmm1 := 0.1;
> glob_diff_ord_fmm2 := 0.1;
> glob_guess_error_rc := 0.1;
> glob_guess_error_ord := 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 := 2;
> 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/mtest5postode.ode#################");
> omniout_str(ALWAYS,"diff ( y1 , x , 1 ) = m1 * y2 ;");
> omniout_str(ALWAYS,"diff ( y2 , x , 2 ) = diff ( y1, x , 1) ;");
> omniout_str(ALWAYS,"!");
> omniout_str(ALWAYS,"#BEGIN FIRST INPUT BLOCK");
> omniout_str(ALWAYS,"Digits:=32;");
> omniout_str(ALWAYS,"max_terms:=30;");
> omniout_str(ALWAYS,"!");
> omniout_str(ALWAYS,"#END FIRST INPUT BLOCK");
> omniout_str(ALWAYS,"#BEGIN SECOND INPUT BLOCK");
> omniout_str(ALWAYS,"x_start := 0.5;");
> omniout_str(ALWAYS,"x_end := 5.0;");
> omniout_str(ALWAYS,"array_y1_init[0 + 1] := exact_soln_y1(x_start);");
> omniout_str(ALWAYS,"array_y2_init[0 + 1] := exact_soln_y2(x_start);");
> omniout_str(ALWAYS,"array_y2_init[1 + 1] := exact_soln_y2p(x_start);");
> omniout_str(ALWAYS,"glob_max_iter := 20;");
> 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.1;");
> 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,"exact_soln_y1 := proc(x)");
> omniout_str(ALWAYS,"return( - cos(x));");
> omniout_str(ALWAYS,"end;");
> omniout_str(ALWAYS,"exact_soln_y2 := proc(x)");
> omniout_str(ALWAYS,"return( - sin(x));");
> omniout_str(ALWAYS,"end;");
> omniout_str(ALWAYS,"exact_soln_y2p := proc(x)");
> omniout_str(ALWAYS,"return( - cos(x));");
> omniout_str(ALWAYS,"end;");
> omniout_str(ALWAYS,"");
> omniout_str(ALWAYS,"#END USER DEF BLOCK");
> omniout_str(ALWAYS,"#######END OF ECHO OF PROBLEM#################");
> glob_unchanged_h_cnt := 0;
> glob_warned := false;
> glob_warned2 := false;
> glob_small_float := 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
> Digits:=32;
> max_terms:=30;
> #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_y1_init:= Array(0..(max_terms + 1),[]);
> array_y2_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..(3 + 1),[]);
> array_last_rel_error:= Array(0..(3 + 1),[]);
> array_type_pole:= Array(0..(3 + 1),[]);
> array_type_real_pole:= Array(0..(3 + 1),[]);
> array_type_complex_pole:= Array(0..(3 + 1),[]);
> array_y1:= Array(0..(max_terms + 1),[]);
> array_x:= Array(0..(max_terms + 1),[]);
> array_y2:= Array(0..(max_terms + 1),[]);
> array_tmp0:= Array(0..(max_terms + 1),[]);
> array_tmp1:= Array(0..(max_terms + 1),[]);
> array_tmp2:= Array(0..(max_terms + 1),[]);
> array_tmp3:= Array(0..(max_terms + 1),[]);
> array_tmp4:= Array(0..(max_terms + 1),[]);
> array_m1:= Array(0..(max_terms + 1),[]);
> array_y1_higher := Array(0..(2+ 1) ,(0..max_terms+ 1),[]);
> array_y1_higher_work := Array(0..(2+ 1) ,(0..max_terms+ 1),[]);
> array_y1_higher_work2 := Array(0..(2+ 1) ,(0..max_terms+ 1),[]);
> array_y1_set_initial := Array(0..(3+ 1) ,(0..max_terms+ 1),[]);
> array_y2_higher := Array(0..(3+ 1) ,(0..max_terms+ 1),[]);
> array_y2_higher_work := Array(0..(3+ 1) ,(0..max_terms+ 1),[]);
> array_y2_higher_work2 := Array(0..(3+ 1) ,(0..max_terms+ 1),[]);
> array_y2_set_initial := Array(0..(3+ 1) ,(0..max_terms+ 1),[]);
> array_poles := Array(0..(3+ 1) ,(0..3+ 1),[]);
> array_given_rad_poles := Array(0..(3+ 1) ,(0..3+ 1),[]);
> array_given_ord_poles := Array(0..(3+ 1) ,(0..3+ 1),[]);
> array_real_poles := Array(0..(3+ 1) ,(0..3+ 1),[]);
> array_complex_poles := Array(0..(3+ 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_y1_init[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= max_terms) do # do number 1
> array_y2_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 <= 3) do # do number 1
> array_1st_rel_error[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 3) do # do number 1
> array_last_rel_error[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 3) do # do number 1
> array_type_pole[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 3) do # do number 1
> array_type_real_pole[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 3) 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_y1[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_y2[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[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_tmp4[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_y1_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_y1_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_y1_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 <=3) do # do number 1
> term := 1;
> while (term <= max_terms) do # do number 2
> array_y1_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 <=3) do # do number 1
> term := 1;
> while (term <= max_terms) do # do number 2
> array_y2_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 <=3) do # do number 1
> term := 1;
> while (term <= max_terms) do # do number 2
> array_y2_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 <=3) do # do number 1
> term := 1;
> while (term <= max_terms) do # do number 2
> array_y2_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 <=3) do # do number 1
> term := 1;
> while (term <= max_terms) do # do number 2
> array_y2_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 <=3) 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 <=3) 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 <=3) 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 <=3) 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 <=3) 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_y1 := Array(1..(max_terms+1 + 1),[]);
> term := 1;
> while (term <= max_terms + 1) do # do number 1
> array_y1[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_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_y2 := Array(1..(max_terms+1 + 1),[]);
> term := 1;
> while (term <= max_terms + 1) do # do number 1
> array_y2[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 := 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_tmp4 := Array(1..(max_terms+1 + 1),[]);
> term := 1;
> while (term <= max_terms + 1) do # do number 1
> array_tmp4[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_2 := Array(1..(max_terms+1 + 1),[]);
> term := 1;
> while (term <= max_terms + 1) do # do number 1
> array_const_2[term] := 0.0;
> term := term + 1;
> od;# end do number 1;
> array_const_2[1] := 2;
> 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
> x_start := 0.5;
> x_end := 5.0;
> array_y1_init[0 + 1] := exact_soln_y1(x_start);
> array_y2_init[0 + 1] := exact_soln_y2(x_start);
> array_y2_init[1 + 1] := exact_soln_y2p(x_start);
> glob_max_iter := 20;
> #END SECOND INPUT BLOCK
> #BEGIN OVERRIDE BLOCK
> glob_desired_digits_correct:=10;
> glob_display_interval:=0.1;
> 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_y1_set_initial[1,1] := true;
> array_y1_set_initial[1,2] := false;
> array_y1_set_initial[1,3] := false;
> array_y1_set_initial[1,4] := false;
> array_y1_set_initial[1,5] := false;
> array_y1_set_initial[1,6] := false;
> array_y1_set_initial[1,7] := false;
> array_y1_set_initial[1,8] := false;
> array_y1_set_initial[1,9] := false;
> array_y1_set_initial[1,10] := false;
> array_y1_set_initial[1,11] := false;
> array_y1_set_initial[1,12] := false;
> array_y1_set_initial[1,13] := false;
> array_y1_set_initial[1,14] := false;
> array_y1_set_initial[1,15] := false;
> array_y1_set_initial[1,16] := false;
> array_y1_set_initial[1,17] := false;
> array_y1_set_initial[1,18] := false;
> array_y1_set_initial[1,19] := false;
> array_y1_set_initial[1,20] := false;
> array_y1_set_initial[1,21] := false;
> array_y1_set_initial[1,22] := false;
> array_y1_set_initial[1,23] := false;
> array_y1_set_initial[1,24] := false;
> array_y1_set_initial[1,25] := false;
> array_y1_set_initial[1,26] := false;
> array_y1_set_initial[1,27] := false;
> array_y1_set_initial[1,28] := false;
> array_y1_set_initial[1,29] := false;
> array_y1_set_initial[1,30] := false;
> array_y2_set_initial[2,1] := true;
> array_y2_set_initial[2,2] := true;
> array_y2_set_initial[2,3] := false;
> array_y2_set_initial[2,4] := false;
> array_y2_set_initial[2,5] := false;
> array_y2_set_initial[2,6] := false;
> array_y2_set_initial[2,7] := false;
> array_y2_set_initial[2,8] := false;
> array_y2_set_initial[2,9] := false;
> array_y2_set_initial[2,10] := false;
> array_y2_set_initial[2,11] := false;
> array_y2_set_initial[2,12] := false;
> array_y2_set_initial[2,13] := false;
> array_y2_set_initial[2,14] := false;
> array_y2_set_initial[2,15] := false;
> array_y2_set_initial[2,16] := false;
> array_y2_set_initial[2,17] := false;
> array_y2_set_initial[2,18] := false;
> array_y2_set_initial[2,19] := false;
> array_y2_set_initial[2,20] := false;
> array_y2_set_initial[2,21] := false;
> array_y2_set_initial[2,22] := false;
> array_y2_set_initial[2,23] := false;
> array_y2_set_initial[2,24] := false;
> array_y2_set_initial[2,25] := false;
> array_y2_set_initial[2,26] := false;
> array_y2_set_initial[2,27] := false;
> array_y2_set_initial[2,28] := false;
> array_y2_set_initial[2,29] := false;
> array_y2_set_initial[2,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 7
> glob_h := glob_max_h;
> fi;# end if 7;
> if (glob_display_interval < glob_h) then # if number 7
> glob_h := glob_display_interval;
> fi;# end if 7;
> 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_y1
> term_no := 1;
> while (term_no <= order_diff) do # do number 2
> array_y1[term_no] := array_y1_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_y1_higher[r_order,term_no] := array_y1_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
> ;
> order_diff := 2;
> #Start Series array_y2
> term_no := 1;
> while (term_no <= order_diff) do # do number 2
> array_y2[term_no] := array_y2_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_y2_higher[r_order,term_no] := array_y2_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
> ;
> if (glob_subiter_method = 1 ) then # if number 7
> atomall();
> elif
> (glob_subiter_method = 2 ) then # if number 8
> subiter := 1;
> while (subiter <= 3) do # do number 2
> atomall();
> subiter := subiter + 1;
> od;# end do number 2;
> else
> subiter := 1;
> while (subiter <= 3 + glob_max_terms) do # do number 2
> atomall();
> subiter := subiter + 1;
> od;# end do number 2;
> fi;# end if 8;
> 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 8
> 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 9
> 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 9;
> 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 9
> omniout_str(ALWAYS,"Beginning glob_h too large.");
> found_h := false;
> fi;# end if 9;
> if (opt_iter > 100) then # if number 9
> glob_h := glob_max_h;
> found_h := false;
> fi;# end if 9;
> if (glob_display_interval < glob_h) then # if number 9
> glob_h := glob_display_interval;
> fi;# end if 9;
> #END OPTIMIZE CODE
> if (glob_html_log) then # if number 9
> html_log_file := fopen("entry.html",WRITE,TEXT);
> fi;# end if 9;
> #BEGIN SOLUTION CODE
> if (found_h) then # if number 9
> 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_y1
> term_no := 1;
> while (term_no <= order_diff) do # do number 1
> array_y1[term_no] := array_y1_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_y1_higher[r_order,term_no] := array_y1_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
> ;
> order_diff := 2;
> #Start Series array_y2
> term_no := 1;
> while (term_no <= order_diff) do # do number 1
> array_y2[term_no] := array_y2_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_y2_higher[r_order,term_no] := array_y2_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 10
> omniout_str(INFO," ");
> omniout_str(INFO,"TOP MAIN SOLVE Loop");
> fi;# end if 10;
> glob_iter := glob_iter + 1;
> glob_clock_sec := elapsed_time_seconds();
> glob_current_iter := glob_current_iter + 1;
> if (glob_subiter_method = 1 ) then # if number 10
> atomall();
> elif
> (glob_subiter_method = 2 ) then # if number 11
> subiter := 1;
> while (subiter <= 3) do # do number 2
> atomall();
> subiter := subiter + 1;
> od;# end do number 2;
> else
> subiter := 1;
> while (subiter <= 3 + glob_max_terms) do # do number 2
> atomall();
> subiter := subiter + 1;
> od;# end do number 2;
> fi;# end if 11;
> display_alot(current_iter);
> if (glob_look_poles) then # if number 11
> #left paren 0004C
> check_for_pole();
> fi;# end if 11;#was right paren 0004C
> if (reached_interval()) then # if number 11
> glob_next_display := glob_next_display + glob_display_interval;
> fi;# end if 11;
> array_x[1] := array_x[1] + glob_h;
> array_x[2] := glob_h;
> #Jump Series array_y1;
> order_diff := 2;
> #START PART 1 SUM AND ADJUST
> #START SUM AND ADJUST EQ =1
> #sum_and_adjust array_y1
> #BEFORE ADJUST SUBSERIES EQ =1
> ord := 2;
> calc_term := 1;
> #adjust_subseriesarray_y1
> iii := glob_max_terms;
> while (iii >= calc_term) do # do number 2
> array_y1_higher_work[2,iii] := array_y1_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_y1
> iii := glob_max_terms;
> while (iii >= calc_term) do # do number 2
> temp_sum := temp_sum + array_y1_higher_work[ord,iii];
> iii := iii - 1;
> od;# end do number 2;
> array_y1_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_y1
> iii := glob_max_terms;
> while (iii >= calc_term) do # do number 2
> array_y1_higher_work[1,iii] := array_y1_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_y1
> iii := glob_max_terms;
> while (iii >= calc_term) do # do number 2
> temp_sum := temp_sum + array_y1_higher_work[ord,iii];
> iii := iii - 1;
> od;# end do number 2;
> array_y1_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_y1
> iii := glob_max_terms;
> while (iii >= calc_term) do # do number 2
> array_y1_higher_work[1,iii] := array_y1_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_y1
> iii := glob_max_terms;
> while (iii >= calc_term) do # do number 2
> temp_sum := temp_sum + array_y1_higher_work[ord,iii];
> iii := iii - 1;
> od;# end do number 2;
> array_y1_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_y1[term_no] := array_y1_higher_work2[1,term_no];
> ord := 1;
> while (ord <= order_diff) do # do number 3
> array_y1_higher[ord,term_no] := array_y1_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
> #Jump Series array_y2;
> order_diff := 3;
> #START PART 1 SUM AND ADJUST
> #START SUM AND ADJUST EQ =2
> #sum_and_adjust array_y2
> #BEFORE ADJUST SUBSERIES EQ =2
> ord := 3;
> calc_term := 1;
> #adjust_subseriesarray_y2
> iii := glob_max_terms;
> while (iii >= calc_term) do # do number 2
> array_y2_higher_work[3,iii] := array_y2_higher[3,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 =2
> #BEFORE SUM SUBSERIES EQ =2
> temp_sum := 0.0;
> ord := 3;
> calc_term := 1;
> #sum_subseriesarray_y2
> iii := glob_max_terms;
> while (iii >= calc_term) do # do number 2
> temp_sum := temp_sum + array_y2_higher_work[ord,iii];
> iii := iii - 1;
> od;# end do number 2;
> array_y2_higher_work2[ord,calc_term] := temp_sum * expt(glob_h , (calc_term - 1)) / (factorial_1(calc_term - 1));
> #AFTER SUM SUBSERIES EQ =2
> #BEFORE ADJUST SUBSERIES EQ =2
> ord := 2;
> calc_term := 2;
> #adjust_subseriesarray_y2
> iii := glob_max_terms;
> while (iii >= calc_term) do # do number 2
> array_y2_higher_work[2,iii] := array_y2_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 =2
> #BEFORE SUM SUBSERIES EQ =2
> temp_sum := 0.0;
> ord := 2;
> calc_term := 2;
> #sum_subseriesarray_y2
> iii := glob_max_terms;
> while (iii >= calc_term) do # do number 2
> temp_sum := temp_sum + array_y2_higher_work[ord,iii];
> iii := iii - 1;
> od;# end do number 2;
> array_y2_higher_work2[ord,calc_term] := temp_sum * expt(glob_h , (calc_term - 1)) / (factorial_1(calc_term - 1));
> #AFTER SUM SUBSERIES EQ =2
> #BEFORE ADJUST SUBSERIES EQ =2
> ord := 2;
> calc_term := 1;
> #adjust_subseriesarray_y2
> iii := glob_max_terms;
> while (iii >= calc_term) do # do number 2
> array_y2_higher_work[2,iii] := array_y2_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 =2
> #BEFORE SUM SUBSERIES EQ =2
> temp_sum := 0.0;
> ord := 2;
> calc_term := 1;
> #sum_subseriesarray_y2
> iii := glob_max_terms;
> while (iii >= calc_term) do # do number 2
> temp_sum := temp_sum + array_y2_higher_work[ord,iii];
> iii := iii - 1;
> od;# end do number 2;
> array_y2_higher_work2[ord,calc_term] := temp_sum * expt(glob_h , (calc_term - 1)) / (factorial_1(calc_term - 1));
> #AFTER SUM SUBSERIES EQ =2
> #BEFORE ADJUST SUBSERIES EQ =2
> ord := 1;
> calc_term := 3;
> #adjust_subseriesarray_y2
> iii := glob_max_terms;
> while (iii >= calc_term) do # do number 2
> array_y2_higher_work[1,iii] := array_y2_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 =2
> #BEFORE SUM SUBSERIES EQ =2
> temp_sum := 0.0;
> ord := 1;
> calc_term := 3;
> #sum_subseriesarray_y2
> iii := glob_max_terms;
> while (iii >= calc_term) do # do number 2
> temp_sum := temp_sum + array_y2_higher_work[ord,iii];
> iii := iii - 1;
> od;# end do number 2;
> array_y2_higher_work2[ord,calc_term] := temp_sum * expt(glob_h , (calc_term - 1)) / (factorial_1(calc_term - 1));
> #AFTER SUM SUBSERIES EQ =2
> #BEFORE ADJUST SUBSERIES EQ =2
> ord := 1;
> calc_term := 2;
> #adjust_subseriesarray_y2
> iii := glob_max_terms;
> while (iii >= calc_term) do # do number 2
> array_y2_higher_work[1,iii] := array_y2_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 =2
> #BEFORE SUM SUBSERIES EQ =2
> temp_sum := 0.0;
> ord := 1;
> calc_term := 2;
> #sum_subseriesarray_y2
> iii := glob_max_terms;
> while (iii >= calc_term) do # do number 2
> temp_sum := temp_sum + array_y2_higher_work[ord,iii];
> iii := iii - 1;
> od;# end do number 2;
> array_y2_higher_work2[ord,calc_term] := temp_sum * expt(glob_h , (calc_term - 1)) / (factorial_1(calc_term - 1));
> #AFTER SUM SUBSERIES EQ =2
> #BEFORE ADJUST SUBSERIES EQ =2
> ord := 1;
> calc_term := 1;
> #adjust_subseriesarray_y2
> iii := glob_max_terms;
> while (iii >= calc_term) do # do number 2
> array_y2_higher_work[1,iii] := array_y2_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 =2
> #BEFORE SUM SUBSERIES EQ =2
> temp_sum := 0.0;
> ord := 1;
> calc_term := 1;
> #sum_subseriesarray_y2
> iii := glob_max_terms;
> while (iii >= calc_term) do # do number 2
> temp_sum := temp_sum + array_y2_higher_work[ord,iii];
> iii := iii - 1;
> od;# end do number 2;
> array_y2_higher_work2[ord,calc_term] := temp_sum * expt(glob_h , (calc_term - 1)) / (factorial_1(calc_term - 1));
> #AFTER SUM SUBSERIES EQ =2
> #END SUM AND ADJUST EQ =2
> #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_y2[term_no] := array_y2_higher_work2[1,term_no];
> ord := 1;
> while (ord <= order_diff) do # do number 3
> array_y2_higher[ord,term_no] := array_y2_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 11
> omniout_str(ALWAYS,"Maximum Iterations Reached before Solution Completed!");
> fi;# end if 11;
> if (elapsed_time_seconds() - convfloat(glob_orig_start_sec) >= convfloat(glob_max_sec )) then # if number 11
> omniout_str(ALWAYS,"Maximum Time Reached before Solution Completed!");
> fi;# end if 11;
> glob_clock_sec := elapsed_time_seconds();
> omniout_str(INFO,"diff ( y1 , x , 1 ) = m1 * y2 ;");
> omniout_str(INFO,"diff ( y2 , x , 2 ) = diff ( y1, x , 1) ;");
> omniout_int(INFO,"Iterations ",32,glob_iter,4," ")
> ;
> prog_report(x_start,x_end);
> if (glob_html_log) then # if number 11
> logstart(html_log_file);
> logitem_str(html_log_file,"2013-07-03T03:24:00-05:00")
> ;
> logitem_str(html_log_file,"Maple")
> ;
> logitem_str(html_log_file,"mtest5")
> ;
> logitem_str(html_log_file,"diff ( y1 , x , 1 ) = m1 * y2 ;")
> ;
> 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 12
> logitem_time(html_log_file,convfloat(glob_total_exp_sec))
> ;
> 0;
> else
> logitem_str(html_log_file,"Done")
> ;
> 0;
> fi;# end if 12;
> log_revs(html_log_file," 194 | ")
> ;
> logitem_str(html_log_file,"mtest5 diffeq.mxt")
> ;
> logitem_str(html_log_file,"mtest5 maple results")
> ;
> logitem_str(html_log_file,"All Tests - All Languages")
> ;
> logend(html_log_file)
> ;
> logditto(html_log_file)
> ;
> logditto(html_log_file)
> ;
> logditto(html_log_file)
> ;
> logitem_str(html_log_file,"diff ( y2 , x , 2 ) = diff ( y1, x , 1) ;")
> ;
> logditto(html_log_file)
> ;
> logditto(html_log_file)
> ;
> logditto(html_log_file)
> ;
> logditto(html_log_file)
> ;
> logditto(html_log_file)
> ;
> ;
> logitem_good_digits(html_log_file,array_last_rel_error[2])
> ;
> logditto(html_log_file)
> ;
> logitem_float(html_log_file,array_1st_rel_error[2])
> ;
> logitem_float(html_log_file,array_last_rel_error[2])
> ;
> logditto(html_log_file)
> ;
> logditto(html_log_file)
> ;
> if (glob_percent_done < 100.0) then # if number 12
> logditto(html_log_file)
> ;
> 0;
> else
> logditto(html_log_file)
> ;
> 0;
> fi;# end if 12;
> logditto(html_log_file);
> ;
> logditto(html_log_file)
> ;
> logditto(html_log_file)
> ;
> logditto(html_log_file)
> ;
> logend(html_log_file)
> ;
> ;
> fi;# end if 11;
> if (glob_html_log) then # if number 11
> fclose(html_log_file);
> fi;# end if 11
> ;
> ;;
> fi;# end if 10
> #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_diff_rc_fm, glob_diff_rc_fmm1, glob_diff_rc_fmm2, glob_diff_ord_fm,
glob_diff_ord_fmm1, glob_diff_ord_fmm2, glob_guess_error_rc,
glob_guess_error_ord, 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_2, array_y1_init, array_y2_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_y1, array_x, array_y2, array_tmp0,
array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_m1, array_y1_higher,
array_y1_higher_work, array_y1_higher_work2, array_y1_set_initial,
array_y2_higher, array_y2_higher_work, array_y2_higher_work2,
array_y2_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_diff_rc_fm := 0.1;
glob_diff_rc_fmm1 := 0.1;
glob_diff_rc_fmm2 := 0.1;
glob_diff_ord_fm := 0.1;
glob_diff_ord_fmm1 := 0.1;
glob_diff_ord_fmm2 := 0.1;
glob_guess_error_rc := 0.1;
glob_guess_error_ord := 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 := 2;
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/mtest5postode.ode#################");
omniout_str(ALWAYS, "diff ( y1 , x , 1 ) = m1 * y2 ;");
omniout_str(ALWAYS, "diff ( y2 , x , 2 ) = diff ( y1, x , 1) ;");
omniout_str(ALWAYS, "!");
omniout_str(ALWAYS, "#BEGIN FIRST INPUT BLOCK");
omniout_str(ALWAYS, "Digits:=32;");
omniout_str(ALWAYS, "max_terms:=30;");
omniout_str(ALWAYS, "!");
omniout_str(ALWAYS, "#END FIRST INPUT BLOCK");
omniout_str(ALWAYS, "#BEGIN SECOND INPUT BLOCK");
omniout_str(ALWAYS, "x_start := 0.5;");
omniout_str(ALWAYS, "x_end := 5.0;");
omniout_str(ALWAYS, "array_y1_init[0 + 1] := exact_soln_y1(x_start);");
omniout_str(ALWAYS, "array_y2_init[0 + 1] := exact_soln_y2(x_start);");
omniout_str(ALWAYS, "array_y2_init[1 + 1] := exact_soln_y2p(x_start);")
;
omniout_str(ALWAYS, "glob_max_iter := 20;");
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.1;");
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, "exact_soln_y1 := proc(x)");
omniout_str(ALWAYS, "return( - cos(x));");
omniout_str(ALWAYS, "end;");
omniout_str(ALWAYS, "exact_soln_y2 := proc(x)");
omniout_str(ALWAYS, "return( - sin(x));");
omniout_str(ALWAYS, "end;");
omniout_str(ALWAYS, "exact_soln_y2p := proc(x)");
omniout_str(ALWAYS, "return( - cos(x));");
omniout_str(ALWAYS, "end;");
omniout_str(ALWAYS, "");
omniout_str(ALWAYS, "#END USER DEF BLOCK");
omniout_str(ALWAYS, "#######END OF ECHO OF PROBLEM#################");
glob_unchanged_h_cnt := 0;
glob_warned := false;
glob_warned2 := false;
glob_small_float := 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_y1_init := Array(0 .. max_terms + 1, []);
array_y2_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 .. 4, []);
array_last_rel_error := Array(0 .. 4, []);
array_type_pole := Array(0 .. 4, []);
array_type_real_pole := Array(0 .. 4, []);
array_type_complex_pole := Array(0 .. 4, []);
array_y1 := Array(0 .. max_terms + 1, []);
array_x := Array(0 .. max_terms + 1, []);
array_y2 := Array(0 .. max_terms + 1, []);
array_tmp0 := Array(0 .. max_terms + 1, []);
array_tmp1 := Array(0 .. max_terms + 1, []);
array_tmp2 := Array(0 .. max_terms + 1, []);
array_tmp3 := Array(0 .. max_terms + 1, []);
array_tmp4 := Array(0 .. max_terms + 1, []);
array_m1 := Array(0 .. max_terms + 1, []);
array_y1_higher := Array(0 .. 3, 0 .. max_terms + 1, []);
array_y1_higher_work := Array(0 .. 3, 0 .. max_terms + 1, []);
array_y1_higher_work2 := Array(0 .. 3, 0 .. max_terms + 1, []);
array_y1_set_initial := Array(0 .. 4, 0 .. max_terms + 1, []);
array_y2_higher := Array(0 .. 4, 0 .. max_terms + 1, []);
array_y2_higher_work := Array(0 .. 4, 0 .. max_terms + 1, []);
array_y2_higher_work2 := Array(0 .. 4, 0 .. max_terms + 1, []);
array_y2_set_initial := Array(0 .. 4, 0 .. max_terms + 1, []);
array_poles := Array(0 .. 4, 0 .. 4, []);
array_given_rad_poles := Array(0 .. 4, 0 .. 4, []);
array_given_ord_poles := Array(0 .. 4, 0 .. 4, []);
array_real_poles := Array(0 .. 4, 0 .. 4, []);
array_complex_poles := Array(0 .. 4, 0 .. 4, []);
array_fact_2 := Array(0 .. max_terms + 1, 0 .. max_terms + 1, []);
term := 1;
while term <= max_terms do array_y1_init[term] := 0.; term := term + 1
end do;
term := 1;
while term <= max_terms do array_y2_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 <= 3 do array_1st_rel_error[term] := 0.; term := term + 1
end do;
term := 1;
while term <= 3 do array_last_rel_error[term] := 0.; term := term + 1
end do;
term := 1;
while term <= 3 do array_type_pole[term] := 0.; term := term + 1 end do
;
term := 1;
while term <= 3 do array_type_real_pole[term] := 0.; term := term + 1
end do;
term := 1;
while term <= 3 do
array_type_complex_pole[term] := 0.; term := term + 1
end do;
term := 1;
while term <= max_terms do array_y1[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_y2[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[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_tmp4[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_y1_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_y1_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_y1_higher_work2[ord, term] := 0.; term := term + 1
end do;
ord := ord + 1
end do;
ord := 1;
while ord <= 3 do
term := 1;
while term <= max_terms do
array_y1_set_initial[ord, term] := 0.; term := term + 1
end do;
ord := ord + 1
end do;
ord := 1;
while ord <= 3 do
term := 1;
while term <= max_terms do
array_y2_higher[ord, term] := 0.; term := term + 1
end do;
ord := ord + 1
end do;
ord := 1;
while ord <= 3 do
term := 1;
while term <= max_terms do
array_y2_higher_work[ord, term] := 0.; term := term + 1
end do;
ord := ord + 1
end do;
ord := 1;
while ord <= 3 do
term := 1;
while term <= max_terms do
array_y2_higher_work2[ord, term] := 0.; term := term + 1
end do;
ord := ord + 1
end do;
ord := 1;
while ord <= 3 do
term := 1;
while term <= max_terms do
array_y2_set_initial[ord, term] := 0.; term := term + 1
end do;
ord := ord + 1
end do;
ord := 1;
while ord <= 3 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 <= 3 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 <= 3 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 <= 3 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 <= 3 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_y1 := Array(1 .. max_terms + 2, []);
term := 1;
while term <= max_terms + 1 do array_y1[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_m1 := Array(1 .. max_terms + 2, []);
term := 1;
while term <= max_terms + 1 do array_m1[term] := 0.; term := term + 1
end do;
array_y2 := Array(1 .. max_terms + 2, []);
term := 1;
while term <= max_terms + 1 do array_y2[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 := 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_tmp4 := Array(1 .. max_terms + 2, []);
term := 1;
while term <= max_terms + 1 do array_tmp4[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_2 := Array(1 .. max_terms + 2, []);
term := 1;
while term <= max_terms + 1 do
array_const_2[term] := 0.; term := term + 1
end do;
array_const_2[1] := 2;
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.5;
x_end := 5.0;
array_y1_init[1] := exact_soln_y1(x_start);
array_y2_init[1] := exact_soln_y2(x_start);
array_y2_init[2] := exact_soln_y2p(x_start);
glob_max_iter := 20;
glob_desired_digits_correct := 10;
glob_display_interval := 0.1;
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_y1_set_initial[1, 1] := true;
array_y1_set_initial[1, 2] := false;
array_y1_set_initial[1, 3] := false;
array_y1_set_initial[1, 4] := false;
array_y1_set_initial[1, 5] := false;
array_y1_set_initial[1, 6] := false;
array_y1_set_initial[1, 7] := false;
array_y1_set_initial[1, 8] := false;
array_y1_set_initial[1, 9] := false;
array_y1_set_initial[1, 10] := false;
array_y1_set_initial[1, 11] := false;
array_y1_set_initial[1, 12] := false;
array_y1_set_initial[1, 13] := false;
array_y1_set_initial[1, 14] := false;
array_y1_set_initial[1, 15] := false;
array_y1_set_initial[1, 16] := false;
array_y1_set_initial[1, 17] := false;
array_y1_set_initial[1, 18] := false;
array_y1_set_initial[1, 19] := false;
array_y1_set_initial[1, 20] := false;
array_y1_set_initial[1, 21] := false;
array_y1_set_initial[1, 22] := false;
array_y1_set_initial[1, 23] := false;
array_y1_set_initial[1, 24] := false;
array_y1_set_initial[1, 25] := false;
array_y1_set_initial[1, 26] := false;
array_y1_set_initial[1, 27] := false;
array_y1_set_initial[1, 28] := false;
array_y1_set_initial[1, 29] := false;
array_y1_set_initial[1, 30] := false;
array_y2_set_initial[2, 1] := true;
array_y2_set_initial[2, 2] := true;
array_y2_set_initial[2, 3] := false;
array_y2_set_initial[2, 4] := false;
array_y2_set_initial[2, 5] := false;
array_y2_set_initial[2, 6] := false;
array_y2_set_initial[2, 7] := false;
array_y2_set_initial[2, 8] := false;
array_y2_set_initial[2, 9] := false;
array_y2_set_initial[2, 10] := false;
array_y2_set_initial[2, 11] := false;
array_y2_set_initial[2, 12] := false;
array_y2_set_initial[2, 13] := false;
array_y2_set_initial[2, 14] := false;
array_y2_set_initial[2, 15] := false;
array_y2_set_initial[2, 16] := false;
array_y2_set_initial[2, 17] := false;
array_y2_set_initial[2, 18] := false;
array_y2_set_initial[2, 19] := false;
array_y2_set_initial[2, 20] := false;
array_y2_set_initial[2, 21] := false;
array_y2_set_initial[2, 22] := false;
array_y2_set_initial[2, 23] := false;
array_y2_set_initial[2, 24] := false;
array_y2_set_initial[2, 25] := false;
array_y2_set_initial[2, 26] := false;
array_y2_set_initial[2, 27] := false;
array_y2_set_initial[2, 28] := false;
array_y2_set_initial[2, 29] := false;
array_y2_set_initial[2, 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_y1[term_no] := array_y1_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_y1_higher[r_order, term_no] := array_y1_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;
order_diff := 2;
term_no := 1;
while term_no <= order_diff do
array_y2[term_no] := array_y2_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_y2_higher[r_order, term_no] := array_y2_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;
if glob_subiter_method = 1 then atomall()
elif glob_subiter_method = 2 then
subiter := 1;
while subiter <= 3 do atomall(); subiter := subiter + 1 end do
else
subiter := 1;
while subiter <= 3 + glob_max_terms do
atomall(); subiter := subiter + 1
end do
end if;
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_y1[term_no] := array_y1_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_y1_higher[r_order, term_no] := array_y1_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;
order_diff := 2;
term_no := 1;
while term_no <= order_diff do
array_y2[term_no] := array_y2_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_y2_higher[r_order, term_no] := array_y2_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;
if glob_subiter_method = 1 then atomall()
elif glob_subiter_method = 2 then
subiter := 1;
while subiter <= 3 do atomall(); subiter := subiter + 1
end do
else
subiter := 1;
while subiter <= 3 + glob_max_terms do
atomall(); subiter := subiter + 1
end do
end if;
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_y1_higher_work[2, iii] := array_y1_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_y1_higher_work[ord, iii];
iii := iii - 1
end do;
array_y1_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_y1_higher_work[1, iii] := array_y1_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_y1_higher_work[ord, iii];
iii := iii - 1
end do;
array_y1_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_y1_higher_work[1, iii] := array_y1_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_y1_higher_work[ord, iii];
iii := iii - 1
end do;
array_y1_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_y1[term_no] := array_y1_higher_work2[1, term_no];
ord := 1;
while ord <= order_diff do
array_y1_higher[ord, term_no] :=
array_y1_higher_work2[ord, term_no];
ord := ord + 1
end do;
term_no := term_no - 1
end do;
order_diff := 3;
ord := 3;
calc_term := 1;
iii := glob_max_terms;
while calc_term <= iii do
array_y2_higher_work[3, iii] := array_y2_higher[3, iii]/(
expt(glob_h, calc_term - 1)*
factorial_3(iii - calc_term, iii - 1));
iii := iii - 1
end do;
temp_sum := 0.;
ord := 3;
calc_term := 1;
iii := glob_max_terms;
while calc_term <= iii do
temp_sum := temp_sum + array_y2_higher_work[ord, iii];
iii := iii - 1
end do;
array_y2_higher_work2[ord, calc_term] := temp_sum*
expt(glob_h, calc_term - 1)/factorial_1(calc_term - 1);
ord := 2;
calc_term := 2;
iii := glob_max_terms;
while calc_term <= iii do
array_y2_higher_work[2, iii] := array_y2_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 := 2;
iii := glob_max_terms;
while calc_term <= iii do
temp_sum := temp_sum + array_y2_higher_work[ord, iii];
iii := iii - 1
end do;
array_y2_higher_work2[ord, calc_term] := temp_sum*
expt(glob_h, calc_term - 1)/factorial_1(calc_term - 1);
ord := 2;
calc_term := 1;
iii := glob_max_terms;
while calc_term <= iii do
array_y2_higher_work[2, iii] := array_y2_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_y2_higher_work[ord, iii];
iii := iii - 1
end do;
array_y2_higher_work2[ord, calc_term] := temp_sum*
expt(glob_h, calc_term - 1)/factorial_1(calc_term - 1);
ord := 1;
calc_term := 3;
iii := glob_max_terms;
while calc_term <= iii do
array_y2_higher_work[1, iii] := array_y2_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 := 3;
iii := glob_max_terms;
while calc_term <= iii do
temp_sum := temp_sum + array_y2_higher_work[ord, iii];
iii := iii - 1
end do;
array_y2_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_y2_higher_work[1, iii] := array_y2_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_y2_higher_work[ord, iii];
iii := iii - 1
end do;
array_y2_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_y2_higher_work[1, iii] := array_y2_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_y2_higher_work[ord, iii];
iii := iii - 1
end do;
array_y2_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_y2[term_no] := array_y2_higher_work2[1, term_no];
ord := 1;
while ord <= order_diff do
array_y2_higher[ord, term_no] :=
array_y2_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 ( y1 , x , 1 ) = m1 * y2 ;");
omniout_str(INFO, "diff ( y2 , x , 2 ) = diff ( y1, x , 1) ;");
omniout_int(INFO, "Iterations ", 32,
glob_iter, 4, " ");
prog_report(x_start, x_end);
if glob_html_log then
logstart(html_log_file);
logitem_str(html_log_file, "2013-07-03T03:24:00-05:00");
logitem_str(html_log_file, "Maple");
logitem_str(html_log_file,
"mtest5");
logitem_str(html_log_file, "diff ( y1 , x , 1 ) = m1 * y2 ;");
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, " 194 | ");
logitem_str(html_log_file,
"mtest5 diffeq.mxt");
logitem_str(html_log_file,
"mtest5 maple results")
;
logitem_str(html_log_file, "All Tests - All Languages");
logend(html_log_file);
logditto(html_log_file);
logditto(html_log_file);
logditto(html_log_file);
logitem_str(html_log_file,
"diff ( y2 , x , 2 ) = diff ( y1, x , 1) ;");
logditto(html_log_file);
logditto(html_log_file);
logditto(html_log_file);
logditto(html_log_file);
logditto(html_log_file);
logitem_good_digits(html_log_file, array_last_rel_error[2]);
logditto(html_log_file);
logitem_float(html_log_file, array_1st_rel_error[2]);
logitem_float(html_log_file, array_last_rel_error[2]);
logditto(html_log_file);
logditto(html_log_file);
if glob_percent_done < 100.0 then logditto(html_log_file); 0
else logditto(html_log_file); 0
end if;
logditto(html_log_file);
logditto(html_log_file);
logditto(html_log_file);
logditto(html_log_file);
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/mtest5postode.ode#################
diff ( y1 , x , 1 ) = m1 * y2 ;
diff ( y2 , x , 2 ) = diff ( y1, x , 1) ;
!
#BEGIN FIRST INPUT BLOCK
Digits:=32;
max_terms:=30;
!
#END FIRST INPUT BLOCK
#BEGIN SECOND INPUT BLOCK
x_start := 0.5;
x_end := 5.0;
array_y1_init[0 + 1] := exact_soln_y1(x_start);
array_y2_init[0 + 1] := exact_soln_y2(x_start);
array_y2_init[1 + 1] := exact_soln_y2p(x_start);
glob_max_iter := 20;
#END SECOND INPUT BLOCK
#BEGIN OVERRIDE BLOCK
glob_desired_digits_correct:=10;
glob_display_interval:=0.1;
glob_look_poles:=true;
glob_max_iter:=10000000;
glob_max_minutes:=3;
glob_subiter_method:=3;
#END OVERRIDE BLOCK
!
#BEGIN USER DEF BLOCK
exact_soln_y1 := proc(x)
return( - cos(x));
end;
exact_soln_y2 := proc(x)
return( - sin(x));
end;
exact_soln_y2p := proc(x)
return( - cos(x));
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 = 4.5
estimated_steps = 4500000
step_error = 2.2222222222222222222222222222222e-17
est_needed_step_err = 2.2222222222222222222222222222222e-17
opt_iter = 1
bytes used=4001556, alloc=3210676, time=0.17
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 2.1760504191201347172640125560893e-183
estimated_step_error = 2.1760504191201347172640125560893e-183
best_h = 2.0e-06
opt_iter = 2
bytes used=8002744, alloc=4586680, time=0.38
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 1.4603227015650941259925623828007e-175
estimated_step_error = 1.4603227015650941259925623828007e-175
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 = 9.8000595592556264960821340759545e-168
estimated_step_error = 9.8000595592556264960821340759545e-168
best_h = 8.000e-06
opt_iter = 4
bytes used=12003700, alloc=4586680, time=0.58
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 6.5767083754010533133506200318762e-160
estimated_step_error = 6.5767083754010533133506200318762e-160
best_h = 1.60000e-05
opt_iter = 5
bytes used=16006080, alloc=4586680, time=0.78
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 4.4135539221189055046517224808234e-152
estimated_step_error = 4.4135539221189055046517224808234e-152
best_h = 3.200000e-05
opt_iter = 6
bytes used=20007816, alloc=4586680, time=0.98
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 2.9618854197278297629265913043536e-144
estimated_step_error = 2.9618854197278297629265913043536e-144
best_h = 6.4000000e-05
opt_iter = 7
bytes used=24009176, alloc=4586680, time=1.18
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 1.9876870146750669269415596204014e-136
estimated_step_error = 1.9876870146750669269415596204014e-136
best_h = 0.000128
opt_iter = 8
bytes used=28010420, alloc=4586680, time=1.39
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 1.3339133117490700886825683454309e-128
estimated_step_error = 1.3339133117490700886825683454309e-128
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 = 8.9517291104750232104266630304315e-121
estimated_step_error = 8.9517291104750232104266630304315e-121
best_h = 0.000512
opt_iter = 10
bytes used=32012292, alloc=4586680, time=1.59
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 6.0073881555206778057824142455026e-113
estimated_step_error = 6.0073881555206778057824142455026e-113
best_h = 0.001024
opt_iter = 11
bytes used=36013976, alloc=4586680, time=1.78
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 4.0314690639458288589709402905376e-105
estimated_step_error = 4.0314690639458288589709402905376e-105
best_h = 0.002048
opt_iter = 12
bytes used=40014832, alloc=4586680, time=1.98
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 2.7054450608346626620567681632845e-97
estimated_step_error = 2.7054450608346626620567681632845e-97
best_h = 0.004096
opt_iter = 13
bytes used=44016164, alloc=4586680, time=2.18
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 1.8155558208048948153888608098124e-89
estimated_step_error = 1.8155558208048948153888608098124e-89
best_h = 0.008192
opt_iter = 14
bytes used=48019012, alloc=4586680, time=2.38
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 1.2183483761748801207239377571011e-81
estimated_step_error = 1.2183483761748801207239377571011e-81
best_h = 0.016384
opt_iter = 15
bytes used=52019976, alloc=4586680, time=2.58
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 8.1755193361148759155424465667867e-74
estimated_step_error = 8.1755193361148759155424465667867e-74
best_h = 0.032768
opt_iter = 16
bytes used=56020976, alloc=4586680, time=2.78
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 5.4855871411416643488751115852213e-66
estimated_step_error = 5.4855871411416643488751115852213e-66
best_h = 0.065536
opt_iter = 17
bytes used=60022120, alloc=4586680, time=2.98
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 3.6800905139569868890031721847892e-58
estimated_step_error = 3.6800905139569868890031721847892e-58
best_h = 0.131072
opt_iter = 18
bytes used=64023448, alloc=4586680, time=3.17
hn_div_ho = 0.5
hn_div_ho_2 = 0.25
hn_div_ho_3 = 0.125
max_estimated_step_error = 2.4680179083383405292585812506907e-50
estimated_step_error = 2.4680179083383405292585812506907e-50
best_h = 0.1
START of Soultion
TOP MAIN SOLVE Loop
x[1] = 0.5
y1[1] (analytic) = -0.87758256189037271611628158260383
y1[1] (numeric) = -0.87758256189037271611628158260383
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.47942553860420300027328793521557
y2[1] (numeric) = -0.47942553860420300027328793521557
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=68025152, alloc=4586680, time=3.38
x[1] = 0.6
y1[1] (analytic) = -0.82533561490967829724095249895538
y1[1] (numeric) = -0.82533561490967829724095249895538
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.56464247339503535720094544565866
y2[1] (numeric) = -0.56464247339503535720094544565866
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=72025840, alloc=4586680, time=3.59
x[1] = 0.7
y1[1] (analytic) = -0.76484218728448842625585999019186
y1[1] (numeric) = -0.76484218728448842625585999019187
absolute error = 1e-32
relative error = 1.3074592597335938698746728353053e-30 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.64421768723769105367261435139872
y2[1] (numeric) = -0.64421768723769105367261435139872
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 16.85
Order of pole (ratio test) = 110.9
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
Radius of convergence (ratio test) for eq 2 = 16
Order of pole (ratio test) = 101.8
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=76026712, alloc=4586680, time=3.79
x[1] = 0.8
y1[1] (analytic) = -0.69670670934716542092074998164232
y1[1] (numeric) = -0.69670670934716542092074998164233
absolute error = 1e-32
relative error = 1.4353241996722398004969524081629e-30 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.71735609089952276162717461058139
y2[1] (numeric) = -0.71735609089952276162717461058139
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 18.45
Order of pole (ratio test) = 123
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
Radius of convergence (ratio test) for eq 2 = 17.48
Order of pole (ratio test) = 112.7
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=80027676, alloc=4652204, time=4.00
x[1] = 0.9
y1[1] (analytic) = -0.62160996827066445648471615140713
y1[1] (numeric) = -0.62160996827066445648471615140714
absolute error = 1e-32
relative error = 1.6087258104660495130240128623064e-30 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.78332690962748338846138231571355
y2[1] (numeric) = -0.78332690962748338846138231571355
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 15.08
Order of pole (ratio test) = 97.47
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
Radius of convergence (ratio test) for eq 2 = 14.28
Order of pole (ratio test) = 89.17
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=84028912, alloc=4652204, time=4.21
x[1] = 1
y1[1] (analytic) = -0.54030230586813971740093660744298
y1[1] (numeric) = -0.54030230586813971740093660744298
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.8414709848078965066525023216303
y2[1] (numeric) = -0.8414709848078965066525023216303
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
x[1] = 1.1
y1[1] (analytic) = -0.45359612142557738777137005178472
y1[1] (numeric) = -0.45359612142557738777137005178472
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.8912073600614353399518025778717
y2[1] (numeric) = -0.8912073600614353399518025778717
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=88030204, alloc=4652204, time=4.42
x[1] = 1.2
y1[1] (analytic) = -0.36235775447667357763837335562308
y1[1] (numeric) = -0.36235775447667357763837335562308
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.93203908596722634967013443549483
y2[1] (numeric) = -0.93203908596722634967013443549482
absolute error = 1e-32
relative error = 1.0729163777098972287051169224352e-30 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=92031920, alloc=4652204, time=4.63
x[1] = 1.3
y1[1] (analytic) = -0.26749882862458740699798410929287
y1[1] (numeric) = -0.26749882862458740699798410929288
absolute error = 1e-32
relative error = 3.7383341270754411719436683964147e-30 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.96355818541719296470134863003955
y2[1] (numeric) = -0.96355818541719296470134863003955
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=96032856, alloc=4652204, time=4.83
x[1] = 1.4
y1[1] (analytic) = -0.16996714290024093861674803520365
y1[1] (numeric) = -0.16996714290024093861674803520366
absolute error = 1e-32
relative error = 5.8834900848273448269942703098450e-30 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.9854497299884601806594745788061
y2[1] (numeric) = -0.98544972998846018065947457880609
absolute error = 1e-32
relative error = 1.0147651062948794009002488479520e-30 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=100033876, alloc=4652204, time=5.04
x[1] = 1.5
y1[1] (analytic) = -0.070737201667702910088189851434269
y1[1] (numeric) = -0.07073720166770291008818985143428
absolute error = 1.1e-32
relative error = 1.5550516193266893390115551277604e-29 %
Correct digits = 31
h = 0.1
y2[1] (analytic) = -0.99749498660405443094172337114149
y2[1] (numeric) = -0.99749498660405443094172337114148
absolute error = 1e-32
relative error = 1.0025113042467249099541836495087e-30 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
x[1] = 1.6
y1[1] (analytic) = 0.029199522301288726205770462946499
y1[1] (numeric) = 0.029199522301288726205770462946487
absolute error = 1.2e-32
relative error = 4.1096562732022427046354553779949e-29 %
Correct digits = 31
h = 0.1
y2[1] (analytic) = -0.99957360304150516434211382554623
bytes used=104035168, alloc=4652204, time=5.25
y2[1] (numeric) = -0.99957360304150516434211382554623
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
Radius of convergence (three term test) for eq 1 = 0.02919
Order of pole (three term test) = 27
Derivative of radius w.r.t nth term = 1.177e+51
Derivative of order w.r.t nth term = 3.437e+49
Derivative of radius w.r.t (n-1)th term = 1.548e+50
Derivative of order w.r.t (n-1)th term = -4.992e+50
Derivative of radius w.r.t (n-2)th term = -1.545e+43
Derivative of order w.r.t (n-2)th term = -4.996e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.05832
Guess error in order = 0.002556
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
Radius of convergence (three term test) for eq 2 = 0.02919
Order of pole (three term test) = 26
Derivative of radius w.r.t nth term = 1.177e+51
Derivative of order w.r.t nth term = 3.437e+49
Derivative of radius w.r.t (n-1)th term = 1.548e+50
Derivative of order w.r.t (n-1)th term = -4.992e+50
Derivative of radius w.r.t (n-2)th term = -1.545e+43
Derivative of order w.r.t (n-2)th term = -4.996e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.05832
Guess error in order = 0.002556
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
x[1] = 1.7
y1[1] (analytic) = 0.12884449429552468408764285733487
y1[1] (numeric) = 0.12884449429552468408764285733486
absolute error = 1e-32
relative error = 7.7612939960503554285051519661640e-30 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.99166481045246861534613339864788
y2[1] (numeric) = -0.99166481045246861534613339864787
absolute error = 1e-32
relative error = 1.0084052488902255927855971847806e-30 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
Radius of convergence (three term test) for eq 1 = 0.1278
Order of pole (three term test) = 26.98
Derivative of radius w.r.t nth term = 5.110e+51
Derivative of order w.r.t nth term = 6.639e+50
Derivative of radius w.r.t (n-1)th term = 1.487e+50
Derivative of order w.r.t (n-1)th term = -2.200e+51
Derivative of radius w.r.t (n-2)th term = -1.327e+45
Derivative of order w.r.t (n-2)th term = -4.956e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.2513
Guess error in order = 0.04898
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
Radius of convergence (three term test) for eq 2 = 0.1278
Order of pole (three term test) = 25.98
Derivative of radius w.r.t nth term = 5.110e+51
Derivative of order w.r.t nth term = 6.639e+50
Derivative of radius w.r.t (n-1)th term = 1.487e+50
Derivative of order w.r.t (n-1)th term = -2.200e+51
Derivative of radius w.r.t (n-2)th term = -1.327e+45
Derivative of order w.r.t (n-2)th term = -4.956e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.2513
Guess error in order = 0.04898
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=108037284, alloc=4652204, time=5.45
x[1] = 1.8
y1[1] (analytic) = 0.22720209469308705531667430653058
y1[1] (numeric) = 0.22720209469308705531667430653057
absolute error = 1e-32
relative error = 4.4013678718536322219439955233621e-30 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.97384763087819518653237317884336
y2[1] (numeric) = -0.97384763087819518653237317884335
absolute error = 1e-32
relative error = 1.0268546826963281313195342926096e-30 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
Radius of convergence (three term test) for eq 1 = 0.2213
Order of pole (three term test) = 26.95
Derivative of radius w.r.t nth term = 8.690e+51
Derivative of order w.r.t nth term = 2.027e+51
Derivative of radius w.r.t (n-1)th term = 1.355e+50
Derivative of order w.r.t (n-1)th term = -3.866e+51
Derivative of radius w.r.t (n-2)th term = -7.277e+45
Derivative of order w.r.t (n-2)th term = -4.867e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.4197
Guess error in order = 0.1469
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
Radius of convergence (three term test) for eq 2 = 0.2213
Order of pole (three term test) = 25.95
Derivative of radius w.r.t nth term = 8.690e+51
Derivative of order w.r.t nth term = 2.027e+51
Derivative of radius w.r.t (n-1)th term = 1.355e+50
Derivative of order w.r.t (n-1)th term = -3.866e+51
Derivative of radius w.r.t (n-2)th term = -7.277e+45
Derivative of order w.r.t (n-2)th term = -4.867e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.4197
Guess error in order = 0.1469
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=112038692, alloc=4652204, time=5.66
x[1] = 1.9
y1[1] (analytic) = 0.32328956686350342227883369508031
y1[1] (numeric) = 0.3232895668635034222788336950803
absolute error = 1e-32
relative error = 3.0932022016726927495556930138634e-30 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.94630008768741448848970961163496
y2[1] (numeric) = -0.94630008768741448848970961163495
absolute error = 1e-32
relative error = 1.0567472337911521726622641141563e-30 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
Radius of convergence (three term test) for eq 1 = 0.3059
Order of pole (three term test) = 26.9
Derivative of radius w.r.t nth term = 1.168e+52
Derivative of order w.r.t nth term = 3.989e+51
Derivative of radius w.r.t (n-1)th term = 1.161e+50
Derivative of order w.r.t (n-1)th term = -5.474e+51
Derivative of radius w.r.t (n-2)th term = -2.096e+46
Derivative of order w.r.t (n-2)th term = -4.729e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.5479
Guess error in order = 0.2808
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
Radius of convergence (three term test) for eq 2 = 0.3059
Order of pole (three term test) = 25.9
Derivative of radius w.r.t nth term = 1.168e+52
Derivative of order w.r.t nth term = 3.989e+51
Derivative of radius w.r.t (n-1)th term = 1.161e+50
Derivative of order w.r.t (n-1)th term = -5.474e+51
Derivative of radius w.r.t (n-2)th term = -2.096e+46
Derivative of order w.r.t (n-2)th term = -4.729e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.5479
Guess error in order = 0.2808
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=116041692, alloc=4652204, time=5.87
x[1] = 2
y1[1] (analytic) = 0.41614683654714238699756822950076
y1[1] (numeric) = 0.41614683654714238699756822950075
absolute error = 1e-32
relative error = 2.4029979617223809897546004014201e-30 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.90929742682568169539601986591174
y2[1] (numeric) = -0.90929742682568169539601986591174
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
Radius of convergence (three term test) for eq 1 = 0.3784
Order of pole (three term test) = 26.83
Derivative of radius w.r.t nth term = 1.388e+52
Derivative of order w.r.t nth term = 6.351e+51
Derivative of radius w.r.t (n-1)th term = 9.219e+49
Derivative of order w.r.t (n-1)th term = -7.001e+51
Derivative of radius w.r.t (n-2)th term = -4.471e+46
Derivative of order w.r.t (n-2)th term = -4.545e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.6257
Guess error in order = 0.4296
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
Radius of convergence (three term test) for eq 2 = 0.3784
Order of pole (three term test) = 25.83
Derivative of radius w.r.t nth term = 1.388e+52
Derivative of order w.r.t nth term = 6.351e+51
Derivative of radius w.r.t (n-1)th term = 9.219e+49
Derivative of order w.r.t (n-1)th term = -7.001e+51
Derivative of radius w.r.t (n-2)th term = -4.471e+46
Derivative of order w.r.t (n-2)th term = -4.545e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.6257
Guess error in order = 0.4296
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=120042436, alloc=4717728, time=6.08
x[1] = 2.1
y1[1] (analytic) = 0.50484610459985745162093852371917
y1[1] (numeric) = 0.50484610459985745162093852371916
absolute error = 1e-32
relative error = 1.9808016559672239571942225812533e-30 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.86320936664887377068075931326902
y2[1] (numeric) = -0.86320936664887377068075931326902
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
Radius of convergence (three term test) for eq 1 = 0.4358
Order of pole (three term test) = 26.75
Derivative of radius w.r.t nth term = 1.517e+52
Derivative of order w.r.t nth term = 8.873e+51
Derivative of radius w.r.t (n-1)th term = 6.564e+49
Derivative of order w.r.t (n-1)th term = -8.428e+51
Derivative of radius w.r.t (n-2)th term = -7.983e+46
Derivative of order w.r.t (n-2)th term = -4.314e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.6494
Guess error in order = 0.5697
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
Radius of convergence (three term test) for eq 2 = 0.4358
Order of pole (three term test) = 25.75
Derivative of radius w.r.t nth term = 1.517e+52
Derivative of order w.r.t nth term = 8.873e+51
Derivative of radius w.r.t (n-1)th term = 6.564e+49
Derivative of order w.r.t (n-1)th term = -8.428e+51
Derivative of radius w.r.t (n-2)th term = -7.983e+46
Derivative of order w.r.t (n-2)th term = -4.314e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.6494
Guess error in order = 0.5697
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=124043788, alloc=4717728, time=6.29
x[1] = 2.2
y1[1] (analytic) = 0.58850111725534570852414261265493
y1[1] (numeric) = 0.58850111725534570852414261265492
absolute error = 1e-32
relative error = 1.6992321181373532904394435004937e-30 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.80849640381959018430403691041612
y2[1] (numeric) = -0.80849640381959018430403691041612
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 13.83
Order of pole (ratio test) = 88.04
Radius of convergence (three term test) for eq 1 = 0.4758
Order of pole (three term test) = 26.65
Derivative of radius w.r.t nth term = 1.551e+52
Derivative of order w.r.t nth term = 1.129e+52
Derivative of radius w.r.t (n-1)th term = 3.854e+49
Derivative of order w.r.t (n-1)th term = -9.739e+51
Derivative of radius w.r.t (n-2)th term = -1.265e+47
Derivative of order w.r.t (n-2)th term = -4.041e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.622
Guess error in order = 0.6792
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
Radius of convergence (ratio test) for eq 2 = 13.1
Order of pole (ratio test) = 80.48
Radius of convergence (three term test) for eq 2 = 0.4758
Order of pole (three term test) = 25.65
Derivative of radius w.r.t nth term = 1.551e+52
Derivative of order w.r.t nth term = 1.129e+52
Derivative of radius w.r.t (n-1)th term = 3.854e+49
Derivative of order w.r.t (n-1)th term = -9.739e+51
Derivative of radius w.r.t (n-2)th term = -1.265e+47
Derivative of order w.r.t (n-2)th term = -4.041e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.622
Guess error in order = 0.6792
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
x[1] = 2.3
y1[1] (analytic) = 0.66627602127982419331788057116602
y1[1] (numeric) = 0.66627602127982419331788057116601
absolute error = 1e-32
relative error = 1.5008794674602549050021477349038e-30 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.7457052121767201773854062116435
y2[1] (numeric) = -0.7457052121767201773854062116435
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 16.98
Order of pole (ratio test) = 111.8
Radius of convergence (three term test) for eq 1 = 0.4968
Order of pole (three term test) = 26.56
Derivative of radius w.r.t nth term = 1.494e+52
Derivative of order w.r.t nth term = 1.335e+52
Derivative of radius w.r.t (n-1)th term = 1.297e+49
Derivative of order w.r.t (n-1)th term = -1.092e+52
Derivative of radius w.r.t (n-2)th term = -1.835e+47
Derivative of order w.r.t (n-2)th term = -3.727e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.5526
Guess error in order = 0.7406
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
Radius of convergence (ratio test) for eq 2 = 16.08
Order of pole (ratio test) = 102.4
Radius of convergence (three term test) for eq 2 = 0.4968
Order of pole (three term test) = 25.56
Derivative of radius w.r.t nth term = 1.494e+52
Derivative of order w.r.t nth term = 1.335e+52
Derivative of radius w.r.t (n-1)th term = 1.297e+49
Derivative of order w.r.t (n-1)th term = -1.092e+52
Derivative of radius w.r.t (n-2)th term = -1.835e+47
Derivative of order w.r.t (n-2)th term = -3.727e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.5526
Guess error in order = 0.7406
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=128045412, alloc=4717728, time=6.49
x[1] = 2.4
y1[1] (analytic) = 0.73739371554124549960882222733478
y1[1] (numeric) = 0.73739371554124549960882222733478
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.67546318055115092656577152534128
y2[1] (numeric) = -0.67546318055115092656577152534128
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 18.32
Order of pole (ratio test) = 122
Radius of convergence (three term test) for eq 1 = 0.4981
Order of pole (three term test) = 26.46
Derivative of radius w.r.t nth term = 1.357e+52
Derivative of order w.r.t nth term = 1.481e+52
Derivative of radius w.r.t (n-1)th term = -9.167e+48
Derivative of order w.r.t (n-1)th term = -1.197e+52
Derivative of radius w.r.t (n-2)th term = -2.488e+47
Derivative of order w.r.t (n-2)th term = -3.376e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.4545
Guess error in order = 0.7443
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
Radius of convergence (ratio test) for eq 2 = 17.4
Order of pole (ratio test) = 112.1
Radius of convergence (three term test) for eq 2 = 0.4981
Order of pole (three term test) = 25.46
Derivative of radius w.r.t nth term = 1.357e+52
Derivative of order w.r.t nth term = 1.481e+52
Derivative of radius w.r.t (n-1)th term = -9.167e+48
Derivative of order w.r.t (n-1)th term = -1.197e+52
Derivative of radius w.r.t (n-2)th term = -2.488e+47
Derivative of order w.r.t (n-2)th term = -3.376e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.4545
Guess error in order = 0.7443
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=132047208, alloc=4717728, time=6.70
x[1] = 2.5
y1[1] (analytic) = 0.80114361554693371483350279046735
y1[1] (numeric) = 0.80114361554693371483350279046735
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.59847214410395649405185470218616
y2[1] (numeric) = -0.59847214410395649405185470218616
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 14.94
Order of pole (ratio test) = 96.52
Radius of convergence (three term test) for eq 1 = 0.4795
Order of pole (three term test) = 26.36
Derivative of radius w.r.t nth term = 1.157e+52
Derivative of order w.r.t nth term = 1.549e+52
Derivative of radius w.r.t (n-1)th term = -2.633e+49
Derivative of order w.r.t (n-1)th term = -1.288e+52
Derivative of radius w.r.t (n-2)th term = -3.190e+47
Derivative of order w.r.t (n-2)th term = -2.991e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.3435
Guess error in order = 0.6897
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
Radius of convergence (ratio test) for eq 2 = 14.19
Order of pole (ratio test) = 88.58
Radius of convergence (three term test) for eq 2 = 0.4795
Order of pole (three term test) = 25.36
Derivative of radius w.r.t nth term = 1.157e+52
Derivative of order w.r.t nth term = 1.549e+52
Derivative of radius w.r.t (n-1)th term = -2.633e+49
Derivative of order w.r.t (n-1)th term = -1.288e+52
Derivative of radius w.r.t (n-2)th term = -3.190e+47
Derivative of order w.r.t (n-2)th term = -2.991e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.3435
Guess error in order = 0.6897
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=136049336, alloc=4717728, time=6.91
x[1] = 2.6
y1[1] (analytic) = 0.8568887533689472337977021516452
y1[1] (numeric) = 0.8568887533689472337977021516452
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.51550137182146423525772693520937
y2[1] (numeric) = -0.51550137182146423525772693520937
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
Radius of convergence (three term test) for eq 1 = 0.4417
Order of pole (three term test) = 26.27
Derivative of radius w.r.t nth term = 9.183e+51
Derivative of order w.r.t nth term = 1.527e+52
Derivative of radius w.r.t (n-1)th term = -3.746e+49
Derivative of order w.r.t (n-1)th term = -1.365e+52
Derivative of radius w.r.t (n-2)th term = -3.904e+47
Derivative of order w.r.t (n-2)th term = -2.576e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.2348
Guess error in order = 0.5854
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
Radius of convergence (three term test) for eq 2 = 0.4417
Order of pole (three term test) = 25.27
Derivative of radius w.r.t nth term = 9.183e+51
Derivative of order w.r.t nth term = 1.527e+52
Derivative of radius w.r.t (n-1)th term = -3.746e+49
Derivative of order w.r.t (n-1)th term = -1.365e+52
Derivative of radius w.r.t (n-2)th term = -3.904e+47
Derivative of order w.r.t (n-2)th term = -2.576e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.2348
Guess error in order = 0.5854
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=140052004, alloc=4717728, time=7.12
x[1] = 2.7
y1[1] (analytic) = 0.90407214201706114798252728194333
y1[1] (numeric) = 0.90407214201706114798252728194333
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.42737988023382993455605308585788
y2[1] (numeric) = -0.42737988023382993455605308585788
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
Radius of convergence (three term test) for eq 1 = 0.3864
Order of pole (three term test) = 26.18
Derivative of radius w.r.t nth term = 6.660e+51
Derivative of order w.r.t nth term = 1.409e+52
Derivative of radius w.r.t (n-1)th term = -4.207e+49
Derivative of order w.r.t (n-1)th term = -1.429e+52
Derivative of radius w.r.t (n-2)th term = -4.585e+47
Derivative of order w.r.t (n-2)th term = -2.136e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.1411
Guess error in order = 0.4479
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
Radius of convergence (three term test) for eq 2 = 0.3864
Order of pole (three term test) = 25.18
Derivative of radius w.r.t nth term = 6.660e+51
Derivative of order w.r.t nth term = 1.409e+52
Derivative of radius w.r.t (n-1)th term = -4.207e+49
Derivative of order w.r.t (n-1)th term = -1.429e+52
Derivative of radius w.r.t (n-2)th term = -4.585e+47
Derivative of order w.r.t (n-2)th term = -2.136e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.1411
Guess error in order = 0.4479
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=144052792, alloc=4717728, time=7.33
x[1] = 2.8
y1[1] (analytic) = 0.94222234066865815258678811736615
y1[1] (numeric) = 0.94222234066865815258678811736615
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.33498815015590491954385375271242
y2[1] (numeric) = -0.33498815015590491954385375271242
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
Radius of convergence (three term test) for eq 1 = 0.3156
Order of pole (three term test) = 26.11
Derivative of radius w.r.t nth term = 4.264e+51
Derivative of order w.r.t nth term = 1.199e+52
Derivative of radius w.r.t (n-1)th term = -4.030e+49
Derivative of order w.r.t (n-1)th term = -1.478e+52
Derivative of radius w.r.t (n-2)th term = -5.190e+47
Derivative of order w.r.t (n-2)th term = -1.674e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.07084
Guess error in order = 0.2989
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
Radius of convergence (three term test) for eq 2 = 0.3156
Order of pole (three term test) = 25.11
Derivative of radius w.r.t nth term = 4.264e+51
Derivative of order w.r.t nth term = 1.199e+52
Derivative of radius w.r.t (n-1)th term = -4.030e+49
Derivative of order w.r.t (n-1)th term = -1.478e+52
Derivative of radius w.r.t (n-2)th term = -5.190e+47
Derivative of order w.r.t (n-2)th term = -1.674e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.07084
Guess error in order = 0.2989
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
x[1] = 2.9
y1[1] (analytic) = 0.97095816514959052178110666934553
y1[1] (numeric) = 0.97095816514959052178110666934553
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.23924932921398232818425691873958
y2[1] (numeric) = -0.23924932921398232818425691873957
absolute error = 1e-32
relative error = 4.1797400364103403433326435361494e-30 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
Radius of convergence (three term test) for eq 1 = 0.2323
Order of pole (three term test) = 26.06
Derivative of radius w.r.t nth term = 2.241e+51
Derivative of order w.r.t nth term = 9.096e+51
Derivative of radius w.r.t (n-1)th term = -3.286e+49
Derivative of order w.r.t (n-1)th term = -1.515e+52
Derivative of radius w.r.t (n-2)th term = -5.679e+47
Derivative of order w.r.t (n-2)th term = -1.196e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.02659
Guess error in order = 0.1619
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
Radius of convergence (three term test) for eq 2 = 0.2323
Order of pole (three term test) = 25.06
Derivative of radius w.r.t nth term = 2.241e+51
Derivative of order w.r.t nth term = 9.096e+51
Derivative of radius w.r.t (n-1)th term = -3.286e+49
Derivative of order w.r.t (n-1)th term = -1.515e+52
Derivative of radius w.r.t (n-2)th term = -5.679e+47
Derivative of order w.r.t (n-2)th term = -1.196e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.02659
Guess error in order = 0.1619
NO COMPLEX POLE (six term test) for Equation 2
bytes used=148053904, alloc=4717728, time=7.54
TOP MAIN SOLVE Loop
x[1] = 3
y1[1] (analytic) = 0.98999249660044545727157279473126
y1[1] (numeric) = 0.98999249660044545727157279473126
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.14112000805986722210074480280811
y2[1] (numeric) = -0.1411200080598672221007448028081
absolute error = 1e-32
relative error = 7.0861673957371859182175322724613e-30 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
Radius of convergence (three term test) for eq 1 = 0.1397
Order of pole (three term test) = 26.02
Derivative of radius w.r.t nth term = 7.951e+50
Derivative of order w.r.t nth term = 5.578e+51
Derivative of radius w.r.t (n-1)th term = -2.102e+49
Derivative of order w.r.t (n-1)th term = -1.539e+52
Derivative of radius w.r.t (n-2)th term = -6.020e+47
Derivative of order w.r.t (n-2)th term = -7.053e+148
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.005565
Guess error in order = 0.05855
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
Radius of convergence (three term test) for eq 2 = 0.1397
Order of pole (three term test) = 25.02
Derivative of radius w.r.t nth term = 7.951e+50
Derivative of order w.r.t nth term = 5.578e+51
Derivative of radius w.r.t (n-1)th term = -2.102e+49
Derivative of order w.r.t (n-1)th term = -1.539e+52
Derivative of radius w.r.t (n-2)th term = -6.020e+47
Derivative of order w.r.t (n-2)th term = -7.053e+148
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.005565
Guess error in order = 0.05855
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=152054640, alloc=4717728, time=7.74
x[1] = 3.1
y1[1] (analytic) = 0.99913515027327946449237605454147
y1[1] (numeric) = 0.99913515027327946449237605454146
absolute error = 1e-32
relative error = 1.0008655983392076489922507371121e-30 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = -0.041580662433290579194698271596673
y2[1] (numeric) = -0.041580662433290579194698271596663
absolute error = 1.0e-32
relative error = 2.4049640902290520627642589597075e-29 %
Correct digits = 31
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
Radius of convergence (three term test) for eq 1 = 0.04154
Order of pole (three term test) = 26
Derivative of radius w.r.t nth term = 6.967e+49
Derivative of order w.r.t nth term = 1.674e+51
Derivative of radius w.r.t (n-1)th term = -6.427e+48
Derivative of order w.r.t (n-1)th term = -1.550e+52
Derivative of radius w.r.t (n-2)th term = -6.188e+47
Derivative of order w.r.t (n-2)th term = -2.078e+148
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.0001437
Guess error in order = 0.005178
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
Radius of convergence (three term test) for eq 2 = 0.04154
Order of pole (three term test) = 25
Derivative of radius w.r.t nth term = 6.967e+49
Derivative of order w.r.t nth term = 1.674e+51
Derivative of radius w.r.t (n-1)th term = -6.427e+48
Derivative of order w.r.t (n-1)th term = -1.550e+52
Derivative of radius w.r.t (n-2)th term = -6.188e+47
Derivative of order w.r.t (n-2)th term = -2.078e+148
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.0001437
Guess error in order = 0.005178
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=156056148, alloc=4717728, time=7.96
x[1] = 3.2
y1[1] (analytic) = 0.99829477579475308466166072228358
y1[1] (numeric) = 0.99829477579475308466166072228358
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = 0.058374143427579909137217414619095
y2[1] (numeric) = 0.058374143427579909137217414619105
absolute error = 1.0e-32
relative error = 1.7130872356878680929063816308708e-29 %
Correct digits = 31
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=160057400, alloc=4717728, time=8.17
x[1] = 3.3
y1[1] (analytic) = 0.98747976990886488393659105110285
y1[1] (numeric) = 0.98747976990886488393659105110285
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = 0.15774569414324838201165427760248
y2[1] (numeric) = 0.15774569414324838201165427760249
absolute error = 1e-32
relative error = 6.3393172500284100361868555679349e-30 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=164058256, alloc=4717728, time=8.39
x[1] = 3.4
y1[1] (analytic) = 0.96679819257946101428220153976569
y1[1] (numeric) = 0.96679819257946101428220153976569
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = 0.25554110202683131924990242936374
y2[1] (numeric) = 0.25554110202683131924990242936375
absolute error = 1e-32
relative error = 3.9132648018986861173935540372102e-30 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
x[1] = 3.5
y1[1] (analytic) = 0.93645668729079633769865762667176
y1[1] (numeric) = 0.93645668729079633769865762667176
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = 0.35078322768961984812036880004364
y2[1] (numeric) = 0.35078322768961984812036880004365
absolute error = 1e-32
relative error = 2.8507634375404641316451674512373e-30 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
bytes used=168059456, alloc=4717728, time=8.60
TOP MAIN SOLVE Loop
x[1] = 3.6
y1[1] (analytic) = 0.89675841633414700587029172526594
y1[1] (numeric) = 0.89675841633414700587029172526594
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = 0.44252044329485238426672734749269
y2[1] (numeric) = 0.44252044329485238426672734749271
absolute error = 2e-32
relative error = 4.5195652094820745312669301450665e-30 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=172060572, alloc=4717728, time=8.80
x[1] = 3.7
y1[1] (analytic) = 0.8481000317104081588356701063544
y1[1] (numeric) = 0.8481000317104081588356701063544
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = 0.52983614090849321321077762570121
y2[1] (numeric) = 0.52983614090849321321077762570122
absolute error = 1e-32
relative error = 1.8873759692672752393665846131690e-30 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=176061960, alloc=4717728, time=9.02
x[1] = 3.8
y1[1] (analytic) = 0.79096771191441669999656817435073
y1[1] (numeric) = 0.79096771191441669999656817435072
absolute error = 1e-32
relative error = 1.2642741099755545400070763510282e-30 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = 0.61185789094271907573358608611888
y2[1] (numeric) = 0.61185789094271907573358608611889
absolute error = 1e-32
relative error = 1.6343664350871598385445951448472e-30 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 15.47
Order of pole (ratio test) = 100.5
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
Radius of convergence (ratio test) for eq 2 = 14.7
Order of pole (ratio test) = 92.28
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=180063588, alloc=4717728, time=9.23
x[1] = 3.9
y1[1] (analytic) = 0.72593230420014012937233048461435
y1[1] (numeric) = 0.72593230420014012937233048461434
absolute error = 1e-32
relative error = 1.3775389168027700596386100490140e-30 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = 0.68776615918397381809088812537869
y2[1] (numeric) = 0.6877661591839738180908881253787
absolute error = 1e-32
relative error = 1.4539825588198288732847595064222e-30 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 18.95
Order of pole (ratio test) = 126.8
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
Radius of convergence (ratio test) for eq 2 = 18
Order of pole (ratio test) = 116.5
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=184065696, alloc=4717728, time=9.44
x[1] = 4
y1[1] (analytic) = 0.65364362086361191463916818309775
y1[1] (numeric) = 0.65364362086361191463916818309774
absolute error = 1e-32
relative error = 1.5298856564663975746295109229374e-30 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = 0.75680249530792825137263909451183
y2[1] (numeric) = 0.75680249530792825137263909451184
absolute error = 1e-32
relative error = 1.3213487088109023776967917563729e-30 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
Radius of convergence (ratio test) for eq 1 = 16.41
Order of pole (ratio test) = 107.6
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
Radius of convergence (ratio test) for eq 2 = 15.55
Order of pole (ratio test) = 98.44
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
x[1] = 4.1
y1[1] (analytic) = 0.57482394653326891153502867965979
y1[1] (numeric) = 0.57482394653326891153502867965978
absolute error = 1e-32
relative error = 1.7396630847252347423447520946823e-30 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = 0.81827711106441050426503702435845
y2[1] (numeric) = 0.81827711106441050426503702435846
absolute error = 1e-32
relative error = 1.2220798877035743190681194045303e-30 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
bytes used=188066764, alloc=4717728, time=9.65
TOP MAIN SOLVE Loop
x[1] = 4.2
y1[1] (analytic) = 0.49026082134069957765554488137713
y1[1] (numeric) = 0.49026082134069957765554488137712
absolute error = 1e-32
relative error = 2.0397306014894970478202618411357e-30 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = 0.87157577241358806001857709790882
y2[1] (numeric) = 0.87157577241358806001857709790883
absolute error = 1e-32
relative error = 1.1473471746819861209444930078806e-30 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=192068728, alloc=4717728, time=9.86
x[1] = 4.3
y1[1] (analytic) = 0.40079917207997529690676239633603
y1[1] (numeric) = 0.40079917207997529690676239633602
absolute error = 1e-32
relative error = 2.4950151339146489650889558438454e-30 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = 0.91616593674945498403170936028464
y2[1] (numeric) = 0.91616593674945498403170936028464
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=196069520, alloc=4717728, time=10.07
x[1] = 4.4
y1[1] (analytic) = 0.30733286997841968311913974221771
y1[1] (numeric) = 0.3073328699784196831191397422177
absolute error = 1e-32
relative error = 3.2538010010781406384241510003522e-30 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = 0.95160207388951595403539233338039
y2[1] (numeric) = 0.95160207388951595403539233338039
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=200070240, alloc=4783252, time=10.28
x[1] = 4.5
y1[1] (analytic) = 0.21079579943077970598048182479383
y1[1] (numeric) = 0.21079579943077970598048182479382
absolute error = 1e-32
relative error = 4.7439275483683253361286618479744e-30 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = 0.97753011766509705538913501449863
y2[1] (numeric) = 0.97753011766509705538913501449863
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=204071504, alloc=4783252, time=10.50
x[1] = 4.6
y1[1] (analytic) = 0.11215252693505451742990782122919
y1[1] (numeric) = 0.11215252693505451742990782122918
absolute error = 1e-32
relative error = 8.9164286113596152761366411596562e-30 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = 0.99369100363346445613810465990883
y2[1] (numeric) = 0.99369100363346445613810465990883
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
x[1] = 4.7
y1[1] (analytic) = 0.012388663462890737150508296327111
y1[1] (numeric) = 0.012388663462890737150508296327101
absolute error = 1.0e-32
relative error = 8.0718957536898230561651453521842e-29 %
Correct digits = 31
h = 0.1
y2[1] (analytic) = 0.99992325756410088417953654157497
y2[1] (numeric) = 0.99992325756410088417953654157497
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
NO REAL POLE (three term test) for Equation 2
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=208072452, alloc=4783252, time=10.71
x[1] = 4.8
y1[1] (analytic) = -0.087498983439446569320215257649488
y1[1] (numeric) = -0.087498983439446569320215257649497
absolute error = 9e-33
relative error = 1.0285833784832969208992823693452e-29 %
Correct digits = 31
h = 0.1
y2[1] (analytic) = 0.99616460883584067178159646650363
y2[1] (numeric) = 0.99616460883584067178159646650363
absolute error = 0
relative error = 0 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
Radius of convergence (three term test) for eq 1 = 0.08716
Order of pole (three term test) = 26.99
Derivative of radius w.r.t nth term = -3.502e+51
Derivative of order w.r.t nth term = -3.076e+50
Derivative of radius w.r.t (n-1)th term = -1.522e+50
Derivative of order w.r.t (n-1)th term = 1.495e+51
Derivative of radius w.r.t (n-2)th term = 4.156e+44
Derivative of order w.r.t (n-2)th term = 4.979e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.173
Guess error in order = 0.02279
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
Radius of convergence (three term test) for eq 2 = 0.08716
Order of pole (three term test) = 25.99
Derivative of radius w.r.t nth term = -3.502e+51
Derivative of order w.r.t nth term = -3.076e+50
Derivative of radius w.r.t (n-1)th term = -1.522e+50
Derivative of order w.r.t (n-1)th term = 1.495e+51
Derivative of radius w.r.t (n-2)th term = 4.156e+44
Derivative of order w.r.t (n-2)th term = 4.979e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.173
Guess error in order = 0.02279
NO COMPLEX POLE (six term test) for Equation 2
TOP MAIN SOLVE Loop
bytes used=212073112, alloc=4783252, time=10.91
x[1] = 4.9
y1[1] (analytic) = -0.18651236942257540449432914412192
y1[1] (numeric) = -0.18651236942257540449432914412193
absolute error = 1e-32
relative error = 5.3615746939246179699119342922790e-30 %
Correct digits = 32
h = 0.1
y2[1] (analytic) = 0.98245261262433251227637724991833
y2[1] (numeric) = 0.98245261262433251227637724991832
absolute error = 1e-32
relative error = 1.0178607977119576440363273863329e-30 %
Correct digits = 32
h = 0.1
NO INFO (given) for Equation 1
NO POLE (ratio test) for Equation 1
Radius of convergence (three term test) for eq 1 = 0.1832
Order of pole (three term test) = 26.97
Derivative of radius w.r.t nth term = -7.260e+51
Derivative of order w.r.t nth term = -1.378e+51
Derivative of radius w.r.t (n-1)th term = -1.418e+50
Derivative of order w.r.t (n-1)th term = 3.179e+51
Derivative of radius w.r.t (n-2)th term = 4.026e+45
Derivative of order w.r.t (n-2)th term = 4.910e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.3537
Guess error in order = 0.1007
NO COMPLEX POLE (six term test) for Equation 1
NO INFO (given) for Equation 2
NO POLE (ratio test) for Equation 2
Radius of convergence (three term test) for eq 2 = 0.1832
Order of pole (three term test) = 25.97
Derivative of radius w.r.t nth term = -7.260e+51
Derivative of order w.r.t nth term = -1.378e+51
Derivative of radius w.r.t (n-1)th term = -1.418e+50
Derivative of order w.r.t (n-1)th term = 3.179e+51
Derivative of radius w.r.t (n-2)th term = 4.026e+45
Derivative of order w.r.t (n-2)th term = 4.910e+149
Guess at Error should be multiplied by ratio of error in relevant terms (I used value of term instead of error in term).
Guess error in radius = 0.3537
Guess error in order = 0.1007
NO COMPLEX POLE (six term test) for Equation 2
Finished!
diff ( y1 , x , 1 ) = m1 * y2 ;
diff ( y2 , x , 2 ) = diff ( y1, x , 1) ;
Iterations = 45
Total Elapsed Time = 11 Seconds
Elapsed Time(since restart) = 7 Seconds
Time to Timeout = 2 Minutes 48 Seconds
Percent Done = 102.2 %
> quit
bytes used=214812684, alloc=4783252, time=11.05