|\^/| Maple 12 (IBM INTEL LINUX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2008 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > #BEGIN OUTFILE1 > > # Begin Function number 3 > reached_interval := proc() > global > DEBUGL, > glob_max_terms, > ALWAYS, > glob_iolevel, > DEBUGMASSIVE, > INFO, > #Top Generate Globals Decl > glob_orig_start_sec, > glob_smallish_float, > glob_max_sec, > glob_unchanged_h_cnt, > glob_not_yet_finished, > glob_clock_sec, > glob_log10relerr, > glob_log10_relerr, > glob_neg_h, > glob_clock_start_sec, > centuries_in_millinium, > glob_optimal_expect_sec, > glob_log10normmin, > glob_curr_iter_when_opt, > glob_start, > glob_html_log, > glob_iter, > MAX_UNCHANGED, > glob_warned, > glob_large_float, > glob_hmin_init, > years_in_century, > glob_good_digits, > glob_subiter_method, > glob_log10abserr, > glob_optimal_clock_start_sec, > glob_not_yet_start_msg, > days_in_year, > glob_current_iter, > glob_small_float, > glob_max_trunc_err, > glob_max_rel_trunc_err, > glob_dump_analytic, > glob_next_display, > glob_hmin, > glob_disp_incr, > glob_optimal_done, > glob_almost_1, > hours_in_day, > sec_in_minute, > glob_dump, > glob_max_opt_iter, > glob_percent_done, > glob_normmax, > glob_log10_abserr, > glob_last_good_h, > glob_optimal_start, > glob_no_eqs, > glob_max_hours, > glob_display_interval, > glob_look_poles, > glob_hmax, > glob_max_minutes, > glob_max_iter, > glob_relerr, > glob_abserr, > glob_h, > min_in_hour, > djd_debug2, > glob_display_flag, > djd_debug, > glob_warned2, > glob_reached_optimal_h, > glob_initial_pass, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_0D0, > array_const_3, > array_const_1, > array_const_4, > array_const_1D0, > #END CONST > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_type_pole, > array_m1, > array_x, > array_norms, > array_y1_init, > array_pole, > array_y2_init, > array_last_rel_error, > array_y2, > array_y1, > array_1st_rel_error, > array_fact_1, > array_complex_pole, > array_y2_set_initial, > array_y2_higher_work2, > array_y2_higher, > array_poles, > array_real_pole, > array_y1_higher, > array_fact_2, > array_y1_higher_work2, > array_y1_higher_work, > array_y2_higher_work, > array_y1_set_initial, > glob_last; > > > > local ret; > > if ((((array_x[1] >= glob_next_display) and not glob_neg_h) or ((array_x[1] <= glob_next_display) and glob_neg_h)) or (glob_next_display = 0.0)) then # if number 1 > ret := true; > else > ret := false; > fi;# end if 1 > ; > return(ret); > > # End Function number 3 > end; reached_interval := proc() local ret; global DEBUGL, glob_max_terms, ALWAYS, glob_iolevel, DEBUGMASSIVE, INFO, glob_orig_start_sec, glob_smallish_float, glob_max_sec, glob_unchanged_h_cnt, glob_not_yet_finished, glob_clock_sec, glob_log10relerr, glob_log10_relerr, glob_neg_h, glob_clock_start_sec, centuries_in_millinium, glob_optimal_expect_sec, glob_log10normmin, glob_curr_iter_when_opt, glob_start, glob_html_log, glob_iter, MAX_UNCHANGED, glob_warned, glob_large_float, glob_hmin_init, years_in_century, glob_good_digits, glob_subiter_method, glob_log10abserr, glob_optimal_clock_start_sec, glob_not_yet_start_msg, days_in_year, glob_current_iter, glob_small_float, glob_max_trunc_err, glob_max_rel_trunc_err, glob_dump_analytic, glob_next_display, glob_hmin, glob_disp_incr, glob_optimal_done, glob_almost_1, hours_in_day, sec_in_minute, glob_dump, glob_max_opt_iter, glob_percent_done, glob_normmax, glob_log10_abserr, glob_last_good_h, glob_optimal_start, glob_no_eqs, glob_max_hours, glob_display_interval, glob_look_poles, glob_hmax, glob_max_minutes, glob_max_iter, glob_relerr, glob_abserr, glob_h, min_in_hour, djd_debug2, glob_display_flag, djd_debug, glob_warned2, glob_reached_optimal_h, glob_initial_pass, array_const_0D0, array_const_3, array_const_1, array_const_4, array_const_1D0, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_type_pole, array_m1, array_x, array_norms, array_y1_init, array_pole, array_y2_init, array_last_rel_error, array_y2, array_y1, array_1st_rel_error, array_fact_1, array_complex_pole, array_y2_set_initial, array_y2_higher_work2, array_y2_higher, array_poles, array_real_pole, array_y1_higher, array_fact_2, array_y1_higher_work2, array_y1_higher_work, array_y2_higher_work, array_y1_set_initial, glob_last; if glob_next_display <= array_x[1] and not glob_neg_h or array_x[1] <= glob_next_display and glob_neg_h or glob_next_display = 0. then ret := true else ret := false end if; return ret end proc > # Begin Function number 4 > display_alot := proc(iter) > global > DEBUGL, > glob_max_terms, > ALWAYS, > glob_iolevel, > DEBUGMASSIVE, > INFO, > #Top Generate Globals Decl > glob_orig_start_sec, > glob_smallish_float, > glob_max_sec, > glob_unchanged_h_cnt, > glob_not_yet_finished, > glob_clock_sec, > glob_log10relerr, > glob_log10_relerr, > glob_neg_h, > glob_clock_start_sec, > centuries_in_millinium, > glob_optimal_expect_sec, > glob_log10normmin, > glob_curr_iter_when_opt, > glob_start, > glob_html_log, > glob_iter, > MAX_UNCHANGED, > glob_warned, > glob_large_float, > glob_hmin_init, > years_in_century, > glob_good_digits, > glob_subiter_method, > glob_log10abserr, > glob_optimal_clock_start_sec, > glob_not_yet_start_msg, > days_in_year, > glob_current_iter, > glob_small_float, > glob_max_trunc_err, > glob_max_rel_trunc_err, > glob_dump_analytic, > glob_next_display, > glob_hmin, > glob_disp_incr, > glob_optimal_done, > glob_almost_1, > hours_in_day, > sec_in_minute, > glob_dump, > glob_max_opt_iter, > glob_percent_done, > glob_normmax, > glob_log10_abserr, > glob_last_good_h, > glob_optimal_start, > glob_no_eqs, > glob_max_hours, > glob_display_interval, > glob_look_poles, > glob_hmax, > glob_max_minutes, > glob_max_iter, > glob_relerr, > glob_abserr, > glob_h, > min_in_hour, > djd_debug2, > glob_display_flag, > djd_debug, > glob_warned2, > glob_reached_optimal_h, > glob_initial_pass, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_0D0, > array_const_3, > array_const_1, > array_const_4, > array_const_1D0, > #END CONST > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_type_pole, > array_m1, > array_x, > array_norms, > array_y1_init, > array_pole, > array_y2_init, > array_last_rel_error, > array_y2, > array_y1, > array_1st_rel_error, > array_fact_1, > array_complex_pole, > array_y2_set_initial, > array_y2_higher_work2, > array_y2_higher, > array_poles, > array_real_pole, > array_y1_higher, > array_fact_2, > array_y1_higher_work2, > array_y1_higher_work, > array_y2_higher_work, > array_y1_set_initial, > glob_last; > > local abserr, analytic_val_y, ind_var, numeric_val, relerr, term_no; > > > > > > #TOP DISPLAY ALOT > if (reached_interval()) then # if number 1 > if (iter >= 0) then # if number 2 > ind_var := array_x[1]; > omniout_float(ALWAYS,"x[1] ",33,ind_var,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 3 > relerr := abserr*100.0/omniabs(analytic_val_y); > if (relerr <> 0.0) then # if number 4 > glob_good_digits := -trunc(log10(relerr/100.0)); > else > glob_good_digits := Digits; > fi;# end if 4 > ; > else > relerr := -1.0 ; > glob_good_digits := -1; > fi;# end if 3 > ; > if (glob_iter = 1) then # if number 3 > array_1st_rel_error[1] := relerr; > else > array_last_rel_error[1] := relerr; > fi;# end if 3 > ; > 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_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 3 > relerr := abserr*100.0/omniabs(analytic_val_y); > if (relerr <> 0.0) then # if number 4 > glob_good_digits := -trunc(log10(relerr/100.0)); > else > glob_good_digits := Digits; > fi;# end if 4 > ; > else > relerr := -1.0 ; > glob_good_digits := -1; > fi;# end if 3 > ; > if (glob_iter = 1) then # if number 3 > array_1st_rel_error[2] := relerr; > else > array_last_rel_error[2] := relerr; > fi;# end if 3 > ; > 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 2 > ; > #BOTTOM DISPLAY ALOT > fi;# end if 1 > ; > > # End Function number 4 > end; display_alot := proc(iter) local abserr, analytic_val_y, ind_var, numeric_val, relerr, term_no; global DEBUGL, glob_max_terms, ALWAYS, glob_iolevel, DEBUGMASSIVE, INFO, glob_orig_start_sec, glob_smallish_float, glob_max_sec, glob_unchanged_h_cnt, glob_not_yet_finished, glob_clock_sec, glob_log10relerr, glob_log10_relerr, glob_neg_h, glob_clock_start_sec, centuries_in_millinium, glob_optimal_expect_sec, glob_log10normmin, glob_curr_iter_when_opt, glob_start, glob_html_log, glob_iter, MAX_UNCHANGED, glob_warned, glob_large_float, glob_hmin_init, years_in_century, glob_good_digits, glob_subiter_method, glob_log10abserr, glob_optimal_clock_start_sec, glob_not_yet_start_msg, days_in_year, glob_current_iter, glob_small_float, glob_max_trunc_err, glob_max_rel_trunc_err, glob_dump_analytic, glob_next_display, glob_hmin, glob_disp_incr, glob_optimal_done, glob_almost_1, hours_in_day, sec_in_minute, glob_dump, glob_max_opt_iter, glob_percent_done, glob_normmax, glob_log10_abserr, glob_last_good_h, glob_optimal_start, glob_no_eqs, glob_max_hours, glob_display_interval, glob_look_poles, glob_hmax, glob_max_minutes, glob_max_iter, glob_relerr, glob_abserr, glob_h, min_in_hour, djd_debug2, glob_display_flag, djd_debug, glob_warned2, glob_reached_optimal_h, glob_initial_pass, array_const_0D0, array_const_3, array_const_1, array_const_4, array_const_1D0, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_type_pole, array_m1, array_x, array_norms, array_y1_init, array_pole, array_y2_init, array_last_rel_error, array_y2, array_y1, array_1st_rel_error, array_fact_1, array_complex_pole, array_y2_set_initial, array_y2_higher_work2, array_y2_higher, array_poles, array_real_pole, array_y1_higher, array_fact_2, array_y1_higher_work2, array_y1_higher_work, array_y2_higher_work, array_y1_set_initial, 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_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 relerr <> 0. then glob_good_digits := -trunc(log10(relerr/100.0)) 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_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 relerr <> 0. then glob_good_digits := -trunc(log10(relerr/100.0)) 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 > # Begin Function number 5 > adjust_for_pole := proc(h_param) > global > DEBUGL, > glob_max_terms, > ALWAYS, > glob_iolevel, > DEBUGMASSIVE, > INFO, > #Top Generate Globals Decl > glob_orig_start_sec, > glob_smallish_float, > glob_max_sec, > glob_unchanged_h_cnt, > glob_not_yet_finished, > glob_clock_sec, > glob_log10relerr, > glob_log10_relerr, > glob_neg_h, > glob_clock_start_sec, > centuries_in_millinium, > glob_optimal_expect_sec, > glob_log10normmin, > glob_curr_iter_when_opt, > glob_start, > glob_html_log, > glob_iter, > MAX_UNCHANGED, > glob_warned, > glob_large_float, > glob_hmin_init, > years_in_century, > glob_good_digits, > glob_subiter_method, > glob_log10abserr, > glob_optimal_clock_start_sec, > glob_not_yet_start_msg, > days_in_year, > glob_current_iter, > glob_small_float, > glob_max_trunc_err, > glob_max_rel_trunc_err, > glob_dump_analytic, > glob_next_display, > glob_hmin, > glob_disp_incr, > glob_optimal_done, > glob_almost_1, > hours_in_day, > sec_in_minute, > glob_dump, > glob_max_opt_iter, > glob_percent_done, > glob_normmax, > glob_log10_abserr, > glob_last_good_h, > glob_optimal_start, > glob_no_eqs, > glob_max_hours, > glob_display_interval, > glob_look_poles, > glob_hmax, > glob_max_minutes, > glob_max_iter, > glob_relerr, > glob_abserr, > glob_h, > min_in_hour, > djd_debug2, > glob_display_flag, > djd_debug, > glob_warned2, > glob_reached_optimal_h, > glob_initial_pass, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_0D0, > array_const_3, > array_const_1, > array_const_4, > array_const_1D0, > #END CONST > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_type_pole, > array_m1, > array_x, > array_norms, > array_y1_init, > array_pole, > array_y2_init, > array_last_rel_error, > array_y2, > array_y1, > array_1st_rel_error, > array_fact_1, > array_complex_pole, > array_y2_set_initial, > array_y2_higher_work2, > array_y2_higher, > array_poles, > array_real_pole, > array_y1_higher, > array_fact_2, > array_y1_higher_work2, > array_y1_higher_work, > array_y2_higher_work, > array_y1_set_initial, > glob_last; > > local hnew, sz2, tmp; > > > > #TOP ADJUST FOR POLE > > hnew := h_param; > glob_normmax := glob_small_float; > if (omniabs(array_y2_higher[1,1]) > glob_small_float) then # if number 1 > tmp := omniabs(array_y2_higher[1,1]); > if (tmp < glob_normmax) then # if number 2 > glob_normmax := tmp; > fi;# end if 2 > fi;# end if 1 > ; > if (omniabs(array_y1_higher[1,1]) > glob_small_float) then # if number 1 > tmp := omniabs(array_y1_higher[1,1]); > if (tmp < glob_normmax) then # if number 2 > glob_normmax := tmp; > fi;# end if 2 > fi;# end if 1 > ; > if (glob_look_poles and (omniabs(array_pole[1]) > glob_small_float) and (array_pole[1] <> glob_large_float)) then # if number 1 > sz2 := array_pole[1]/10.0; > if (sz2 < hnew) then # if number 2 > omniout_float(INFO,"glob_h adjusted to ",20,h_param,12,"due to singularity."); > omniout_str(INFO,"Reached Optimal"); > return(hnew); > fi;# end if 2 > fi;# end if 1 > ; > if ( not glob_reached_optimal_h) then # if number 1 > 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 1 > ; > hnew := sz2; > ;#END block > return(hnew); > #BOTTOM ADJUST FOR POLE > > # End Function number 5 > end; adjust_for_pole := proc(h_param) local hnew, sz2, tmp; global DEBUGL, glob_max_terms, ALWAYS, glob_iolevel, DEBUGMASSIVE, INFO, glob_orig_start_sec, glob_smallish_float, glob_max_sec, glob_unchanged_h_cnt, glob_not_yet_finished, glob_clock_sec, glob_log10relerr, glob_log10_relerr, glob_neg_h, glob_clock_start_sec, centuries_in_millinium, glob_optimal_expect_sec, glob_log10normmin, glob_curr_iter_when_opt, glob_start, glob_html_log, glob_iter, MAX_UNCHANGED, glob_warned, glob_large_float, glob_hmin_init, years_in_century, glob_good_digits, glob_subiter_method, glob_log10abserr, glob_optimal_clock_start_sec, glob_not_yet_start_msg, days_in_year, glob_current_iter, glob_small_float, glob_max_trunc_err, glob_max_rel_trunc_err, glob_dump_analytic, glob_next_display, glob_hmin, glob_disp_incr, glob_optimal_done, glob_almost_1, hours_in_day, sec_in_minute, glob_dump, glob_max_opt_iter, glob_percent_done, glob_normmax, glob_log10_abserr, glob_last_good_h, glob_optimal_start, glob_no_eqs, glob_max_hours, glob_display_interval, glob_look_poles, glob_hmax, glob_max_minutes, glob_max_iter, glob_relerr, glob_abserr, glob_h, min_in_hour, djd_debug2, glob_display_flag, djd_debug, glob_warned2, glob_reached_optimal_h, glob_initial_pass, array_const_0D0, array_const_3, array_const_1, array_const_4, array_const_1D0, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_type_pole, array_m1, array_x, array_norms, array_y1_init, array_pole, array_y2_init, array_last_rel_error, array_y2, array_y1, array_1st_rel_error, array_fact_1, array_complex_pole, array_y2_set_initial, array_y2_higher_work2, array_y2_higher, array_poles, array_real_pole, array_y1_higher, array_fact_2, array_y1_higher_work2, array_y1_higher_work, array_y2_higher_work, array_y1_set_initial, glob_last; hnew := h_param; glob_normmax := glob_small_float; 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_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_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 > # Begin Function number 6 > prog_report := proc(x_start,x_end) > global > DEBUGL, > glob_max_terms, > ALWAYS, > glob_iolevel, > DEBUGMASSIVE, > INFO, > #Top Generate Globals Decl > glob_orig_start_sec, > glob_smallish_float, > glob_max_sec, > glob_unchanged_h_cnt, > glob_not_yet_finished, > glob_clock_sec, > glob_log10relerr, > glob_log10_relerr, > glob_neg_h, > glob_clock_start_sec, > centuries_in_millinium, > glob_optimal_expect_sec, > glob_log10normmin, > glob_curr_iter_when_opt, > glob_start, > glob_html_log, > glob_iter, > MAX_UNCHANGED, > glob_warned, > glob_large_float, > glob_hmin_init, > years_in_century, > glob_good_digits, > glob_subiter_method, > glob_log10abserr, > glob_optimal_clock_start_sec, > glob_not_yet_start_msg, > days_in_year, > glob_current_iter, > glob_small_float, > glob_max_trunc_err, > glob_max_rel_trunc_err, > glob_dump_analytic, > glob_next_display, > glob_hmin, > glob_disp_incr, > glob_optimal_done, > glob_almost_1, > hours_in_day, > sec_in_minute, > glob_dump, > glob_max_opt_iter, > glob_percent_done, > glob_normmax, > glob_log10_abserr, > glob_last_good_h, > glob_optimal_start, > glob_no_eqs, > glob_max_hours, > glob_display_interval, > glob_look_poles, > glob_hmax, > glob_max_minutes, > glob_max_iter, > glob_relerr, > glob_abserr, > glob_h, > min_in_hour, > djd_debug2, > glob_display_flag, > djd_debug, > glob_warned2, > glob_reached_optimal_h, > glob_initial_pass, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_0D0, > array_const_3, > array_const_1, > array_const_4, > array_const_1D0, > #END CONST > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_type_pole, > array_m1, > array_x, > array_norms, > array_y1_init, > array_pole, > array_y2_init, > array_last_rel_error, > array_y2, > array_y1, > array_1st_rel_error, > array_fact_1, > array_complex_pole, > array_y2_set_initial, > array_y2_higher_work2, > array_y2_higher, > array_poles, > array_real_pole, > array_y1_higher, > array_fact_2, > array_y1_higher_work2, > array_y1_higher_work, > array_y2_higher_work, > array_y1_set_initial, > 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)); > 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 1 > 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)); > fi;# end if 1 > ; > 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 Function number 6 > 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 DEBUGL, glob_max_terms, ALWAYS, glob_iolevel, DEBUGMASSIVE, INFO, glob_orig_start_sec, glob_smallish_float, glob_max_sec, glob_unchanged_h_cnt, glob_not_yet_finished, glob_clock_sec, glob_log10relerr, glob_log10_relerr, glob_neg_h, glob_clock_start_sec, centuries_in_millinium, glob_optimal_expect_sec, glob_log10normmin, glob_curr_iter_when_opt, glob_start, glob_html_log, glob_iter, MAX_UNCHANGED, glob_warned, glob_large_float, glob_hmin_init, years_in_century, glob_good_digits, glob_subiter_method, glob_log10abserr, glob_optimal_clock_start_sec, glob_not_yet_start_msg, days_in_year, glob_current_iter, glob_small_float, glob_max_trunc_err, glob_max_rel_trunc_err, glob_dump_analytic, glob_next_display, glob_hmin, glob_disp_incr, glob_optimal_done, glob_almost_1, hours_in_day, sec_in_minute, glob_dump, glob_max_opt_iter, glob_percent_done, glob_normmax, glob_log10_abserr, glob_last_good_h, glob_optimal_start, glob_no_eqs, glob_max_hours, glob_display_interval, glob_look_poles, glob_hmax, glob_max_minutes, glob_max_iter, glob_relerr, glob_abserr, glob_h, min_in_hour, djd_debug2, glob_display_flag, djd_debug, glob_warned2, glob_reached_optimal_h, glob_initial_pass, array_const_0D0, array_const_3, array_const_1, array_const_4, array_const_1D0, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_type_pole, array_m1, array_x, array_norms, array_y1_init, array_pole, array_y2_init, array_last_rel_error, array_y2, array_y1, array_1st_rel_error, array_fact_1, array_complex_pole, array_y2_set_initial, array_y2_higher_work2, array_y2_higher, array_poles, array_real_pole, array_y1_higher, array_fact_2, array_y1_higher_work2, array_y1_higher_work, array_y2_higher_work, array_y1_set_initial, 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)); 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)) 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 > # Begin Function number 7 > check_for_pole := proc() > global > DEBUGL, > glob_max_terms, > ALWAYS, > glob_iolevel, > DEBUGMASSIVE, > INFO, > #Top Generate Globals Decl > glob_orig_start_sec, > glob_smallish_float, > glob_max_sec, > glob_unchanged_h_cnt, > glob_not_yet_finished, > glob_clock_sec, > glob_log10relerr, > glob_log10_relerr, > glob_neg_h, > glob_clock_start_sec, > centuries_in_millinium, > glob_optimal_expect_sec, > glob_log10normmin, > glob_curr_iter_when_opt, > glob_start, > glob_html_log, > glob_iter, > MAX_UNCHANGED, > glob_warned, > glob_large_float, > glob_hmin_init, > years_in_century, > glob_good_digits, > glob_subiter_method, > glob_log10abserr, > glob_optimal_clock_start_sec, > glob_not_yet_start_msg, > days_in_year, > glob_current_iter, > glob_small_float, > glob_max_trunc_err, > glob_max_rel_trunc_err, > glob_dump_analytic, > glob_next_display, > glob_hmin, > glob_disp_incr, > glob_optimal_done, > glob_almost_1, > hours_in_day, > sec_in_minute, > glob_dump, > glob_max_opt_iter, > glob_percent_done, > glob_normmax, > glob_log10_abserr, > glob_last_good_h, > glob_optimal_start, > glob_no_eqs, > glob_max_hours, > glob_display_interval, > glob_look_poles, > glob_hmax, > glob_max_minutes, > glob_max_iter, > glob_relerr, > glob_abserr, > glob_h, > min_in_hour, > djd_debug2, > glob_display_flag, > djd_debug, > glob_warned2, > glob_reached_optimal_h, > glob_initial_pass, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_0D0, > array_const_3, > array_const_1, > array_const_4, > array_const_1D0, > #END CONST > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_type_pole, > array_m1, > array_x, > array_norms, > array_y1_init, > array_pole, > array_y2_init, > array_last_rel_error, > array_y2, > array_y1, > array_1st_rel_error, > array_fact_1, > array_complex_pole, > array_y2_set_initial, > array_y2_higher_work2, > array_y2_higher, > array_poles, > array_real_pole, > array_y1_higher, > array_fact_2, > array_y1_higher_work2, > array_y1_higher_work, > array_y2_higher_work, > array_y1_set_initial, > glob_last; > > local cnt, dr1, dr2, ds1, ds2, hdrc, m, n, nr1, nr2, ord_no, rad_c, rcs, rm0, rm1, rm2, rm3, rm4, found; > > > > > > #TOP CHECK FOR POLE > #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 - 4 - 1; > while ((m >= 10) and ((omniabs(array_y2_higher[1,m]) < glob_small_float) or (omniabs(array_y2_higher[1,m-1]) < glob_small_float) or (omniabs(array_y2_higher[1,m-2]) < glob_small_float ))) do # do number 2 > m := m - 1; > od;# end do number 2 > ; > if (m > 10) then # if number 1 > 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]; > hdrc := convfloat(m-1)*rm0-convfloat(m-2)*rm1; > if (omniabs(hdrc) > glob_small_float) then # if number 2 > rcs := glob_h/hdrc; > ord_no := convfloat(m-1)*rm0/hdrc - convfloat(m) + 2.0; > array_real_pole[1,1] := rcs; > array_real_pole[1,2] := ord_no; > else > array_real_pole[1,1] := glob_large_float; > array_real_pole[1,2] := glob_large_float; > fi;# end if 2 > else > array_real_pole[1,1] := glob_large_float; > array_real_pole[1,2] := glob_large_float; > fi;# end if 1 > ; > #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 - 1 - 1; > while ((m >= 10) and ((omniabs(array_y1_higher[1,m]) < glob_small_float) or (omniabs(array_y1_higher[1,m-1]) < glob_small_float) or (omniabs(array_y1_higher[1,m-2]) < glob_small_float ))) do # do number 2 > m := m - 1; > od;# end do number 2 > ; > if (m > 10) then # if number 1 > 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]; > hdrc := convfloat(m-1)*rm0-convfloat(m-2)*rm1; > if (omniabs(hdrc) > glob_small_float) then # if number 2 > rcs := glob_h/hdrc; > ord_no := convfloat(m-1)*rm0/hdrc - convfloat(m) + 2.0; > array_real_pole[2,1] := rcs; > array_real_pole[2,2] := ord_no; > else > array_real_pole[2,1] := glob_large_float; > array_real_pole[2,2] := glob_large_float; > fi;# end if 2 > else > array_real_pole[2,1] := glob_large_float; > array_real_pole[2,2] := glob_large_float; > fi;# end if 1 > ; > #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 - 4 - 1; > cnt := 0; > while ((cnt < 5) and (n >= 10)) do # do number 2 > if (omniabs(array_y2_higher[1,n]) > glob_small_float) then # if number 1 > cnt := cnt + 1; > else > cnt := 0; > fi;# end if 1 > ; > n := n - 1; > od;# end do number 2 > ; > m := n + cnt; > if (m <= 10) then # if number 1 > array_complex_pole[1,1] := glob_large_float; > array_complex_pole[1,2] := glob_large_float; > elif ((omniabs(array_y2_higher[1,m]) >= (glob_large_float)) or (omniabs(array_y2_higher[1,m-1]) >=(glob_large_float)) or (omniabs(array_y2_higher[1,m-2]) >= (glob_large_float)) or (omniabs(array_y2_higher[1,m-3]) >= (glob_large_float)) or (omniabs(array_y2_higher[1,m-4]) >= (glob_large_float)) or (omniabs(array_y2_higher[1,m-5]) >= (glob_large_float))) then # if number 2 > array_complex_pole[1,1] := glob_large_float; > array_complex_pole[1,2] := 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) <= glob_small_float) or (omniabs(dr1) <= glob_small_float)) then # if number 3 > array_complex_pole[1,1] := glob_large_float; > array_complex_pole[1,2] := glob_large_float; > else > if (omniabs(nr1*dr2 - nr2 * dr1) > glob_small_float) then # if number 4 > 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) > glob_small_float) then # if number 5 > if (rcs > 0.0) then # if number 6 > rad_c := sqrt(rcs) * omniabs(glob_h); > else > rad_c := glob_large_float; > fi;# end if 6 > else > rad_c := glob_large_float; > ord_no := glob_large_float; > fi;# end if 5 > else > rad_c := glob_large_float; > ord_no := glob_large_float; > fi;# end if 4 > fi;# end if 3 > ; > array_complex_pole[1,1] := rad_c; > array_complex_pole[1,2] := ord_no; > fi;# end if 2 > ; > #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 - 1 - 1; > cnt := 0; > while ((cnt < 5) and (n >= 10)) do # do number 2 > if (omniabs(array_y1_higher[1,n]) > glob_small_float) then # if number 2 > cnt := cnt + 1; > else > cnt := 0; > fi;# end if 2 > ; > n := n - 1; > od;# end do number 2 > ; > m := n + cnt; > if (m <= 10) then # if number 2 > array_complex_pole[2,1] := glob_large_float; > array_complex_pole[2,2] := glob_large_float; > elif ((omniabs(array_y1_higher[1,m]) >= (glob_large_float)) or (omniabs(array_y1_higher[1,m-1]) >=(glob_large_float)) or (omniabs(array_y1_higher[1,m-2]) >= (glob_large_float)) or (omniabs(array_y1_higher[1,m-3]) >= (glob_large_float)) or (omniabs(array_y1_higher[1,m-4]) >= (glob_large_float)) or (omniabs(array_y1_higher[1,m-5]) >= (glob_large_float))) then # if number 3 > array_complex_pole[2,1] := glob_large_float; > array_complex_pole[2,2] := 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) <= glob_small_float) or (omniabs(dr1) <= glob_small_float)) then # if number 4 > array_complex_pole[2,1] := glob_large_float; > array_complex_pole[2,2] := glob_large_float; > else > if (omniabs(nr1*dr2 - nr2 * dr1) > glob_small_float) then # if number 5 > 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) > glob_small_float) then # if number 6 > if (rcs > 0.0) then # if number 7 > rad_c := sqrt(rcs) * omniabs(glob_h); > else > rad_c := glob_large_float; > fi;# end if 7 > else > rad_c := glob_large_float; > ord_no := glob_large_float; > fi;# end if 6 > else > rad_c := glob_large_float; > ord_no := glob_large_float; > fi;# end if 5 > fi;# end if 4 > ; > array_complex_pole[2,1] := rad_c; > array_complex_pole[2,2] := ord_no; > fi;# end if 3 > ; > #BOTTOM RADII COMPLEX EQ = 2 > found := false; > #TOP WHICH RADII EQ = 1 > if ( not found and ((array_real_pole[1,1] = glob_large_float) or (array_real_pole[1,2] = glob_large_float)) and ((array_complex_pole[1,1] <> glob_large_float) and (array_complex_pole[1,2] <> glob_large_float)) and ((array_complex_pole[1,1] > 0.0) and (array_complex_pole[1,2] > 0.0))) then # if number 3 > array_poles[1,1] := array_complex_pole[1,1]; > array_poles[1,2] := array_complex_pole[1,2]; > found := true; > array_type_pole[1] := 2; > if (glob_display_flag) then # if number 4 > omniout_str(ALWAYS,"Complex estimate of poles used"); > fi;# end if 4 > ; > fi;# end if 3 > ; > if ( not found and ((array_real_pole[1,1] <> glob_large_float) and (array_real_pole[1,2] <> glob_large_float) and (array_real_pole[1,1] > 0.0) and (array_real_pole[1,2] > 0.0) and ((array_complex_pole[1,1] = glob_large_float) or (array_complex_pole[1,2] = glob_large_float) or (array_complex_pole[1,1] <= 0.0 ) or (array_complex_pole[1,2] <= 0.0)))) then # if number 3 > array_poles[1,1] := array_real_pole[1,1]; > array_poles[1,2] := array_real_pole[1,2]; > found := true; > array_type_pole[1] := 1; > if (glob_display_flag) then # if number 4 > omniout_str(ALWAYS,"Real estimate of pole used"); > fi;# end if 4 > ; > fi;# end if 3 > ; > if ( not found and (((array_real_pole[1,1] = glob_large_float) or (array_real_pole[1,2] = glob_large_float)) and ((array_complex_pole[1,1] = glob_large_float) or (array_complex_pole[1,2] = glob_large_float)))) then # if number 3 > array_poles[1,1] := glob_large_float; > array_poles[1,2] := glob_large_float; > found := true; > array_type_pole[1] := 3; > if (reached_interval()) then # if number 4 > omniout_str(ALWAYS,"NO POLE"); > fi;# end if 4 > ; > fi;# end if 3 > ; > if ( not found and ((array_real_pole[1,1] < array_complex_pole[1,1]) and (array_real_pole[1,1] > 0.0) and (array_real_pole[1,2] > 0.0))) then # if number 3 > array_poles[1,1] := array_real_pole[1,1]; > array_poles[1,2] := array_real_pole[1,2]; > found := true; > array_type_pole[1] := 1; > if (glob_display_flag) then # if number 4 > omniout_str(ALWAYS,"Real estimate of pole used"); > fi;# end if 4 > ; > fi;# end if 3 > ; > if ( not found and ((array_complex_pole[1,1] <> glob_large_float) and (array_complex_pole[1,2] <> glob_large_float) and (array_complex_pole[1,1] > 0.0) and (array_complex_pole[1,2] > 0.0))) then # if number 3 > array_poles[1,1] := array_complex_pole[1,1]; > array_poles[1,2] := array_complex_pole[1,2]; > array_type_pole[1] := 2; > found := true; > if (glob_display_flag) then # if number 4 > omniout_str(ALWAYS,"Complex estimate of poles used"); > fi;# end if 4 > ; > fi;# end if 3 > ; > if ( not found ) then # if number 3 > array_poles[1,1] := glob_large_float; > array_poles[1,2] := glob_large_float; > array_type_pole[1] := 3; > if (reached_interval()) then # if number 4 > omniout_str(ALWAYS,"NO POLE"); > fi;# end if 4 > ; > fi;# end if 3 > ; > #BOTTOM WHICH RADII EQ = 1 > found := false; > #TOP WHICH RADII EQ = 2 > if ( not found and ((array_real_pole[2,1] = glob_large_float) or (array_real_pole[2,2] = glob_large_float)) and ((array_complex_pole[2,1] <> glob_large_float) and (array_complex_pole[2,2] <> glob_large_float)) and ((array_complex_pole[2,1] > 0.0) and (array_complex_pole[2,2] > 0.0))) then # if number 3 > array_poles[2,1] := array_complex_pole[2,1]; > array_poles[2,2] := array_complex_pole[2,2]; > found := true; > array_type_pole[2] := 2; > if (glob_display_flag) then # if number 4 > omniout_str(ALWAYS,"Complex estimate of poles used"); > fi;# end if 4 > ; > fi;# end if 3 > ; > if ( not found and ((array_real_pole[2,1] <> glob_large_float) and (array_real_pole[2,2] <> glob_large_float) and (array_real_pole[2,1] > 0.0) and (array_real_pole[2,2] > 0.0) and ((array_complex_pole[2,1] = glob_large_float) or (array_complex_pole[2,2] = glob_large_float) or (array_complex_pole[2,1] <= 0.0 ) or (array_complex_pole[2,2] <= 0.0)))) then # if number 3 > array_poles[2,1] := array_real_pole[2,1]; > array_poles[2,2] := array_real_pole[2,2]; > found := true; > array_type_pole[2] := 1; > if (glob_display_flag) then # if number 4 > omniout_str(ALWAYS,"Real estimate of pole used"); > fi;# end if 4 > ; > fi;# end if 3 > ; > if ( not found and (((array_real_pole[2,1] = glob_large_float) or (array_real_pole[2,2] = glob_large_float)) and ((array_complex_pole[2,1] = glob_large_float) or (array_complex_pole[2,2] = glob_large_float)))) then # if number 3 > array_poles[2,1] := glob_large_float; > array_poles[2,2] := glob_large_float; > found := true; > array_type_pole[2] := 3; > if (reached_interval()) then # if number 4 > omniout_str(ALWAYS,"NO POLE"); > fi;# end if 4 > ; > fi;# end if 3 > ; > if ( not found and ((array_real_pole[2,1] < array_complex_pole[2,1]) and (array_real_pole[2,1] > 0.0) and (array_real_pole[2,2] > 0.0))) then # if number 3 > array_poles[2,1] := array_real_pole[2,1]; > array_poles[2,2] := array_real_pole[2,2]; > found := true; > array_type_pole[2] := 1; > if (glob_display_flag) then # if number 4 > omniout_str(ALWAYS,"Real estimate of pole used"); > fi;# end if 4 > ; > fi;# end if 3 > ; > if ( not found and ((array_complex_pole[2,1] <> glob_large_float) and (array_complex_pole[2,2] <> glob_large_float) and (array_complex_pole[2,1] > 0.0) and (array_complex_pole[2,2] > 0.0))) then # if number 3 > array_poles[2,1] := array_complex_pole[2,1]; > array_poles[2,2] := array_complex_pole[2,2]; > array_type_pole[2] := 2; > found := true; > if (glob_display_flag) then # if number 4 > omniout_str(ALWAYS,"Complex estimate of poles used"); > fi;# end if 4 > ; > fi;# end if 3 > ; > if ( not found ) then # if number 3 > array_poles[2,1] := glob_large_float; > array_poles[2,2] := glob_large_float; > array_type_pole[2] := 3; > if (reached_interval()) then # if number 4 > omniout_str(ALWAYS,"NO POLE"); > fi;# end if 4 > ; > fi;# end if 3 > ; > #BOTTOM WHICH RADII EQ = 2 > array_pole[1] := glob_large_float; > array_pole[2] := glob_large_float; > #TOP WHICH RADIUS EQ = 1 > if (array_pole[1] > array_poles[1,1]) then # if number 3 > array_pole[1] := array_poles[1,1]; > array_pole[2] := array_poles[1,2]; > fi;# end if 3 > ; > #BOTTOM WHICH RADIUS EQ = 1 > #TOP WHICH RADIUS EQ = 2 > if (array_pole[1] > array_poles[2,1]) then # if number 3 > array_pole[1] := array_poles[2,1]; > array_pole[2] := array_poles[2,2]; > fi;# end if 3 > ; > #BOTTOM WHICH RADIUS EQ = 2 > #BOTTOM CHECK FOR POLE > if (reached_interval()) then # if number 3 > display_pole(); > fi;# end if 3 > > # End Function number 7 > end; check_for_pole := proc() local cnt, dr1, dr2, ds1, ds2, hdrc, m, n, nr1, nr2, ord_no, rad_c, rcs, rm0, rm1, rm2, rm3, rm4, found; global DEBUGL, glob_max_terms, ALWAYS, glob_iolevel, DEBUGMASSIVE, INFO, glob_orig_start_sec, glob_smallish_float, glob_max_sec, glob_unchanged_h_cnt, glob_not_yet_finished, glob_clock_sec, glob_log10relerr, glob_log10_relerr, glob_neg_h, glob_clock_start_sec, centuries_in_millinium, glob_optimal_expect_sec, glob_log10normmin, glob_curr_iter_when_opt, glob_start, glob_html_log, glob_iter, MAX_UNCHANGED, glob_warned, glob_large_float, glob_hmin_init, years_in_century, glob_good_digits, glob_subiter_method, glob_log10abserr, glob_optimal_clock_start_sec, glob_not_yet_start_msg, days_in_year, glob_current_iter, glob_small_float, glob_max_trunc_err, glob_max_rel_trunc_err, glob_dump_analytic, glob_next_display, glob_hmin, glob_disp_incr, glob_optimal_done, glob_almost_1, hours_in_day, sec_in_minute, glob_dump, glob_max_opt_iter, glob_percent_done, glob_normmax, glob_log10_abserr, glob_last_good_h, glob_optimal_start, glob_no_eqs, glob_max_hours, glob_display_interval, glob_look_poles, glob_hmax, glob_max_minutes, glob_max_iter, glob_relerr, glob_abserr, glob_h, min_in_hour, djd_debug2, glob_display_flag, djd_debug, glob_warned2, glob_reached_optimal_h, glob_initial_pass, array_const_0D0, array_const_3, array_const_1, array_const_4, array_const_1D0, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_type_pole, array_m1, array_x, array_norms, array_y1_init, array_pole, array_y2_init, array_last_rel_error, array_y2, array_y1, array_1st_rel_error, array_fact_1, array_complex_pole, array_y2_set_initial, array_y2_higher_work2, array_y2_higher, array_poles, array_real_pole, array_y1_higher, array_fact_2, array_y1_higher_work2, array_y1_higher_work, array_y2_higher_work, array_y1_set_initial, glob_last; n := glob_max_terms; m := n - 5; while 10 <= m and (omniabs(array_y2_higher[1, m]) < glob_small_float or omniabs(array_y2_higher[1, m - 1]) < glob_small_float or omniabs(array_y2_higher[1, m - 2]) < glob_small_float) do m := m - 1 end do; if 10 < m then 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]; hdrc := convfloat(m - 1)*rm0 - convfloat(m - 2)*rm1; if glob_small_float < omniabs(hdrc) then rcs := glob_h/hdrc; ord_no := convfloat(m - 1)*rm0/hdrc - convfloat(m) + 2.0; array_real_pole[1, 1] := rcs; array_real_pole[1, 2] := ord_no else array_real_pole[1, 1] := glob_large_float; array_real_pole[1, 2] := glob_large_float end if else array_real_pole[1, 1] := glob_large_float; array_real_pole[1, 2] := glob_large_float end if; n := glob_max_terms; m := n - 2; while 10 <= m and (omniabs(array_y1_higher[1, m]) < glob_small_float or omniabs(array_y1_higher[1, m - 1]) < glob_small_float or omniabs(array_y1_higher[1, m - 2]) < glob_small_float) do m := m - 1 end do; if 10 < m then 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]; hdrc := convfloat(m - 1)*rm0 - convfloat(m - 2)*rm1; if glob_small_float < omniabs(hdrc) then rcs := glob_h/hdrc; ord_no := convfloat(m - 1)*rm0/hdrc - convfloat(m) + 2.0; array_real_pole[2, 1] := rcs; array_real_pole[2, 2] := ord_no else array_real_pole[2, 1] := glob_large_float; array_real_pole[2, 2] := glob_large_float end if else array_real_pole[2, 1] := glob_large_float; array_real_pole[2, 2] := glob_large_float end if; n := glob_max_terms - 5; cnt := 0; while cnt < 5 and 10 <= n do if glob_small_float < omniabs(array_y2_higher[1, n]) then cnt := cnt + 1 else cnt := 0 end if; n := n - 1 end do; m := n + cnt; if m <= 10 then array_complex_pole[1, 1] := glob_large_float; array_complex_pole[1, 2] := glob_large_float elif glob_large_float <= omniabs(array_y2_higher[1, m]) or glob_large_float <= omniabs(array_y2_higher[1, m - 1]) or glob_large_float <= omniabs(array_y2_higher[1, m - 2]) or glob_large_float <= omniabs(array_y2_higher[1, m - 3]) or glob_large_float <= omniabs(array_y2_higher[1, m - 4]) or glob_large_float <= omniabs(array_y2_higher[1, m - 5]) then array_complex_pole[1, 1] := glob_large_float; array_complex_pole[1, 2] := 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) <= glob_small_float or omniabs(dr1) <= glob_small_float then array_complex_pole[1, 1] := glob_large_float; array_complex_pole[1, 2] := glob_large_float else if glob_small_float < omniabs(nr1*dr2 - nr2*dr1) 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 glob_small_float < omniabs(rcs) 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_pole[1, 1] := rad_c; array_complex_pole[1, 2] := ord_no end if; n := glob_max_terms - 2; cnt := 0; while cnt < 5 and 10 <= n do if glob_small_float < omniabs(array_y1_higher[1, n]) then cnt := cnt + 1 else cnt := 0 end if; n := n - 1 end do; m := n + cnt; if m <= 10 then array_complex_pole[2, 1] := glob_large_float; array_complex_pole[2, 2] := glob_large_float elif glob_large_float <= omniabs(array_y1_higher[1, m]) or glob_large_float <= omniabs(array_y1_higher[1, m - 1]) or glob_large_float <= omniabs(array_y1_higher[1, m - 2]) or glob_large_float <= omniabs(array_y1_higher[1, m - 3]) or glob_large_float <= omniabs(array_y1_higher[1, m - 4]) or glob_large_float <= omniabs(array_y1_higher[1, m - 5]) then array_complex_pole[2, 1] := glob_large_float; array_complex_pole[2, 2] := 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) <= glob_small_float or omniabs(dr1) <= glob_small_float then array_complex_pole[2, 1] := glob_large_float; array_complex_pole[2, 2] := glob_large_float else if glob_small_float < omniabs(nr1*dr2 - nr2*dr1) 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 glob_small_float < omniabs(rcs) 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_pole[2, 1] := rad_c; array_complex_pole[2, 2] := ord_no end if; found := false; if not found and (array_real_pole[1, 1] = glob_large_float or array_real_pole[1, 2] = glob_large_float) and array_complex_pole[1, 1] <> glob_large_float and array_complex_pole[1, 2] <> glob_large_float and 0. < array_complex_pole[1, 1] and 0. < array_complex_pole[1, 2] then array_poles[1, 1] := array_complex_pole[1, 1]; array_poles[1, 2] := array_complex_pole[1, 2]; found := true; array_type_pole[1] := 2; if glob_display_flag then omniout_str(ALWAYS, "Complex estimate of poles used") end if end if; if not found and array_real_pole[1, 1] <> glob_large_float and array_real_pole[1, 2] <> glob_large_float and 0. < array_real_pole[1, 1] and 0. < array_real_pole[1, 2] and ( array_complex_pole[1, 1] = glob_large_float or array_complex_pole[1, 2] = glob_large_float or array_complex_pole[1, 1] <= 0. or array_complex_pole[1, 2] <= 0.) then array_poles[1, 1] := array_real_pole[1, 1]; array_poles[1, 2] := array_real_pole[1, 2]; found := true; array_type_pole[1] := 1; if glob_display_flag then omniout_str(ALWAYS, "Real estimate of pole used") end if end if; if not found and (array_real_pole[1, 1] = glob_large_float or array_real_pole[1, 2] = glob_large_float) and ( array_complex_pole[1, 1] = glob_large_float or array_complex_pole[1, 2] = glob_large_float) then array_poles[1, 1] := glob_large_float; array_poles[1, 2] := glob_large_float; found := true; array_type_pole[1] := 3; if reached_interval() then omniout_str(ALWAYS, "NO POLE") end if end if; if not found and array_real_pole[1, 1] < array_complex_pole[1, 1] and 0. < array_real_pole[1, 1] and 0. < array_real_pole[1, 2] then array_poles[1, 1] := array_real_pole[1, 1]; array_poles[1, 2] := array_real_pole[1, 2]; found := true; array_type_pole[1] := 1; if glob_display_flag then omniout_str(ALWAYS, "Real estimate of pole used") end if end if; if not found and array_complex_pole[1, 1] <> glob_large_float and array_complex_pole[1, 2] <> glob_large_float and 0. < array_complex_pole[1, 1] and 0. < array_complex_pole[1, 2] then array_poles[1, 1] := array_complex_pole[1, 1]; array_poles[1, 2] := array_complex_pole[1, 2]; array_type_pole[1] := 2; found := true; if glob_display_flag then omniout_str(ALWAYS, "Complex estimate of poles used") end if end if; if not found then array_poles[1, 1] := glob_large_float; array_poles[1, 2] := glob_large_float; array_type_pole[1] := 3; if reached_interval() then omniout_str(ALWAYS, "NO POLE") end if end if; found := false; if not found and (array_real_pole[2, 1] = glob_large_float or array_real_pole[2, 2] = glob_large_float) and array_complex_pole[2, 1] <> glob_large_float and array_complex_pole[2, 2] <> glob_large_float and 0. < array_complex_pole[2, 1] and 0. < array_complex_pole[2, 2] then array_poles[2, 1] := array_complex_pole[2, 1]; array_poles[2, 2] := array_complex_pole[2, 2]; found := true; array_type_pole[2] := 2; if glob_display_flag then omniout_str(ALWAYS, "Complex estimate of poles used") end if end if; if not found and array_real_pole[2, 1] <> glob_large_float and array_real_pole[2, 2] <> glob_large_float and 0. < array_real_pole[2, 1] and 0. < array_real_pole[2, 2] and ( array_complex_pole[2, 1] = glob_large_float or array_complex_pole[2, 2] = glob_large_float or array_complex_pole[2, 1] <= 0. or array_complex_pole[2, 2] <= 0.) then array_poles[2, 1] := array_real_pole[2, 1]; array_poles[2, 2] := array_real_pole[2, 2]; found := true; array_type_pole[2] := 1; if glob_display_flag then omniout_str(ALWAYS, "Real estimate of pole used") end if end if; if not found and (array_real_pole[2, 1] = glob_large_float or array_real_pole[2, 2] = glob_large_float) and ( array_complex_pole[2, 1] = glob_large_float or array_complex_pole[2, 2] = glob_large_float) then array_poles[2, 1] := glob_large_float; array_poles[2, 2] := glob_large_float; found := true; array_type_pole[2] := 3; if reached_interval() then omniout_str(ALWAYS, "NO POLE") end if end if; if not found and array_real_pole[2, 1] < array_complex_pole[2, 1] and 0. < array_real_pole[2, 1] and 0. < array_real_pole[2, 2] then array_poles[2, 1] := array_real_pole[2, 1]; array_poles[2, 2] := array_real_pole[2, 2]; found := true; array_type_pole[2] := 1; if glob_display_flag then omniout_str(ALWAYS, "Real estimate of pole used") end if end if; if not found and array_complex_pole[2, 1] <> glob_large_float and array_complex_pole[2, 2] <> glob_large_float and 0. < array_complex_pole[2, 1] and 0. < array_complex_pole[2, 2] then array_poles[2, 1] := array_complex_pole[2, 1]; array_poles[2, 2] := array_complex_pole[2, 2]; array_type_pole[2] := 2; found := true; if glob_display_flag then omniout_str(ALWAYS, "Complex estimate of poles used") end if end if; if not found then array_poles[2, 1] := glob_large_float; array_poles[2, 2] := glob_large_float; array_type_pole[2] := 3; if reached_interval() then omniout_str(ALWAYS, "NO POLE") end if end if; array_pole[1] := glob_large_float; array_pole[2] := glob_large_float; if array_poles[1, 1] < array_pole[1] then array_pole[1] := array_poles[1, 1]; array_pole[2] := array_poles[1, 2] end if; if array_poles[2, 1] < array_pole[1] then array_pole[1] := array_poles[2, 1]; array_pole[2] := array_poles[2, 2] end if; if reached_interval() then display_pole() end if end proc > # Begin Function number 8 > get_norms := proc() > global > DEBUGL, > glob_max_terms, > ALWAYS, > glob_iolevel, > DEBUGMASSIVE, > INFO, > #Top Generate Globals Decl > glob_orig_start_sec, > glob_smallish_float, > glob_max_sec, > glob_unchanged_h_cnt, > glob_not_yet_finished, > glob_clock_sec, > glob_log10relerr, > glob_log10_relerr, > glob_neg_h, > glob_clock_start_sec, > centuries_in_millinium, > glob_optimal_expect_sec, > glob_log10normmin, > glob_curr_iter_when_opt, > glob_start, > glob_html_log, > glob_iter, > MAX_UNCHANGED, > glob_warned, > glob_large_float, > glob_hmin_init, > years_in_century, > glob_good_digits, > glob_subiter_method, > glob_log10abserr, > glob_optimal_clock_start_sec, > glob_not_yet_start_msg, > days_in_year, > glob_current_iter, > glob_small_float, > glob_max_trunc_err, > glob_max_rel_trunc_err, > glob_dump_analytic, > glob_next_display, > glob_hmin, > glob_disp_incr, > glob_optimal_done, > glob_almost_1, > hours_in_day, > sec_in_minute, > glob_dump, > glob_max_opt_iter, > glob_percent_done, > glob_normmax, > glob_log10_abserr, > glob_last_good_h, > glob_optimal_start, > glob_no_eqs, > glob_max_hours, > glob_display_interval, > glob_look_poles, > glob_hmax, > glob_max_minutes, > glob_max_iter, > glob_relerr, > glob_abserr, > glob_h, > min_in_hour, > djd_debug2, > glob_display_flag, > djd_debug, > glob_warned2, > glob_reached_optimal_h, > glob_initial_pass, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_0D0, > array_const_3, > array_const_1, > array_const_4, > array_const_1D0, > #END CONST > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_type_pole, > array_m1, > array_x, > array_norms, > array_y1_init, > array_pole, > array_y2_init, > array_last_rel_error, > array_y2, > array_y1, > array_1st_rel_error, > array_fact_1, > array_complex_pole, > array_y2_set_initial, > array_y2_higher_work2, > array_y2_higher, > array_poles, > array_real_pole, > array_y1_higher, > array_fact_2, > array_y1_higher_work2, > array_y1_higher_work, > array_y2_higher_work, > array_y1_set_initial, > glob_last; > > local iii; > > > > if ( not glob_initial_pass) then # if number 3 > iii := 1; > while (iii <= glob_max_terms) do # do number 2 > array_norms[iii] := 0.0; > iii := iii + 1; > od;# end do number 2 > ; > #TOP GET NORMS > iii := 1; > while (iii <= glob_max_terms) do # do number 2 > if (omniabs(array_y2[iii]) > array_norms[iii]) then # if number 4 > array_norms[iii] := omniabs(array_y2[iii]); > fi;# end if 4 > ; > iii := iii + 1; > od;# end do number 2 > ; > iii := 1; > while (iii <= glob_max_terms) do # do number 2 > if (omniabs(array_y1[iii]) > array_norms[iii]) then # if number 4 > array_norms[iii] := omniabs(array_y1[iii]); > fi;# end if 4 > ; > iii := iii + 1; > od;# end do number 2 > #BOTTOM GET NORMS > ; > fi;# end if 3 > ; > > # End Function number 8 > end; get_norms := proc() local iii; global DEBUGL, glob_max_terms, ALWAYS, glob_iolevel, DEBUGMASSIVE, INFO, glob_orig_start_sec, glob_smallish_float, glob_max_sec, glob_unchanged_h_cnt, glob_not_yet_finished, glob_clock_sec, glob_log10relerr, glob_log10_relerr, glob_neg_h, glob_clock_start_sec, centuries_in_millinium, glob_optimal_expect_sec, glob_log10normmin, glob_curr_iter_when_opt, glob_start, glob_html_log, glob_iter, MAX_UNCHANGED, glob_warned, glob_large_float, glob_hmin_init, years_in_century, glob_good_digits, glob_subiter_method, glob_log10abserr, glob_optimal_clock_start_sec, glob_not_yet_start_msg, days_in_year, glob_current_iter, glob_small_float, glob_max_trunc_err, glob_max_rel_trunc_err, glob_dump_analytic, glob_next_display, glob_hmin, glob_disp_incr, glob_optimal_done, glob_almost_1, hours_in_day, sec_in_minute, glob_dump, glob_max_opt_iter, glob_percent_done, glob_normmax, glob_log10_abserr, glob_last_good_h, glob_optimal_start, glob_no_eqs, glob_max_hours, glob_display_interval, glob_look_poles, glob_hmax, glob_max_minutes, glob_max_iter, glob_relerr, glob_abserr, glob_h, min_in_hour, djd_debug2, glob_display_flag, djd_debug, glob_warned2, glob_reached_optimal_h, glob_initial_pass, array_const_0D0, array_const_3, array_const_1, array_const_4, array_const_1D0, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_type_pole, array_m1, array_x, array_norms, array_y1_init, array_pole, array_y2_init, array_last_rel_error, array_y2, array_y1, array_1st_rel_error, array_fact_1, array_complex_pole, array_y2_set_initial, array_y2_higher_work2, array_y2_higher, array_poles, array_real_pole, array_y1_higher, array_fact_2, array_y1_higher_work2, array_y1_higher_work, array_y2_higher_work, array_y1_set_initial, 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_y2[iii]) then array_norms[iii] := omniabs(array_y2[iii]) end if; 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 end if end proc > # Begin Function number 9 > atomall := proc() > global > DEBUGL, > glob_max_terms, > ALWAYS, > glob_iolevel, > DEBUGMASSIVE, > INFO, > #Top Generate Globals Decl > glob_orig_start_sec, > glob_smallish_float, > glob_max_sec, > glob_unchanged_h_cnt, > glob_not_yet_finished, > glob_clock_sec, > glob_log10relerr, > glob_log10_relerr, > glob_neg_h, > glob_clock_start_sec, > centuries_in_millinium, > glob_optimal_expect_sec, > glob_log10normmin, > glob_curr_iter_when_opt, > glob_start, > glob_html_log, > glob_iter, > MAX_UNCHANGED, > glob_warned, > glob_large_float, > glob_hmin_init, > years_in_century, > glob_good_digits, > glob_subiter_method, > glob_log10abserr, > glob_optimal_clock_start_sec, > glob_not_yet_start_msg, > days_in_year, > glob_current_iter, > glob_small_float, > glob_max_trunc_err, > glob_max_rel_trunc_err, > glob_dump_analytic, > glob_next_display, > glob_hmin, > glob_disp_incr, > glob_optimal_done, > glob_almost_1, > hours_in_day, > sec_in_minute, > glob_dump, > glob_max_opt_iter, > glob_percent_done, > glob_normmax, > glob_log10_abserr, > glob_last_good_h, > glob_optimal_start, > glob_no_eqs, > glob_max_hours, > glob_display_interval, > glob_look_poles, > glob_hmax, > glob_max_minutes, > glob_max_iter, > glob_relerr, > glob_abserr, > glob_h, > min_in_hour, > djd_debug2, > glob_display_flag, > djd_debug, > glob_warned2, > glob_reached_optimal_h, > glob_initial_pass, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_0D0, > array_const_3, > array_const_1, > array_const_4, > array_const_1D0, > #END CONST > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_type_pole, > array_m1, > array_x, > array_norms, > array_y1_init, > array_pole, > array_y2_init, > array_last_rel_error, > array_y2, > array_y1, > array_1st_rel_error, > array_fact_1, > array_complex_pole, > array_y2_set_initial, > array_y2_higher_work2, > array_y2_higher, > array_poles, > array_real_pole, > array_y1_higher, > array_fact_2, > array_y1_higher_work2, > array_y1_higher_work, > array_y2_higher_work, > array_y1_set_initial, > glob_last; > > local kkk, order_d, adj2, temporary, term; > > > > > > #TOP ATOMALL > #END OUTFILE1 > #BEGIN ATOMHDR1 > #emit pre add CONST FULL $eq_no = 1 i = 1 > array_tmp1[1] := array_const_0D0[1] + array_y1[1]; > #emit pre sub FULL - CONST $eq_no = 1 i = 1 > array_tmp2[1] := array_tmp1[1] - array_const_1D0[1]; > #emit pre assign xxx $eq_no = 1 i = 1 $min_hdrs = 5 > if ( not array_y2_set_initial[1,5]) then # if number 1 > if (1 <= glob_max_terms) then # if number 2 > temporary := array_tmp2[1] * expt(glob_h , (4)) * factorial_3(0,4); > array_y2[5] := temporary; > array_y2_higher[1,5] := temporary; > temporary := temporary / glob_h * (2.0); > array_y2_higher[2,4] := temporary > ; > temporary := temporary / glob_h * (3.0); > array_y2_higher[3,3] := temporary > ; > temporary := temporary / glob_h * (4.0); > array_y2_higher[4,2] := temporary > ; > temporary := temporary / glob_h * (5.0); > array_y2_higher[5,1] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 2; > #emit pre diff $eq_no = 2 i = 1 > array_tmp4[1] := array_y2_higher[4,1]; > #emit pre assign xxx $eq_no = 2 i = 1 $min_hdrs = 5 > if ( not array_y1_set_initial[2,2]) then # if number 1 > if (1 <= glob_max_terms) then # if number 2 > temporary := array_tmp5[1] * expt(glob_h , (1)) * factorial_3(0,1); > array_y1[2] := temporary; > array_y1_higher[1,2] := temporary; > temporary := temporary / glob_h * (2.0); > array_y1_higher[2,1] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 2; > #END ATOMHDR1 > #BEGIN ATOMHDR2 > #emit pre add CONST FULL $eq_no = 1 i = 2 > array_tmp1[2] := array_y1[2]; > #emit pre sub FULL CONST $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_y2_set_initial[1,6]) then # if number 1 > if (2 <= glob_max_terms) then # if number 2 > temporary := array_tmp2[2] * expt(glob_h , (4)) * factorial_3(1,5); > array_y2[6] := temporary; > array_y2_higher[1,6] := temporary; > temporary := temporary / glob_h * (2.0); > array_y2_higher[2,5] := temporary > ; > temporary := temporary / glob_h * (3.0); > array_y2_higher[3,4] := temporary > ; > temporary := temporary / glob_h * (4.0); > array_y2_higher[4,3] := temporary > ; > temporary := temporary / glob_h * (5.0); > array_y2_higher[5,2] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 3; > #emit pre diff $eq_no = 2 i = 2 > array_tmp4[2] := array_y2_higher[4,2]; > #emit pre assign xxx $eq_no = 2 i = 2 $min_hdrs = 5 > if ( not array_y1_set_initial[2,3]) then # if number 1 > if (2 <= glob_max_terms) then # if number 2 > temporary := array_tmp5[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; > #END ATOMHDR2 > #BEGIN ATOMHDR3 > #emit pre add CONST FULL $eq_no = 1 i = 3 > array_tmp1[3] := array_y1[3]; > #emit pre sub FULL CONST $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_y2_set_initial[1,7]) then # if number 1 > if (3 <= glob_max_terms) then # if number 2 > temporary := array_tmp2[3] * expt(glob_h , (4)) * factorial_3(2,6); > array_y2[7] := temporary; > array_y2_higher[1,7] := temporary; > temporary := temporary / glob_h * (2.0); > array_y2_higher[2,6] := temporary > ; > temporary := temporary / glob_h * (3.0); > array_y2_higher[3,5] := temporary > ; > temporary := temporary / glob_h * (4.0); > array_y2_higher[4,4] := temporary > ; > temporary := temporary / glob_h * (5.0); > array_y2_higher[5,3] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 4; > #emit pre diff $eq_no = 2 i = 3 > array_tmp4[3] := array_y2_higher[4,3]; > #emit pre assign xxx $eq_no = 2 i = 3 $min_hdrs = 5 > if ( not array_y1_set_initial[2,4]) then # if number 1 > if (3 <= glob_max_terms) then # if number 2 > temporary := array_tmp5[3] * expt(glob_h , (1)) * factorial_3(2,3); > array_y1[4] := temporary; > array_y1_higher[1,4] := temporary; > temporary := temporary / glob_h * (2.0); > array_y1_higher[2,3] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 4; > #END ATOMHDR3 > #BEGIN ATOMHDR4 > #emit pre add CONST FULL $eq_no = 1 i = 4 > array_tmp1[4] := array_y1[4]; > #emit pre sub FULL CONST $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_y2_set_initial[1,8]) then # if number 1 > if (4 <= glob_max_terms) then # if number 2 > temporary := array_tmp2[4] * expt(glob_h , (4)) * factorial_3(3,7); > array_y2[8] := temporary; > array_y2_higher[1,8] := temporary; > temporary := temporary / glob_h * (2.0); > array_y2_higher[2,7] := temporary > ; > temporary := temporary / glob_h * (3.0); > array_y2_higher[3,6] := temporary > ; > temporary := temporary / glob_h * (4.0); > array_y2_higher[4,5] := temporary > ; > temporary := temporary / glob_h * (5.0); > array_y2_higher[5,4] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 5; > #emit pre diff $eq_no = 2 i = 4 > array_tmp4[4] := array_y2_higher[4,4]; > #emit pre assign xxx $eq_no = 2 i = 4 $min_hdrs = 5 > if ( not array_y1_set_initial[2,5]) then # if number 1 > if (4 <= glob_max_terms) then # if number 2 > temporary := array_tmp5[4] * expt(glob_h , (1)) * factorial_3(3,4); > array_y1[5] := temporary; > array_y1_higher[1,5] := temporary; > temporary := temporary / glob_h * (2.0); > array_y1_higher[2,4] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 5; > #END ATOMHDR4 > #BEGIN ATOMHDR5 > #emit pre add CONST FULL $eq_no = 1 i = 5 > array_tmp1[5] := array_y1[5]; > #emit pre sub FULL CONST $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_y2_set_initial[1,9]) then # if number 1 > if (5 <= glob_max_terms) then # if number 2 > temporary := array_tmp2[5] * expt(glob_h , (4)) * factorial_3(4,8); > array_y2[9] := temporary; > array_y2_higher[1,9] := temporary; > temporary := temporary / glob_h * (2.0); > array_y2_higher[2,8] := temporary > ; > temporary := temporary / glob_h * (3.0); > array_y2_higher[3,7] := temporary > ; > temporary := temporary / glob_h * (4.0); > array_y2_higher[4,6] := temporary > ; > temporary := temporary / glob_h * (5.0); > array_y2_higher[5,5] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 6; > #emit pre diff $eq_no = 2 i = 5 > array_tmp4[5] := array_y2_higher[4,5]; > #emit pre assign xxx $eq_no = 2 i = 5 $min_hdrs = 5 > if ( not array_y1_set_initial[2,6]) then # if number 1 > if (5 <= glob_max_terms) then # if number 2 > temporary := array_tmp5[5] * expt(glob_h , (1)) * factorial_3(4,5); > array_y1[6] := temporary; > array_y1_higher[1,6] := temporary; > temporary := temporary / glob_h * (2.0); > array_y1_higher[2,5] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 6; > #END ATOMHDR5 > #BEGIN OUTFILE3 > #Top Atomall While Loop-- outfile3 > while (kkk <= glob_max_terms) do # do number 1 > #END OUTFILE3 > #BEGIN OUTFILE4 > #emit NOT FULL - FULL add $eq_no = 1 > array_tmp1[kkk] := array_y1[kkk]; > #emit FULL - NOT FULL sub $eq_no = 1 > array_tmp2[kkk] := array_tmp1[kkk]; > #emit assign $eq_no = 1 > order_d := 4; > if (kkk + order_d + 1 <= glob_max_terms) then # if number 1 > if ( not array_y2_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_y2[kkk + order_d] := temporary; > array_y2_higher[1,kkk + order_d] := temporary; > term := kkk + order_d - 1; > adj2 := 2; > while ((adj2 <= order_d + 1) and (term >= 1)) do # do number 2 > temporary := temporary / glob_h * convfp(adj2); > array_y2_higher[adj2,term] := temporary; > adj2 := adj2 + 1; > term := term - 1; > od;# end do number 2 > fi;# end if 2 > fi;# end if 1 > ; > #emit diff $eq_no = 2 > array_tmp4[kkk] := array_y2_higher[4,kkk]; > #emit assign $eq_no = 2 > order_d := 1; > if (kkk + order_d + 1 <= glob_max_terms) then # if number 1 > if ( not array_y1_set_initial[2,kkk + order_d]) then # if number 2 > temporary := array_tmp5[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 := 2; > while ((adj2 <= order_d + 1) and (term >= 1)) do # do number 2 > temporary := temporary / glob_h * convfp(adj2); > array_y1_higher[adj2,term] := temporary; > adj2 := adj2 + 1; > term := term - 1; > od;# end do number 2 > 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 Function number 9 > end; atomall := proc() local kkk, order_d, adj2, temporary, term; global DEBUGL, glob_max_terms, ALWAYS, glob_iolevel, DEBUGMASSIVE, INFO, glob_orig_start_sec, glob_smallish_float, glob_max_sec, glob_unchanged_h_cnt, glob_not_yet_finished, glob_clock_sec, glob_log10relerr, glob_log10_relerr, glob_neg_h, glob_clock_start_sec, centuries_in_millinium, glob_optimal_expect_sec, glob_log10normmin, glob_curr_iter_when_opt, glob_start, glob_html_log, glob_iter, MAX_UNCHANGED, glob_warned, glob_large_float, glob_hmin_init, years_in_century, glob_good_digits, glob_subiter_method, glob_log10abserr, glob_optimal_clock_start_sec, glob_not_yet_start_msg, days_in_year, glob_current_iter, glob_small_float, glob_max_trunc_err, glob_max_rel_trunc_err, glob_dump_analytic, glob_next_display, glob_hmin, glob_disp_incr, glob_optimal_done, glob_almost_1, hours_in_day, sec_in_minute, glob_dump, glob_max_opt_iter, glob_percent_done, glob_normmax, glob_log10_abserr, glob_last_good_h, glob_optimal_start, glob_no_eqs, glob_max_hours, glob_display_interval, glob_look_poles, glob_hmax, glob_max_minutes, glob_max_iter, glob_relerr, glob_abserr, glob_h, min_in_hour, djd_debug2, glob_display_flag, djd_debug, glob_warned2, glob_reached_optimal_h, glob_initial_pass, array_const_0D0, array_const_3, array_const_1, array_const_4, array_const_1D0, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_type_pole, array_m1, array_x, array_norms, array_y1_init, array_pole, array_y2_init, array_last_rel_error, array_y2, array_y1, array_1st_rel_error, array_fact_1, array_complex_pole, array_y2_set_initial, array_y2_higher_work2, array_y2_higher, array_poles, array_real_pole, array_y1_higher, array_fact_2, array_y1_higher_work2, array_y1_higher_work, array_y2_higher_work, array_y1_set_initial, glob_last; array_tmp1[1] := array_const_0D0[1] + array_y1[1]; array_tmp2[1] := array_tmp1[1] - array_const_1D0[1]; if not array_y2_set_initial[1, 5] then if 1 <= glob_max_terms then temporary := array_tmp2[1]*expt(glob_h, 4)*factorial_3(0, 4); array_y2[5] := temporary; array_y2_higher[1, 5] := temporary; temporary := temporary*2.0/glob_h; array_y2_higher[2, 4] := temporary; temporary := temporary*3.0/glob_h; array_y2_higher[3, 3] := temporary; temporary := temporary*4.0/glob_h; array_y2_higher[4, 2] := temporary; temporary := temporary*5.0/glob_h; array_y2_higher[5, 1] := temporary end if end if; kkk := 2; array_tmp4[1] := array_y2_higher[4, 1]; if not array_y1_set_initial[2, 2] then if 1 <= glob_max_terms then temporary := array_tmp5[1]*expt(glob_h, 1)*factorial_3(0, 1); array_y1[2] := temporary; array_y1_higher[1, 2] := temporary; temporary := temporary*2.0/glob_h; array_y1_higher[2, 1] := temporary end if end if; kkk := 2; array_tmp1[2] := array_y1[2]; array_tmp2[2] := array_tmp1[2]; if not array_y2_set_initial[1, 6] then if 2 <= glob_max_terms then temporary := array_tmp2[2]*expt(glob_h, 4)*factorial_3(1, 5); array_y2[6] := temporary; array_y2_higher[1, 6] := temporary; temporary := temporary*2.0/glob_h; array_y2_higher[2, 5] := temporary; temporary := temporary*3.0/glob_h; array_y2_higher[3, 4] := temporary; temporary := temporary*4.0/glob_h; array_y2_higher[4, 3] := temporary; temporary := temporary*5.0/glob_h; array_y2_higher[5, 2] := temporary end if end if; kkk := 3; array_tmp4[2] := array_y2_higher[4, 2]; if not array_y1_set_initial[2, 3] then if 2 <= glob_max_terms then temporary := array_tmp5[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_tmp1[3] := array_y1[3]; array_tmp2[3] := array_tmp1[3]; if not array_y2_set_initial[1, 7] then if 3 <= glob_max_terms then temporary := array_tmp2[3]*expt(glob_h, 4)*factorial_3(2, 6); array_y2[7] := temporary; array_y2_higher[1, 7] := temporary; temporary := temporary*2.0/glob_h; array_y2_higher[2, 6] := temporary; temporary := temporary*3.0/glob_h; array_y2_higher[3, 5] := temporary; temporary := temporary*4.0/glob_h; array_y2_higher[4, 4] := temporary; temporary := temporary*5.0/glob_h; array_y2_higher[5, 3] := temporary end if end if; kkk := 4; array_tmp4[3] := array_y2_higher[4, 3]; if not array_y1_set_initial[2, 4] then if 3 <= glob_max_terms then temporary := array_tmp5[3]*expt(glob_h, 1)*factorial_3(2, 3); array_y1[4] := temporary; array_y1_higher[1, 4] := temporary; temporary := temporary*2.0/glob_h; array_y1_higher[2, 3] := temporary end if end if; kkk := 4; array_tmp1[4] := array_y1[4]; array_tmp2[4] := array_tmp1[4]; if not array_y2_set_initial[1, 8] then if 4 <= glob_max_terms then temporary := array_tmp2[4]*expt(glob_h, 4)*factorial_3(3, 7); array_y2[8] := temporary; array_y2_higher[1, 8] := temporary; temporary := temporary*2.0/glob_h; array_y2_higher[2, 7] := temporary; temporary := temporary*3.0/glob_h; array_y2_higher[3, 6] := temporary; temporary := temporary*4.0/glob_h; array_y2_higher[4, 5] := temporary; temporary := temporary*5.0/glob_h; array_y2_higher[5, 4] := temporary end if end if; kkk := 5; array_tmp4[4] := array_y2_higher[4, 4]; if not array_y1_set_initial[2, 5] then if 4 <= glob_max_terms then temporary := array_tmp5[4]*expt(glob_h, 1)*factorial_3(3, 4); array_y1[5] := temporary; array_y1_higher[1, 5] := temporary; temporary := temporary*2.0/glob_h; array_y1_higher[2, 4] := temporary end if end if; kkk := 5; array_tmp1[5] := array_y1[5]; array_tmp2[5] := array_tmp1[5]; if not array_y2_set_initial[1, 9] then if 5 <= glob_max_terms then temporary := array_tmp2[5]*expt(glob_h, 4)*factorial_3(4, 8); array_y2[9] := temporary; array_y2_higher[1, 9] := temporary; temporary := temporary*2.0/glob_h; array_y2_higher[2, 8] := temporary; temporary := temporary*3.0/glob_h; array_y2_higher[3, 7] := temporary; temporary := temporary*4.0/glob_h; array_y2_higher[4, 6] := temporary; temporary := temporary*5.0/glob_h; array_y2_higher[5, 5] := temporary end if end if; kkk := 6; array_tmp4[5] := array_y2_higher[4, 5]; if not array_y1_set_initial[2, 6] then if 5 <= glob_max_terms then temporary := array_tmp5[5]*expt(glob_h, 1)*factorial_3(4, 5); array_y1[6] := temporary; array_y1_higher[1, 6] := temporary; temporary := temporary*2.0/glob_h; array_y1_higher[2, 5] := temporary end if end if; kkk := 6; while kkk <= glob_max_terms do array_tmp1[kkk] := array_y1[kkk]; array_tmp2[kkk] := array_tmp1[kkk]; order_d := 4; if kkk + order_d + 1 <= glob_max_terms then if not array_y2_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_y2[kkk + order_d] := temporary; array_y2_higher[1, kkk + order_d] := temporary; term := kkk + order_d - 1; adj2 := 2; while adj2 <= order_d + 1 and 1 <= term do temporary := temporary*convfp(adj2)/glob_h; array_y2_higher[adj2, term] := temporary; adj2 := adj2 + 1; term := term - 1 end do end if end if; array_tmp4[kkk] := array_y2_higher[4, kkk]; order_d := 1; if kkk + order_d + 1 <= glob_max_terms then if not array_y1_set_initial[2, kkk + order_d] then temporary := array_tmp5[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 := 2; while adj2 <= order_d + 1 and 1 <= term do temporary := temporary*convfp(adj2)/glob_h; array_y1_higher[adj2, term] := temporary; adj2 := adj2 + 1; term := term - 1 end do end if end if; kkk := kkk + 1 end do end proc > #BEGIN ATS LIBRARY BLOCK > omniout_str := proc(iolevel,str) > global glob_iolevel; > if (glob_iolevel >= iolevel) then > printf("%s\n",str); > fi; > # End Function number 1 > end; omniout_str := proc(iolevel, str) global glob_iolevel; if iolevel <= glob_iolevel then printf("%s\n", str) end if end proc > omniout_str_noeol := proc(iolevel,str) > global glob_iolevel; > if (glob_iolevel >= iolevel) then > printf("%s",str); > fi; > # End Function number 1 > end; omniout_str_noeol := proc(iolevel, str) global glob_iolevel; if iolevel <= glob_iolevel then printf("%s", str) end if end proc > omniout_labstr := proc(iolevel,label,str) > global glob_iolevel; > if (glob_iolevel >= iolevel) then > print(label,str); > fi; > # End Function number 1 > end; omniout_labstr := proc(iolevel, label, str) global glob_iolevel; if iolevel <= glob_iolevel then print(label, str) end if end proc > omniout_float := proc(iolevel,prelabel,prelen,value,vallen,postlabel) > global glob_iolevel; > if (glob_iolevel >= iolevel) then > if vallen = 4 then > printf("%-30s = %-42.4g %s \n",prelabel,value, postlabel); > else > printf("%-30s = %-42.32g %s \n",prelabel,value, postlabel); > fi; > fi; > # End Function number 1 > 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 \n", prelabel, value, postlabel) else printf("%-30s = %-42.32g %s \n", prelabel, value, postlabel) end if end if end proc > omniout_int := proc(iolevel,prelabel,prelen,value,vallen,postlabel) > global glob_iolevel; > if (glob_iolevel >= iolevel) then > if vallen = 5 then > printf("%-30s = %-32d %s\n",prelabel,value, postlabel); > else > printf("%-30s = %-32d %s \n",prelabel,value, postlabel); > fi; > fi; > # End Function number 1 > 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\n", prelabel, value, postlabel) else printf("%-30s = %-32d %s \n", prelabel, value, postlabel) end if end if end proc > omniout_float_arr := proc(iolevel,prelabel,elemnt,prelen,value,vallen,postlabel) > global glob_iolevel; > if (glob_iolevel >= iolevel) then > print(prelabel,"[",elemnt,"]",value, postlabel); > fi; > # End Function number 1 > 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 > dump_series := proc(iolevel,dump_label,series_name, > array_series,numb) > global glob_iolevel; > local i; > if (glob_iolevel >= iolevel) then > i := 1; > while (i <= numb) do > print(dump_label,series_name > ,i,array_series[i]); > i := i + 1; > od; > fi; > # End Function number 1 > end; dump_series := proc(iolevel, dump_label, series_name, array_series, numb) local i; global glob_iolevel; if iolevel <= glob_iolevel then i := 1; while i <= numb do print(dump_label, series_name, i, array_series[i]); i := i + 1 end do end if end proc > dump_series_2 := proc(iolevel,dump_label,series_name2, > array_series2,numb,subnum,array_x) > global glob_iolevel; > local i,sub,ts_term; > if (glob_iolevel >= iolevel) then > sub := 1; > while (sub <= subnum) do > i := 1; > while (i <= numb) do > print(dump_label,series_name2,sub,i,array_series2[sub,i]); > od; > sub := sub + 1; > od; > fi; > # End Function number 1 > end; dump_series_2 := proc( iolevel, dump_label, series_name2, array_series2, numb, subnum, array_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, array_series2[sub, i]) end do; sub := sub + 1 end do end if end proc > cs_info := proc(iolevel,str) > global glob_iolevel,glob_correct_start_flag,glob_h,glob_reached_optimal_h; > if (glob_iolevel >= 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) > fi; > # End Function number 1 > 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 > # Begin Function number 2 > logitem_time := proc(fd,secs_in) > global centuries_in_millinium, days_in_year, hours_in_day, min_in_hour, sec_in_minute, years_in_century; > local cent_int, centuries, days, days_int, hours, hours_int, millinium_int, milliniums, minutes, minutes_int, sec_in_millinium, sec_int, seconds, secs, years, years_int; > secs := (secs_in); > fprintf(fd,""); > if (secs >= 0.0) then # if number 1 > sec_in_millinium := convfloat(sec_in_minute * min_in_hour * hours_in_day * days_in_year * years_in_century * centuries_in_millinium); > milliniums := convfloat(secs / sec_in_millinium); > millinium_int := floor(milliniums); > centuries := (milliniums - millinium_int)*centuries_in_millinium; > cent_int := floor(centuries); > years := (centuries - cent_int) * years_in_century; > years_int := floor(years); > days := (years - years_int) * days_in_year; > days_int := floor(days); > hours := (days - days_int) * hours_in_day; > hours_int := floor(hours); > minutes := (hours - hours_int) * min_in_hour; > minutes_int := floor(minutes); > seconds := (minutes - minutes_int) * sec_in_minute; > sec_int := floor(seconds); > if (millinium_int > 0) then # if number 2 > fprintf(fd,"%d Millinia %d Centuries %d Years %d Days %d Hours %d Minutes %d Seconds",millinium_int,cent_int,years_int,days_int,hours_int,minutes_int,sec_int); > elif (cent_int > 0) then # if number 3 > fprintf(fd,"%d Centuries %d Years %d Days %d Hours %d Minutes %d Seconds",cent_int,years_int,days_int,hours_int,minutes_int,sec_int); > elif (years_int > 0) then # if number 4 > 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 5 > 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 6 > fprintf(fd,"%d Hours %d Minutes %d Seconds",hours_int,minutes_int,sec_int); > elif (minutes_int > 0) then # if number 7 > fprintf(fd,"%d Minutes %d Seconds",minutes_int,sec_int); > else > fprintf(fd,"%d Seconds",sec_int); > fi;# end if 7 > else > fprintf(fd,"Unknown"); > fi;# end if 6 > fprintf(fd,""); > # End Function number 2 > end; logitem_time := proc(fd, secs_in) local cent_int, centuries, days, days_int, hours, hours_int, millinium_int, milliniums, minutes, minutes_int, sec_in_millinium, sec_int, seconds, secs, years, years_int; global centuries_in_millinium, days_in_year, hours_in_day, min_in_hour, sec_in_minute, years_in_century; secs := secs_in; fprintf(fd, ""); if 0. <= secs then sec_in_millinium := convfloat(sec_in_minute*min_in_hour* hours_in_day*days_in_year*years_in_century* centuries_in_millinium); milliniums := convfloat(secs/sec_in_millinium); millinium_int := floor(milliniums); centuries := (milliniums - millinium_int)*centuries_in_millinium; cent_int := floor(centuries); years := (centuries - cent_int)*years_in_century; years_int := floor(years); days := (years - years_int)*days_in_year; days_int := floor(days); hours := (days - days_int)*hours_in_day; hours_int := floor(hours); minutes := (hours - hours_int)*min_in_hour; minutes_int := floor(minutes); seconds := (minutes - minutes_int)*sec_in_minute; sec_int := floor(seconds); if 0 < millinium_int then fprintf(fd, "%d Millinia %d Centuries %\ d Years %d Days %d Hours %d Minutes %d Seconds", millinium_int, cent_int, years_int, days_int, hours_int, minutes_int, sec_int) elif 0 < cent_int then fprintf(fd, "%d Centuries %d Years %d Days %d Hours %d Minutes %d Seconds", cent_int, years_int, days_int, hours_int, minutes_int, sec_int) elif 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 > omniout_timestr := proc (secs_in) > global centuries_in_millinium, days_in_year, hours_in_day, min_in_hour, sec_in_minute, years_in_century; > local cent_int, centuries, days, days_int, hours, hours_int, millinium_int, milliniums, minutes, minutes_int, sec_in_millinium, sec_int, seconds, secs, years, years_int; > secs := convfloat(secs_in); > if (secs >= 0.0) then # if number 6 > sec_in_millinium := convfloat(sec_in_minute * min_in_hour * hours_in_day * days_in_year * years_in_century * centuries_in_millinium); > milliniums := convfloat(secs / sec_in_millinium); > millinium_int := floor(milliniums); > centuries := (milliniums - millinium_int)*centuries_in_millinium; > cent_int := floor(centuries); > years := (centuries - cent_int) * years_in_century; > years_int := floor(years); > days := (years - years_int) * days_in_year; > days_int := floor(days); > hours := (days - days_int) * hours_in_day; > hours_int := floor(hours); > minutes := (hours - hours_int) * min_in_hour; > minutes_int := floor(minutes); > seconds := (minutes - minutes_int) * sec_in_minute; > sec_int := floor(seconds); > > if (millinium_int > 0) then # if number 7 > printf(" = %d Millinia %d Centuries %d Years %d Days %d Hours %d Minutes %d Seconds\n",millinium_int,cent_int,years_int,days_int,hours_int,minutes_int,sec_int); > elif (cent_int > 0) then # if number 8 > printf(" = %d Centuries %d Years %d Days %d Hours %d Minutes %d Seconds\n",cent_int,years_int,days_int,hours_int,minutes_int,sec_int); > elif (years_int > 0) then # if number 9 > 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 10 > 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 11 > printf(" = %d Hours %d Minutes %d Seconds\n",hours_int,minutes_int,sec_int); > elif (minutes_int > 0) then # if number 12 > printf(" = %d Minutes %d Seconds\n",minutes_int,sec_int); > else > printf(" = %d Seconds\n",sec_int); > fi;# end if 12 > else > printf(" Unknown\n"); > fi;# end if 11 > # End Function number 2 > end; omniout_timestr := proc(secs_in) local cent_int, centuries, days, days_int, hours, hours_int, millinium_int, milliniums, minutes, minutes_int, sec_in_millinium, sec_int, seconds, secs, years, years_int; global centuries_in_millinium, days_in_year, hours_in_day, min_in_hour, sec_in_minute, years_in_century; secs := convfloat(secs_in); if 0. <= secs then sec_in_millinium := convfloat(sec_in_minute*min_in_hour* hours_in_day*days_in_year*years_in_century* centuries_in_millinium); milliniums := convfloat(secs/sec_in_millinium); millinium_int := floor(milliniums); centuries := (milliniums - millinium_int)*centuries_in_millinium; cent_int := floor(centuries); years := (centuries - cent_int)*years_in_century; years_int := floor(years); days := (years - years_int)*days_in_year; days_int := floor(days); hours := (days - days_int)*hours_in_day; hours_int := floor(hours); minutes := (hours - hours_int)*min_in_hour; minutes_int := floor(minutes); seconds := (minutes - minutes_int)*sec_in_minute; sec_int := floor(seconds); if 0 < millinium_int then printf(" = %d Millinia %d Centuries %d\ Years %d Days %d Hours %d Minutes %d Seconds\n", millinium_int, cent_int, years_int, days_int, hours_int, minutes_int, sec_int) elif 0 < cent_int then printf(" = %d Centuries %d Years %d Days \ %d Hours %d Minutes %d Seconds\n", cent_int, years_int, days_int, hours_int, minutes_int, sec_int) elif 0 < years_int then printf( " = %d Years %d Days %d Hours %d Minutes %d Seconds\n", years_int, days_int, hours_int, minutes_int, sec_int) elif 0 < days_int then printf( " = %d Days %d Hours %d Minutes %d Seconds\n", days_int, hours_int, minutes_int, sec_int) elif 0 < hours_int then printf( " = %d Hours %d Minutes %d Seconds\n", hours_int, minutes_int, sec_int) elif 0 < minutes_int then printf(" = %d Minutes %d Seconds\n", minutes_int, sec_int) else printf(" = %d Seconds\n", sec_int) end if else printf(" Unknown\n") end if end proc > # Begin Function number 3 > ats := proc( > mmm_ats,array_a,array_b,jjj_ats) > local iii_ats, lll_ats,ma_ats, ret_ats; > > > > > > ret_ats := 0.0; > if (jjj_ats <= mmm_ats) then # if number 11 > 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 + array_a[iii_ats]*array_b[lll_ats]; > iii_ats := iii_ats + 1; > od;# end do number 1 > fi;# end if 11 > ; > ret_ats; > > # End Function number 3 > end; ats := proc(mmm_ats, array_a, array_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 + array_a[iii_ats]*array_b[lll_ats]; iii_ats := iii_ats + 1 end do end if; ret_ats end proc > # Begin Function number 4 > att := proc( > mmm_att,array_aa,array_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 11 > 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 12 > ret_att := ret_att + array_aa[iii_att]*array_bb[lll_att]* convfp(al_att); > fi;# end if 12 > ; > iii_att := iii_att + 1; > od;# end do number 1 > ; > ret_att := ret_att / convfp(mmm_att) ; > fi;# end if 11 > ; > ret_att; > > # End Function number 4 > end; att := proc(mmm_att, array_aa, array_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 + array_aa[iii_att]*array_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 > # Begin Function number 5 > display_pole := proc() > global ALWAYS,glob_display_flag, glob_large_float, array_pole; > if ((array_pole[1] <> glob_large_float) and (array_pole[1] > 0.0) and (array_pole[2] <> glob_large_float) and (array_pole[2]> 0.0) and glob_display_flag) then # if number 11 > omniout_float(ALWAYS,"Radius of convergence ",4, array_pole[1],4," "); > omniout_float(ALWAYS,"Order of pole ",4, array_pole[2],4," "); > fi;# end if 11 > # End Function number 5 > end; display_pole := proc() global ALWAYS, glob_display_flag, glob_large_float, array_pole; if array_pole[1] <> glob_large_float and 0. < array_pole[1] and array_pole[2] <> glob_large_float and 0. < array_pole[2] and glob_display_flag then omniout_float(ALWAYS, "Radius of convergence ", 4, array_pole[1], 4, " "); omniout_float(ALWAYS, "Order of pole ", 4, array_pole[2], 4, " ") end if end proc > # Begin Function number 6 > logditto := proc(file) > fprintf(file,""); > fprintf(file,"ditto"); > fprintf(file,""); > # End Function number 6 > end; logditto := proc(file) fprintf(file, ""); fprintf(file, "ditto"); fprintf(file, "") end proc > # Begin Function number 7 > logitem_integer := proc(file,n) > fprintf(file,""); > fprintf(file,"%d",n); > fprintf(file,""); > # End Function number 7 > end; logitem_integer := proc(file, n) fprintf(file, ""); fprintf(file, "%d", n); fprintf(file, "") end proc > # Begin Function number 8 > logitem_str := proc(file,str) > fprintf(file,""); > fprintf(file,str); > fprintf(file,""); > # End Function number 8 > end; logitem_str := proc(file, str) fprintf(file, ""); fprintf(file, str); fprintf(file, "") end proc > # Begin Function number 9 > logitem_good_digits := proc(file,rel_error) > global glob_small_float; > > local good_digits; > > > fprintf(file,""); > if (rel_error <> -1.0) then # if number 11 > if (rel_error <> 0.0) then # if number 12 > good_digits := -trunc(log10(rel_error/100.0)); > fprintf(file,"%d",good_digits); > else > good_digits := Digits; > fprintf(file,"%d",good_digits); > fi;# end if 12 > ; > else > fprintf(file,"Unknown"); > fi;# end if 11 > ; > fprintf(file,""); > > # End Function number 9 > end; logitem_good_digits := proc(file, rel_error) local good_digits; global glob_small_float; fprintf(file, ""); if rel_error <> -1.0 then if rel_error <> 0. then good_digits := -trunc(log10(rel_error/100.0)); 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 > # Begin Function number 10 > log_revs := proc(file,revs) > fprintf(file,revs); > # End Function number 10 > end; log_revs := proc(file, revs) fprintf(file, revs) end proc > # Begin Function number 11 > logitem_float := proc(file,x) > fprintf(file,""); > fprintf(file,"%g",x); > fprintf(file,""); > # End Function number 11 > end; logitem_float := proc(file, x) fprintf(file, ""); fprintf(file, "%g", x); fprintf(file, "") end proc > # Begin Function number 12 > logitem_pole := proc(file,pole) > fprintf(file,""); > if (pole = 0) then # if number 11 > fprintf(file,"NA"); > elif (pole = 1) then # if number 12 > fprintf(file,"Real"); > elif (pole = 2) then # if number 13 > fprintf(file,"Complex"); > else > fprintf(file,"No Pole"); > fi;# end if 13 > fprintf(file,""); > # End Function number 12 > 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") else fprintf(file, "No Pole") end if; fprintf(file, "") end proc > # Begin Function number 13 > logstart := proc(file) > fprintf(file,""); > # End Function number 13 > end; logstart := proc(file) fprintf(file, "") end proc > # Begin Function number 14 > logend := proc(file) > fprintf(file,"\n"); > # End Function number 14 > end; logend := proc(file) fprintf(file, "\n") end proc > # Begin Function number 15 > not_reached_end := proc(x,x_end) > global neg_h; > local ret; > > > > if ((glob_neg_h and (x > x_end)) or (( not glob_neg_h) and (x < x_end))) then # if number 13 > ret := true; > else > ret := false; > fi;# end if 13 > ; > > > ret; > > # End Function number 15 > end; not_reached_end := proc(x, x_end) local ret; global neg_h; if glob_neg_h and x_end < x or not glob_neg_h and x < x_end then ret := true else ret := false end if; ret end proc > # Begin Function number 16 > 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 13 > omniout_str(ALWAYS,"Illegal max_terms = -- Using 30"); > glob_max_terms := 30; > fi;# end if 13 > ; > if (glob_max_iter < 2) then # if number 13 > omniout_str(ALWAYS,"Illegal max_iter"); > errflag := true; > fi;# end if 13 > ; > if (errflag) then # if number 13 > > quit; > fi;# end if 13 > > # End Function number 16 > 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 > # Begin Function number 17 > 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 13 > sec_left := 0.0; > else > if (sub2 > 0.0) then # if number 14 > rrr := (sub1/sub2); > sec_left := rrr * ms2 - ms2; > else > sec_left := 0.0; > fi;# end if 14 > fi;# end if 13 > ; > sec_left; > > # End Function number 17 > 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 > # Begin Function number 18 > 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 13 > rrr := (100.0*sub2)/sub1; > else > rrr := 0.0; > fi;# end if 13 > ; > rrr; > > # End Function number 18 > 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 > # Begin Function number 19 > factorial_2 := proc(nnn) > local ret; > > > > ret := nnn!; > > # End Function number 19 > end; factorial_2 := proc(nnn) local ret; ret := nnn! end proc > # Begin Function number 20 > factorial_1 := proc(nnn) > global glob_max_terms,array_fact_1; > local ret; > > > > if (nnn <= glob_max_terms) then # if number 13 > if (array_fact_1[nnn] = 0) then # if number 14 > ret := factorial_2(nnn); > array_fact_1[nnn] := ret; > else > ret := array_fact_1[nnn]; > fi;# end if 14 > ; > else > ret := factorial_2(nnn); > fi;# end if 13 > ; > ret; > > # End Function number 20 > 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 > # Begin Function number 21 > 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 13 > if (array_fact_2[mmm,nnn] = 0) then # if number 14 > ret := factorial_1(mmm)/factorial_1(nnn); > array_fact_2[mmm,nnn] := ret; > else > ret := array_fact_2[mmm,nnn]; > fi;# end if 14 > ; > else > ret := factorial_2(mmm)/factorial_2(nnn); > fi;# end if 13 > ; > ret; > > # End Function number 21 > 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 > # Begin Function number 22 > convfp := proc(mmm) > (mmm); > > # End Function number 22 > end; convfp := proc(mmm) mmm end proc > # Begin Function number 23 > convfloat := proc(mmm) > (mmm); > > # End Function number 23 > end; convfloat := proc(mmm) mmm end proc > elapsed_time_seconds := proc() > time(); > end; elapsed_time_seconds := proc() time() end proc > > > > > > > > > > > > > > > > > > > > omniabs := proc(x) > abs(x); > end; omniabs := proc(x) abs(x) end proc > expt := proc(x,y) > (x^y); > end; expt := proc(x, y) x^y end proc > #END ATS LIBRARY BLOCK > #BEGIN USER DEF BLOCK > #BEGIN USER DEF BLOCK > exact_soln_y1 := proc(x) > return(1.0 + sin(x)); > end; exact_soln_y1 := proc(x) return 1.0 + sin(x) end proc > exact_soln_y2 := proc(x) > return(1.0 + sin(x)); > end; exact_soln_y2 := proc(x) return 1.0 + sin(x) end proc > exact_soln_y2p := proc(x) > return( cos(x)); > end; exact_soln_y2p := proc(x) return cos(x) end proc > exact_soln_y2pp := proc(x) > return( -sin(x)); > end; exact_soln_y2pp := proc(x) return -sin(x) end proc > exact_soln_y2ppp := proc(x) > return( -cos(x)); > end; exact_soln_y2ppp := 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, log10norm, max_terms, opt_iter, tmp,subiter; > global > DEBUGL, > glob_max_terms, > ALWAYS, > glob_iolevel, > DEBUGMASSIVE, > INFO, > #Top Generate Globals Decl > glob_orig_start_sec, > glob_smallish_float, > glob_max_sec, > glob_unchanged_h_cnt, > glob_not_yet_finished, > glob_clock_sec, > glob_log10relerr, > glob_log10_relerr, > glob_neg_h, > glob_clock_start_sec, > centuries_in_millinium, > glob_optimal_expect_sec, > glob_log10normmin, > glob_curr_iter_when_opt, > glob_start, > glob_html_log, > glob_iter, > MAX_UNCHANGED, > glob_warned, > glob_large_float, > glob_hmin_init, > years_in_century, > glob_good_digits, > glob_subiter_method, > glob_log10abserr, > glob_optimal_clock_start_sec, > glob_not_yet_start_msg, > days_in_year, > glob_current_iter, > glob_small_float, > glob_max_trunc_err, > glob_max_rel_trunc_err, > glob_dump_analytic, > glob_next_display, > glob_hmin, > glob_disp_incr, > glob_optimal_done, > glob_almost_1, > hours_in_day, > sec_in_minute, > glob_dump, > glob_max_opt_iter, > glob_percent_done, > glob_normmax, > glob_log10_abserr, > glob_last_good_h, > glob_optimal_start, > glob_no_eqs, > glob_max_hours, > glob_display_interval, > glob_look_poles, > glob_hmax, > glob_max_minutes, > glob_max_iter, > glob_relerr, > glob_abserr, > glob_h, > min_in_hour, > djd_debug2, > glob_display_flag, > djd_debug, > glob_warned2, > glob_reached_optimal_h, > glob_initial_pass, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_0D0, > array_const_3, > array_const_1, > array_const_4, > array_const_1D0, > #END CONST > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_type_pole, > array_m1, > array_x, > array_norms, > array_y1_init, > array_pole, > array_y2_init, > array_last_rel_error, > array_y2, > array_y1, > array_1st_rel_error, > array_fact_1, > array_complex_pole, > array_y2_set_initial, > array_y2_higher_work2, > array_y2_higher, > array_poles, > array_real_pole, > array_y1_higher, > array_fact_2, > array_y1_higher_work2, > array_y1_higher_work, > array_y2_higher_work, > array_y1_set_initial, > glob_last; > glob_last; > ALWAYS := 1; > INFO := 2; > DEBUGL := 3; > DEBUGMASSIVE := 4; > glob_iolevel := INFO; > DEBUGL := 3; > glob_max_terms := 30; > ALWAYS := 1; > glob_iolevel := 5; > DEBUGMASSIVE := 4; > INFO := 2; > glob_orig_start_sec := 0.0; > glob_smallish_float := 0.1e-100; > glob_max_sec := 10000.0; > glob_unchanged_h_cnt := 0; > glob_not_yet_finished := true; > glob_clock_sec := 0.0; > glob_log10relerr := 0.0; > glob_log10_relerr := 0.1e-10; > glob_neg_h := false; > glob_clock_start_sec := 0.0; > centuries_in_millinium := 10; > glob_optimal_expect_sec := 0.1; > glob_log10normmin := 0.1; > glob_curr_iter_when_opt := 0; > glob_start := 0; > glob_html_log := true; > glob_iter := 0; > MAX_UNCHANGED := 10; > glob_warned := false; > glob_large_float := 9.0e100; > glob_hmin_init := 0.001; > years_in_century := 100; > glob_good_digits := 0; > glob_subiter_method := 3; > glob_log10abserr := 0.0; > glob_optimal_clock_start_sec := 0.0; > glob_not_yet_start_msg := true; > days_in_year := 365; > glob_current_iter := 0; > glob_small_float := 0.1e-50; > glob_max_trunc_err := 0.1e-10; > glob_max_rel_trunc_err := 0.1e-10; > glob_dump_analytic := false; > glob_next_display := 0.0; > glob_hmin := 0.00000000001; > glob_disp_incr := 0.1; > glob_optimal_done := false; > glob_almost_1 := 0.9990; > hours_in_day := 24; > sec_in_minute := 60; > glob_dump := false; > glob_max_opt_iter := 10; > glob_percent_done := 0.0; > glob_normmax := 0.0; > glob_log10_abserr := 0.1e-10; > glob_last_good_h := 0.1; > glob_optimal_start := 0.0; > glob_no_eqs := 0; > glob_max_hours := 0.0; > glob_display_interval := 0.0; > glob_look_poles := false; > glob_hmax := 1.0; > glob_max_minutes := 0.0; > glob_max_iter := 1000; > glob_relerr := 0.1e-10; > glob_abserr := 0.1e-10; > glob_h := 0.1; > min_in_hour := 60; > djd_debug2 := true; > glob_display_flag := true; > djd_debug := true; > glob_warned2 := false; > glob_reached_optimal_h := false; > glob_initial_pass := true; > #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/mtest8postode.ode#################"); > omniout_str(ALWAYS,"diff ( y2 , x , 4 ) = y1 - 1.0;"); > omniout_str(ALWAYS,"diff ( y1 , x , 1 ) = m1 * diff ( y2 , x , 3 ) ;"); > 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.1;"); > omniout_str(ALWAYS,"x_end := 5.1;"); > 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,"array_y2_init[2 + 1] := exact_soln_y2pp(x_start);"); > omniout_str(ALWAYS,"array_y2_init[3 + 1] := exact_soln_y2ppp(x_start);"); > omniout_str(ALWAYS,"glob_h := 0.00001;"); > omniout_str(ALWAYS,"glob_look_poles := true;"); > omniout_str(ALWAYS,"glob_max_iter := 20;"); > omniout_str(ALWAYS,"#END SECOND INPUT BLOCK"); > omniout_str(ALWAYS,"#BEGIN OVERRIDE BLOCK"); > omniout_str(ALWAYS,"glob_h := 0.005 ;"); > omniout_str(ALWAYS,"glob_display_interval := 0.1;"); > omniout_str(ALWAYS,"glob_look_poles := true;"); > omniout_str(ALWAYS,"glob_max_iter := 10000;"); > omniout_str(ALWAYS,"glob_max_minutes := 10;"); > 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(1.0 + sin(x));"); > omniout_str(ALWAYS,"end;"); > omniout_str(ALWAYS,"exact_soln_y2 := proc(x)"); > omniout_str(ALWAYS,"return(1.0 + 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,"exact_soln_y2pp := proc(x)"); > omniout_str(ALWAYS,"return( -sin(x));"); > omniout_str(ALWAYS,"end;"); > omniout_str(ALWAYS,"exact_soln_y2ppp := proc(x)"); > omniout_str(ALWAYS,"return( -cos(x));"); > omniout_str(ALWAYS,"end;"); > omniout_str(ALWAYS,""); > omniout_str(ALWAYS,""); > omniout_str(ALWAYS,""); > omniout_str(ALWAYS,"#END USER DEF BLOCK"); > omniout_str(ALWAYS,"#######END OF ECHO OF PROBLEM#################"); > glob_unchanged_h_cnt := 0; > glob_warned := false; > glob_warned2 := false; > glob_small_float := 1.0e-200; > glob_smallish_float := 1.0e-64; > glob_large_float := 1.0e100; > glob_almost_1 := 0.99; > glob_log10_abserr := -8.0; > glob_log10_relerr := -8.0; > glob_hmax := 0.01; > #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_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_tmp5:= Array(0..(max_terms + 1),[]); > array_type_pole:= Array(0..(max_terms + 1),[]); > array_m1:= Array(0..(max_terms + 1),[]); > array_x:= Array(0..(max_terms + 1),[]); > array_norms:= Array(0..(max_terms + 1),[]); > array_y1_init:= Array(0..(max_terms + 1),[]); > array_pole:= Array(0..(max_terms + 1),[]); > array_y2_init:= Array(0..(max_terms + 1),[]); > array_last_rel_error:= Array(0..(max_terms + 1),[]); > array_y2:= Array(0..(max_terms + 1),[]); > array_y1:= Array(0..(max_terms + 1),[]); > array_1st_rel_error:= Array(0..(max_terms + 1),[]); > array_fact_1:= Array(0..(max_terms + 1),[]); > array_complex_pole := Array(0..(2+ 1) ,(0..3+ 1),[]); > array_y2_set_initial := Array(0..(3+ 1) ,(0..max_terms+ 1),[]); > array_y2_higher_work2 := Array(0..(5+ 1) ,(0..max_terms+ 1),[]); > array_y2_higher := Array(0..(5+ 1) ,(0..max_terms+ 1),[]); > array_poles := Array(0..(2+ 1) ,(0..3+ 1),[]); > array_real_pole := Array(0..(2+ 1) ,(0..3+ 1),[]); > array_y1_higher := Array(0..(2+ 1) ,(0..max_terms+ 1),[]); > array_fact_2 := Array(0..(max_terms+ 1) ,(0..max_terms+ 1),[]); > array_y1_higher_work2 := Array(0..(2+ 1) ,(0..max_terms+ 1),[]); > array_y1_higher_work := Array(0..(2+ 1) ,(0..max_terms+ 1),[]); > array_y2_higher_work := Array(0..(5+ 1) ,(0..max_terms+ 1),[]); > array_y1_set_initial := Array(0..(3+ 1) ,(0..max_terms+ 1),[]); > term := 1; > while (term <= max_terms) do # do number 2 > array_tmp0[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while (term <= max_terms) do # do number 2 > array_tmp1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while (term <= max_terms) do # do number 2 > array_tmp2[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while (term <= max_terms) do # do number 2 > array_tmp3[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while (term <= max_terms) do # do number 2 > array_tmp4[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while (term <= max_terms) do # do number 2 > array_tmp5[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while (term <= max_terms) do # do number 2 > array_type_pole[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while (term <= max_terms) do # do number 2 > array_m1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while (term <= max_terms) do # do number 2 > array_x[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while (term <= max_terms) do # do number 2 > array_norms[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while (term <= max_terms) do # do number 2 > array_y1_init[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while (term <= max_terms) do # do number 2 > array_pole[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while (term <= max_terms) do # do number 2 > array_y2_init[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while (term <= max_terms) do # do number 2 > array_last_rel_error[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while (term <= max_terms) do # do number 2 > array_y2[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while (term <= max_terms) do # do number 2 > array_y1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while (term <= max_terms) do # do number 2 > array_1st_rel_error[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while (term <= max_terms) do # do number 2 > array_fact_1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > ord := 1; > while (ord <=2) do # do number 2 > term := 1; > while (term <= 3) do # do number 3 > array_complex_pole[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while (ord <=3) do # do number 2 > term := 1; > while (term <= max_terms) do # do number 3 > array_y2_set_initial[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while (ord <=5) do # do number 2 > term := 1; > while (term <= max_terms) do # do number 3 > array_y2_higher_work2[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while (ord <=5) do # do number 2 > term := 1; > while (term <= max_terms) do # do number 3 > array_y2_higher[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while (ord <=2) do # do number 2 > term := 1; > while (term <= 3) do # do number 3 > array_poles[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while (ord <=2) do # do number 2 > term := 1; > while (term <= 3) do # do number 3 > array_real_pole[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while (ord <=2) do # do number 2 > term := 1; > while (term <= max_terms) do # do number 3 > array_y1_higher[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while (ord <=max_terms) do # do number 2 > term := 1; > while (term <= max_terms) do # do number 3 > array_fact_2[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while (ord <=2) do # do number 2 > term := 1; > while (term <= max_terms) do # do number 3 > array_y1_higher_work2[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while (ord <=2) do # do number 2 > term := 1; > while (term <= max_terms) do # do number 3 > array_y1_higher_work[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while (ord <=5) do # do number 2 > term := 1; > while (term <= max_terms) do # do number 3 > array_y2_higher_work[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while (ord <=3) do # do number 2 > term := 1; > while (term <= max_terms) do # do number 3 > array_y1_set_initial[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > #BEGIN ARRAYS DEFINED AND INITIALIZATED > array_tmp5 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while (term <= max_terms + 1) do # do number 2 > array_tmp5[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp4 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while (term <= max_terms + 1) do # do number 2 > array_tmp4[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp3 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while (term <= max_terms + 1) do # do number 2 > array_tmp3[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp2 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while (term <= max_terms + 1) do # do number 2 > array_tmp2[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp1 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while (term <= max_terms + 1) do # do number 2 > array_tmp1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp0 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while (term <= max_terms + 1) do # do number 2 > array_tmp0[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_m1 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while (term <= max_terms + 1) do # do number 2 > array_m1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_x := Array(1..(max_terms+1 + 1),[]); > term := 1; > while (term <= max_terms + 1) do # do number 2 > array_x[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_y1 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while (term <= max_terms + 1) do # do number 2 > array_y1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_y2 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while (term <= max_terms + 1) do # do number 2 > array_y2[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_const_0D0 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while (term <= max_terms + 1) do # do number 2 > array_const_0D0[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_const_0D0[1] := 0.0; > array_const_3 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while (term <= max_terms + 1) do # do number 2 > array_const_3[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_const_3[1] := 3; > array_const_1 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while (term <= max_terms + 1) do # do number 2 > array_const_1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_const_1[1] := 1; > array_const_4 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while (term <= max_terms + 1) do # do number 2 > array_const_4[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_const_4[1] := 4; > array_const_1D0 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while (term <= max_terms + 1) do # do number 2 > array_const_1D0[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_const_1D0[1] := 1.0; > array_m1 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while (term <= max_terms) do # do number 2 > array_m1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_m1[1] := -1.0; > #END ARRAYS DEFINED AND INITIALIZATED > #Initing Factorial Tables > iiif := 0; > while (iiif <= glob_max_terms) do # do number 2 > jjjf := 0; > while (jjjf <= glob_max_terms) do # do number 3 > array_fact_1[iiif] := 0; > array_fact_2[iiif,jjjf] := 0; > jjjf := jjjf + 1; > od;# end do number 3 > ; > iiif := iiif + 1; > od;# end do number 2 > ; > #Done Initing Factorial Tables > #TOP SECOND INPUT BLOCK > #BEGIN SECOND INPUT BLOCK > #END FIRST INPUT BLOCK > #BEGIN SECOND INPUT BLOCK > x_start := 0.1; > x_end := 5.1; > 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); > array_y2_init[2 + 1] := exact_soln_y2pp(x_start); > array_y2_init[3 + 1] := exact_soln_y2ppp(x_start); > glob_h := 0.00001; > glob_look_poles := true; > glob_max_iter := 20; > #END SECOND INPUT BLOCK > #BEGIN OVERRIDE BLOCK > glob_h := 0.005 ; > glob_display_interval := 0.1; > glob_look_poles := true; > glob_max_iter := 10000; > glob_max_minutes := 10; > #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); > glob_abserr := expt(10.0 , (glob_log10_abserr)); > glob_relerr := expt(10.0 , (glob_log10_relerr)); > 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_y2_set_initial[1,1] := true; > array_y2_set_initial[1,2] := true; > array_y2_set_initial[1,3] := true; > array_y2_set_initial[1,4] := true; > array_y2_set_initial[1,5] := false; > array_y2_set_initial[1,6] := false; > array_y2_set_initial[1,7] := false; > array_y2_set_initial[1,8] := false; > array_y2_set_initial[1,9] := false; > array_y2_set_initial[1,10] := false; > array_y2_set_initial[1,11] := false; > array_y2_set_initial[1,12] := false; > array_y2_set_initial[1,13] := false; > array_y2_set_initial[1,14] := false; > array_y2_set_initial[1,15] := false; > array_y2_set_initial[1,16] := false; > array_y2_set_initial[1,17] := false; > array_y2_set_initial[1,18] := false; > array_y2_set_initial[1,19] := false; > array_y2_set_initial[1,20] := false; > array_y2_set_initial[1,21] := false; > array_y2_set_initial[1,22] := false; > array_y2_set_initial[1,23] := false; > array_y2_set_initial[1,24] := false; > array_y2_set_initial[1,25] := false; > array_y2_set_initial[1,26] := false; > array_y2_set_initial[1,27] := false; > array_y2_set_initial[1,28] := false; > array_y2_set_initial[1,29] := false; > array_y2_set_initial[1,30] := false; > array_y1_set_initial[2,1] := true; > array_y1_set_initial[2,2] := false; > array_y1_set_initial[2,3] := false; > array_y1_set_initial[2,4] := false; > array_y1_set_initial[2,5] := false; > array_y1_set_initial[2,6] := false; > array_y1_set_initial[2,7] := false; > array_y1_set_initial[2,8] := false; > array_y1_set_initial[2,9] := false; > array_y1_set_initial[2,10] := false; > array_y1_set_initial[2,11] := false; > array_y1_set_initial[2,12] := false; > array_y1_set_initial[2,13] := false; > array_y1_set_initial[2,14] := false; > array_y1_set_initial[2,15] := false; > array_y1_set_initial[2,16] := false; > array_y1_set_initial[2,17] := false; > array_y1_set_initial[2,18] := false; > array_y1_set_initial[2,19] := false; > array_y1_set_initial[2,20] := false; > array_y1_set_initial[2,21] := false; > array_y1_set_initial[2,22] := false; > array_y1_set_initial[2,23] := false; > array_y1_set_initial[2,24] := false; > array_y1_set_initial[2,25] := false; > array_y1_set_initial[2,26] := false; > array_y1_set_initial[2,27] := false; > array_y1_set_initial[2,28] := false; > array_y1_set_initial[2,29] := false; > array_y1_set_initial[2,30] := false; > if (glob_html_log) then # if number 3 > html_log_file := fopen("html/entry.html",WRITE,TEXT); > fi;# end if 3 > ; > #BEGIN SOLUTION CODE > 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 := 4; > #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 > ; > 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 > ; > current_iter := 1; > glob_clock_start_sec := elapsed_time_seconds(); > if (omniabs(array_y2_higher[1,1]) > glob_small_float) then # if number 3 > tmp := omniabs(array_y2_higher[1,1]); > log10norm := (log10(tmp)); > if (log10norm < glob_log10normmin) then # if number 4 > glob_log10normmin := log10norm; > fi;# end if 4 > fi;# end if 3 > ; > display_alot(current_iter) > ; > if (omniabs(array_y1_higher[1,1]) > glob_small_float) then # if number 3 > tmp := omniabs(array_y1_higher[1,1]); > log10norm := (log10(tmp)); > if (log10norm < glob_log10normmin) then # if number 4 > glob_log10normmin := log10norm; > fi;# end if 4 > fi;# end if 3 > ; > display_alot(current_iter) > ; > glob_clock_sec := elapsed_time_seconds(); > glob_current_iter := 0; > glob_iter := 0; > omniout_str(DEBUGL," "); > glob_reached_optimal_h := true; > glob_optimal_clock_start_sec := elapsed_time_seconds(); > while ((glob_current_iter < glob_max_iter) and not_reached_end(array_x[1] , x_end ) and ((convfloat(glob_clock_sec) - convfloat(glob_orig_start_sec)) < convfloat(glob_max_sec))) do # do number 2 > #left paren 0001C > if (reached_interval()) then # if number 3 > omniout_str(INFO," "); > omniout_str(INFO,"TOP MAIN SOLVE Loop"); > fi;# end if 3 > ; > 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 3 > atomall(); > elif (glob_subiter_method = 2 ) then # if number 4 > subiter := 1; > while (subiter <= 5) do # do number 3 > atomall(); > subiter := subiter + 1; > od;# end do number 3 > ; > else > subiter := 1; > while (subiter <= 5 + glob_max_terms) do # do number 3 > atomall(); > subiter := subiter + 1; > od;# end do number 3 > ; > fi;# end if 4 > ; > if (glob_look_poles) then # if number 4 > #left paren 0004C > check_for_pole(); > fi;# end if 4 > ;#was right paren 0004C > if (reached_interval()) then # if number 4 > glob_next_display := glob_next_display + glob_display_interval; > fi;# end if 4 > ; > array_x[1] := array_x[1] + glob_h; > array_x[2] := glob_h; > #Jump Series array_y2 > order_diff := 4; > #START PART 1 SUM AND ADJUST > #START SUM AND ADJUST EQ =1 > #sum_and_adjust array_y2 > #BEFORE ADJUST SUBSERIES EQ =1 > ord := 5; > calc_term := 1; > #adjust_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > array_y2_higher_work[5,iii] := array_y2_higher[5,iii] / expt(glob_h , (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1); > iii := iii - 1; > od;# end do number 3 > ; > #AFTER ADJUST SUBSERIES EQ =1 > #BEFORE SUM SUBSERIES EQ =1 > temp_sum := 0.0; > ord := 5; > calc_term := 1; > #sum_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_y2_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_y2_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 := 4; > calc_term := 2; > #adjust_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > array_y2_higher_work[4,iii] := array_y2_higher[4,iii] / expt(glob_h , (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1); > iii := iii - 1; > od;# end do number 3 > ; > #AFTER ADJUST SUBSERIES EQ =1 > #BEFORE SUM SUBSERIES EQ =1 > temp_sum := 0.0; > ord := 4; > calc_term := 2; > #sum_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_y2_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_y2_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 := 4; > calc_term := 1; > #adjust_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > array_y2_higher_work[4,iii] := array_y2_higher[4,iii] / expt(glob_h , (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1); > iii := iii - 1; > od;# end do number 3 > ; > #AFTER ADJUST SUBSERIES EQ =1 > #BEFORE SUM SUBSERIES EQ =1 > temp_sum := 0.0; > ord := 4; > calc_term := 1; > #sum_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_y2_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_y2_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 := 3; > calc_term := 3; > #adjust_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > 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 3 > ; > #AFTER ADJUST SUBSERIES EQ =1 > #BEFORE SUM SUBSERIES EQ =1 > temp_sum := 0.0; > ord := 3; > calc_term := 3; > #sum_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_y2_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_y2_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 := 3; > calc_term := 2; > #adjust_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > 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 3 > ; > #AFTER ADJUST SUBSERIES EQ =1 > #BEFORE SUM SUBSERIES EQ =1 > temp_sum := 0.0; > ord := 3; > calc_term := 2; > #sum_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_y2_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_y2_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 := 3; > calc_term := 1; > #adjust_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > 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 3 > ; > #AFTER ADJUST SUBSERIES EQ =1 > #BEFORE SUM SUBSERIES EQ =1 > temp_sum := 0.0; > ord := 3; > calc_term := 1; > #sum_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_y2_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_y2_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 := 2; > calc_term := 4; > #adjust_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > 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 3 > ; > #AFTER ADJUST SUBSERIES EQ =1 > #BEFORE SUM SUBSERIES EQ =1 > temp_sum := 0.0; > ord := 2; > calc_term := 4; > #sum_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_y2_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_y2_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 := 2; > calc_term := 3; > #adjust_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > 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 3 > ; > #AFTER ADJUST SUBSERIES EQ =1 > #BEFORE SUM SUBSERIES EQ =1 > temp_sum := 0.0; > ord := 2; > calc_term := 3; > #sum_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_y2_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_y2_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 := 2; > calc_term := 2; > #adjust_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > 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 3 > ; > #AFTER ADJUST SUBSERIES EQ =1 > #BEFORE SUM SUBSERIES EQ =1 > temp_sum := 0.0; > ord := 2; > calc_term := 2; > #sum_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_y2_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_y2_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 := 2; > calc_term := 1; > #adjust_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > 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 3 > ; > #AFTER ADJUST SUBSERIES EQ =1 > #BEFORE SUM SUBSERIES EQ =1 > temp_sum := 0.0; > ord := 2; > calc_term := 1; > #sum_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_y2_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_y2_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 := 5; > #adjust_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > 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 3 > ; > #AFTER ADJUST SUBSERIES EQ =1 > #BEFORE SUM SUBSERIES EQ =1 > temp_sum := 0.0; > ord := 1; > calc_term := 5; > #sum_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_y2_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_y2_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 := 4; > #adjust_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > 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 3 > ; > #AFTER ADJUST SUBSERIES EQ =1 > #BEFORE SUM SUBSERIES EQ =1 > temp_sum := 0.0; > ord := 1; > calc_term := 4; > #sum_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_y2_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_y2_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 := 3; > #adjust_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > 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 3 > ; > #AFTER ADJUST SUBSERIES EQ =1 > #BEFORE SUM SUBSERIES EQ =1 > temp_sum := 0.0; > ord := 1; > calc_term := 3; > #sum_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_y2_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_y2_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_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > 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 3 > ; > #AFTER ADJUST SUBSERIES EQ =1 > #BEFORE SUM SUBSERIES EQ =1 > temp_sum := 0.0; > ord := 1; > calc_term := 2; > #sum_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_y2_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_y2_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_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > 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 3 > ; > #AFTER ADJUST SUBSERIES EQ =1 > #BEFORE SUM SUBSERIES EQ =1 > temp_sum := 0.0; > ord := 1; > calc_term := 1; > #sum_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_y2_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_y2_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 3 > array_y2[term_no] := array_y2_higher_work2[1,term_no]; > ord := 1; > while (ord <= order_diff) do # do number 4 > array_y2_higher[ord,term_no] := array_y2_higher_work2[ord,term_no]; > ord := ord + 1; > od;# end do number 4 > ; > term_no := term_no - 1; > od;# end do number 3 > ; > #END PART 2 HEVE MOVED TERMS to REGULAR Array > #Jump Series array_y1 > order_diff := 1; > #START PART 1 SUM AND ADJUST > #START SUM AND ADJUST EQ =2 > #sum_and_adjust array_y1 > #BEFORE ADJUST SUBSERIES EQ =2 > ord := 2; > calc_term := 1; > #adjust_subseriesarray_y1 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > 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 3 > ; > #AFTER ADJUST SUBSERIES EQ =2 > #BEFORE SUM SUBSERIES EQ =2 > temp_sum := 0.0; > ord := 2; > calc_term := 1; > #sum_subseriesarray_y1 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_y1_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_y1_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_y1 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > 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 3 > ; > #AFTER ADJUST SUBSERIES EQ =2 > #BEFORE SUM SUBSERIES EQ =2 > temp_sum := 0.0; > ord := 1; > calc_term := 2; > #sum_subseriesarray_y1 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_y1_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_y1_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_y1 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > 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 3 > ; > #AFTER ADJUST SUBSERIES EQ =2 > #BEFORE SUM SUBSERIES EQ =2 > temp_sum := 0.0; > ord := 1; > calc_term := 1; > #sum_subseriesarray_y1 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_y1_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_y1_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 3 > array_y1[term_no] := array_y1_higher_work2[1,term_no]; > ord := 1; > while (ord <= order_diff) do # do number 4 > array_y1_higher[ord,term_no] := array_y1_higher_work2[ord,term_no]; > ord := ord + 1; > od;# end do number 4 > ; > term_no := term_no - 1; > od;# end do number 3 > ; > #END PART 2 HEVE MOVED TERMS to REGULAR Array > display_alot(current_iter) > ; > od;# end do number 2 > ;#right paren 0001C > omniout_str(ALWAYS,"Finished!"); > if (glob_iter >= glob_max_iter) then # if number 4 > omniout_str(ALWAYS,"Maximum Iterations Reached before Solution Completed!"); > fi;# end if 4 > ; > if (elapsed_time_seconds() - convfloat(glob_orig_start_sec) >= convfloat(glob_max_sec )) then # if number 4 > omniout_str(ALWAYS,"Maximum Time Reached before Solution Completed!"); > fi;# end if 4 > ; > glob_clock_sec := elapsed_time_seconds(); > omniout_str(INFO,"diff ( y2 , x , 4 ) = y1 - 1.0;"); > omniout_str(INFO,"diff ( y1 , x , 1 ) = m1 * diff ( y2 , x , 3 ) ;"); > omniout_int(INFO,"Iterations ",32,glob_iter,4," ") > ; > prog_report(x_start,x_end); > if (glob_html_log) then # if number 4 > logstart(html_log_file); > logitem_str(html_log_file,"2012-09-21T01:41:17-05:00") > ; > logitem_str(html_log_file,"Maple") > ; > logitem_str(html_log_file,"mtest8") > ; > logitem_str(html_log_file,"diff ( y2 , x , 4 ) = y1 - 1.0;") > ; > logitem_float(html_log_file,x_start) > ; > logitem_float(html_log_file,x_end) > ; > logitem_float(html_log_file,array_x[1]) > ; > logitem_float(html_log_file,glob_h) > ; > logitem_integer(html_log_file,Digits) > ; > ; > logitem_good_digits(html_log_file,array_last_rel_error[1]) > ; > logitem_integer(html_log_file,glob_max_terms) > ; > logitem_float(html_log_file,array_1st_rel_error[1]) > ; > logitem_float(html_log_file,array_last_rel_error[1]) > ; > logitem_integer(html_log_file,glob_iter) > ; > logitem_pole(html_log_file,array_type_pole[1]) > ; > if (array_type_pole[1] = 1 or array_type_pole[1] = 2) then # if number 5 > logitem_float(html_log_file,array_pole[1]) > ; > logitem_float(html_log_file,array_pole[2]) > ; > 0; > else > logitem_str(html_log_file,"NA") > ; > logitem_str(html_log_file,"NA") > ; > 0; > fi;# end if 5 > ; > logitem_time(html_log_file,convfloat(glob_clock_sec)) > ; > if (glob_percent_done < 100.0) then # if number 5 > logitem_time(html_log_file,convfloat(glob_optimal_expect_sec)) > ; > 0; > else > logitem_str(html_log_file,"Done") > ; > 0; > fi;# end if 5 > ; > log_revs(html_log_file," 130 ") > ; > logitem_str(html_log_file,"mtest8 diffeq.mxt") > ; > logitem_str(html_log_file,"mtest8 maple results") > ; > logitem_str(html_log_file,"c c++ Maple and Maxima") > ; > logend(html_log_file) > ; > logditto(html_log_file) > ; > logditto(html_log_file) > ; > logditto(html_log_file) > ; > logitem_str(html_log_file,"diff ( y1 , x , 1 ) = m1 * diff ( y2 , x , 3 ) ;") > ; > 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) > ; > logitem_pole(html_log_file,array_type_pole[2]) > ; > if (array_type_pole[2] = 1 or array_type_pole[2] = 2) then # if number 5 > logitem_float(html_log_file,array_pole[1]) > ; > logitem_float(html_log_file,array_pole[2]) > ; > 0; > else > logitem_str(html_log_file,"NA") > ; > logitem_str(html_log_file,"NA") > ; > 0; > fi;# end if 5 > ; > logditto(html_log_file) > ; > if (glob_percent_done < 100.0) then # if number 5 > logditto(html_log_file) > ; > 0; > else > logditto(html_log_file) > ; > 0; > fi;# end if 5 > ; > logditto(html_log_file); > ; > logditto(html_log_file) > ; > logditto(html_log_file) > ; > logditto(html_log_file) > ; > logend(html_log_file) > ; > ; > fi;# end if 4 > ; > if (glob_html_log) then # if number 4 > fclose(html_log_file); > fi;# end if 4 > ; > ;; > #END OUTFILEMAIN > > # End Function number 9 > 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, log10norm, max_terms, opt_iter, tmp, subiter; global DEBUGL, glob_max_terms, ALWAYS, glob_iolevel, DEBUGMASSIVE, INFO, glob_orig_start_sec, glob_smallish_float, glob_max_sec, glob_unchanged_h_cnt, glob_not_yet_finished, glob_clock_sec, glob_log10relerr, glob_log10_relerr, glob_neg_h, glob_clock_start_sec, centuries_in_millinium, glob_optimal_expect_sec, glob_log10normmin, glob_curr_iter_when_opt, glob_start, glob_html_log, glob_iter, MAX_UNCHANGED, glob_warned, glob_large_float, glob_hmin_init, years_in_century, glob_good_digits, glob_subiter_method, glob_log10abserr, glob_optimal_clock_start_sec, glob_not_yet_start_msg, days_in_year, glob_current_iter, glob_small_float, glob_max_trunc_err, glob_max_rel_trunc_err, glob_dump_analytic, glob_next_display, glob_hmin, glob_disp_incr, glob_optimal_done, glob_almost_1, hours_in_day, sec_in_minute, glob_dump, glob_max_opt_iter, glob_percent_done, glob_normmax, glob_log10_abserr, glob_last_good_h, glob_optimal_start, glob_no_eqs, glob_max_hours, glob_display_interval, glob_look_poles, glob_hmax, glob_max_minutes, glob_max_iter, glob_relerr, glob_abserr, glob_h, min_in_hour, djd_debug2, glob_display_flag, djd_debug, glob_warned2, glob_reached_optimal_h, glob_initial_pass, array_const_0D0, array_const_3, array_const_1, array_const_4, array_const_1D0, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_type_pole, array_m1, array_x, array_norms, array_y1_init, array_pole, array_y2_init, array_last_rel_error, array_y2, array_y1, array_1st_rel_error, array_fact_1, array_complex_pole, array_y2_set_initial, array_y2_higher_work2, array_y2_higher, array_poles, array_real_pole, array_y1_higher, array_fact_2, array_y1_higher_work2, array_y1_higher_work, array_y2_higher_work, array_y1_set_initial, glob_last; glob_last; ALWAYS := 1; INFO := 2; DEBUGL := 3; DEBUGMASSIVE := 4; glob_iolevel := INFO; DEBUGL := 3; glob_max_terms := 30; ALWAYS := 1; glob_iolevel := 5; DEBUGMASSIVE := 4; INFO := 2; glob_orig_start_sec := 0.; glob_smallish_float := 0.1*10^(-100); glob_max_sec := 10000.0; glob_unchanged_h_cnt := 0; glob_not_yet_finished := true; glob_clock_sec := 0.; glob_log10relerr := 0.; glob_log10_relerr := 0.1*10^(-10); glob_neg_h := false; glob_clock_start_sec := 0.; centuries_in_millinium := 10; glob_optimal_expect_sec := 0.1; glob_log10normmin := 0.1; glob_curr_iter_when_opt := 0; glob_start := 0; glob_html_log := true; glob_iter := 0; MAX_UNCHANGED := 10; glob_warned := false; glob_large_float := 0.90*10^101; glob_hmin_init := 0.001; years_in_century := 100; glob_good_digits := 0; glob_subiter_method := 3; glob_log10abserr := 0.; glob_optimal_clock_start_sec := 0.; glob_not_yet_start_msg := true; days_in_year := 365; glob_current_iter := 0; glob_small_float := 0.1*10^(-50); glob_max_trunc_err := 0.1*10^(-10); glob_max_rel_trunc_err := 0.1*10^(-10); glob_dump_analytic := false; glob_next_display := 0.; glob_hmin := 0.1*10^(-10); glob_disp_incr := 0.1; glob_optimal_done := false; glob_almost_1 := 0.9990; hours_in_day := 24; sec_in_minute := 60; glob_dump := false; glob_max_opt_iter := 10; glob_percent_done := 0.; glob_normmax := 0.; glob_log10_abserr := 0.1*10^(-10); glob_last_good_h := 0.1; glob_optimal_start := 0.; glob_no_eqs := 0; glob_max_hours := 0.; glob_display_interval := 0.; glob_look_poles := false; glob_hmax := 1.0; glob_max_minutes := 0.; glob_max_iter := 1000; glob_relerr := 0.1*10^(-10); glob_abserr := 0.1*10^(-10); glob_h := 0.1; min_in_hour := 60; djd_debug2 := true; glob_display_flag := true; djd_debug := true; glob_warned2 := false; glob_reached_optimal_h := false; glob_initial_pass := true; 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/mtest8postode.ode#################"); omniout_str(ALWAYS, "diff ( y2 , x , 4 ) = y1 - 1.0;"); omniout_str(ALWAYS, "diff ( y1 , x , 1 ) = m1 * diff ( y2 , x , 3 ) ;") ; 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.1;"); omniout_str(ALWAYS, "x_end := 5.1;"); 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, "array_y2_init[2 + 1] := exact_soln_y2pp(x_start);") ; omniout_str(ALWAYS, "array_y2_init[3 + 1] := exact_soln_y2ppp(x_start);"); omniout_str(ALWAYS, "glob_h := 0.00001;"); omniout_str(ALWAYS, "glob_look_poles := true;"); omniout_str(ALWAYS, "glob_max_iter := 20;"); omniout_str(ALWAYS, "#END SECOND INPUT BLOCK"); omniout_str(ALWAYS, "#BEGIN OVERRIDE BLOCK"); omniout_str(ALWAYS, "glob_h := 0.005 ;"); omniout_str(ALWAYS, "glob_display_interval := 0.1;"); omniout_str(ALWAYS, "glob_look_poles := true;"); omniout_str(ALWAYS, "glob_max_iter := 10000;"); omniout_str(ALWAYS, "glob_max_minutes := 10;"); 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(1.0 +\tsin(x));"); omniout_str(ALWAYS, "end;"); omniout_str(ALWAYS, "exact_soln_y2 := proc(x)"); omniout_str(ALWAYS, "return(1.0 +\tsin(x));"); omniout_str(ALWAYS, "end;"); omniout_str(ALWAYS, "exact_soln_y2p := proc(x)"); omniout_str(ALWAYS, "return(\tcos(x));"); omniout_str(ALWAYS, "end;"); omniout_str(ALWAYS, "exact_soln_y2pp := proc(x)"); omniout_str(ALWAYS, "return(\t-sin(x));"); omniout_str(ALWAYS, "end;"); omniout_str(ALWAYS, "exact_soln_y2ppp := proc(x)"); omniout_str(ALWAYS, "return(\t-cos(x));"); omniout_str(ALWAYS, "end;"); omniout_str(ALWAYS, ""); omniout_str(ALWAYS, ""); omniout_str(ALWAYS, ""); omniout_str(ALWAYS, "#END USER DEF BLOCK"); omniout_str(ALWAYS, "#######END OF ECHO OF PROBLEM#################"); glob_unchanged_h_cnt := 0; glob_warned := false; glob_warned2 := false; glob_small_float := 0.10*10^(-199); glob_smallish_float := 0.10*10^(-63); glob_large_float := 0.10*10^101; glob_almost_1 := 0.99; glob_log10_abserr := -8.0; glob_log10_relerr := -8.0; glob_hmax := 0.01; Digits := 32; max_terms := 30; glob_max_terms := max_terms; glob_html_log := true; array_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_tmp5 := Array(0 .. max_terms + 1, []); array_type_pole := Array(0 .. max_terms + 1, []); array_m1 := Array(0 .. max_terms + 1, []); array_x := Array(0 .. max_terms + 1, []); array_norms := Array(0 .. max_terms + 1, []); array_y1_init := Array(0 .. max_terms + 1, []); array_pole := Array(0 .. max_terms + 1, []); array_y2_init := Array(0 .. max_terms + 1, []); array_last_rel_error := Array(0 .. max_terms + 1, []); array_y2 := Array(0 .. max_terms + 1, []); array_y1 := Array(0 .. max_terms + 1, []); array_1st_rel_error := Array(0 .. max_terms + 1, []); array_fact_1 := Array(0 .. max_terms + 1, []); array_complex_pole := Array(0 .. 3, 0 .. 4, []); array_y2_set_initial := Array(0 .. 4, 0 .. max_terms + 1, []); array_y2_higher_work2 := Array(0 .. 6, 0 .. max_terms + 1, []); array_y2_higher := Array(0 .. 6, 0 .. max_terms + 1, []); array_poles := Array(0 .. 3, 0 .. 4, []); array_real_pole := Array(0 .. 3, 0 .. 4, []); array_y1_higher := Array(0 .. 3, 0 .. max_terms + 1, []); array_fact_2 := Array(0 .. max_terms + 1, 0 .. max_terms + 1, []); array_y1_higher_work2 := Array(0 .. 3, 0 .. max_terms + 1, []); array_y1_higher_work := Array(0 .. 3, 0 .. max_terms + 1, []); array_y2_higher_work := Array(0 .. 6, 0 .. max_terms + 1, []); array_y1_set_initial := Array(0 .. 4, 0 .. max_terms + 1, []); 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_tmp5[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_type_pole[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_m1[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_norms[term] := 0.; term := term + 1 end do; 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_pole[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_last_rel_error[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_y1[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_1st_rel_error[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_fact_1[term] := 0.; term := term + 1 end do; ord := 1; while ord <= 2 do term := 1; while term <= 3 do array_complex_pole[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 <= 5 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 <= 5 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 <= 2 do term := 1; while term <= 3 do array_poles[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 2 do term := 1; while term <= 3 do array_real_pole[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[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; 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 <= 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 <= 5 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_y1_set_initial[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; array_tmp5 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp5[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_tmp3 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp3[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_tmp1 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp1[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_m1 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_m1[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_y1 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_y1[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_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_3 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_const_3[term] := 0.; term := term + 1 end do; array_const_3[1] := 3; 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_4 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_const_4[term] := 0.; term := term + 1 end do; array_const_4[1] := 4; array_const_1D0 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_const_1D0[term] := 0.; term := term + 1 end do; array_const_1D0[1] := 1.0; array_m1 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms do array_m1[term] := 0.; term := term + 1 end do; array_m1[1] := -1.0; iiif := 0; while iiif <= glob_max_terms do jjjf := 0; while jjjf <= glob_max_terms do array_fact_1[iiif] := 0; array_fact_2[iiif, jjjf] := 0; jjjf := jjjf + 1 end do; iiif := iiif + 1 end do; x_start := 0.1; x_end := 5.1; 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); array_y2_init[3] := exact_soln_y2pp(x_start); array_y2_init[4] := exact_soln_y2ppp(x_start); glob_h := 0.00001; glob_look_poles := true; glob_max_iter := 20; glob_h := 0.005; glob_display_interval := 0.1; glob_look_poles := true; glob_max_iter := 10000; glob_max_minutes := 10; 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); glob_abserr := expt(10.0, glob_log10_abserr); glob_relerr := expt(10.0, glob_log10_relerr); 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_y2_set_initial[1, 1] := true; array_y2_set_initial[1, 2] := true; array_y2_set_initial[1, 3] := true; array_y2_set_initial[1, 4] := true; array_y2_set_initial[1, 5] := false; array_y2_set_initial[1, 6] := false; array_y2_set_initial[1, 7] := false; array_y2_set_initial[1, 8] := false; array_y2_set_initial[1, 9] := false; array_y2_set_initial[1, 10] := false; array_y2_set_initial[1, 11] := false; array_y2_set_initial[1, 12] := false; array_y2_set_initial[1, 13] := false; array_y2_set_initial[1, 14] := false; array_y2_set_initial[1, 15] := false; array_y2_set_initial[1, 16] := false; array_y2_set_initial[1, 17] := false; array_y2_set_initial[1, 18] := false; array_y2_set_initial[1, 19] := false; array_y2_set_initial[1, 20] := false; array_y2_set_initial[1, 21] := false; array_y2_set_initial[1, 22] := false; array_y2_set_initial[1, 23] := false; array_y2_set_initial[1, 24] := false; array_y2_set_initial[1, 25] := false; array_y2_set_initial[1, 26] := false; array_y2_set_initial[1, 27] := false; array_y2_set_initial[1, 28] := false; array_y2_set_initial[1, 29] := false; array_y2_set_initial[1, 30] := false; array_y1_set_initial[2, 1] := true; array_y1_set_initial[2, 2] := false; array_y1_set_initial[2, 3] := false; array_y1_set_initial[2, 4] := false; array_y1_set_initial[2, 5] := false; array_y1_set_initial[2, 6] := false; array_y1_set_initial[2, 7] := false; array_y1_set_initial[2, 8] := false; array_y1_set_initial[2, 9] := false; array_y1_set_initial[2, 10] := false; array_y1_set_initial[2, 11] := false; array_y1_set_initial[2, 12] := false; array_y1_set_initial[2, 13] := false; array_y1_set_initial[2, 14] := false; array_y1_set_initial[2, 15] := false; array_y1_set_initial[2, 16] := false; array_y1_set_initial[2, 17] := false; array_y1_set_initial[2, 18] := false; array_y1_set_initial[2, 19] := false; array_y1_set_initial[2, 20] := false; array_y1_set_initial[2, 21] := false; array_y1_set_initial[2, 22] := false; array_y1_set_initial[2, 23] := false; array_y1_set_initial[2, 24] := false; array_y1_set_initial[2, 25] := false; array_y1_set_initial[2, 26] := false; array_y1_set_initial[2, 27] := false; array_y1_set_initial[2, 28] := false; array_y1_set_initial[2, 29] := false; array_y1_set_initial[2, 30] := false; if glob_html_log then html_log_file := fopen("html/entry.html", WRITE, TEXT) end if; omniout_str(ALWAYS, "START of Soultion"); array_x[1] := x_start; array_x[2] := glob_h; glob_next_display := x_start; order_diff := 4; 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; 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; current_iter := 1; glob_clock_start_sec := elapsed_time_seconds(); if glob_small_float < omniabs(array_y2_higher[1, 1]) then tmp := omniabs(array_y2_higher[1, 1]); log10norm := log10(tmp); if log10norm < glob_log10normmin then glob_log10normmin := log10norm end if end if; display_alot(current_iter); if glob_small_float < omniabs(array_y1_higher[1, 1]) then tmp := omniabs(array_y1_higher[1, 1]); log10norm := log10(tmp); if log10norm < glob_log10normmin then glob_log10normmin := log10norm end if end if; display_alot(current_iter); glob_clock_sec := elapsed_time_seconds(); glob_current_iter := 0; glob_iter := 0; omniout_str(DEBUGL, " "); glob_reached_optimal_h := true; glob_optimal_clock_start_sec := elapsed_time_seconds(); while glob_current_iter < glob_max_iter and not_reached_end(array_x[1], 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 <= 5 do atomall(); subiter := subiter + 1 end do else subiter := 1; while subiter <= 5 + glob_max_terms do atomall(); subiter := subiter + 1 end do end if; 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 := 4; ord := 5; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do array_y2_higher_work[5, iii] := array_y2_higher[5, iii]/( expt(glob_h, calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; temp_sum := 0.; ord := 5; 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 := 4; calc_term := 2; iii := glob_max_terms; while calc_term <= iii do array_y2_higher_work[4, iii] := array_y2_higher[4, iii]/( expt(glob_h, calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; temp_sum := 0.; ord := 4; 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 := 4; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do array_y2_higher_work[4, iii] := array_y2_higher[4, iii]/( expt(glob_h, calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; temp_sum := 0.; ord := 4; 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 := 3; calc_term := 3; 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 := 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 := 3; calc_term := 2; 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 := 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 := 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 := 4; 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 := 4; 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 := 3; 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 := 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 := 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 := 5; 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 := 5; 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 := 4; 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 := 4; 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; order_diff := 1; 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; display_alot(current_iter) 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 ( y2 , x , 4 ) = y1 - 1.0;"); omniout_str(INFO, "diff ( y1 , x , 1 ) = m1 * diff ( y2 , x , 3 ) ;"); omniout_int(INFO, "Iterations ", 32, glob_iter, 4, " "); prog_report(x_start, x_end); if glob_html_log then logstart(html_log_file); logitem_str(html_log_file, "2012-09-21T01:41:17-05:00"); logitem_str(html_log_file, "Maple"); logitem_str(html_log_file, "mtest8") ; logitem_str(html_log_file, "diff ( y2 , x , 4 ) = y1 - 1.0;"); logitem_float(html_log_file, x_start); logitem_float(html_log_file, x_end); logitem_float(html_log_file, array_x[1]); logitem_float(html_log_file, glob_h); logitem_integer(html_log_file, Digits); logitem_good_digits(html_log_file, array_last_rel_error[1]); logitem_integer(html_log_file, glob_max_terms); logitem_float(html_log_file, array_1st_rel_error[1]); logitem_float(html_log_file, array_last_rel_error[1]); logitem_integer(html_log_file, glob_iter); logitem_pole(html_log_file, array_type_pole[1]); if array_type_pole[1] = 1 or array_type_pole[1] = 2 then logitem_float(html_log_file, array_pole[1]); logitem_float(html_log_file, array_pole[2]); 0 else logitem_str(html_log_file, "NA"); logitem_str(html_log_file, "NA"); 0 end if; logitem_time(html_log_file, convfloat(glob_clock_sec)); if glob_percent_done < 100.0 then logitem_time(html_log_file, convfloat(glob_optimal_expect_sec)) ; 0 else logitem_str(html_log_file, "Done"); 0 end if; log_revs(html_log_file, " 130 "); logitem_str(html_log_file, "mtest8 diffeq.mxt"); logitem_str(html_log_file, "mtest8 maple results"); logitem_str(html_log_file, "c c++ Maple and Maxima"); logend(html_log_file); logditto(html_log_file); logditto(html_log_file); logditto(html_log_file); logitem_str(html_log_file, "diff ( y1 , x , 1 ) = m1 * diff ( y2 , x , 3 ) ;"); 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); logitem_pole(html_log_file, array_type_pole[2]); if array_type_pole[2] = 1 or array_type_pole[2] = 2 then logitem_float(html_log_file, array_pole[1]); logitem_float(html_log_file, array_pole[2]); 0 else logitem_str(html_log_file, "NA"); logitem_str(html_log_file, "NA"); 0 end if; 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 proc > main(); ##############ECHO OF PROBLEM################# ##############temp/mtest8postode.ode################# diff ( y2 , x , 4 ) = y1 - 1.0; diff ( y1 , x , 1 ) = m1 * diff ( y2 , x , 3 ) ; ! #BEGIN FIRST INPUT BLOCK Digits := 32; max_terms := 30; ! #END FIRST INPUT BLOCK #BEGIN SECOND INPUT BLOCK x_start := 0.1; x_end := 5.1; 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); array_y2_init[2 + 1] := exact_soln_y2pp(x_start); array_y2_init[3 + 1] := exact_soln_y2ppp(x_start); glob_h := 0.00001; glob_look_poles := true; glob_max_iter := 20; #END SECOND INPUT BLOCK #BEGIN OVERRIDE BLOCK glob_h := 0.005 ; glob_display_interval := 0.1; glob_look_poles := true; glob_max_iter := 10000; glob_max_minutes := 10; #END OVERRIDE BLOCK ! #BEGIN USER DEF BLOCK exact_soln_y1 := proc(x) return(1.0 + sin(x)); end; exact_soln_y2 := proc(x) return(1.0 + sin(x)); end; exact_soln_y2p := proc(x) return( cos(x)); end; exact_soln_y2pp := proc(x) return( -sin(x)); end; exact_soln_y2ppp := proc(x) return( -cos(x)); end; #END USER DEF BLOCK #######END OF ECHO OF PROBLEM################# START of Soultion x[1] = 0.1 y2[1] (analytic) = 1.0998334166468281523068141984106 y2[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0 relative error = 0 % Correct digits = 32 h = 0.005 y1[1] (analytic) = 1.0998334166468281523068141984106 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0 relative error = 0 % Correct digits = 32 h = 0.005 x[1] = 0.1 y2[1] (analytic) = 1.0998334166468281523068141984106 y2[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0 relative error = 0 % Correct digits = 32 h = 0.005 y1[1] (analytic) = 1.0998334166468281523068141984106 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0 relative error = 0 % Correct digits = 32 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=3.8MB, alloc=2.8MB, time=0.18 memory used=7.6MB, alloc=3.9MB, time=0.42 memory used=11.4MB, alloc=3.9MB, time=0.65 memory used=15.2MB, alloc=3.9MB, time=0.88 memory used=19.0MB, alloc=3.9MB, time=1.10 memory used=22.8MB, alloc=3.9MB, time=1.33 x[1] = 0.2 y2[1] (analytic) = 1.1986693307950612154594126271184 y2[1] (numeric) = 1.1986692480364196123111216775936 absolute error = 8.27586416031482909495248e-08 relative error = 6.9042094827149368306926980505219e-06 % Correct digits = 7 h = 0.005 y1[1] (analytic) = 1.1986693307950612154594126271184 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.0988359141482330631525984287078 relative error = 8.2454695059793123327868981473342 % Correct digits = 1 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=26.7MB, alloc=3.9MB, time=1.56 memory used=30.5MB, alloc=3.9MB, time=1.79 memory used=34.3MB, alloc=3.9MB, time=2.02 memory used=38.1MB, alloc=3.9MB, time=2.25 memory used=41.9MB, alloc=3.9MB, time=2.48 memory used=45.7MB, alloc=3.9MB, time=2.71 x[1] = 0.3 y2[1] (analytic) = 1.295520206661339575105320745685 y2[1] (numeric) = 1.2955175647102358300018166836328 absolute error = 2.6419511037451035040620522e-06 relative error = 0.00020392974884997165142666265451302 % Correct digits = 5 h = 0.005 y1[1] (analytic) = 1.295520206661339575105320745685 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.1956867900145114227985065472744 relative error = 15.104881344831518952969145870472 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=49.5MB, alloc=3.9MB, time=2.93 memory used=53.4MB, alloc=3.9MB, time=3.16 memory used=57.2MB, alloc=3.9MB, time=3.38 memory used=61.0MB, alloc=3.9MB, time=3.61 memory used=64.8MB, alloc=3.9MB, time=3.84 x[1] = 0.4 y2[1] (analytic) = 1.3894183423086504916663117567957 y2[1] (numeric) = 1.3893983375154958038356496766703 absolute error = 2.00047931546878306620801254e-05 relative error = 0.0014397962475036832690068877812544 % Correct digits = 4 h = 0.005 y1[1] (analytic) = 1.3894183423086504916663117567957 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.2895849256618223393594975583851 relative error = 20.842169477959351769652257603831 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop memory used=68.6MB, alloc=3.9MB, time=4.06 NO POLE NO POLE memory used=72.4MB, alloc=3.9MB, time=4.30 memory used=76.2MB, alloc=3.9MB, time=4.53 memory used=80.1MB, alloc=3.9MB, time=4.75 memory used=83.9MB, alloc=3.9MB, time=4.99 memory used=87.7MB, alloc=3.9MB, time=5.22 x[1] = 0.5 y2[1] (analytic) = 1.4794255386042030002732879352156 y2[1] (numeric) = 1.4793415206410832150846017982678 absolute error = 8.40179631197851886861369478e-05 relative error = 0.0056790937379013889872032437824782 % Correct digits = 4 h = 0.005 y1[1] (analytic) = 1.4794255386042030002732879352156 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.379592121957374847966473736805 relative error = 25.658075520009577248638102526571 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=91.5MB, alloc=3.9MB, time=5.46 memory used=95.3MB, alloc=3.9MB, time=5.69 memory used=99.1MB, alloc=3.9MB, time=5.91 memory used=102.9MB, alloc=3.9MB, time=6.14 memory used=106.8MB, alloc=3.9MB, time=6.37 memory used=110.6MB, alloc=3.9MB, time=6.59 x[1] = 0.6 y2[1] (analytic) = 1.5646424733950353572009454456587 y2[1] (numeric) = 1.5643870516175464278358848714073 absolute error = 0.0002554217774889293650605742514 relative error = 0.016324609732388453748217610780029 % Correct digits = 3 h = 0.005 y1[1] (analytic) = 1.5646424733950353572009454456587 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.4648090567482072048941312472481 relative error = 29.707045836461443818943114606507 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=114.4MB, alloc=3.9MB, time=6.82 memory used=118.2MB, alloc=3.9MB, time=7.04 memory used=122.0MB, alloc=4.0MB, time=7.27 memory used=125.8MB, alloc=4.0MB, time=7.50 memory used=129.7MB, alloc=4.0MB, time=7.73 memory used=133.5MB, alloc=4.0MB, time=7.95 x[1] = 0.7 y2[1] (analytic) = 1.6442176872376910536726143513987 y2[1] (numeric) = 1.6435848513170984889919414004899 absolute error = 0.0006328359205925646806729509088 relative error = 0.038488572742198021774380157947222 % Correct digits = 3 h = 0.005 y1[1] (analytic) = 1.6442176872376910536726143513987 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.5443842705908629013658001529881 relative error = 33.109014385159435169918424155878 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=137.3MB, alloc=4.0MB, time=8.18 memory used=141.1MB, alloc=4.0MB, time=8.41 memory used=144.9MB, alloc=4.0MB, time=8.64 memory used=148.7MB, alloc=4.0MB, time=8.86 memory used=152.5MB, alloc=4.0MB, time=9.09 memory used=156.4MB, alloc=4.0MB, time=9.32 x[1] = 0.8 y2[1] (analytic) = 1.7173560908995227616271746105814 y2[1] (numeric) = 1.715994823953617128270444571337 absolute error = 0.0013612669459056333567300392444 relative error = 0.07926527020919838524187583040766 % Correct digits = 3 h = 0.005 y1[1] (analytic) = 1.7173560908995227616271746105814 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.6175226742526946093203604121708 relative error = 35.957753754449750123122977799112 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=160.2MB, alloc=4.0MB, time=9.54 memory used=164.0MB, alloc=4.0MB, time=9.77 memory used=167.8MB, alloc=4.0MB, time=10.00 memory used=171.6MB, alloc=4.0MB, time=10.23 memory used=175.4MB, alloc=4.0MB, time=10.46 x[1] = 0.9 y2[1] (analytic) = 1.7833269096274833884613823157136 y2[1] (numeric) = 1.7806868570826447582042982511897 absolute error = 0.0026400525448386302570840645239 relative error = 0.14804086287186161863877526334535 % Correct digits = 2 h = 0.005 y1[1] (analytic) = 1.7833269096274833884613823157136 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.683493492980655236154568117303 relative error = 38.326875980547459796135295555423 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop memory used=179.2MB, alloc=4.0MB, time=10.69 NO POLE NO POLE memory used=183.1MB, alloc=4.0MB, time=10.93 memory used=186.9MB, alloc=4.0MB, time=11.16 memory used=190.7MB, alloc=4.0MB, time=11.38 memory used=194.5MB, alloc=4.0MB, time=11.61 memory used=198.3MB, alloc=4.0MB, time=11.84 x[1] = 1 y2[1] (analytic) = 1.8414709848078965066525023216303 y2[1] (numeric) = 1.8367408216013884741416369887088 absolute error = 0.0047301632065080325108653329215 relative error = 0.25686873404641161491262827375875 % Correct digits = 2 h = 0.005 y1[1] (analytic) = 1.8414709848078965066525023216303 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.7416375681610683543456881232197 relative error = 40.27419244069362759694823098043 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop memory used=202.1MB, alloc=4.0MB, time=12.06 NO POLE NO POLE memory used=205.9MB, alloc=4.0MB, time=12.29 memory used=209.8MB, alloc=4.0MB, time=12.51 memory used=213.6MB, alloc=4.0MB, time=12.74 memory used=217.4MB, alloc=4.0MB, time=12.97 memory used=221.2MB, alloc=4.0MB, time=13.19 x[1] = 1.1 y2[1] (analytic) = 1.8912073600614353399518025778717 y2[1] (numeric) = 1.8832465717487200542458260139758 absolute error = 0.0079607883127152857059765638959 relative error = 0.42093683013462266419061613134537 % Correct digits = 2 h = 0.005 y1[1] (analytic) = 1.8912073600614353399518025778717 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.7913739434146071876449883794611 relative error = 41.844906070421575947553017711517 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=225.0MB, alloc=4.0MB, time=13.42 memory used=228.8MB, alloc=4.0MB, time=13.65 memory used=232.6MB, alloc=4.0MB, time=13.87 memory used=236.5MB, alloc=4.0MB, time=14.10 memory used=240.3MB, alloc=4.0MB, time=14.34 memory used=244.1MB, alloc=4.0MB, time=14.57 x[1] = 1.2 y2[1] (analytic) = 1.9320390859672263496701344354948 y2[1] (numeric) = 1.9193039451051759594954612384909 absolute error = 0.0127351408620503901746731970039 relative error = 0.65915544641659591537953163983814 % Correct digits = 2 h = 0.005 y1[1] (analytic) = 1.9320390859672263496701344354948 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.8322056693203981973633202370842 relative error = 43.073956182608776950273766212391 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=247.9MB, alloc=4.0MB, time=14.79 memory used=251.7MB, alloc=4.0MB, time=15.02 memory used=255.5MB, alloc=4.0MB, time=15.26 memory used=259.4MB, alloc=4.0MB, time=15.48 memory used=263.2MB, alloc=4.0MB, time=15.71 memory used=267.0MB, alloc=4.0MB, time=15.94 x[1] = 1.3 y2[1] (analytic) = 1.9635581854171929647013486300396 y2[1] (numeric) = 1.9440227625929573336843692551748 absolute error = 0.0195354228242356310169793748648 relative error = 0.9948991055788337610493491789851 % Correct digits = 2 h = 0.005 y1[1] (analytic) = 1.9635581854171929647013486300396 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.863724768770364812394534431629 relative error = 43.987734877683345917928993293852 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=270.8MB, alloc=4.0MB, time=16.17 memory used=274.6MB, alloc=4.0MB, time=16.41 memory used=278.4MB, alloc=4.0MB, time=16.63 memory used=282.2MB, alloc=4.0MB, time=16.87 memory used=286.1MB, alloc=4.0MB, time=17.10 memory used=289.9MB, alloc=4.0MB, time=17.34 x[1] = 1.4 y2[1] (analytic) = 1.9854497299884601806594745788061 y2[1] (numeric) = 1.9565228284759300034216073383677 absolute error = 0.0289269015125301772378672404384 relative error = 1.456944543879149536872058524408 % Correct digits = 1 h = 0.005 y1[1] (analytic) = 1.9854497299884601806594745788061 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.8856163133416320283526603803955 relative error = 44.605325431572593999834853481657 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=293.7MB, alloc=4.0MB, time=17.57 memory used=297.5MB, alloc=4.0MB, time=17.79 memory used=301.3MB, alloc=4.0MB, time=18.02 memory used=305.1MB, alloc=4.0MB, time=18.25 memory used=308.9MB, alloc=4.0MB, time=18.48 x[1] = 1.5 y2[1] (analytic) = 1.9974949866040544309417233711415 y2[1] (numeric) = 1.9559339303596244781314634438296 absolute error = 0.0415610562444299528102599273119 relative error = 2.080658851369033715601232193909 % Correct digits = 1 h = 0.005 y1[1] (analytic) = 1.9974949866040544309417233711415 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.8976615699572262786349091727309 relative error = 44.939365353969807210177641218588 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop memory used=312.8MB, alloc=4.0MB, time=18.71 NO POLE NO POLE memory used=316.6MB, alloc=4.0MB, time=18.94 memory used=320.4MB, alloc=4.0MB, time=19.17 memory used=324.2MB, alloc=4.0MB, time=19.40 memory used=328.0MB, alloc=4.0MB, time=19.63 memory used=331.8MB, alloc=4.0MB, time=19.85 x[1] = 1.6 y2[1] (analytic) = 1.9995736030415051643421138255462 y2[1] (numeric) = 1.9413958391912359500534562087412 absolute error = 0.058177763850269214288657616805 relative error = 2.9095084953000161207937081375932 % Correct digits = 1 h = 0.005 y1[1] (analytic) = 1.9995736030415051643421138255462 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.8997401863946770120352996271356 relative error = 44.996602526963899823402275531154 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=335.6MB, alloc=4.0MB, time=20.09 memory used=339.5MB, alloc=4.0MB, time=20.33 memory used=343.3MB, alloc=4.0MB, time=20.56 memory used=347.1MB, alloc=4.0MB, time=20.78 memory used=350.9MB, alloc=4.0MB, time=21.01 memory used=354.7MB, alloc=4.0MB, time=21.24 x[1] = 1.7 y2[1] (analytic) = 1.9916648104524686153461333986479 y2[1] (numeric) = 1.9120583092596242942423349517017 absolute error = 0.0796065011928443211037984469462 relative error = 3.9969828645393010725030208582317 % Correct digits = 1 h = 0.005 y1[1] (analytic) = 1.9916648104524686153461333986479 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.8918313938056404630393192002373 relative error = 44.778187028520789108799350135373 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=358.5MB, alloc=4.0MB, time=21.47 memory used=362.4MB, alloc=4.0MB, time=21.70 memory used=366.2MB, alloc=4.0MB, time=21.92 memory used=370.0MB, alloc=4.0MB, time=22.15 memory used=373.8MB, alloc=4.0MB, time=22.38 memory used=377.6MB, alloc=4.0MB, time=22.60 x[1] = 1.8 y2[1] (analytic) = 1.9738476308781951865323731788434 y2[1] (numeric) = 1.8670810781953140685680796727312 absolute error = 0.1067665526828811179642935061122 relative error = 5.4090574678947754262304290218306 % Correct digits = 1 h = 0.005 y1[1] (analytic) = 1.9738476308781951865323731788434 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.8740142142313670342255589804328 relative error = 44.279720509252513077887140171032 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=381.4MB, alloc=4.0MB, time=22.85 memory used=385.2MB, alloc=4.0MB, time=23.08 memory used=389.1MB, alloc=4.0MB, time=23.32 memory used=392.9MB, alloc=4.0MB, time=23.55 memory used=396.7MB, alloc=4.0MB, time=23.77 memory used=400.5MB, alloc=4.0MB, time=24.01 x[1] = 1.9 y2[1] (analytic) = 1.946300087687414488489709611635 y2[1] (numeric) = 1.8056338669704945137159010532692 absolute error = 0.1406662207169199747738085583658 relative error = 7.2273654821677052780855983383067 % Correct digits = 1 h = 0.005 y1[1] (analytic) = 1.946300087687414488489709611635 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.8464666710405863361828954132244 relative error = 43.491066788490691871405858211991 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=404.3MB, alloc=4.0MB, time=24.23 memory used=408.1MB, alloc=4.0MB, time=24.46 memory used=411.9MB, alloc=4.0MB, time=24.69 memory used=415.8MB, alloc=4.0MB, time=24.91 memory used=419.6MB, alloc=4.0MB, time=25.16 x[1] = 2 y2[1] (analytic) = 1.9092974268256816953960198659117 y2[1] (numeric) = 1.7268963798990195531862404561748 absolute error = 0.1824010469266621422097794097369 relative error = 9.5533071151682490172104602796523 % Correct digits = 1 h = 0.005 y1[1] (analytic) = 1.9092974268256816953960198659117 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.8094640101788535430892056675011 relative error = 42.395909553213752581242269168099 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop memory used=423.4MB, alloc=4.0MB, time=25.41 NO POLE NO POLE memory used=427.2MB, alloc=4.0MB, time=25.66 memory used=431.0MB, alloc=4.0MB, time=25.90 memory used=434.8MB, alloc=4.0MB, time=26.15 memory used=438.6MB, alloc=4.0MB, time=26.40 memory used=442.5MB, alloc=4.0MB, time=26.65 x[1] = 2.1 y2[1] (analytic) = 1.863209366648873770680759313269 y2[1] (numeric) = 1.6300583046364077932947699257278 absolute error = 0.2331510620124659773859893875412 relative error = 12.513411868028884197713759520638 % Correct digits = 0 h = 0.005 y1[1] (analytic) = 1.863209366648873770680759313269 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.7633759500020456183739451148584 relative error = 40.971023636223788305016210126843 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=446.3MB, alloc=4.0MB, time=26.90 memory used=450.1MB, alloc=4.0MB, time=27.15 memory used=453.9MB, alloc=4.0MB, time=27.39 memory used=457.7MB, alloc=4.0MB, time=27.64 memory used=461.5MB, alloc=4.0MB, time=27.89 memory used=465.3MB, alloc=4.0MB, time=28.14 x[1] = 2.2 y2[1] (analytic) = 1.8084964038195901843040369104161 y2[1] (numeric) = 1.5143193121798425231723921876268 absolute error = 0.2941770916397476611316447227893 relative error = 16.266390744180535660805550931466 % Correct digits = 0 h = 0.005 y1[1] (analytic) = 1.8084964038195901843040369104161 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.7086629871727620319972227120055 relative error = 39.185203004885598020709462790219 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=469.2MB, alloc=4.0MB, time=28.38 memory used=473.0MB, alloc=4.0MB, time=28.62 memory used=476.8MB, alloc=4.0MB, time=28.87 memory used=480.6MB, alloc=4.0MB, time=29.12 memory used=484.4MB, alloc=4.0MB, time=29.36 memory used=488.2MB, alloc=4.0MB, time=29.61 x[1] = 2.3 y2[1] (analytic) = 1.7457052121767201773854062116435 y2[1] (numeric) = 1.378889056868171714765240648991 absolute error = 0.3668161553085484626201655626525 relative error = 21.012491269998863403446754260611 % Correct digits = 0 h = 0.005 y1[1] (analytic) = 1.7457052121767201773854062116435 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.6458717955298920250785920132329 relative error = 36.997758328541297895361380825566 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=492.1MB, alloc=4.0MB, time=29.87 memory used=495.9MB, alloc=4.0MB, time=30.11 memory used=499.7MB, alloc=4.0MB, time=30.36 memory used=503.5MB, alloc=4.0MB, time=30.61 memory used=507.3MB, alloc=4.0MB, time=30.86 memory used=511.1MB, alloc=4.0MB, time=31.10 x[1] = 2.4 y2[1] (analytic) = 1.6754631805511509265657715253413 y2[1] (numeric) = 1.2229871763819080228346793983589 absolute error = 0.4524760041692429037310921269824 relative error = 27.00602492621765326538899619839 % Correct digits = 0 h = 0.005 y1[1] (analytic) = 1.6754631805511509265657715253413 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.5756297639043227742589573269307 relative error = 34.356455610977189652350256097515 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=514.9MB, alloc=4.0MB, time=31.35 memory used=518.8MB, alloc=4.0MB, time=31.60 memory used=522.6MB, alloc=4.0MB, time=31.85 memory used=526.4MB, alloc=4.0MB, time=32.09 memory used=530.2MB, alloc=4.0MB, time=32.34 x[1] = 2.5 y2[1] (analytic) = 1.5984721441039564940518547021862 y2[1] (numeric) = 1.0458432917432287849573032056895 absolute error = 0.5526288523607277090945514964967 relative error = 34.57231672125951922241486216335 % Correct digits = 0 h = 0.005 y1[1] (analytic) = 1.5984721441039564940518547021862 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.4986387274571283417450405037756 relative error = 31.19470860323602963902660499375 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop memory used=534.0MB, alloc=4.0MB, time=32.59 NO POLE NO POLE memory used=537.8MB, alloc=4.0MB, time=32.84 memory used=541.6MB, alloc=4.0MB, time=33.09 memory used=545.5MB, alloc=4.0MB, time=33.32 memory used=549.3MB, alloc=4.0MB, time=33.56 memory used=553.1MB, alloc=4.0MB, time=33.79 x[1] = 2.6 y2[1] (analytic) = 1.5155013718214642352577269352094 y2[1] (numeric) = 0.84669700731597602152493752236094 absolute error = 0.66880436450548821373278941284846 relative error = 44.130897994612811868513692406213 % Correct digits = 0 h = 0.005 y1[1] (analytic) = 1.5155013718214642352577269352094 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.4156679551746360829509127367988 relative error = 27.427751825460203504461813956012 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop memory used=556.9MB, alloc=4.0MB, time=34.03 NO POLE NO POLE memory used=560.7MB, alloc=4.0MB, time=34.26 memory used=564.5MB, alloc=4.0MB, time=34.51 memory used=568.3MB, alloc=4.0MB, time=34.75 memory used=572.2MB, alloc=4.0MB, time=35.00 memory used=576.0MB, alloc=4.0MB, time=35.23 x[1] = 2.7 y2[1] (analytic) = 1.4273798802338299345560530858579 y2[1] (numeric) = 0.62479791080565643574463848117142 absolute error = 0.80258196942817349881141460468648 relative error = 56.227636422666715279878931449865 % Correct digits = 0 h = 0.005 y1[1] (analytic) = 1.4273798802338299345560530858579 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.3275464635870017822492388874473 relative error = 22.947392500260260736165041489731 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=579.8MB, alloc=4.0MB, time=35.48 memory used=583.6MB, alloc=4.0MB, time=35.73 memory used=587.4MB, alloc=4.0MB, time=35.97 memory used=591.2MB, alloc=4.0MB, time=36.22 memory used=595.0MB, alloc=4.0MB, time=36.47 memory used=598.9MB, alloc=4.0MB, time=36.72 x[1] = 2.8 y2[1] (analytic) = 1.3349881501559049195438537527124 y2[1] (numeric) = 0.3794055732594414136386928963392 absolute error = 0.9555825768964635059051608563732 relative error = 71.57985460656463438804222861334 % Correct digits = 0 h = 0.005 y1[1] (analytic) = 1.3349881501559049195438537527124 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.2351547335090767672370395543018 relative error = 17.614743133234142649679276970566 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=602.7MB, alloc=4.0MB, time=36.97 memory used=606.5MB, alloc=4.0MB, time=37.21 memory used=610.3MB, alloc=4.0MB, time=37.46 memory used=614.1MB, alloc=4.0MB, time=37.71 memory used=617.9MB, alloc=4.0MB, time=37.96 memory used=621.8MB, alloc=4.0MB, time=38.20 x[1] = 2.9 y2[1] (analytic) = 1.2392493292139823281842569187396 y2[1] (numeric) = 0.10978954906616702404461826350221 absolute error = 1.1294597801478153041396386552374 relative error = 91.140640831671609399433150519258 % Correct digits = 0 h = 0.005 y1[1] (analytic) = 1.2392493292139823281842569187396 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.139415912567154175877442720329 relative error = 11.25002929439400174747946178329 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=625.6MB, alloc=4.0MB, time=38.46 memory used=629.4MB, alloc=4.0MB, time=38.71 memory used=633.2MB, alloc=4.0MB, time=38.97 memory used=637.0MB, alloc=4.0MB, time=39.22 memory used=640.8MB, alloc=4.0MB, time=39.52 memory used=644.6MB, alloc=4.0MB, time=40.12 x[1] = 3 y2[1] (analytic) = 1.1411200080598672221007448028081 y2[1] (numeric) = -0.18477062404366598138483724028181 absolute error = 1.3258906321035332034855820430899 relative error = 116.19204139254495097782194200722 % Correct digits = 0 h = 0.005 y1[1] (analytic) = 1.1411200080598672221007448028081 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.0412865914130390697939306043975 relative error = 3.6180761989472563940998451949901 % Correct digits = 1 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=648.5MB, alloc=4.0MB, time=40.72 memory used=652.3MB, alloc=4.0MB, time=41.33 memory used=656.1MB, alloc=4.0MB, time=41.92 memory used=659.9MB, alloc=4.0MB, time=42.52 memory used=663.7MB, alloc=4.0MB, time=43.11 x[1] = 3.1 y2[1] (analytic) = 1.0415806624332905791946982715967 y2[1] (numeric) = -0.50498542499789216818169475653517 absolute error = 1.5465660874311827473763930281319 relative error = 148.4826037205961119996344103719 % Correct digits = 0 h = 0.005 y1[1] (analytic) = 1.0415806624332905791946982715967 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.0582527542135375731121159268139 relative error = 5.5927261627006682588522153365723 % Correct digits = 1 h = 0.005 TOP MAIN SOLVE Loop memory used=667.5MB, alloc=4.0MB, time=43.71 NO POLE NO POLE memory used=671.3MB, alloc=4.0MB, time=44.32 memory used=675.2MB, alloc=4.0MB, time=44.92 memory used=679.0MB, alloc=4.0MB, time=45.51 memory used=682.8MB, alloc=4.0MB, time=46.11 memory used=686.6MB, alloc=4.0MB, time=46.71 x[1] = 3.2 y2[1] (analytic) = 0.9416258565724200908627825853809 y2[1] (numeric) = -0.85155534938268141906274474536038 absolute error = 1.7931812059551015099255273307413 relative error = 190.43457583911286924911318838085 % Correct digits = 0 h = 0.005 y1[1] (analytic) = 0.9416258565724200908627825853809 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.1582075600744080614440316130297 relative error = 16.80153098708376190781109682142 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=690.4MB, alloc=4.0MB, time=47.31 memory used=694.2MB, alloc=4.0MB, time=47.90 memory used=698.0MB, alloc=4.0MB, time=48.49 memory used=701.9MB, alloc=4.1MB, time=49.08 memory used=705.7MB, alloc=4.1MB, time=49.68 memory used=709.5MB, alloc=4.1MB, time=50.30 x[1] = 3.3 y2[1] (analytic) = 0.84225430585675161798834572239752 y2[1] (numeric) = -1.2251709094425389339295469854402 absolute error = 2.0674252152992905519178927078377 relative error = 245.46330020791995308577830540728 % Correct digits = 0 h = 0.005 y1[1] (analytic) = 0.84225430585675161798834572239752 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.25757911079007653431846847601308 relative error = 30.582106734148879186640087125249 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=713.3MB, alloc=4.1MB, time=50.89 memory used=717.1MB, alloc=4.1MB, time=51.48 memory used=720.9MB, alloc=4.1MB, time=52.07 memory used=724.8MB, alloc=4.1MB, time=52.67 memory used=728.6MB, alloc=4.1MB, time=53.27 memory used=732.4MB, alloc=4.1MB, time=53.88 x[1] = 3.4 y2[1] (analytic) = 0.74445889797316868075009757063626 y2[1] (numeric) = -1.6265126340803052298684305740374 absolute error = 2.3709715320534739106185281446737 relative error = 318.48252986277383106262165097539 % Correct digits = 0 h = 0.005 y1[1] (analytic) = 0.74445889797316868075009757063626 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.35537451867365947155671662777434 relative error = 47.735948840316991736329837818676 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=736.2MB, alloc=4.1MB, time=54.49 memory used=740.0MB, alloc=4.1MB, time=55.07 memory used=743.8MB, alloc=4.1MB, time=55.66 memory used=747.6MB, alloc=4.1MB, time=56.25 memory used=751.5MB, alloc=4.1MB, time=56.83 memory used=755.3MB, alloc=4.1MB, time=57.42 x[1] = 3.5 y2[1] (analytic) = 0.64921677231038015187963119995636 y2[1] (numeric) = -2.0562510688571561411504939269948 absolute error = 2.7054678411675362930301251269512 relative error = 416.7279646118100293846218437261 % Correct digits = 0 h = 0.005 y1[1] (analytic) = 0.64921677231038015187963119995636 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.45061664433644800042718299845424 relative error = 69.409273382267978789178788241519 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=759.1MB, alloc=4.1MB, time=58.01 memory used=762.9MB, alloc=4.1MB, time=58.59 memory used=766.7MB, alloc=4.1MB, time=59.18 memory used=770.5MB, alloc=4.1MB, time=59.81 memory used=774.3MB, alloc=4.1MB, time=60.40 x[1] = 3.6 y2[1] (analytic) = 0.55747955670514761573327265250731 y2[1] (numeric) = -2.5150467759926028192316047787359 absolute error = 3.0725263326977504349648774312432 relative error = 551.14600988369831575687620695924 % Correct digits = 0 h = 0.005 y1[1] (analytic) = 0.55747955670514761573327265250731 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.54235385994168053657354154590329 relative error = 97.28677104271518615867368110248 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop memory used=778.2MB, alloc=4.1MB, time=60.98 NO POLE NO POLE memory used=782.0MB, alloc=4.1MB, time=61.54 memory used=785.8MB, alloc=4.1MB, time=62.11 memory used=789.6MB, alloc=4.1MB, time=62.68 memory used=793.4MB, alloc=4.1MB, time=63.25 memory used=797.2MB, alloc=4.1MB, time=63.83 x[1] = 3.7 y2[1] (analytic) = 0.47016385909150678678922237429879 y2[1] (numeric) = -3.0035503343644917327524001822635 absolute error = 3.4737141934559985195416225565623 relative error = 738.83054307241391554060197888447 % Correct digits = 0 h = 0.005 y1[1] (analytic) = 0.47016385909150678678922237429879 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.62966955755532136551759182411181 relative error = 133.92555496971331296546412200479 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop memory used=801.0MB, alloc=4.1MB, time=64.40 NO POLE NO POLE memory used=804.9MB, alloc=4.1MB, time=64.95 memory used=808.7MB, alloc=4.1MB, time=65.52 memory used=812.5MB, alloc=4.1MB, time=66.11 memory used=816.3MB, alloc=4.1MB, time=66.70 memory used=820.1MB, alloc=4.1MB, time=67.28 x[1] = 3.8 y2[1] (analytic) = 0.38814210905728092426641391388112 y2[1] (numeric) = -3.5224023395090046675382865091617 absolute error = 3.9105444485662855918047004230428 relative error = 1007.5032719495988531400514666626 % Correct digits = -1 h = 0.005 y1[1] (analytic) = 0.38814210905728092426641391388112 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.71169130758954722804040028452948 relative error = 183.3584377943692319534771162733 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=823.9MB, alloc=4.1MB, time=67.86 memory used=827.7MB, alloc=4.1MB, time=68.44 memory used=831.6MB, alloc=4.1MB, time=69.01 memory used=835.4MB, alloc=4.1MB, time=69.57 memory used=839.2MB, alloc=4.1MB, time=70.13 memory used=843.0MB, alloc=4.1MB, time=70.67 x[1] = 3.9 y2[1] (analytic) = 0.31223384081602618190911187462131 y2[1] (numeric) = -4.0722334036206587265994394495937 absolute error = 4.384467244436684908508551324215 relative error = 1404.2255102707115576110264597788 % Correct digits = -1 h = 0.005 y1[1] (analytic) = 0.31223384081602618190911187462131 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.78759957583080197039770232378929 relative error = 252.24670515290809392950214639463 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=846.8MB, alloc=4.1MB, time=71.23 memory used=850.6MB, alloc=4.1MB, time=71.78 memory used=854.5MB, alloc=4.1MB, time=72.33 memory used=858.3MB, alloc=4.1MB, time=72.87 memory used=862.1MB, alloc=4.1MB, time=73.43 memory used=865.9MB, alloc=4.1MB, time=73.98 x[1] = 4 y2[1] (analytic) = 0.24319750469207174862736090548817 y2[1] (numeric) = -4.6536641555523063301308040123036 absolute error = 4.8968616602443780787581649177918 relative error = 2013.5328552998989816514422121418 % Correct digits = -1 h = 0.005 y1[1] (analytic) = 0.24319750469207174862736090548817 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.85663591195475640367945329292243 relative error = 352.2387752454117919297939196184 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=869.7MB, alloc=4.1MB, time=74.54 memory used=873.5MB, alloc=4.1MB, time=75.10 memory used=877.3MB, alloc=4.1MB, time=75.67 memory used=881.2MB, alloc=4.1MB, time=76.22 memory used=885.0MB, alloc=4.1MB, time=76.76 x[1] = 4.1 y2[1] (analytic) = 0.18172288893558949573496297564155 y2[1] (numeric) = -5.2673052408151352155120945246153 absolute error = 5.4490281297507247112470575002568 relative error = 2998.5370371709738432910245181237 % Correct digits = -1 h = 0.005 y1[1] (analytic) = 0.18172288893558949573496297564155 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.91811052771123865657185122276905 relative error = 505.22558445384224724412757763166 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop memory used=888.8MB, alloc=4.1MB, time=77.33 NO POLE NO POLE memory used=892.6MB, alloc=4.1MB, time=77.88 memory used=896.4MB, alloc=4.1MB, time=78.45 memory used=900.2MB, alloc=4.1MB, time=78.99 memory used=904.0MB, alloc=4.1MB, time=79.54 memory used=907.9MB, alloc=4.1MB, time=80.10 x[1] = 4.2 y2[1] (analytic) = 0.12842422758641193998142290209118 y2[1] (numeric) = -5.913757321578668437307794632433 absolute error = 6.0421815491650803772892175345242 relative error = 4704.8611175017724846538656831094 % Correct digits = -1 h = 0.005 y1[1] (analytic) = 0.12842422758641193998142290209118 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 0.97140918906041621232539129631942 relative error = 756.4064875584248246934684856427 % Correct digits = 0 h = 0.005 TOP MAIN SOLVE Loop memory used=911.7MB, alloc=4.1MB, time=80.65 NO POLE NO POLE memory used=915.5MB, alloc=4.1MB, time=81.19 memory used=919.3MB, alloc=4.1MB, time=81.75 memory used=923.1MB, alloc=4.1MB, time=82.31 memory used=926.9MB, alloc=4.1MB, time=82.85 memory used=930.7MB, alloc=4.1MB, time=83.41 x[1] = 4.3 y2[1] (analytic) = 0.08383406325054501596829063971536 y2[1] (numeric) = -6.5936110766707643672671573002406 absolute error = 6.677445139921309383235447939956 relative error = 7965.0739580225445630873269008197 % Correct digits = -1 h = 0.005 y1[1] (analytic) = 0.08383406325054501596829063971536 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 1.0159993533962831363385235586952 relative error = 1211.9171062481908206769699673162 % Correct digits = -1 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=934.6MB, alloc=4.1MB, time=83.96 memory used=938.4MB, alloc=4.1MB, time=84.53 memory used=942.2MB, alloc=4.1MB, time=85.09 memory used=946.0MB, alloc=4.1MB, time=85.66 memory used=949.8MB, alloc=4.1MB, time=86.24 memory used=953.6MB, alloc=4.1MB, time=86.83 x[1] = 4.4 y2[1] (analytic) = 0.04839792611048404596460766661961 y2[1] (numeric) = -7.3074472015776166943242048111029 absolute error = 7.3558451276881007402888124777225 relative error = 15198.678370837597344645962226954 % Correct digits = -2 h = 0.005 y1[1] (analytic) = 0.04839792611048404596460766661961 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 1.051435490536344106342206531791 relative error = 2172.4804656631356271068828228862 % Correct digits = -1 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=957.4MB, alloc=4.1MB, time=87.41 memory used=961.3MB, alloc=4.1MB, time=87.99 memory used=965.1MB, alloc=4.1MB, time=88.57 memory used=968.9MB, alloc=4.1MB, time=89.13 memory used=972.7MB, alloc=4.1MB, time=89.68 memory used=976.5MB, alloc=4.1MB, time=90.24 x[1] = 4.5 y2[1] (analytic) = 0.02246988233490294461086498550137 y2[1] (numeric) = -8.0558364084437544245977287666642 absolute error = 8.0783062907786573692085937521656 relative error = 35951.707135690928567872357565076 % Correct digits = -2 h = 0.005 y1[1] (analytic) = 0.02246988233490294461086498550137 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 1.0773635343119252076959492129092 relative error = 4794.7003827360216695601654483086 % Correct digits = -1 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=980.3MB, alloc=4.1MB, time=90.78 memory used=984.2MB, alloc=4.1MB, time=91.34 memory used=988.0MB, alloc=4.1MB, time=91.88 memory used=991.8MB, alloc=4.1MB, time=92.42 memory used=995.6MB, alloc=4.1MB, time=92.99 memory used=999.4MB, alloc=4.1MB, time=93.53 x[1] = 4.6 y2[1] (analytic) = 0.00630899636653554386189534009117 y2[1] (numeric) = -8.8393394260720418813912900871494 absolute error = 8.8456484224385774252531854272406 relative error = 140206.90310360701770181160634225 % Correct digits = -3 h = 0.005 y1[1] (analytic) = 0.00630899636653554386189534009117 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 1.0935244202802926084449188583194 relative error = 17332.779363776669077674829758583 % Correct digits = -2 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=1003.2MB, alloc=4.1MB, time=94.10 memory used=1007.0MB, alloc=4.1MB, time=94.63 memory used=1010.9MB, alloc=4.1MB, time=95.20 memory used=1014.7MB, alloc=4.1MB, time=95.74 memory used=1018.5MB, alloc=4.1MB, time=96.28 x[1] = 4.7 y2[1] (analytic) = 7.674243589911582046345842503e-05 y2[1] (numeric) = -9.6585069999236787051932190113638 absolute error = 9.6585837423595778210136824697888 relative error = 12585714.31724759486235485639641 % Correct digits = -5 h = 0.005 y1[1] (analytic) = 7.674243589911582046345842503e-05 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 1.0997566742109290364863507399856 relative error = 1433048.9530676987047240685913601 % Correct digits = -4 h = 0.005 TOP MAIN SOLVE Loop memory used=1022.3MB, alloc=4.1MB, time=96.83 NO POLE NO POLE memory used=1026.1MB, alloc=4.1MB, time=97.37 memory used=1029.9MB, alloc=4.1MB, time=97.92 memory used=1033.7MB, alloc=4.1MB, time=98.48 memory used=1037.6MB, alloc=4.1MB, time=99.04 memory used=1041.4MB, alloc=4.1MB, time=99.58 x[1] = 4.8 y2[1] (analytic) = 0.00383539116415932821840353349637 y2[1] (numeric) = -10.513879892118199853676615096692 absolute error = 10.517715283282359181895018630188 relative error = 274227.96875498659424125168561563 % Correct digits = -3 h = 0.005 y1[1] (analytic) = 0.00383539116415932821840353349637 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 1.0959980254826688240884106649142 relative error = 28575.912562047591235227362441875 % Correct digits = -2 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=1045.2MB, alloc=4.1MB, time=100.12 memory used=1049.0MB, alloc=4.1MB, time=100.66 memory used=1052.8MB, alloc=4.1MB, time=101.21 memory used=1056.6MB, alloc=4.1MB, time=101.76 memory used=1060.4MB, alloc=4.1MB, time=102.33 memory used=1064.3MB, alloc=4.1MB, time=102.89 x[1] = 4.9 y2[1] (analytic) = 0.01754738737566748772362275008167 y2[1] (numeric) = -11.405988881433475601699347219099 absolute error = 11.423536268809143089422969969181 relative error = 65101.066182934264108387600306652 % Correct digits = -2 h = 0.005 y1[1] (analytic) = 0.01754738737566748772362275008167 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 1.0822860292711606645831914483289 relative error = 6167.7901450556620115997815014871 % Correct digits = -1 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=1068.1MB, alloc=4.1MB, time=103.44 memory used=1071.9MB, alloc=4.1MB, time=103.98 memory used=1075.7MB, alloc=4.1MB, time=104.54 memory used=1079.5MB, alloc=4.1MB, time=105.09 memory used=1083.3MB, alloc=4.1MB, time=105.63 memory used=1087.2MB, alloc=4.1MB, time=106.17 x[1] = 5 y2[1] (analytic) = 0.04107572533686153110684559384401 y2[1] (numeric) = -12.335354763305711541304053573134 absolute error = 12.376430488642573072410899166978 relative error = 30130.76552426917599907045093245 % Correct digits = -2 h = 0.005 y1[1] (analytic) = 0.04107572533686153110684559384401 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 1.0587576913099666211999686045666 relative error = 2577.5751557084080347966248214276 % Correct digits = -1 h = 0.005 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=1091.0MB, alloc=4.1MB, time=106.71 memory used=1094.8MB, alloc=4.1MB, time=107.25 memory used=1098.6MB, alloc=4.1MB, time=107.80 memory used=1102.4MB, alloc=4.1MB, time=108.35 memory used=1106.2MB, alloc=4.1MB, time=108.89 memory used=1110.0MB, alloc=4.1MB, time=109.44 x[1] = 5.1 y2[1] (analytic) = 0.07418531767226770305385375245514 y2[1] (numeric) = -13.302488349829448581718141671915 absolute error = 13.37667366750171628477199542437 relative error = 18031.430055468032337335468721761 % Correct digits = -2 h = 0.005 y1[1] (analytic) = 0.07418531767226770305385375245514 y1[1] (numeric) = 1.0998334166468281523068141984106 absolute error = 1.0256480989745604492529604459555 relative error = 1382.5486378660786444685961315022 % Correct digits = -1 h = 0.005 Finished! diff ( y2 , x , 4 ) = y1 - 1.0; diff ( y1 , x , 1 ) = m1 * diff ( y2 , x , 3 ) ; Iterations = 1000 Total Elapsed Time = 1 Minutes 49 Seconds Elapsed Time(since restart) = 1 Minutes 49 Seconds Time to Timeout = 8 Minutes 10 Seconds Percent Done = 100.1 % > quit memory used=1110.6MB, alloc=4.1MB, time=109.51