|\^/| 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 > display_alot := proc(iter) > global > ALWAYS, > glob_iolevel, > DEBUGL, > INFO, > DEBUGMASSIVE, > glob_max_terms, > #Top Generate Globals Decl > glob_unchanged_h_cnt, > glob_no_eqs, > glob_look_poles, > centuries_in_millinium, > days_in_year, > djd_debug, > glob_log10normmin, > glob_current_iter, > glob_max_trunc_err, > min_in_hour, > glob_normmax, > glob_max_iter, > glob_log10_relerr, > glob_large_float, > glob_max_opt_iter, > glob_orig_start_sec, > glob_smallish_float, > glob_relerr, > glob_hmin_init, > glob_optimal_done, > years_in_century, > glob_log10abserr, > glob_max_hours, > glob_disp_incr, > glob_not_yet_finished, > djd_debug2, > glob_display_flag, > MAX_UNCHANGED, > glob_start, > glob_max_sec, > glob_optimal_clock_start_sec, > glob_log10_abserr, > glob_h, > glob_reached_optimal_h, > glob_clock_sec, > glob_iter, > glob_curr_iter_when_opt, > glob_optimal_start, > glob_not_yet_start_msg, > sec_in_min, > glob_max_minutes, > glob_last_good_h, > glob_dump, > glob_optimal_expect_sec, > glob_warned2, > glob_hmin, > glob_html_log, > glob_subiter_method, > glob_percent_done, > glob_warned, > glob_small_float, > glob_abserr, > glob_dump_analytic, > glob_clock_start_sec, > hours_in_day, > glob_log10relerr, > glob_max_rel_trunc_err, > glob_hmax, > glob_initial_pass, > glob_almost_1, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_1D0, > array_const_1, > array_const_0D0, > #END CONST > array_last_rel_error, > array_1st_rel_error, > array_pole, > array_y, > array_x, > array_type_pole, > array_norms, > array_m1, > array_tmp0, > array_tmp1, > array_tmp2, > array_y_init, > array_poles, > array_y_higher, > array_real_pole, > array_y_set_initial, > array_complex_pole, > array_y_higher_work2, > array_y_higher_work, > glob_last; > > local abserr, analytic_val_y, ind_var, numeric_val, relerr, term_no; > #TOP DISPLAY ALOT > if (iter >= 0) then # if number 1 > ind_var := array_x[1]; > omniout_float(ALWAYS,"x[1] ",33,ind_var,20," "); > analytic_val_y := exact_soln_y(ind_var); > omniout_float(ALWAYS,"y[1] (analytic) ",33,analytic_val_y,20," "); > term_no := 1; > numeric_val := array_y[term_no]; > abserr := abs(numeric_val - analytic_val_y); > omniout_float(ALWAYS,"y[1] (numeric) ",33,numeric_val,20," "); > if (abs(analytic_val_y) <> 0.0) then # if number 2 > relerr := abserr*100.0/abs(analytic_val_y); > else > relerr := -1.0 ; > fi;# end if 2 > ; > if glob_iter = 1 then # if number 2 > array_1st_rel_error[1] := relerr; > else > array_last_rel_error[1] := relerr; > fi;# end if 2 > ; > omniout_float(ALWAYS,"absolute error ",4,abserr,20," "); > omniout_float(ALWAYS,"relative error ",4,relerr,20,"%"); > omniout_float(ALWAYS,"h ",4,glob_h,20," "); > #BOTTOM DISPLAY ALOT > fi;# end if 1 > ; > # End Function number 3 > end; display_alot := proc(iter) local abserr, analytic_val_y, ind_var, numeric_val, relerr, term_no; global ALWAYS, glob_iolevel, DEBUGL, INFO, DEBUGMASSIVE, glob_max_terms, glob_unchanged_h_cnt, glob_no_eqs, glob_look_poles, centuries_in_millinium, days_in_year, djd_debug, glob_log10normmin, glob_current_iter, glob_max_trunc_err, min_in_hour, glob_normmax, glob_max_iter, glob_log10_relerr, glob_large_float, glob_max_opt_iter, glob_orig_start_sec, glob_smallish_float, glob_relerr, glob_hmin_init, glob_optimal_done, years_in_century, glob_log10abserr, glob_max_hours, glob_disp_incr, glob_not_yet_finished, djd_debug2, glob_display_flag, MAX_UNCHANGED, glob_start, glob_max_sec, glob_optimal_clock_start_sec, glob_log10_abserr, glob_h, glob_reached_optimal_h, glob_clock_sec, glob_iter, glob_curr_iter_when_opt, glob_optimal_start, glob_not_yet_start_msg, sec_in_min, glob_max_minutes, glob_last_good_h, glob_dump, glob_optimal_expect_sec, glob_warned2, glob_hmin, glob_html_log, glob_subiter_method, glob_percent_done, glob_warned, glob_small_float, glob_abserr, glob_dump_analytic, glob_clock_start_sec, hours_in_day, glob_log10relerr, glob_max_rel_trunc_err, glob_hmax, glob_initial_pass, glob_almost_1, array_const_1D0, array_const_1, array_const_0D0, array_last_rel_error, array_1st_rel_error, array_pole, array_y, array_x, array_type_pole, array_norms, array_m1, array_tmp0, array_tmp1, array_tmp2, array_y_init, array_poles, array_y_higher, array_real_pole, array_y_set_initial, array_complex_pole, array_y_higher_work2, array_y_higher_work, glob_last; if 0 <= iter then ind_var := array_x[1]; omniout_float(ALWAYS, "x[1] ", 33, ind_var, 20, " "); analytic_val_y := exact_soln_y(ind_var); omniout_float(ALWAYS, "y[1] (analytic) ", 33, analytic_val_y, 20, " "); term_no := 1; numeric_val := array_y[term_no]; abserr := abs(numeric_val - analytic_val_y); omniout_float(ALWAYS, "y[1] (numeric) ", 33, numeric_val, 20, " "); if abs(analytic_val_y) <> 0. then relerr := abserr*100.0/abs(analytic_val_y) else relerr := -1.0 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_float(ALWAYS, "h ", 4, glob_h, 20, " ") end if end proc > # Begin Function number 4 > adjust_for_pole := proc(h_param) > global > ALWAYS, > glob_iolevel, > DEBUGL, > INFO, > DEBUGMASSIVE, > glob_max_terms, > #Top Generate Globals Decl > glob_unchanged_h_cnt, > glob_no_eqs, > glob_look_poles, > centuries_in_millinium, > days_in_year, > djd_debug, > glob_log10normmin, > glob_current_iter, > glob_max_trunc_err, > min_in_hour, > glob_normmax, > glob_max_iter, > glob_log10_relerr, > glob_large_float, > glob_max_opt_iter, > glob_orig_start_sec, > glob_smallish_float, > glob_relerr, > glob_hmin_init, > glob_optimal_done, > years_in_century, > glob_log10abserr, > glob_max_hours, > glob_disp_incr, > glob_not_yet_finished, > djd_debug2, > glob_display_flag, > MAX_UNCHANGED, > glob_start, > glob_max_sec, > glob_optimal_clock_start_sec, > glob_log10_abserr, > glob_h, > glob_reached_optimal_h, > glob_clock_sec, > glob_iter, > glob_curr_iter_when_opt, > glob_optimal_start, > glob_not_yet_start_msg, > sec_in_min, > glob_max_minutes, > glob_last_good_h, > glob_dump, > glob_optimal_expect_sec, > glob_warned2, > glob_hmin, > glob_html_log, > glob_subiter_method, > glob_percent_done, > glob_warned, > glob_small_float, > glob_abserr, > glob_dump_analytic, > glob_clock_start_sec, > hours_in_day, > glob_log10relerr, > glob_max_rel_trunc_err, > glob_hmax, > glob_initial_pass, > glob_almost_1, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_1D0, > array_const_1, > array_const_0D0, > #END CONST > array_last_rel_error, > array_1st_rel_error, > array_pole, > array_y, > array_x, > array_type_pole, > array_norms, > array_m1, > array_tmp0, > array_tmp1, > array_tmp2, > array_y_init, > array_poles, > array_y_higher, > array_real_pole, > array_y_set_initial, > array_complex_pole, > array_y_higher_work2, > array_y_higher_work, > glob_last; > > local hnew, sz2, tmp; > #TOP ADJUST FOR POLE > > hnew := h_param; > glob_normmax := glob_small_float; > if (abs(array_y_higher[1,1]) > glob_small_float) then # if number 1 > tmp := abs(array_y_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 (abs(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"); > newline(); > 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 > #BOTTOM ADJUST FOR POLE > # End Function number 4 > end; adjust_for_pole := proc(h_param) local hnew, sz2, tmp; global ALWAYS, glob_iolevel, DEBUGL, INFO, DEBUGMASSIVE, glob_max_terms, glob_unchanged_h_cnt, glob_no_eqs, glob_look_poles, centuries_in_millinium, days_in_year, djd_debug, glob_log10normmin, glob_current_iter, glob_max_trunc_err, min_in_hour, glob_normmax, glob_max_iter, glob_log10_relerr, glob_large_float, glob_max_opt_iter, glob_orig_start_sec, glob_smallish_float, glob_relerr, glob_hmin_init, glob_optimal_done, years_in_century, glob_log10abserr, glob_max_hours, glob_disp_incr, glob_not_yet_finished, djd_debug2, glob_display_flag, MAX_UNCHANGED, glob_start, glob_max_sec, glob_optimal_clock_start_sec, glob_log10_abserr, glob_h, glob_reached_optimal_h, glob_clock_sec, glob_iter, glob_curr_iter_when_opt, glob_optimal_start, glob_not_yet_start_msg, sec_in_min, glob_max_minutes, glob_last_good_h, glob_dump, glob_optimal_expect_sec, glob_warned2, glob_hmin, glob_html_log, glob_subiter_method, glob_percent_done, glob_warned, glob_small_float, glob_abserr, glob_dump_analytic, glob_clock_start_sec, hours_in_day, glob_log10relerr, glob_max_rel_trunc_err, glob_hmax, glob_initial_pass, glob_almost_1, array_const_1D0, array_const_1, array_const_0D0, array_last_rel_error, array_1st_rel_error, array_pole, array_y, array_x, array_type_pole, array_norms, array_m1, array_tmp0, array_tmp1, array_tmp2, array_y_init, array_poles, array_y_higher, array_real_pole, array_y_set_initial, array_complex_pole, array_y_higher_work2, array_y_higher_work, glob_last; hnew := h_param; glob_normmax := glob_small_float; if glob_small_float < abs(array_y_higher[1, 1]) then tmp := abs(array_y_higher[1, 1]); if tmp < glob_normmax then glob_normmax := tmp end if end if; if glob_look_poles and glob_small_float < abs(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"); newline(); 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 end proc > # Begin Function number 5 > prog_report := proc(x_start,x_end) > global > ALWAYS, > glob_iolevel, > DEBUGL, > INFO, > DEBUGMASSIVE, > glob_max_terms, > #Top Generate Globals Decl > glob_unchanged_h_cnt, > glob_no_eqs, > glob_look_poles, > centuries_in_millinium, > days_in_year, > djd_debug, > glob_log10normmin, > glob_current_iter, > glob_max_trunc_err, > min_in_hour, > glob_normmax, > glob_max_iter, > glob_log10_relerr, > glob_large_float, > glob_max_opt_iter, > glob_orig_start_sec, > glob_smallish_float, > glob_relerr, > glob_hmin_init, > glob_optimal_done, > years_in_century, > glob_log10abserr, > glob_max_hours, > glob_disp_incr, > glob_not_yet_finished, > djd_debug2, > glob_display_flag, > MAX_UNCHANGED, > glob_start, > glob_max_sec, > glob_optimal_clock_start_sec, > glob_log10_abserr, > glob_h, > glob_reached_optimal_h, > glob_clock_sec, > glob_iter, > glob_curr_iter_when_opt, > glob_optimal_start, > glob_not_yet_start_msg, > sec_in_min, > glob_max_minutes, > glob_last_good_h, > glob_dump, > glob_optimal_expect_sec, > glob_warned2, > glob_hmin, > glob_html_log, > glob_subiter_method, > glob_percent_done, > glob_warned, > glob_small_float, > glob_abserr, > glob_dump_analytic, > glob_clock_start_sec, > hours_in_day, > glob_log10relerr, > glob_max_rel_trunc_err, > glob_hmax, > glob_initial_pass, > glob_almost_1, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_1D0, > array_const_1, > array_const_0D0, > #END CONST > array_last_rel_error, > array_1st_rel_error, > array_pole, > array_y, > array_x, > array_type_pole, > array_norms, > array_m1, > array_tmp0, > array_tmp1, > array_tmp2, > array_y_init, > array_poles, > array_y_higher, > array_real_pole, > array_y_set_initial, > array_complex_pole, > array_y_higher_work2, > array_y_higher_work, > 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 5 > 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 ALWAYS, glob_iolevel, DEBUGL, INFO, DEBUGMASSIVE, glob_max_terms, glob_unchanged_h_cnt, glob_no_eqs, glob_look_poles, centuries_in_millinium, days_in_year, djd_debug, glob_log10normmin, glob_current_iter, glob_max_trunc_err, min_in_hour, glob_normmax, glob_max_iter, glob_log10_relerr, glob_large_float, glob_max_opt_iter, glob_orig_start_sec, glob_smallish_float, glob_relerr, glob_hmin_init, glob_optimal_done, years_in_century, glob_log10abserr, glob_max_hours, glob_disp_incr, glob_not_yet_finished, djd_debug2, glob_display_flag, MAX_UNCHANGED, glob_start, glob_max_sec, glob_optimal_clock_start_sec, glob_log10_abserr, glob_h, glob_reached_optimal_h, glob_clock_sec, glob_iter, glob_curr_iter_when_opt, glob_optimal_start, glob_not_yet_start_msg, sec_in_min, glob_max_minutes, glob_last_good_h, glob_dump, glob_optimal_expect_sec, glob_warned2, glob_hmin, glob_html_log, glob_subiter_method, glob_percent_done, glob_warned, glob_small_float, glob_abserr, glob_dump_analytic, glob_clock_start_sec, hours_in_day, glob_log10relerr, glob_max_rel_trunc_err, glob_hmax, glob_initial_pass, glob_almost_1, array_const_1D0, array_const_1, array_const_0D0, array_last_rel_error, array_1st_rel_error, array_pole, array_y, array_x, array_type_pole, array_norms, array_m1, array_tmp0, array_tmp1, array_tmp2, array_y_init, array_poles, array_y_higher, array_real_pole, array_y_set_initial, array_complex_pole, array_y_higher_work2, array_y_higher_work, 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 6 > check_for_pole := proc() > global > ALWAYS, > glob_iolevel, > DEBUGL, > INFO, > DEBUGMASSIVE, > glob_max_terms, > #Top Generate Globals Decl > glob_unchanged_h_cnt, > glob_no_eqs, > glob_look_poles, > centuries_in_millinium, > days_in_year, > djd_debug, > glob_log10normmin, > glob_current_iter, > glob_max_trunc_err, > min_in_hour, > glob_normmax, > glob_max_iter, > glob_log10_relerr, > glob_large_float, > glob_max_opt_iter, > glob_orig_start_sec, > glob_smallish_float, > glob_relerr, > glob_hmin_init, > glob_optimal_done, > years_in_century, > glob_log10abserr, > glob_max_hours, > glob_disp_incr, > glob_not_yet_finished, > djd_debug2, > glob_display_flag, > MAX_UNCHANGED, > glob_start, > glob_max_sec, > glob_optimal_clock_start_sec, > glob_log10_abserr, > glob_h, > glob_reached_optimal_h, > glob_clock_sec, > glob_iter, > glob_curr_iter_when_opt, > glob_optimal_start, > glob_not_yet_start_msg, > sec_in_min, > glob_max_minutes, > glob_last_good_h, > glob_dump, > glob_optimal_expect_sec, > glob_warned2, > glob_hmin, > glob_html_log, > glob_subiter_method, > glob_percent_done, > glob_warned, > glob_small_float, > glob_abserr, > glob_dump_analytic, > glob_clock_start_sec, > hours_in_day, > glob_log10relerr, > glob_max_rel_trunc_err, > glob_hmax, > glob_initial_pass, > glob_almost_1, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_1D0, > array_const_1, > array_const_0D0, > #END CONST > array_last_rel_error, > array_1st_rel_error, > array_pole, > array_y, > array_x, > array_type_pole, > array_norms, > array_m1, > array_tmp0, > array_tmp1, > array_tmp2, > array_y_init, > array_poles, > array_y_higher, > array_real_pole, > array_y_set_initial, > array_complex_pole, > array_y_higher_work2, > array_y_higher_work, > 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 - 1 - 1; > while ((m >= 10) and ((abs(array_y_higher[1,m]) < glob_small_float) or (abs(array_y_higher[1,m-1]) < glob_small_float) or (abs(array_y_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_y_higher[1,m]/array_y_higher[1,m-1]; > rm1 := array_y_higher[1,m-1]/array_y_higher[1,m-2]; > hdrc := convfloat(m-1)*rm0-convfloat(m-2)*rm1; > if (abs(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 > #TOP RADII COMPLEX EQ = 1 > #Computes radius of convergence for complex conjugate pair of poles. > #from 6 adjacent Taylor series terms > #Also computes r_order of poles. > #Due to Manuel Prieto. > #With a correction by Dennis J. Darland > n := glob_max_terms - 1 - 1; > cnt := 0; > while ((cnt < 5) and (n >= 10)) do # do number 2 > if (abs(array_y_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 (abs(array_y_higher[1,m]) >= (glob_large_float)) or (abs(array_y_higher[1,m-1]) >=(glob_large_float)) or (abs(array_y_higher[1,m-2]) >= (glob_large_float)) or (abs(array_y_higher[1,m-3]) >= (glob_large_float)) or (abs(array_y_higher[1,m-4]) >= (glob_large_float)) or (abs(array_y_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_y_higher[1,m])/(array_y_higher[1,m-1]); > rm1 := (array_y_higher[1,m-1])/(array_y_higher[1,m-2]); > rm2 := (array_y_higher[1,m-2])/(array_y_higher[1,m-3]); > rm3 := (array_y_higher[1,m-3])/(array_y_higher[1,m-4]); > rm4 := (array_y_higher[1,m-4])/(array_y_higher[1,m-5]); > nr1 := convfloat(m-1)*rm0 - 2.0*convfloat(m-2)*rm1 + convfloat(m-3)*rm2; > nr2 := convfloat(m-2)*rm1 - 2.0*convfloat(m-3)*rm2 + convfloat(m-4)*rm3; > dr1 := (-1.0)/rm1 + 2.0/rm2 - 1.0/rm3; > dr2 := (-1.0)/rm2 + 2.0/rm3 - 1.0/rm4; > ds1 := 3.0/rm1 - 8.0/rm2 + 5.0/rm3; > ds2 := 3.0/rm2 - 8.0/rm3 + 5.0/rm4; > if ((abs(nr1 * dr2 - nr2 * dr1) <= glob_small_float) or (abs(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 (abs(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 (abs(rcs) > glob_small_float) then # if number 5 > if (rcs > 0.0) then # if number 6 > rad_c := sqrt(rcs) * 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 > 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 2 > 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 3 > omniout_str(ALWAYS,"Complex estimate of poles used"); > fi;# end if 3 > ; > fi;# end if 2 > ; > 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 2 > 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 3 > omniout_str(ALWAYS,"Real estimate of pole used"); > fi;# end if 3 > ; > fi;# end if 2 > ; > 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 2 > array_poles[1,1] := glob_large_float; > array_poles[1,2] := glob_large_float; > found := true; > array_type_pole[1] := 3; > if (glob_display_flag) then # if number 3 > omniout_str(ALWAYS,"NO POLE"); > fi;# end if 3 > ; > fi;# end if 2 > ; > 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 2 > 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 3 > omniout_str(ALWAYS,"Real estimate of pole used"); > fi;# end if 3 > ; > fi;# end if 2 > ; > 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 2 > 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 3 > omniout_str(ALWAYS,"Complex estimate of poles used"); > fi;# end if 3 > ; > fi;# end if 2 > ; > if not found then # if number 2 > array_poles[1,1] := glob_large_float; > array_poles[1,2] := glob_large_float; > array_type_pole[1] := 3; > if (glob_display_flag) then # if number 3 > omniout_str(ALWAYS,"NO POLE"); > fi;# end if 3 > ; > fi;# end if 2 > ; > #BOTTOM WHICH RADII EQ = 1 > 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 2 > array_pole[1] := array_poles[1,1]; > array_pole[2] := array_poles[1,2]; > fi;# end if 2 > ; > #BOTTOM WHICH RADIUS EQ = 1 > #BOTTOM CHECK FOR POLE > display_pole(); > # End Function number 6 > 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 ALWAYS, glob_iolevel, DEBUGL, INFO, DEBUGMASSIVE, glob_max_terms, glob_unchanged_h_cnt, glob_no_eqs, glob_look_poles, centuries_in_millinium, days_in_year, djd_debug, glob_log10normmin, glob_current_iter, glob_max_trunc_err, min_in_hour, glob_normmax, glob_max_iter, glob_log10_relerr, glob_large_float, glob_max_opt_iter, glob_orig_start_sec, glob_smallish_float, glob_relerr, glob_hmin_init, glob_optimal_done, years_in_century, glob_log10abserr, glob_max_hours, glob_disp_incr, glob_not_yet_finished, djd_debug2, glob_display_flag, MAX_UNCHANGED, glob_start, glob_max_sec, glob_optimal_clock_start_sec, glob_log10_abserr, glob_h, glob_reached_optimal_h, glob_clock_sec, glob_iter, glob_curr_iter_when_opt, glob_optimal_start, glob_not_yet_start_msg, sec_in_min, glob_max_minutes, glob_last_good_h, glob_dump, glob_optimal_expect_sec, glob_warned2, glob_hmin, glob_html_log, glob_subiter_method, glob_percent_done, glob_warned, glob_small_float, glob_abserr, glob_dump_analytic, glob_clock_start_sec, hours_in_day, glob_log10relerr, glob_max_rel_trunc_err, glob_hmax, glob_initial_pass, glob_almost_1, array_const_1D0, array_const_1, array_const_0D0, array_last_rel_error, array_1st_rel_error, array_pole, array_y, array_x, array_type_pole, array_norms, array_m1, array_tmp0, array_tmp1, array_tmp2, array_y_init, array_poles, array_y_higher, array_real_pole, array_y_set_initial, array_complex_pole, array_y_higher_work2, array_y_higher_work, glob_last; n := glob_max_terms; m := n - 2; while 10 <= m and (abs(array_y_higher[1, m]) < glob_small_float or abs(array_y_higher[1, m - 1]) < glob_small_float or abs(array_y_higher[1, m - 2]) < glob_small_float) do m := m - 1 end do; if 10 < m then rm0 := array_y_higher[1, m]/array_y_higher[1, m - 1]; rm1 := array_y_higher[1, m - 1]/array_y_higher[1, m - 2]; hdrc := convfloat(m - 1)*rm0 - convfloat(m - 2)*rm1; if glob_small_float < abs(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 - 2; cnt := 0; while cnt < 5 and 10 <= n do if glob_small_float < abs(array_y_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 <= abs(array_y_higher[1, m]) or glob_large_float <= abs(array_y_higher[1, m - 1]) or glob_large_float <= abs(array_y_higher[1, m - 2]) or glob_large_float <= abs(array_y_higher[1, m - 3]) or glob_large_float <= abs(array_y_higher[1, m - 4]) or glob_large_float <= abs(array_y_higher[1, m - 5]) then array_complex_pole[1, 1] := glob_large_float; array_complex_pole[1, 2] := glob_large_float else rm0 := array_y_higher[1, m]/array_y_higher[1, m - 1]; rm1 := array_y_higher[1, m - 1]/array_y_higher[1, m - 2]; rm2 := array_y_higher[1, m - 2]/array_y_higher[1, m - 3]; rm3 := array_y_higher[1, m - 3]/array_y_higher[1, m - 4]; rm4 := array_y_higher[1, m - 4]/array_y_higher[1, m - 5]; nr1 := convfloat(m - 1)*rm0 - 2.0*convfloat(m - 2)*rm1 + convfloat(m - 3)*rm2; nr2 := convfloat(m - 2)*rm1 - 2.0*convfloat(m - 3)*rm2 + convfloat(m - 4)*rm3; dr1 := (-1)*(1.0)/rm1 + 2.0/rm2 - 1.0/rm3; dr2 := (-1)*(1.0)/rm2 + 2.0/rm3 - 1.0/rm4; ds1 := 3.0/rm1 - 8.0/rm2 + 5.0/rm3; ds2 := 3.0/rm2 - 8.0/rm3 + 5.0/rm4; if abs(nr1*dr2 - nr2*dr1) <= glob_small_float or abs(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 < abs(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 < abs(rcs) then if 0. < rcs then rad_c := sqrt(rcs)*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; 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 glob_display_flag 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 glob_display_flag 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; display_pole() end proc > # Begin Function number 7 > get_norms := proc() > global > ALWAYS, > glob_iolevel, > DEBUGL, > INFO, > DEBUGMASSIVE, > glob_max_terms, > #Top Generate Globals Decl > glob_unchanged_h_cnt, > glob_no_eqs, > glob_look_poles, > centuries_in_millinium, > days_in_year, > djd_debug, > glob_log10normmin, > glob_current_iter, > glob_max_trunc_err, > min_in_hour, > glob_normmax, > glob_max_iter, > glob_log10_relerr, > glob_large_float, > glob_max_opt_iter, > glob_orig_start_sec, > glob_smallish_float, > glob_relerr, > glob_hmin_init, > glob_optimal_done, > years_in_century, > glob_log10abserr, > glob_max_hours, > glob_disp_incr, > glob_not_yet_finished, > djd_debug2, > glob_display_flag, > MAX_UNCHANGED, > glob_start, > glob_max_sec, > glob_optimal_clock_start_sec, > glob_log10_abserr, > glob_h, > glob_reached_optimal_h, > glob_clock_sec, > glob_iter, > glob_curr_iter_when_opt, > glob_optimal_start, > glob_not_yet_start_msg, > sec_in_min, > glob_max_minutes, > glob_last_good_h, > glob_dump, > glob_optimal_expect_sec, > glob_warned2, > glob_hmin, > glob_html_log, > glob_subiter_method, > glob_percent_done, > glob_warned, > glob_small_float, > glob_abserr, > glob_dump_analytic, > glob_clock_start_sec, > hours_in_day, > glob_log10relerr, > glob_max_rel_trunc_err, > glob_hmax, > glob_initial_pass, > glob_almost_1, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_1D0, > array_const_1, > array_const_0D0, > #END CONST > array_last_rel_error, > array_1st_rel_error, > array_pole, > array_y, > array_x, > array_type_pole, > array_norms, > array_m1, > array_tmp0, > array_tmp1, > array_tmp2, > array_y_init, > array_poles, > array_y_higher, > array_real_pole, > array_y_set_initial, > array_complex_pole, > array_y_higher_work2, > array_y_higher_work, > glob_last; > > local iii; > if (not glob_initial_pass) then # if number 2 > set_z(array_norms,glob_max_terms+1); > #TOP GET NORMS > iii := 1; > while (iii <= glob_max_terms) do # do number 2 > if (abs(array_y[iii]) > array_norms[iii]) then # if number 3 > array_norms[iii] := abs(array_y[iii]); > fi;# end if 3 > ; > iii := iii + 1; > od;# end do number 2 > #GET NORMS > ; > fi;# end if 2 > ; > # End Function number 7 > end; get_norms := proc() local iii; global ALWAYS, glob_iolevel, DEBUGL, INFO, DEBUGMASSIVE, glob_max_terms, glob_unchanged_h_cnt, glob_no_eqs, glob_look_poles, centuries_in_millinium, days_in_year, djd_debug, glob_log10normmin, glob_current_iter, glob_max_trunc_err, min_in_hour, glob_normmax, glob_max_iter, glob_log10_relerr, glob_large_float, glob_max_opt_iter, glob_orig_start_sec, glob_smallish_float, glob_relerr, glob_hmin_init, glob_optimal_done, years_in_century, glob_log10abserr, glob_max_hours, glob_disp_incr, glob_not_yet_finished, djd_debug2, glob_display_flag, MAX_UNCHANGED, glob_start, glob_max_sec, glob_optimal_clock_start_sec, glob_log10_abserr, glob_h, glob_reached_optimal_h, glob_clock_sec, glob_iter, glob_curr_iter_when_opt, glob_optimal_start, glob_not_yet_start_msg, sec_in_min, glob_max_minutes, glob_last_good_h, glob_dump, glob_optimal_expect_sec, glob_warned2, glob_hmin, glob_html_log, glob_subiter_method, glob_percent_done, glob_warned, glob_small_float, glob_abserr, glob_dump_analytic, glob_clock_start_sec, hours_in_day, glob_log10relerr, glob_max_rel_trunc_err, glob_hmax, glob_initial_pass, glob_almost_1, array_const_1D0, array_const_1, array_const_0D0, array_last_rel_error, array_1st_rel_error, array_pole, array_y, array_x, array_type_pole, array_norms, array_m1, array_tmp0, array_tmp1, array_tmp2, array_y_init, array_poles, array_y_higher, array_real_pole, array_y_set_initial, array_complex_pole, array_y_higher_work2, array_y_higher_work, glob_last; if not glob_initial_pass then set_z(array_norms, glob_max_terms + 1); iii := 1; while iii <= glob_max_terms do if array_norms[iii] < abs(array_y[iii]) then array_norms[iii] := abs(array_y[iii]) end if; iii := iii + 1 end do end if end proc > # Begin Function number 8 > atomall := proc() > global > ALWAYS, > glob_iolevel, > DEBUGL, > INFO, > DEBUGMASSIVE, > glob_max_terms, > #Top Generate Globals Decl > glob_unchanged_h_cnt, > glob_no_eqs, > glob_look_poles, > centuries_in_millinium, > days_in_year, > djd_debug, > glob_log10normmin, > glob_current_iter, > glob_max_trunc_err, > min_in_hour, > glob_normmax, > glob_max_iter, > glob_log10_relerr, > glob_large_float, > glob_max_opt_iter, > glob_orig_start_sec, > glob_smallish_float, > glob_relerr, > glob_hmin_init, > glob_optimal_done, > years_in_century, > glob_log10abserr, > glob_max_hours, > glob_disp_incr, > glob_not_yet_finished, > djd_debug2, > glob_display_flag, > MAX_UNCHANGED, > glob_start, > glob_max_sec, > glob_optimal_clock_start_sec, > glob_log10_abserr, > glob_h, > glob_reached_optimal_h, > glob_clock_sec, > glob_iter, > glob_curr_iter_when_opt, > glob_optimal_start, > glob_not_yet_start_msg, > sec_in_min, > glob_max_minutes, > glob_last_good_h, > glob_dump, > glob_optimal_expect_sec, > glob_warned2, > glob_hmin, > glob_html_log, > glob_subiter_method, > glob_percent_done, > glob_warned, > glob_small_float, > glob_abserr, > glob_dump_analytic, > glob_clock_start_sec, > hours_in_day, > glob_log10relerr, > glob_max_rel_trunc_err, > glob_hmax, > glob_initial_pass, > glob_almost_1, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_1D0, > array_const_1, > array_const_0D0, > #END CONST > array_last_rel_error, > array_1st_rel_error, > array_pole, > array_y, > array_x, > array_type_pole, > array_norms, > array_m1, > array_tmp0, > array_tmp1, > array_tmp2, > array_y_init, > array_poles, > array_y_higher, > array_real_pole, > array_y_set_initial, > array_complex_pole, > array_y_higher_work2, > array_y_higher_work, > glob_last; > > local kkk, order_d, adj2, temporary, term; > #TOP ATOMALL > #END OUTFILE1 > #BEGIN ATOMHDR1 > #emit pre add $eq_no = 1 i = 1 > array_tmp1[1] := array_const_0D0[1] + array_y[1]; > #emit pre sub $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_y_set_initial[1,2] then # if number 1 > if (1 <= glob_max_terms) then # if number 2 > temporary := array_tmp2[1] * (glob_h ^ (1)) * factorial_3(0,1); > array_y[2] := temporary; > array_y_higher[1,2] := temporary; > temporary := temporary / glob_h * (2.0); > array_y_higher[2,1] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 2; > #END ATOMHDR1 > #BEGIN ATOMHDR2 > #emit pre add $eq_no = 1 i = 2 > array_tmp1[2] := array_const_0D0[2] + array_y[2]; > #emit pre sub $eq_no = 1 i = 2 > array_tmp2[2] := (array_tmp1[2] - (array_const_1D0[2])); > #emit pre assign xxx $eq_no = 1 i = 2 $min_hdrs = 5 > if not array_y_set_initial[1,3] then # if number 1 > if (2 <= glob_max_terms) then # if number 2 > temporary := array_tmp2[2] * (glob_h ^ (1)) * factorial_3(1,2); > array_y[3] := temporary; > array_y_higher[1,3] := temporary; > temporary := temporary / glob_h * (2.0); > array_y_higher[2,2] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 3; > #END ATOMHDR2 > #BEGIN ATOMHDR3 > #emit pre add $eq_no = 1 i = 3 > array_tmp1[3] := array_const_0D0[3] + array_y[3]; > #emit pre sub $eq_no = 1 i = 3 > array_tmp2[3] := (array_tmp1[3] - (array_const_1D0[3])); > #emit pre assign xxx $eq_no = 1 i = 3 $min_hdrs = 5 > if not array_y_set_initial[1,4] then # if number 1 > if (3 <= glob_max_terms) then # if number 2 > temporary := array_tmp2[3] * (glob_h ^ (1)) * factorial_3(2,3); > array_y[4] := temporary; > array_y_higher[1,4] := temporary; > temporary := temporary / glob_h * (2.0); > array_y_higher[2,3] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 4; > #END ATOMHDR3 > #BEGIN ATOMHDR4 > #emit pre add $eq_no = 1 i = 4 > array_tmp1[4] := array_const_0D0[4] + array_y[4]; > #emit pre sub $eq_no = 1 i = 4 > array_tmp2[4] := (array_tmp1[4] - (array_const_1D0[4])); > #emit pre assign xxx $eq_no = 1 i = 4 $min_hdrs = 5 > if not array_y_set_initial[1,5] then # if number 1 > if (4 <= glob_max_terms) then # if number 2 > temporary := array_tmp2[4] * (glob_h ^ (1)) * factorial_3(3,4); > array_y[5] := temporary; > array_y_higher[1,5] := temporary; > temporary := temporary / glob_h * (2.0); > array_y_higher[2,4] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 5; > #END ATOMHDR4 > #BEGIN ATOMHDR5 > #emit pre add $eq_no = 1 i = 5 > array_tmp1[5] := array_const_0D0[5] + array_y[5]; > #emit pre sub $eq_no = 1 i = 5 > array_tmp2[5] := (array_tmp1[5] - (array_const_1D0[5])); > #emit pre assign xxx $eq_no = 1 i = 5 $min_hdrs = 5 > if not array_y_set_initial[1,6] then # if number 1 > if (5 <= glob_max_terms) then # if number 2 > temporary := array_tmp2[5] * (glob_h ^ (1)) * factorial_3(4,5); > array_y[6] := temporary; > array_y_higher[1,6] := temporary; > temporary := temporary / glob_h * (2.0); > array_y_higher[2,5] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 6; > #END ATOMHDR5 > #BEGIN OUTFILE3 > #Top Atomall While Loop-- outfile3 > while (kkk <= glob_max_terms) do # do number 1 > #END OUTFILE3 > #BEGIN OUTFILE4 > #emit add $eq_no = 1 > array_tmp1[kkk] := array_const_0D0[kkk] + array_y[kkk]; > #emit sub $eq_no = 1 > array_tmp2[kkk] := (array_tmp1[kkk] - (array_const_1D0[kkk])); > #emit assign $eq_no = 1 > order_d := 1; > if (kkk + order_d + 1 <= glob_max_terms) then # if number 1 > if not array_y_set_initial[1,kkk + order_d] then # if number 2 > temporary := array_tmp2[kkk] * (glob_h ^ (order_d)) / factorial_3((kkk - 1),(kkk + order_d - 1)); > array_y[kkk + order_d] := temporary; > array_y_higher[1,kkk + order_d] := temporary; > term := kkk + order_d - 1; > adj2 := 2; > while (adj2 <= order_d + 1) and (term >= 1) do # do number 2 > temporary := temporary / glob_h * convfp(adj2); > array_y_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 > # End Function number 8 > end; atomall := proc() local kkk, order_d, adj2, temporary, term; global ALWAYS, glob_iolevel, DEBUGL, INFO, DEBUGMASSIVE, glob_max_terms, glob_unchanged_h_cnt, glob_no_eqs, glob_look_poles, centuries_in_millinium, days_in_year, djd_debug, glob_log10normmin, glob_current_iter, glob_max_trunc_err, min_in_hour, glob_normmax, glob_max_iter, glob_log10_relerr, glob_large_float, glob_max_opt_iter, glob_orig_start_sec, glob_smallish_float, glob_relerr, glob_hmin_init, glob_optimal_done, years_in_century, glob_log10abserr, glob_max_hours, glob_disp_incr, glob_not_yet_finished, djd_debug2, glob_display_flag, MAX_UNCHANGED, glob_start, glob_max_sec, glob_optimal_clock_start_sec, glob_log10_abserr, glob_h, glob_reached_optimal_h, glob_clock_sec, glob_iter, glob_curr_iter_when_opt, glob_optimal_start, glob_not_yet_start_msg, sec_in_min, glob_max_minutes, glob_last_good_h, glob_dump, glob_optimal_expect_sec, glob_warned2, glob_hmin, glob_html_log, glob_subiter_method, glob_percent_done, glob_warned, glob_small_float, glob_abserr, glob_dump_analytic, glob_clock_start_sec, hours_in_day, glob_log10relerr, glob_max_rel_trunc_err, glob_hmax, glob_initial_pass, glob_almost_1, array_const_1D0, array_const_1, array_const_0D0, array_last_rel_error, array_1st_rel_error, array_pole, array_y, array_x, array_type_pole, array_norms, array_m1, array_tmp0, array_tmp1, array_tmp2, array_y_init, array_poles, array_y_higher, array_real_pole, array_y_set_initial, array_complex_pole, array_y_higher_work2, array_y_higher_work, glob_last; array_tmp1[1] := array_const_0D0[1] + array_y[1]; array_tmp2[1] := array_tmp1[1] - array_const_1D0[1]; if not array_y_set_initial[1, 2] then if 1 <= glob_max_terms then temporary := array_tmp2[1]*glob_h*factorial_3(0, 1); array_y[2] := temporary; array_y_higher[1, 2] := temporary; temporary := temporary*2.0/glob_h; array_y_higher[2, 1] := temporary end if end if; kkk := 2; array_tmp1[2] := array_const_0D0[2] + array_y[2]; array_tmp2[2] := array_tmp1[2] - array_const_1D0[2]; if not array_y_set_initial[1, 3] then if 2 <= glob_max_terms then temporary := array_tmp2[2]*glob_h*factorial_3(1, 2); array_y[3] := temporary; array_y_higher[1, 3] := temporary; temporary := temporary*2.0/glob_h; array_y_higher[2, 2] := temporary end if end if; kkk := 3; array_tmp1[3] := array_const_0D0[3] + array_y[3]; array_tmp2[3] := array_tmp1[3] - array_const_1D0[3]; if not array_y_set_initial[1, 4] then if 3 <= glob_max_terms then temporary := array_tmp2[3]*glob_h*factorial_3(2, 3); array_y[4] := temporary; array_y_higher[1, 4] := temporary; temporary := temporary*2.0/glob_h; array_y_higher[2, 3] := temporary end if end if; kkk := 4; array_tmp1[4] := array_const_0D0[4] + array_y[4]; array_tmp2[4] := array_tmp1[4] - array_const_1D0[4]; if not array_y_set_initial[1, 5] then if 4 <= glob_max_terms then temporary := array_tmp2[4]*glob_h*factorial_3(3, 4); array_y[5] := temporary; array_y_higher[1, 5] := temporary; temporary := temporary*2.0/glob_h; array_y_higher[2, 4] := temporary end if end if; kkk := 5; array_tmp1[5] := array_const_0D0[5] + array_y[5]; array_tmp2[5] := array_tmp1[5] - array_const_1D0[5]; if not array_y_set_initial[1, 6] then if 5 <= glob_max_terms then temporary := array_tmp2[5]*glob_h*factorial_3(4, 5); array_y[6] := temporary; array_y_higher[1, 6] := temporary; temporary := temporary*2.0/glob_h; array_y_higher[2, 5] := temporary end if end if; kkk := 6; while kkk <= glob_max_terms do array_tmp1[kkk] := array_const_0D0[kkk] + array_y[kkk]; array_tmp2[kkk] := array_tmp1[kkk] - array_const_1D0[kkk]; order_d := 1; if kkk + order_d + 1 <= glob_max_terms then if not array_y_set_initial[1, kkk + order_d] then temporary := array_tmp2[kkk]*glob_h^order_d/ factorial_3(kkk - 1, kkk + order_d - 1); array_y[kkk + order_d] := temporary; array_y_higher[1, kkk + order_d] := temporary; term := kkk + order_d - 1; adj2 := 2; while adj2 <= order_d + 1 and 1 <= term do temporary := temporary*convfp(adj2)/glob_h; array_y_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_min, 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); > if (secs > 0.0) then # if number 1 > sec_in_millinium := convfloat(sec_in_min * 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_min; > sec_int := floor(seconds); > fprintf(fd,""); > 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_min, years_in_century; secs := secs_in; if 0. < secs then sec_in_millinium := convfloat(sec_in_min*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_min; sec_int := floor(seconds); fprintf(fd, ""); 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_min, 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_min * 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_min; > 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_min, years_in_century; secs := convfloat(secs_in); if 0. < secs then sec_in_millinium := convfloat(sec_in_min*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_min; 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 > log_revs := proc(file,revs) > fprintf(file,revs); > # End Function number 9 > end; log_revs := proc(file, revs) fprintf(file, revs) end proc > # Begin Function number 10 > logitem_float := proc(file,x) > fprintf(file,""); > fprintf(file,"%g",x); > fprintf(file,""); > # End Function number 10 > end; logitem_float := proc(file, x) fprintf(file, ""); fprintf(file, "%g", x); fprintf(file, "") end proc > # Begin Function number 11 > 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 11 > 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 12 > logstart := proc(file) > fprintf(file,""); > # End Function number 12 > end; logstart := proc(file) fprintf(file, "") end proc > # Begin Function number 13 > logend := proc(file) > fprintf(file,"\n"); > # End Function number 13 > end; logend := proc(file) fprintf(file, "\n") end proc > # Begin Function number 14 > 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 14 > 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 15 > comp_expect_sec := proc(t_end2,t_start2,t2,clock_sec) > global glob_small_float; > local ms2, rrr, sec_left, sub1, sub2; > ; > ms2 := clock_sec; > sub1 := (t_end2-t_start2); > sub2 := (t2-t_start2); > if (sub1 = 0.0) then # if number 13 > sec_left := 0.0; > else > if (abs(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 15 > end; comp_expect_sec := proc(t_end2, t_start2, t2, clock_sec) local ms2, rrr, sec_left, sub1, sub2; global glob_small_float; ms2 := clock_sec; sub1 := t_end2 - t_start2; sub2 := t2 - t_start2; if sub1 = 0. then sec_left := 0. else if 0. < abs(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 16 > 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 (abs(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 16 > 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 < abs(sub2) then rrr := 100.0*sub2/sub1 else rrr := 0. end if; rrr end proc > > # Begin Function number 17 > factorial_1 := proc(nnn) > nnn!; > > # End Function number 17 > end; factorial_1 := proc(nnn) nnn! end proc > > # Begin Function number 18 > factorial_3 := proc(mmm2,nnn2) > (mmm2!)/(nnn2!); > > # End Function number 18 > end; factorial_3 := proc(mmm2, nnn2) mmm2!/nnn2! end proc > # Begin Function number 19 > convfp := proc(mmm) > (mmm); > > # End Function number 19 > end; convfp := proc(mmm) mmm end proc > # Begin Function number 20 > convfloat := proc(mmm) > (mmm); > > # End Function number 20 > end; convfloat := proc(mmm) mmm end proc > elapsed_time_seconds := proc() > time(); > end; elapsed_time_seconds := proc() time() end proc > > > > #END ATS LIBRARY BLOCK > #BEGIN USER DEF BLOCK > #BEGIN USER DEF BLOCK > exact_soln_y := proc(x) > 1.0 + exp(x); > end; exact_soln_y := proc(x) 1.0 + exp(x) end proc > > #END USER DEF BLOCK > #END USER DEF BLOCK > #END OUTFILE5 > # Begin Function number 2 > mainprog := proc() > #BEGIN OUTFIEMAIN > local d1,d2,d3,d4,est_err_2,niii,done_once, > term,ord,order_diff,term_no,html_log_file, > rows,r_order,sub_iter,calc_term,iii,temp_sum,current_iter, > x_start,x_end > ,it, log10norm, max_terms, opt_iter, tmp; > #Top Generate Globals Definition > #Bottom Generate Globals Deninition > global > ALWAYS, > glob_iolevel, > DEBUGL, > INFO, > DEBUGMASSIVE, > glob_max_terms, > #Top Generate Globals Decl > glob_unchanged_h_cnt, > glob_no_eqs, > glob_look_poles, > centuries_in_millinium, > days_in_year, > djd_debug, > glob_log10normmin, > glob_current_iter, > glob_max_trunc_err, > min_in_hour, > glob_normmax, > glob_max_iter, > glob_log10_relerr, > glob_large_float, > glob_max_opt_iter, > glob_orig_start_sec, > glob_smallish_float, > glob_relerr, > glob_hmin_init, > glob_optimal_done, > years_in_century, > glob_log10abserr, > glob_max_hours, > glob_disp_incr, > glob_not_yet_finished, > djd_debug2, > glob_display_flag, > MAX_UNCHANGED, > glob_start, > glob_max_sec, > glob_optimal_clock_start_sec, > glob_log10_abserr, > glob_h, > glob_reached_optimal_h, > glob_clock_sec, > glob_iter, > glob_curr_iter_when_opt, > glob_optimal_start, > glob_not_yet_start_msg, > sec_in_min, > glob_max_minutes, > glob_last_good_h, > glob_dump, > glob_optimal_expect_sec, > glob_warned2, > glob_hmin, > glob_html_log, > glob_subiter_method, > glob_percent_done, > glob_warned, > glob_small_float, > glob_abserr, > glob_dump_analytic, > glob_clock_start_sec, > hours_in_day, > glob_log10relerr, > glob_max_rel_trunc_err, > glob_hmax, > glob_initial_pass, > glob_almost_1, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_1D0, > array_const_1, > array_const_0D0, > #END CONST > array_last_rel_error, > array_1st_rel_error, > array_pole, > array_y, > array_x, > array_type_pole, > array_norms, > array_m1, > array_tmp0, > array_tmp1, > array_tmp2, > array_y_init, > array_poles, > array_y_higher, > array_real_pole, > array_y_set_initial, > array_complex_pole, > array_y_higher_work2, > array_y_higher_work, > glob_last; > glob_last; > ALWAYS := 1; > INFO := 2; > DEBUGL := 3; > DEBUGMASSIVE := 4; > glob_iolevel := INFO; > ALWAYS := 1; > glob_iolevel := 5; > DEBUGL := 3; > INFO := 2; > DEBUGMASSIVE := 4; > glob_max_terms := 30; > glob_unchanged_h_cnt := 0; > glob_no_eqs := 0; > glob_look_poles := false; > centuries_in_millinium := 10.0; > days_in_year := 365.0; > djd_debug := true; > glob_log10normmin := 0.1; > glob_current_iter := 0; > glob_max_trunc_err := 0.1e-10; > min_in_hour := 60.0; > glob_normmax := 0.0; > glob_max_iter := 1000; > glob_log10_relerr := 0.1e-10; > glob_large_float := 9.0e100; > glob_max_opt_iter := 10; > glob_orig_start_sec := 0.0; > glob_smallish_float := 0.1e-100; > glob_relerr := 0.1e-10; > glob_hmin_init := 0.001; > glob_optimal_done := false; > years_in_century := 100.0; > glob_log10abserr := 0.0; > glob_max_hours := 0.0; > glob_disp_incr := 0.1; > glob_not_yet_finished := true; > djd_debug2 := true; > glob_display_flag := true; > MAX_UNCHANGED := 10; > glob_start := 0; > glob_max_sec := 10000.0; > glob_optimal_clock_start_sec := 0.0; > glob_log10_abserr := 0.1e-10; > glob_h := 0.1; > glob_reached_optimal_h := false; > glob_clock_sec := 0.0; > glob_iter := 0; > glob_curr_iter_when_opt := 0; > glob_optimal_start := 0.0; > glob_not_yet_start_msg := true; > sec_in_min := 60.0; > glob_max_minutes := 0.0; > glob_last_good_h := 0.1; > glob_dump := false; > glob_optimal_expect_sec := 0.1; > glob_warned2 := false; > glob_hmin := 0.00000000001; > glob_html_log := true; > glob_subiter_method := 3; > glob_percent_done := 0.0; > glob_warned := false; > glob_small_float := 0.1e-50; > glob_abserr := 0.1e-10; > glob_dump_analytic := false; > glob_clock_start_sec := 0.0; > hours_in_day := 24.0; > glob_log10relerr := 0.0; > glob_max_rel_trunc_err := 0.1e-10; > glob_hmax := 1.0; > glob_initial_pass := true; > glob_almost_1 := 0.9990; > #Write Set Defaults > glob_orig_start_sec := elapsed_time_seconds(); > MAX_UNCHANGED := 10; > glob_curr_iter_when_opt := 0; > glob_display_flag := true; > glob_no_eqs := 1; > glob_iter := -1; > opt_iter := -1; > glob_max_iter := 50000; > glob_max_hours := 0.0; > glob_max_minutes := 15.0; > omniout_str(ALWAYS,"##############ECHO OF PROBLEM#################"); > omniout_str(ALWAYS,"##############temp/diff0postode.ode#################"); > omniout_str(ALWAYS,"diff ( y , x , 1 ) = y - 1.0;"); > 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 := 1.1;"); > omniout_str(ALWAYS,"x_end := 5.0 ;"); > omniout_str(ALWAYS,"array_y_init[0 + 1] := exact_soln_y(x_start);"); > omniout_str(ALWAYS,"glob_h := 0.01 ;"); > omniout_str(ALWAYS,"glob_look_poles := true;"); > omniout_str(ALWAYS,"glob_max_iter := 100;"); > omniout_str(ALWAYS,"#END SECOND INPUT BLOCK"); > omniout_str(ALWAYS,"#BEGIN OVERRIDE BLOCK"); > omniout_str(ALWAYS,"glob_h := 0.0001 ;"); > omniout_str(ALWAYS,"glob_look_poles := true;"); > omniout_str(ALWAYS,"glob_max_iter := 100;"); > omniout_str(ALWAYS,"glob_max_minutes := 15;"); > omniout_str(ALWAYS,"#END OVERRIDE BLOCK"); > omniout_str(ALWAYS,"!"); > omniout_str(ALWAYS,"#BEGIN USER DEF BLOCK"); > omniout_str(ALWAYS,"exact_soln_y := proc(x)"); > omniout_str(ALWAYS,"1.0 + exp(x);"); > omniout_str(ALWAYS,"end;"); > omniout_str(ALWAYS,""); > omniout_str(ALWAYS,"#END USER DEF BLOCK"); > omniout_str(ALWAYS,"#######END OF ECHO OF PROBLEM#################"); > glob_unchanged_h_cnt := 0; > glob_warned := false; > glob_warned2 := false; > glob_small_float := 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_last_rel_error:= Array(1..(max_terms + 1),[]); > array_1st_rel_error:= Array(1..(max_terms + 1),[]); > array_pole:= Array(1..(max_terms + 1),[]); > array_y:= Array(1..(max_terms + 1),[]); > array_x:= Array(1..(max_terms + 1),[]); > array_type_pole:= Array(1..(max_terms + 1),[]); > array_norms:= Array(1..(max_terms + 1),[]); > array_m1:= Array(1..(max_terms + 1),[]); > array_tmp0:= Array(1..(max_terms + 1),[]); > array_tmp1:= Array(1..(max_terms + 1),[]); > array_tmp2:= Array(1..(max_terms + 1),[]); > array_y_init:= Array(1..(max_terms + 1),[]); > array_poles := Array(1..(1+ 1) ,(1..3+ 1),[]); > array_y_higher := Array(1..(2+ 1) ,(1..max_terms+ 1),[]); > array_real_pole := Array(1..(1+ 1) ,(1..3+ 1),[]); > array_y_set_initial := Array(1..(2+ 1) ,(1..max_terms+ 1),[]); > array_complex_pole := Array(1..(1+ 1) ,(1..3+ 1),[]); > array_y_higher_work2 := Array(1..(2+ 1) ,(1..max_terms+ 1),[]); > array_y_higher_work := Array(1..(2+ 1) ,(1..max_terms+ 1),[]); > 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_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_pole[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_y[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_type_pole[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_m1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > 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_y_init[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > ord := 1; > while ord <=1 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 <= max_terms do # do number 3 > array_y_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 <=1 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_y_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 <=1 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 <=2 do # do number 2 > term := 1; > while term <= max_terms do # do number 3 > array_y_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_y_higher_work[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_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_y := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_y[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_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_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_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_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 > #TOP SECOND INPUT BLOCK > #BEGIN SECOND INPUT BLOCK > #END FIRST INPUT BLOCK > #BEGIN SECOND INPUT BLOCK > x_start := 1.1; > x_end := 5.0 ; > array_y_init[0 + 1] := exact_soln_y(x_start); > glob_h := 0.01 ; > glob_look_poles := true; > glob_max_iter := 100; > #END SECOND INPUT BLOCK > #BEGIN OVERRIDE BLOCK > glob_h := 0.0001 ; > glob_look_poles := true; > glob_max_iter := 100; > glob_max_minutes := 15; > #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 := 10.0 ^ (glob_log10_abserr); > glob_relerr := 10.0 ^ (glob_log10_relerr); > chk_data(); > #AFTER INITS AFTER SECOND INPUT BLOCK > array_y_set_initial[1,1] := true; > array_y_set_initial[1,2] := false; > array_y_set_initial[1,3] := false; > array_y_set_initial[1,4] := false; > array_y_set_initial[1,5] := false; > array_y_set_initial[1,6] := false; > array_y_set_initial[1,7] := false; > array_y_set_initial[1,8] := false; > array_y_set_initial[1,9] := false; > array_y_set_initial[1,10] := false; > array_y_set_initial[1,11] := false; > array_y_set_initial[1,12] := false; > array_y_set_initial[1,13] := false; > array_y_set_initial[1,14] := false; > array_y_set_initial[1,15] := false; > array_y_set_initial[1,16] := false; > array_y_set_initial[1,17] := false; > array_y_set_initial[1,18] := false; > array_y_set_initial[1,19] := false; > array_y_set_initial[1,20] := false; > array_y_set_initial[1,21] := false; > array_y_set_initial[1,22] := false; > array_y_set_initial[1,23] := false; > array_y_set_initial[1,24] := false; > array_y_set_initial[1,25] := false; > array_y_set_initial[1,26] := false; > array_y_set_initial[1,27] := false; > array_y_set_initial[1,28] := false; > array_y_set_initial[1,29] := false; > array_y_set_initial[1,30] := false; > if glob_html_log then # if number 2 > html_log_file := fopen("html/entry.html",WRITE,TEXT); > fi;# end if 2 > ; > #BEGIN SOLUTION CODE > omniout_str(ALWAYS,"START of Soultion"); > #Start Series -- INITIALIZE FOR SOLUTION > array_x[1] := x_start; > array_x[2] := glob_h; > order_diff := 1; > #Start Series array_y > term_no := 1; > while (term_no <= order_diff) do # do number 2 > array_y[term_no] := array_y_init[term_no] * glob_h ^ (term_no - 1) / factorial_1(term_no - 1); > term_no := term_no + 1; > od;# end do number 2 > ; > rows := order_diff; > r_order := 1; > while (r_order <= rows) do # do number 2 > term_no := 1; > while (term_no <= (rows - r_order + 1)) do # do number 3 > it := term_no + r_order - 1; > array_y_higher[r_order,term_no] := array_y_init[it]* (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(); > start_array_y(); > if (abs(array_y_higher[1,1]) > glob_small_float) then # if number 2 > tmp := abs(array_y_higher[1,1]); > log10norm := (log10(tmp)); > if (log10norm < glob_log10normmin) then # if number 3 > glob_log10normmin := log10norm; > fi;# end if 3 > fi;# end if 2 > ; > display_alot(current_iter) > ; > glob_clock_sec := elapsed_time_seconds(); > glob_current_iter := 0; > glob_iter := 0; > omniout_str(DEBUGL," "); > glob_reached_optimal_h := true; > glob_optimal_clock_start_sec := elapsed_time_seconds(); > while ((glob_current_iter < glob_max_iter) and (array_x[1] <= x_end ) and ((convfloat(glob_clock_sec) - convfloat(glob_orig_start_sec)) < convfloat(glob_max_sec))) do # do number 2 > #left paren 0001C > omniout_str(INFO," "); > omniout_str(INFO,"TOP MAIN SOLVE Loop"); > glob_iter := glob_iter + 1; > glob_clock_sec := elapsed_time_seconds(); > glob_current_iter := glob_current_iter + 1; > atomall(); > if (glob_look_poles) then # if number 2 > #left paren 0004C > check_for_pole(); > fi;# end if 2 > ;#was right paren 0004C > array_x[1] := array_x[1] + glob_h; > array_x[2] := glob_h; > #Jump Series array_y > order_diff := 1; > #START PART 1 SUM AND ADJUST > #START SUM AND ADJUST EQ =1 > #sum_and_adjust array_y > #BEFORE ADJUST SUBSERIES EQ =1 > ord := 2; > calc_term := 1; > #adjust_subseriesarray_y > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > array_y_higher_work[2,iii] := array_y_higher[2,iii] / (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_y > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_y_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_y_higher_work2[ord,calc_term] := temp_sum * (glob_h ^ (calc_term - 1)) / (convfp(calc_term - 1)!); > #AFTER SUM SUBSERIES EQ =1 > #BEFORE ADJUST SUBSERIES EQ =1 > ord := 1; > calc_term := 2; > #adjust_subseriesarray_y > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > array_y_higher_work[1,iii] := array_y_higher[1,iii] / (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_y > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_y_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_y_higher_work2[ord,calc_term] := temp_sum * (glob_h ^ (calc_term - 1)) / (convfp(calc_term - 1)!); > #AFTER SUM SUBSERIES EQ =1 > #BEFORE ADJUST SUBSERIES EQ =1 > ord := 1; > calc_term := 1; > #adjust_subseriesarray_y > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > array_y_higher_work[1,iii] := array_y_higher[1,iii] / (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_y > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_y_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_y_higher_work2[ord,calc_term] := temp_sum * (glob_h ^ (calc_term - 1)) / (convfp(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_y[term_no] := array_y_higher_work2[1,term_no]; > ord := 1; > while ord <= order_diff do # do number 4 > array_y_higher[ord,term_no] := array_y_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 2 > omniout_str(ALWAYS,"Maximum Iterations Reached before Solution Completed!") > fi;# end if 2 > ; > if (elapsed_time_seconds() - convfloat(glob_orig_start_sec) >= convfloat(glob_max_sec )) then # if number 2 > omniout_str(ALWAYS,"Maximum Time Reached before Solution Completed!") > fi;# end if 2 > ; > glob_clock_sec := elapsed_time_seconds(); > omniout_str(INFO,"diff ( y , x , 1 ) = y - 1.0;"); > omniout_int(INFO,"Iterations ",32,glob_iter,4," ") > ; > prog_report(x_start,x_end); > if glob_html_log then # if number 2 > logstart(html_log_file); > logitem_str(html_log_file,"2012-06-13T01:33:47-05:00") > ; > logitem_str(html_log_file,"Maple") > ; > logitem_str(html_log_file,"diff0") > ; > logitem_str(html_log_file,"diff ( y , x , 1 ) = y - 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_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 3 > 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 3 > ; > logitem_time(html_log_file,convfloat(glob_clock_sec)) > ; > if glob_percent_done < 100.0 then # if number 3 > logitem_time(html_log_file,convfloat(glob_optimal_expect_sec)) > ; > 0 > else > logitem_str(html_log_file,"Done") > ; > 0 > fi;# end if 3 > ; > log_revs(html_log_file," 090 ") > ; > logitem_str(html_log_file,"diff0 diffeq.mxt") > ; > logitem_str(html_log_file,"diff0 maple results") > ; > logitem_str(html_log_file,"Test of revised logic - mostly affecting systems of eqs") > ; > logend(html_log_file) > ; > ; > fi;# end if 2 > ; > if glob_html_log then # if number 2 > fclose(html_log_file); > fi;# end if 2 > ; > ;; > #END OUTFILEMAIN > # End Function number 8 > end; mainprog := proc() local d1, d2, d3, d4, est_err_2, niii, done_once, term, ord, order_diff, term_no, html_log_file, rows, r_order, sub_iter, calc_term, iii, temp_sum, current_iter, x_start, x_end, it, log10norm, max_terms, opt_iter, tmp; global ALWAYS, glob_iolevel, DEBUGL, INFO, DEBUGMASSIVE, glob_max_terms, glob_unchanged_h_cnt, glob_no_eqs, glob_look_poles, centuries_in_millinium, days_in_year, djd_debug, glob_log10normmin, glob_current_iter, glob_max_trunc_err, min_in_hour, glob_normmax, glob_max_iter, glob_log10_relerr, glob_large_float, glob_max_opt_iter, glob_orig_start_sec, glob_smallish_float, glob_relerr, glob_hmin_init, glob_optimal_done, years_in_century, glob_log10abserr, glob_max_hours, glob_disp_incr, glob_not_yet_finished, djd_debug2, glob_display_flag, MAX_UNCHANGED, glob_start, glob_max_sec, glob_optimal_clock_start_sec, glob_log10_abserr, glob_h, glob_reached_optimal_h, glob_clock_sec, glob_iter, glob_curr_iter_when_opt, glob_optimal_start, glob_not_yet_start_msg, sec_in_min, glob_max_minutes, glob_last_good_h, glob_dump, glob_optimal_expect_sec, glob_warned2, glob_hmin, glob_html_log, glob_subiter_method, glob_percent_done, glob_warned, glob_small_float, glob_abserr, glob_dump_analytic, glob_clock_start_sec, hours_in_day, glob_log10relerr, glob_max_rel_trunc_err, glob_hmax, glob_initial_pass, glob_almost_1, array_const_1D0, array_const_1, array_const_0D0, array_last_rel_error, array_1st_rel_error, array_pole, array_y, array_x, array_type_pole, array_norms, array_m1, array_tmp0, array_tmp1, array_tmp2, array_y_init, array_poles, array_y_higher, array_real_pole, array_y_set_initial, array_complex_pole, array_y_higher_work2, array_y_higher_work, glob_last; glob_last; ALWAYS := 1; INFO := 2; DEBUGL := 3; DEBUGMASSIVE := 4; glob_iolevel := INFO; ALWAYS := 1; glob_iolevel := 5; DEBUGL := 3; INFO := 2; DEBUGMASSIVE := 4; glob_max_terms := 30; glob_unchanged_h_cnt := 0; glob_no_eqs := 0; glob_look_poles := false; centuries_in_millinium := 10.0; days_in_year := 365.0; djd_debug := true; glob_log10normmin := 0.1; glob_current_iter := 0; glob_max_trunc_err := 0.1*10^(-10); min_in_hour := 60.0; glob_normmax := 0.; glob_max_iter := 1000; glob_log10_relerr := 0.1*10^(-10); glob_large_float := 0.90*10^101; glob_max_opt_iter := 10; glob_orig_start_sec := 0.; glob_smallish_float := 0.1*10^(-100); glob_relerr := 0.1*10^(-10); glob_hmin_init := 0.001; glob_optimal_done := false; years_in_century := 100.0; glob_log10abserr := 0.; glob_max_hours := 0.; glob_disp_incr := 0.1; glob_not_yet_finished := true; djd_debug2 := true; glob_display_flag := true; MAX_UNCHANGED := 10; glob_start := 0; glob_max_sec := 10000.0; glob_optimal_clock_start_sec := 0.; glob_log10_abserr := 0.1*10^(-10); glob_h := 0.1; glob_reached_optimal_h := false; glob_clock_sec := 0.; glob_iter := 0; glob_curr_iter_when_opt := 0; glob_optimal_start := 0.; glob_not_yet_start_msg := true; sec_in_min := 60.0; glob_max_minutes := 0.; glob_last_good_h := 0.1; glob_dump := false; glob_optimal_expect_sec := 0.1; glob_warned2 := false; glob_hmin := 0.1*10^(-10); glob_html_log := true; glob_subiter_method := 3; glob_percent_done := 0.; glob_warned := false; glob_small_float := 0.1*10^(-50); glob_abserr := 0.1*10^(-10); glob_dump_analytic := false; glob_clock_start_sec := 0.; hours_in_day := 24.0; glob_log10relerr := 0.; glob_max_rel_trunc_err := 0.1*10^(-10); glob_hmax := 1.0; glob_initial_pass := true; glob_almost_1 := 0.9990; glob_orig_start_sec := elapsed_time_seconds(); MAX_UNCHANGED := 10; glob_curr_iter_when_opt := 0; glob_display_flag := true; glob_no_eqs := 1; glob_iter := -1; opt_iter := -1; glob_max_iter := 50000; glob_max_hours := 0.; glob_max_minutes := 15.0; omniout_str(ALWAYS, "##############ECHO OF PROBLEM#################"); omniout_str(ALWAYS, "##############temp/diff0postode.ode#################"); omniout_str(ALWAYS, "diff ( y , x , 1 ) = y - 1.0;"); 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 := 1.1;"); omniout_str(ALWAYS, "x_end := 5.0 ;"); omniout_str(ALWAYS, "array_y_init[0 + 1] := exact_soln_y(x_start);"); omniout_str(ALWAYS, "glob_h := 0.01 ;"); omniout_str(ALWAYS, "glob_look_poles := true;"); omniout_str(ALWAYS, "glob_max_iter := 100;"); omniout_str(ALWAYS, "#END SECOND INPUT BLOCK"); omniout_str(ALWAYS, "#BEGIN OVERRIDE BLOCK"); omniout_str(ALWAYS, "glob_h := 0.0001 ;"); omniout_str(ALWAYS, "glob_look_poles := true;"); omniout_str(ALWAYS, "glob_max_iter := 100;"); omniout_str(ALWAYS, "glob_max_minutes := 15;"); omniout_str(ALWAYS, "#END OVERRIDE BLOCK"); omniout_str(ALWAYS, "!"); omniout_str(ALWAYS, "#BEGIN USER DEF BLOCK"); omniout_str(ALWAYS, "exact_soln_y := proc(x)"); omniout_str(ALWAYS, "1.0 + exp(x);"); omniout_str(ALWAYS, "end;"); omniout_str(ALWAYS, ""); omniout_str(ALWAYS, "#END USER DEF BLOCK"); omniout_str(ALWAYS, "#######END OF ECHO OF PROBLEM#################"); glob_unchanged_h_cnt := 0; glob_warned := false; glob_warned2 := false; glob_small_float := 0.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_last_rel_error := Array(1 .. max_terms + 1, []); array_1st_rel_error := Array(1 .. max_terms + 1, []); array_pole := Array(1 .. max_terms + 1, []); array_y := Array(1 .. max_terms + 1, []); array_x := Array(1 .. max_terms + 1, []); array_type_pole := Array(1 .. max_terms + 1, []); array_norms := Array(1 .. max_terms + 1, []); array_m1 := Array(1 .. max_terms + 1, []); array_tmp0 := Array(1 .. max_terms + 1, []); array_tmp1 := Array(1 .. max_terms + 1, []); array_tmp2 := Array(1 .. max_terms + 1, []); array_y_init := Array(1 .. max_terms + 1, []); array_poles := Array(1 .. 2, 1 .. 4, []); array_y_higher := Array(1 .. 3, 1 .. max_terms + 1, []); array_real_pole := Array(1 .. 2, 1 .. 4, []); array_y_set_initial := Array(1 .. 3, 1 .. max_terms + 1, []); array_complex_pole := Array(1 .. 2, 1 .. 4, []); array_y_higher_work2 := Array(1 .. 3, 1 .. max_terms + 1, []); array_y_higher_work := Array(1 .. 3, 1 .. max_terms + 1, []); 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_1st_rel_error[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_y[term] := 0.; term := term + 1 end do ; term := 1; while term <= max_terms do array_x[term] := 0.; term := term + 1 end do ; term := 1; while term <= max_terms do array_type_pole[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_m1[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp0[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp1[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp2[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_y_init[term] := 0.; term := term + 1 end do; ord := 1; while ord <= 1 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 <= max_terms do array_y_higher[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 1 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_y_set_initial[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 1 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 <= 2 do term := 1; while term <= max_terms do array_y_higher_work2[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 2 do term := 1; while term <= max_terms do array_y_higher_work[ord, term] := 0.; term := term + 1 end do; ord := ord + 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_y := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_y[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_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_const_1 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_const_1[term] := 0.; term := term + 1 end do; array_const_1[1] := 1; array_const_0D0 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_const_0D0[term] := 0.; term := term + 1 end do; array_const_0D0[1] := 0.; array_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; x_start := 1.1; x_end := 5.0; array_y_init[1] := exact_soln_y(x_start); glob_h := 0.01; glob_look_poles := true; glob_max_iter := 100; glob_h := 0.0001; glob_look_poles := true; glob_max_iter := 100; glob_max_minutes := 15; 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 := 10.0^glob_log10_abserr; glob_relerr := 10.0^glob_log10_relerr; chk_data(); array_y_set_initial[1, 1] := true; array_y_set_initial[1, 2] := false; array_y_set_initial[1, 3] := false; array_y_set_initial[1, 4] := false; array_y_set_initial[1, 5] := false; array_y_set_initial[1, 6] := false; array_y_set_initial[1, 7] := false; array_y_set_initial[1, 8] := false; array_y_set_initial[1, 9] := false; array_y_set_initial[1, 10] := false; array_y_set_initial[1, 11] := false; array_y_set_initial[1, 12] := false; array_y_set_initial[1, 13] := false; array_y_set_initial[1, 14] := false; array_y_set_initial[1, 15] := false; array_y_set_initial[1, 16] := false; array_y_set_initial[1, 17] := false; array_y_set_initial[1, 18] := false; array_y_set_initial[1, 19] := false; array_y_set_initial[1, 20] := false; array_y_set_initial[1, 21] := false; array_y_set_initial[1, 22] := false; array_y_set_initial[1, 23] := false; array_y_set_initial[1, 24] := false; array_y_set_initial[1, 25] := false; array_y_set_initial[1, 26] := false; array_y_set_initial[1, 27] := false; array_y_set_initial[1, 28] := false; array_y_set_initial[1, 29] := false; array_y_set_initial[1, 30] := false; 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; order_diff := 1; term_no := 1; while term_no <= order_diff do array_y[term_no] := array_y_init[term_no]*glob_h^(term_no - 1)/ factorial_1(term_no - 1); term_no := term_no + 1 end do; rows := order_diff; r_order := 1; while r_order <= rows do term_no := 1; while term_no <= rows - r_order + 1 do it := term_no + r_order - 1; array_y_higher[r_order, term_no] := array_y_init[it]* 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(); start_array_y(); if glob_small_float < abs(array_y_higher[1, 1]) then tmp := abs(array_y_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 array_x[1] <= x_end and convfloat(glob_clock_sec) - convfloat(glob_orig_start_sec) < convfloat(glob_max_sec) do omniout_str(INFO, " "); omniout_str(INFO, "TOP MAIN SOLVE Loop"); glob_iter := glob_iter + 1; glob_clock_sec := elapsed_time_seconds(); glob_current_iter := glob_current_iter + 1; atomall(); if glob_look_poles then check_for_pole() end if; array_x[1] := array_x[1] + glob_h; array_x[2] := glob_h; order_diff := 1; ord := 2; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do array_y_higher_work[2, iii] := array_y_higher[2, iii]/( glob_h^(calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; temp_sum := 0.; ord := 2; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do temp_sum := temp_sum + array_y_higher_work[ord, iii]; iii := iii - 1 end do; array_y_higher_work2[ord, calc_term] := temp_sum*glob_h^(calc_term - 1)/convfp(calc_term - 1)!; ord := 1; calc_term := 2; iii := glob_max_terms; while calc_term <= iii do array_y_higher_work[1, iii] := array_y_higher[1, iii]/( glob_h^(calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; temp_sum := 0.; ord := 1; calc_term := 2; iii := glob_max_terms; while calc_term <= iii do temp_sum := temp_sum + array_y_higher_work[ord, iii]; iii := iii - 1 end do; array_y_higher_work2[ord, calc_term] := temp_sum*glob_h^(calc_term - 1)/convfp(calc_term - 1)!; ord := 1; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do array_y_higher_work[1, iii] := array_y_higher[1, iii]/( glob_h^(calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; temp_sum := 0.; ord := 1; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do temp_sum := temp_sum + array_y_higher_work[ord, iii]; iii := iii - 1 end do; array_y_higher_work2[ord, calc_term] := temp_sum*glob_h^(calc_term - 1)/convfp(calc_term - 1)!; term_no := glob_max_terms; while 1 <= term_no do array_y[term_no] := array_y_higher_work2[1, term_no]; ord := 1; while ord <= order_diff do array_y_higher[ord, term_no] := array_y_higher_work2[ord, term_no]; ord := ord + 1 end do; term_no := term_no - 1 end do; 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 ( y , x , 1 ) = y - 1.0;"); omniout_int(INFO, "Iterations ", 32, glob_iter, 4, " "); prog_report(x_start, x_end); if glob_html_log then logstart(html_log_file); logitem_str(html_log_file, "2012-06-13T01:33:47-05:00"); logitem_str(html_log_file, "Maple"); logitem_str(html_log_file, "diff0"); logitem_str(html_log_file, "diff ( y , x , 1 ) = y - 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_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, " 090 "); logitem_str(html_log_file, "diff0 diffeq.mxt"); logitem_str(html_log_file, "diff0 maple results"); logitem_str(html_log_file, "Test of revised logic - mostly affecting systems of eqs"); logend(html_log_file) end if; if glob_html_log then fclose(html_log_file) end if end proc > mainprog(); ##############ECHO OF PROBLEM################# ##############temp/diff0postode.ode################# diff ( y , x , 1 ) = y - 1.0; ! #BEGIN FIRST INPUT BLOCK Digits := 32; max_terms := 30; ! #END FIRST INPUT BLOCK #BEGIN SECOND INPUT BLOCK x_start := 1.1; x_end := 5.0 ; array_y_init[0 + 1] := exact_soln_y(x_start); glob_h := 0.01 ; glob_look_poles := true; glob_max_iter := 100; #END SECOND INPUT BLOCK #BEGIN OVERRIDE BLOCK glob_h := 0.0001 ; glob_look_poles := true; glob_max_iter := 100; glob_max_minutes := 15; #END OVERRIDE BLOCK ! #BEGIN USER DEF BLOCK exact_soln_y := proc(x) 1.0 + exp(x); end; #END USER DEF BLOCK #######END OF ECHO OF PROBLEM################# START of Soultion x[1] = 1.1 y[1] (analytic) = 4.0041660239464331120584079535887 y[1] (numeric) = 4.0041660239464331120584079535887 absolute error = 0 relative error = 0 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1001 y[1] (analytic) = 4.0044664555701585819567125446461 y[1] (numeric) = 4.0044664555701585819567126907871 absolute error = 1.461410e-25 relative error = 3.6494499734595066743318156832795e-24 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 7.477e-16 Order of pole = 0.5 x[1] = 1.1002 y[1] (analytic) = 4.004766917238548632593823426701 y[1] (numeric) = 4.0047669172385486325938237190123 absolute error = 2.923113e-25 relative error = 7.2990839677021866239905177842237e-24 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 7.477e-16 Order of pole = 0.5 x[1] = 1.1003 y[1] (analytic) = 4.0050674089546078806561449533619 y[1] (numeric) = 4.0050674089546078806561453918727 absolute error = 4.385108e-25 relative error = 1.0948899362332054508133956612918e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1004 y[1] (analytic) = 4.0053679307213412433067737028868 y[1] (numeric) = 4.0053679307213412433067742876263 absolute error = 5.847395e-25 relative error = 1.4598896034369859795542258016438e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1005 y[1] (analytic) = 4.0056684825417539382155476498388 y[1] (numeric) = 4.0056684825417539382155483808363 absolute error = 7.309975e-25 relative error = 1.8249076357316354422819063527056e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1006 y[1] (analytic) = 4.0059690644188514835890983418101 y[1] (numeric) = 4.0059690644188514835890992190947 absolute error = 8.772846e-25 relative error = 2.1899435215116126785542561870083e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1007 y[1] (analytic) = 4.0062696763556396982009060815126 y[1] (numeric) = 4.0062696763556396982009071051137 absolute error = 1.0236011e-24 relative error = 2.5549979973668006475239964816000e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1008 y[1] (analytic) = 4.0065703183551247014213581145386 y[1] (numeric) = 4.0065703183551247014213592844854 absolute error = 1.1699468e-24 relative error = 2.9200705517139536741292460555679e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1009 y[1] (analytic) = 4.0068709904203129132478098230892 y[1] (numeric) = 4.0068709904203129132478111394109 absolute error = 1.3163217e-24 relative error = 3.2851611722640474474565272198272e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.101 y[1] (analytic) = 4.0071716925542110543346489259728 y[1] (numeric) = 4.0071716925542110543346503886988 absolute error = 1.4627260e-24 relative error = 3.6502703458349794668664006096337e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1011 y[1] (analytic) = 4.0074724247598261460233626851747 y[1] (numeric) = 4.0074724247598261460233642943342 absolute error = 1.6091595e-24 relative error = 4.0153975609612319434648258500199e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1012 y[1] (analytic) = 4.0077731870401655103726081192961 y[1] (numeric) = 4.0077731870401655103726098749184 absolute error = 1.7556223e-24 relative error = 4.3805430548742411286788700725023e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 7.477e-16 Order of pole = 0.5 x[1] = 1.1013 y[1] (analytic) = 4.0080739793982367701882852241666 y[1] (numeric) = 4.008073979398236770188287126281 absolute error = 1.9021144e-24 relative error = 4.7457068152359283200845107570611e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 7.477e-16 Order of pole = 0.5 x[1] = 1.1014 y[1] (analytic) = 4.0083748018370478490536132009277 y[1] (numeric) = 4.0083748018370478490536152495634 absolute error = 2.0486357e-24 relative error = 5.1108885802323308506309144529651e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1015 y[1] (analytic) = 4.0086756543596069713592096918902 y[1] (numeric) = 4.0086756543596069713592118870766 absolute error = 2.1951864e-24 relative error = 5.4760888365029994214171905567508e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1016 y[1] (analytic) = 4.0089765369689226623331730244657 y[1] (numeric) = 4.008976536968922662333175366232 absolute error = 2.3417663e-24 relative error = 5.8413070727785933839992351647651e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1017 y[1] (analytic) = 4.0092774496680037480711674634722 y[1] (numeric) = 4.0092774496680037480711699518477 absolute error = 2.4883755e-24 relative error = 6.2065435262058377097682521174666e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1018 y[1] (analytic) = 4.0095783924598593555665114721162 y[1] (numeric) = 4.0095783924598593555665141071302 absolute error = 2.6350140e-24 relative error = 6.5717981844555733335025140360877e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1019 y[1] (analytic) = 4.0098793653474989127402689819507 y[1] (numeric) = 4.0098793653474989127402717636325 absolute error = 2.7816818e-24 relative error = 6.9370710352004256261873453841461e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.102 y[1] (analytic) = 4.0101803683339321484713436721111 y[1] (numeric) = 4.0101803683339321484713466004901 absolute error = 2.9283790e-24 relative error = 7.3023623154801466184514368754900e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1021 y[1] (analytic) = 4.0104814014221690926265762581294 y[1] (numeric) = 4.0104814014221690926265793332348 absolute error = 3.0751054e-24 relative error = 7.6676715142215282584432190968125e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1022 y[1] (analytic) = 4.0107824646152200760908447906273 y[1] (numeric) = 4.0107824646152200760908480124885 absolute error = 3.2218612e-24 relative error = 8.0329991178145177188798198884616e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1023 y[1] (analytic) = 4.0110835579160957307971679641905 y[1] (numeric) = 4.0110835579160957307971713328367 absolute error = 3.3686462e-24 relative error = 8.3983446152643467238029785739425e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 7.477e-16 Order of pole = 0.5 x[1] = 1.1024 y[1] (analytic) = 4.0113846813278069897568114367235 y[1] (numeric) = 4.0113846813278069897568149521842 absolute error = 3.5154607e-24 relative error = 8.7637087421801407178780807064364e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 memory used=3.8MB, alloc=2.9MB, time=0.39 x[1] = 1.1025 y[1] (analytic) = 4.0116858348533650870893971595881 y[1] (numeric) = 4.0116858348533650870894008218925 absolute error = 3.6623044e-24 relative error = 9.1290907383176587718430351310761e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1026 y[1] (analytic) = 4.0119870184957815580530157188237 y[1] (numeric) = 4.0119870184957815580530195280013 absolute error = 3.8091776e-24 relative error = 9.4944913391773109398784722241005e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1027 y[1] (analytic) = 4.0122882322580682390743416877544 y[1] (numeric) = 4.0122882322580682390743456438344 absolute error = 3.9560800e-24 relative error = 9.8599097846307145474409376621611e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1028 y[1] (analytic) = 4.0125894761432372677787519912798 y[1] (numeric) = 4.0125894761432372677787560942916 absolute error = 4.1030118e-24 relative error = 1.0225346560853948991549521315771e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1029 y[1] (analytic) = 4.0128907501543010830204472821547 y[1] (numeric) = 4.0128907501543010830204515321276 absolute error = 4.2499729e-24 relative error = 1.0590801406284441676603290168976e-22 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.103 y[1] (analytic) = 4.0131920542942724249125763295557 y[1] (numeric) = 4.0131920542942724249125807265191 absolute error = 4.3969634e-24 relative error = 1.0956274557792660903606580490088e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1031 y[1] (analytic) = 4.0134933885661643348573634202381 y[1] (numeric) = 4.0134933885661643348573679642213 absolute error = 4.5439832e-24 relative error = 1.1321765753857028659581451795298e-22 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1032 y[1] (analytic) = 4.0137947529729901555762387725829 y[1] (numeric) = 4.0137947529729901555762434636153 absolute error = 4.6910324e-24 relative error = 1.1687275231314168665897270335048e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1033 y[1] (analytic) = 4.0140961475177635311399719638368 y[1] (numeric) = 4.0140961475177635311399768019477 absolute error = 4.8381109e-24 relative error = 1.2052802728683493663975594073246e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1034 y[1] (analytic) = 4.0143975722034984069988083708441 y[1] (numeric) = 4.014397572203498406998813356063 absolute error = 4.9852189e-24 relative error = 1.2418348731871165503860698767169e-22 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1035 y[1] (analytic) = 4.0146990270332090300126086245754 y[1] (numeric) = 4.0146990270332090300126137569316 absolute error = 5.1323562e-24 relative error = 1.2783912730296795585533940014148e-22 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1036 y[1] (analytic) = 4.0150005120099099484809910787503 y[1] (numeric) = 4.0150005120099099484809963582732 absolute error = 5.2795229e-24 relative error = 1.3149494960729332326019917705154e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1037 y[1] (analytic) = 4.0153020271366160121734772928594 y[1] (numeric) = 4.0153020271366160121734827195784 absolute error = 5.4267190e-24 relative error = 1.3515095410817429291435480598159e-22 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1038 y[1] (analytic) = 4.0156035724163423723596405298843 y[1] (numeric) = 4.0156035724163423723596461038287 absolute error = 5.5739444e-24 relative error = 1.3880713819182963581265615670561e-22 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1039 y[1] (analytic) = 4.0159051478521044818392572690184 y[1] (numeric) = 4.0159051478521044818392629902176 absolute error = 5.7211992e-24 relative error = 1.4246350422544136089152890808817e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.104 y[1] (analytic) = 4.0162067534469180949724617336901 y[1] (numeric) = 4.0162067534469180949724676021736 absolute error = 5.8684835e-24 relative error = 1.4612005457546132052227608160244e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1041 y[1] (analytic) = 4.0165083892037992677099034351892 y[1] (numeric) = 4.0165083892037992677099094509863 absolute error = 6.0157971e-24 relative error = 1.4977678413843731201843188673936e-22 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1042 y[1] (analytic) = 4.0168100551257643576229077321981 y[1] (numeric) = 4.0168100551257643576229138953382 absolute error = 6.1631401e-24 relative error = 1.5343369528104398002839358417029e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1043 y[1] (analytic) = 4.0171117512158300239336394065308 y[1] (numeric) = 4.0171117512158300239336457170434 absolute error = 6.3105126e-24 relative error = 1.5709079036922592471708802055787e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1044 y[1] (analytic) = 4.0174134774770132275452692553793 y[1] (numeric) = 4.0174134774770132275452757132938 absolute error = 6.4579145e-24 relative error = 1.6074806678987029391072594878638e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1045 y[1] (analytic) = 4.0177152339123312310721437003707 y[1] (numeric) = 4.0177152339123312310721503057165 absolute error = 6.6053458e-24 relative error = 1.6440552441960679534083812180865e-22 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1046 y[1] (analytic) = 4.0180170205248015988699574137355 y[1] (numeric) = 4.018017020524801598869964166542 absolute error = 6.7528065e-24 relative error = 1.6806316313508303239481199111280e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1047 y[1] (analytic) = 4.01831883731744219706592896189 y[1] (numeric) = 4.0183188373174421970659358621866 absolute error = 6.9002966e-24 relative error = 1.7172098281296450392483674427239e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1048 y[1] (analytic) = 4.0186206842932711935889794667333 y[1] (numeric) = 4.0186206842932711935889865145495 absolute error = 7.0478162e-24 relative error = 1.7537898581835060188492963426688e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1049 y[1] (analytic) = 4.018922561455307058199914284962 y[1] (numeric) = 4.0189225614553070581999214803272 absolute error = 7.1953652e-24 relative error = 1.7903716953915278812676008675537e-22 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.105 y[1] (analytic) = 4.0192244688065685625216077057034 y[1] (numeric) = 4.019224468806568562521615048647 absolute error = 7.3429436e-24 relative error = 1.8269553385209027491464849134001e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1051 y[1] (analytic) = 4.0195264063500747800691906667689 y[1] (numeric) = 4.0195264063500747800691981573204 absolute error = 7.4905515e-24 relative error = 1.8635408112175545091724553387060e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1052 y[1] (analytic) = 4.0198283740888450862802414898312 y[1] (numeric) = 4.0198283740888450862802491280201 absolute error = 7.6381889e-24 relative error = 1.9001281122434265781726681199057e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1053 y[1] (analytic) = 4.0201303720258991585449796348248 y[1] (numeric) = 4.0201303720258991585449874206804 absolute error = 7.7858556e-24 relative error = 1.9367171906110115213008763261004e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1054 y[1] (analytic) = 4.0204324001642569762364624738732 y[1] (numeric) = 4.0204324001642569762364704074251 absolute error = 7.9335519e-24 relative error = 1.9733081197126633381705755359709e-22 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1055 y[1] (analytic) = 4.0207344585069388207407850850451 y[1] (numeric) = 4.0207344585069388207407931663227 absolute error = 8.0812776e-24 relative error = 2.0099008485631018097996258926198e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1056 y[1] (analytic) = 4.0210365470569652754872830662403 y[1] (numeric) = 4.0210365470569652754872912952731 absolute error = 8.2290328e-24 relative error = 2.0464954007998029831659675907864e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1057 y[1] (analytic) = 4.0213386658173572259787383695082 y[1] (numeric) = 4.0213386658173572259787467463256 absolute error = 8.3768174e-24 relative error = 2.0830917503182661949464699593623e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1058 y[1] (analytic) = 4.0216408147911358598215881561006 y[1] (numeric) = 4.0216408147911358598215966807322 absolute error = 8.5246316e-24 relative error = 2.1196899456180616711630277730576e-22 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1059 y[1] (analytic) = 4.0219429939813226667561366725619 y[1] (numeric) = 4.0219429939813226667561453450371 absolute error = 8.6724752e-24 relative error = 2.1562899357295748249235404020254e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.106 y[1] (analytic) = 4.0222452033909394386867701481565 y[1] (numeric) = 4.0222452033909394386867789685048 absolute error = 8.8203483e-24 relative error = 2.1928917442835252558790723569159e-22 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1061 y[1] (analytic) = 4.0225474430230082697121747139384 y[1] (numeric) = 4.0225474430230082697121836821893 absolute error = 8.9682509e-24 relative error = 2.2294953700434710246881717262030e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1062 y[1] (analytic) = 4.0228497128805515561555573437632 y[1] (numeric) = 4.0228497128805515561555664599461 absolute error = 9.1161829e-24 relative error = 2.2661007869151492243656882331478e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 memory used=7.6MB, alloc=3.9MB, time=0.82 x[1] = 1.1063 y[1] (analytic) = 4.0231520129665919965948698175449 y[1] (numeric) = 4.0231520129665919965948790816894 absolute error = 9.2641445e-24 relative error = 2.3027080433803456379997022118415e-22 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1064 y[1] (analytic) = 4.0234543432841525918930357070611 y[1] (numeric) = 4.0234543432841525918930451191968 absolute error = 9.4121357e-24 relative error = 2.3393171381975532888310860170155e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 7.477e-16 Order of pole = 0.5 x[1] = 1.1065 y[1] (analytic) = 4.0237567038362566452281803846076 y[1] (numeric) = 4.0237567038362566452281899447638 absolute error = 9.5601562e-24 relative error = 2.3759279955682535274604492588745e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 7.477e-16 Order of pole = 0.5 x[1] = 1.1066 y[1] (analytic) = 4.0240590946259277621238640548039 y[1] (numeric) = 4.0240590946259277621238737630102 absolute error = 9.7082063e-24 relative error = 2.4125406888196964946495196473097e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1067 y[1] (analytic) = 4.0243615156561898504793178098551 y[1] (numeric) = 4.024361515656189850479327666141 absolute error = 9.8562859e-24 relative error = 2.4491551918622522710540491189038e-22 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1068 y[1] (analytic) = 4.0246639669300671205996827085688 y[1] (numeric) = 4.0246639669300671205996927129638 absolute error = 1.00043950e-23 relative error = 2.4857715034607352993871115397708e-22 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1069 y[1] (analytic) = 4.0249664484505840852262518794316 y[1] (numeric) = 4.0249664484505840852262620319653 absolute error = 1.01525337e-23 relative error = 2.5223896472250670965645090403217e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.107 y[1] (analytic) = 4.0252689602207655595667156480479 y[1] (numeric) = 4.0252689602207655595667259487498 absolute error = 1.03007019e-23 relative error = 2.5590095970717591041086252174570e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1071 y[1] (analytic) = 4.0255715022436366613254096892413 y[1] (numeric) = 4.0255715022436366613254201381409 absolute error = 1.04488996e-23 relative error = 2.5956313517661644663103866649660e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1072 y[1] (analytic) = 4.0258740745222228107335662041234 y[1] (numeric) = 4.0258740745222228107335768012503 absolute error = 1.05971269e-23 relative error = 2.6322549349131421514309288698484e-22 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1073 y[1] (analytic) = 4.0261766770595497305795681224315 y[1] (numeric) = 4.0261766770595497305795788678153 absolute error = 1.07453838e-23 relative error = 2.6688803452728035597057579897586e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1074 y[1] (analytic) = 4.0264793098586434462392063304377 y[1] (numeric) = 4.0264793098586434462392172241078 absolute error = 1.08936701e-23 relative error = 2.7055075319342547971240156910166e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1075 y[1] (analytic) = 4.0267819729225302857059399247315 y[1] (numeric) = 4.0267819729225302857059509667175 absolute error = 1.10419860e-23 relative error = 2.7421365433366194655326051828562e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1076 y[1] (analytic) = 4.0270846662542368796211594921801 y[1] (numeric) = 4.0270846662542368796211706825116 absolute error = 1.11903315e-23 relative error = 2.7787673782405484823156813929904e-22 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1077 y[1] (analytic) = 4.0273873898567901613044534163676 y[1] (numeric) = 4.0273873898567901613044647550741 absolute error = 1.13387065e-23 relative error = 2.8154000105768799612242305612194e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1078 y[1] (analytic) = 4.0276901437332173667838772108156 y[1] (numeric) = 4.0276901437332173667838886979267 absolute error = 1.14871111e-23 relative error = 2.8520344639403505376289293605026e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1079 y[1] (analytic) = 4.0279929278865460348262258792894 y[1] (numeric) = 4.0279929278865460348262375148347 absolute error = 1.16355453e-23 relative error = 2.8886707370921509098549622151824e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.108 y[1] (analytic) = 4.0282957423198040069673093034912 y[1] (numeric) = 4.0282957423198040069673210875002 absolute error = 1.17840090e-23 relative error = 2.9253088039692579559551822456967e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1081 y[1] (analytic) = 4.028598587036019427542230658443 y[1] (numeric) = 4.0285985870360194275422425909453 absolute error = 1.19325023e-23 relative error = 2.9619486881613485269891366208371e-22 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1082 y[1] (analytic) = 4.0289014620382207437156678558633 y[1] (numeric) = 4.0289014620382207437156799368885 absolute error = 1.20810252e-23 relative error = 2.9985903884301530840605965139446e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1083 y[1] (analytic) = 4.0292043673294367055121580158392 y[1] (numeric) = 4.0292043673294367055121702454168 absolute error = 1.22295776e-23 relative error = 3.0352338787187864056377843253726e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1084 y[1] (analytic) = 4.0295073029126963658463849670964 y[1] (numeric) = 4.029507302912696365846397345256 absolute error = 1.23781596e-23 relative error = 3.0718791826118663858698688078098e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1085 y[1] (analytic) = 4.0298102687910290805534697761718 y[1] (numeric) = 4.0298102687910290805534823029431 absolute error = 1.25267713e-23 relative error = 3.1085263236867272978763055076803e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 7.477e-16 Order of pole = 0.5 x[1] = 1.1086 y[1] (analytic) = 4.03011326496746450841926430579 y[1] (numeric) = 4.0301132649674645084192769812026 absolute error = 1.26754126e-23 relative error = 3.1451752758870239404322449810068e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1087 y[1] (analytic) = 4.0304162914450326112106478027467 y[1] (numeric) = 4.0304162914450326112106606268302 absolute error = 1.28240835e-23 relative error = 3.1818260379753868084744161707409e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 7.477e-16 Order of pole = 0.5 x[1] = 1.1088 y[1] (analytic) = 4.030719348226763653705826515603 y[1] (numeric) = 4.0307193482267636537058394883869 absolute error = 1.29727839e-23 relative error = 3.2184785839051590641630828822081e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 7.477e-16 Order of pole = 0.5 x[1] = 1.1089 y[1] (analytic) = 4.0310224353156882037246363424926 y[1] (numeric) = 4.0310224353156882037246494640065 absolute error = 1.31215139e-23 relative error = 3.2551329372525293152216975039721e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.109 y[1] (analytic) = 4.0313255527148371321588485093454 y[1] (numeric) = 4.031325552714837132158861779619 absolute error = 1.32702736e-23 relative error = 3.2917891215864044176438865736279e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1091 y[1] (analytic) = 4.0316287004272416130024782788307 y[1] (numeric) = 4.0316287004272416130024916978936 absolute error = 1.34190629e-23 relative error = 3.3284471108606675231681056762819e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 7.477e-16 Order of pole = 0.5 x[1] = 1.1092 y[1] (analytic) = 4.0319318784559331233820966903224 y[1] (numeric) = 4.0319318784559331233821102582042 absolute error = 1.35678818e-23 relative error = 3.3651069038388491093494850525623e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 7.477e-16 Order of pole = 0.5 x[1] = 1.1093 y[1] (analytic) = 4.0322350868039434435871453311898 y[1] (numeric) = 4.0322350868039434435871590479202 absolute error = 1.37167304e-23 relative error = 3.4017685240848009669992004478868e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.1094 y[1] (analytic) = 4.0325383254743046571002541397177 y[1] (numeric) = 4.0325383254743046571002680053264 absolute error = 1.38656087e-23 relative error = 3.4384319703568187918802626274209e-22 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1095 y[1] (analytic) = 4.0328415944700491506275622399578 y[1] (numeric) = 4.0328415944700491506275762544743 absolute error = 1.40145165e-23 relative error = 3.4750971918205556765631100247807e-22 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 1.1096 y[1] (analytic) = 4.0331448937942096141290418088151 y[1] (numeric) = 4.0331448937942096141290559722691 absolute error = 1.41634540e-23 relative error = 3.5117642368349504969176283384472e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 7.477e-16 Order of pole = 0.5 x[1] = 1.1097 y[1] (analytic) = 4.0334482234498190408488249756734 y[1] (numeric) = 4.0334482234498190408488392880945 absolute error = 1.43124211e-23 relative error = 3.5484330793661578225553119880716e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 7.477e-16 Order of pole = 0.5 x[1] = 1.1098 y[1] (analytic) = 4.0337515834399107273455337548612 y[1] (numeric) = 4.0337515834399107273455482162792 absolute error = 1.44614180e-23 relative error = 3.5851037677604239303784856749612e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 7.477e-16 Order of pole = 0.5 x[1] = 1.1099 y[1] (analytic) = 4.0340549737675182735226130112641 y[1] (numeric) = 4.0340549737675182735226276217086 absolute error = 1.46104445e-23 relative error = 3.6217762511934466254976352956902e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.602e-16 Order of pole = 0.5 x[1] = 1.11 y[1] (analytic) = 4.0343583944356755826586664593838 y[1] (numeric) = 4.0343583944356755826586812188843 absolute error = 1.47595005e-23 relative error = 3.6584505036431085218051148022046e-22 % h = 0.0001 Finished! Maximum Iterations Reached before Solution Completed! diff ( y , x , 1 ) = y - 1.0; Iterations = 100 Total Elapsed Time = 1 Seconds Elapsed Time(since restart) = 1 Seconds Expected Time Remaining = 7 Minutes 29 Seconds Optimized Time Remaining = 7 Minutes 22 Seconds Time to Timeout = 14 Minutes 58 Seconds Percent Done = 0.259 % > quit memory used=11.4MB, alloc=3.9MB, time=1.25