|\^/| 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 > DEBUGMASSIVE, > glob_max_terms, > DEBUGL, > INFO, > ALWAYS, > glob_iolevel, > #Top Generate Globals Decl > glob_log10abserr, > glob_current_iter, > glob_unchanged_h_cnt, > glob_optimal_clock_start_sec, > glob_no_eqs, > glob_max_trunc_err, > glob_relerr, > glob_html_log, > glob_log10normmin, > glob_start, > glob_max_sec, > glob_optimal_start, > glob_large_float, > glob_disp_incr, > glob_not_yet_start_msg, > glob_almost_1, > sec_in_min, > glob_subiter_method, > glob_max_minutes, > glob_log10relerr, > MAX_UNCHANGED, > glob_log10_abserr, > glob_dump_analytic, > glob_h, > glob_clock_start_sec, > glob_normmax, > glob_iter, > glob_warned2, > glob_abserr, > glob_look_poles, > glob_hmin, > hours_in_day, > djd_debug2, > glob_hmin_init, > glob_optimal_done, > glob_clock_sec, > glob_dump, > glob_optimal_expect_sec, > glob_curr_iter_when_opt, > glob_hmax, > glob_initial_pass, > days_in_year, > djd_debug, > glob_max_opt_iter, > glob_warned, > glob_max_hours, > centuries_in_millinium, > glob_display_flag, > glob_orig_start_sec, > glob_smallish_float, > glob_reached_optimal_h, > min_in_hour, > glob_small_float, > glob_last_good_h, > glob_not_yet_finished, > years_in_century, > glob_log10_relerr, > glob_percent_done, > glob_max_rel_trunc_err, > glob_max_iter, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_2D0, > array_const_1, > array_const_0D0, > array_const_1D0, > #END CONST > array_1st_rel_error, > array_norms, > array_y, > array_x, > array_last_rel_error, > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_tmp6, > array_tmp7, > array_tmp8, > array_tmp9, > array_m1, > array_type_pole, > array_y_init, > array_pole, > array_complex_pole, > array_y_higher_work2, > array_y_higher, > array_y_higher_work, > array_real_pole, > array_poles, > array_y_set_initial, > 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 DEBUGMASSIVE, glob_max_terms, DEBUGL, INFO, ALWAYS, glob_iolevel, glob_log10abserr, glob_current_iter, glob_unchanged_h_cnt, glob_optimal_clock_start_sec, glob_no_eqs, glob_max_trunc_err, glob_relerr, glob_html_log, glob_log10normmin, glob_start, glob_max_sec, glob_optimal_start, glob_large_float, glob_disp_incr, glob_not_yet_start_msg, glob_almost_1, sec_in_min, glob_subiter_method, glob_max_minutes, glob_log10relerr, MAX_UNCHANGED, glob_log10_abserr, glob_dump_analytic, glob_h, glob_clock_start_sec, glob_normmax, glob_iter, glob_warned2, glob_abserr, glob_look_poles, glob_hmin, hours_in_day, djd_debug2, glob_hmin_init, glob_optimal_done, glob_clock_sec, glob_dump, glob_optimal_expect_sec, glob_curr_iter_when_opt, glob_hmax, glob_initial_pass, days_in_year, djd_debug, glob_max_opt_iter, glob_warned, glob_max_hours, centuries_in_millinium, glob_display_flag, glob_orig_start_sec, glob_smallish_float, glob_reached_optimal_h, min_in_hour, glob_small_float, glob_last_good_h, glob_not_yet_finished, years_in_century, glob_log10_relerr, glob_percent_done, glob_max_rel_trunc_err, glob_max_iter, array_const_2D0, array_const_1, array_const_0D0, array_const_1D0, array_1st_rel_error, array_norms, array_y, array_x, array_last_rel_error, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_tmp6, array_tmp7, array_tmp8, array_tmp9, array_m1, array_type_pole, array_y_init, array_pole, array_complex_pole, array_y_higher_work2, array_y_higher, array_y_higher_work, array_real_pole, array_poles, array_y_set_initial, 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 > DEBUGMASSIVE, > glob_max_terms, > DEBUGL, > INFO, > ALWAYS, > glob_iolevel, > #Top Generate Globals Decl > glob_log10abserr, > glob_current_iter, > glob_unchanged_h_cnt, > glob_optimal_clock_start_sec, > glob_no_eqs, > glob_max_trunc_err, > glob_relerr, > glob_html_log, > glob_log10normmin, > glob_start, > glob_max_sec, > glob_optimal_start, > glob_large_float, > glob_disp_incr, > glob_not_yet_start_msg, > glob_almost_1, > sec_in_min, > glob_subiter_method, > glob_max_minutes, > glob_log10relerr, > MAX_UNCHANGED, > glob_log10_abserr, > glob_dump_analytic, > glob_h, > glob_clock_start_sec, > glob_normmax, > glob_iter, > glob_warned2, > glob_abserr, > glob_look_poles, > glob_hmin, > hours_in_day, > djd_debug2, > glob_hmin_init, > glob_optimal_done, > glob_clock_sec, > glob_dump, > glob_optimal_expect_sec, > glob_curr_iter_when_opt, > glob_hmax, > glob_initial_pass, > days_in_year, > djd_debug, > glob_max_opt_iter, > glob_warned, > glob_max_hours, > centuries_in_millinium, > glob_display_flag, > glob_orig_start_sec, > glob_smallish_float, > glob_reached_optimal_h, > min_in_hour, > glob_small_float, > glob_last_good_h, > glob_not_yet_finished, > years_in_century, > glob_log10_relerr, > glob_percent_done, > glob_max_rel_trunc_err, > glob_max_iter, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_2D0, > array_const_1, > array_const_0D0, > array_const_1D0, > #END CONST > array_1st_rel_error, > array_norms, > array_y, > array_x, > array_last_rel_error, > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_tmp6, > array_tmp7, > array_tmp8, > array_tmp9, > array_m1, > array_type_pole, > array_y_init, > array_pole, > array_complex_pole, > array_y_higher_work2, > array_y_higher, > array_y_higher_work, > array_real_pole, > array_poles, > array_y_set_initial, > 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 DEBUGMASSIVE, glob_max_terms, DEBUGL, INFO, ALWAYS, glob_iolevel, glob_log10abserr, glob_current_iter, glob_unchanged_h_cnt, glob_optimal_clock_start_sec, glob_no_eqs, glob_max_trunc_err, glob_relerr, glob_html_log, glob_log10normmin, glob_start, glob_max_sec, glob_optimal_start, glob_large_float, glob_disp_incr, glob_not_yet_start_msg, glob_almost_1, sec_in_min, glob_subiter_method, glob_max_minutes, glob_log10relerr, MAX_UNCHANGED, glob_log10_abserr, glob_dump_analytic, glob_h, glob_clock_start_sec, glob_normmax, glob_iter, glob_warned2, glob_abserr, glob_look_poles, glob_hmin, hours_in_day, djd_debug2, glob_hmin_init, glob_optimal_done, glob_clock_sec, glob_dump, glob_optimal_expect_sec, glob_curr_iter_when_opt, glob_hmax, glob_initial_pass, days_in_year, djd_debug, glob_max_opt_iter, glob_warned, glob_max_hours, centuries_in_millinium, glob_display_flag, glob_orig_start_sec, glob_smallish_float, glob_reached_optimal_h, min_in_hour, glob_small_float, glob_last_good_h, glob_not_yet_finished, years_in_century, glob_log10_relerr, glob_percent_done, glob_max_rel_trunc_err, glob_max_iter, array_const_2D0, array_const_1, array_const_0D0, array_const_1D0, array_1st_rel_error, array_norms, array_y, array_x, array_last_rel_error, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_tmp6, array_tmp7, array_tmp8, array_tmp9, array_m1, array_type_pole, array_y_init, array_pole, array_complex_pole, array_y_higher_work2, array_y_higher, array_y_higher_work, array_real_pole, array_poles, array_y_set_initial, 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 > DEBUGMASSIVE, > glob_max_terms, > DEBUGL, > INFO, > ALWAYS, > glob_iolevel, > #Top Generate Globals Decl > glob_log10abserr, > glob_current_iter, > glob_unchanged_h_cnt, > glob_optimal_clock_start_sec, > glob_no_eqs, > glob_max_trunc_err, > glob_relerr, > glob_html_log, > glob_log10normmin, > glob_start, > glob_max_sec, > glob_optimal_start, > glob_large_float, > glob_disp_incr, > glob_not_yet_start_msg, > glob_almost_1, > sec_in_min, > glob_subiter_method, > glob_max_minutes, > glob_log10relerr, > MAX_UNCHANGED, > glob_log10_abserr, > glob_dump_analytic, > glob_h, > glob_clock_start_sec, > glob_normmax, > glob_iter, > glob_warned2, > glob_abserr, > glob_look_poles, > glob_hmin, > hours_in_day, > djd_debug2, > glob_hmin_init, > glob_optimal_done, > glob_clock_sec, > glob_dump, > glob_optimal_expect_sec, > glob_curr_iter_when_opt, > glob_hmax, > glob_initial_pass, > days_in_year, > djd_debug, > glob_max_opt_iter, > glob_warned, > glob_max_hours, > centuries_in_millinium, > glob_display_flag, > glob_orig_start_sec, > glob_smallish_float, > glob_reached_optimal_h, > min_in_hour, > glob_small_float, > glob_last_good_h, > glob_not_yet_finished, > years_in_century, > glob_log10_relerr, > glob_percent_done, > glob_max_rel_trunc_err, > glob_max_iter, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_2D0, > array_const_1, > array_const_0D0, > array_const_1D0, > #END CONST > array_1st_rel_error, > array_norms, > array_y, > array_x, > array_last_rel_error, > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_tmp6, > array_tmp7, > array_tmp8, > array_tmp9, > array_m1, > array_type_pole, > array_y_init, > array_pole, > array_complex_pole, > array_y_higher_work2, > array_y_higher, > array_y_higher_work, > array_real_pole, > array_poles, > array_y_set_initial, > glob_last; > > local clock_sec, opt_clock_sec, clock_sec1, expect_sec, left_sec, percent_done, total_clock_sec; > #TOP PROGRESS REPORT > clock_sec1 := elapsed_time_seconds(); > total_clock_sec := convfloat(clock_sec1) - convfloat(glob_orig_start_sec); > glob_clock_sec := convfloat(clock_sec1) - convfloat(glob_clock_start_sec); > left_sec := convfloat(glob_max_sec) + convfloat(glob_orig_start_sec) - convfloat(clock_sec1); > expect_sec := comp_expect_sec(convfloat(x_end),convfloat(x_start),convfloat(array_x[1]) + convfloat(glob_h) ,convfloat( clock_sec1) - convfloat(glob_orig_start_sec)); > opt_clock_sec := convfloat( clock_sec1) - convfloat(glob_optimal_clock_start_sec); > glob_optimal_expect_sec := comp_expect_sec(convfloat(x_end),convfloat(x_start),convfloat(array_x[1]) +convfloat( glob_h) ,convfloat( opt_clock_sec)); > percent_done := comp_percent(convfloat(x_end),convfloat(x_start),convfloat(array_x[1]) + convfloat(glob_h)); > glob_percent_done := percent_done; > omniout_str_noeol(INFO,"Total Elapsed Time "); > omniout_timestr(convfloat(total_clock_sec)); > omniout_str_noeol(INFO,"Elapsed Time(since restart) "); > omniout_timestr(convfloat(glob_clock_sec)); > if convfloat(percent_done) < convfloat(100.0) then # if number 1 > omniout_str_noeol(INFO,"Expected Time Remaining "); > omniout_timestr(convfloat(expect_sec)); > omniout_str_noeol(INFO,"Optimized Time Remaining "); > omniout_timestr(convfloat(glob_optimal_expect_sec)); > fi;# end if 1 > ; > omniout_str_noeol(INFO,"Time to Timeout "); > omniout_timestr(convfloat(left_sec)); > omniout_float(INFO, "Percent Done ",33,percent_done,4,"%"); > #BOTTOM PROGRESS REPORT > # End Function number 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 DEBUGMASSIVE, glob_max_terms, DEBUGL, INFO, ALWAYS, glob_iolevel, glob_log10abserr, glob_current_iter, glob_unchanged_h_cnt, glob_optimal_clock_start_sec, glob_no_eqs, glob_max_trunc_err, glob_relerr, glob_html_log, glob_log10normmin, glob_start, glob_max_sec, glob_optimal_start, glob_large_float, glob_disp_incr, glob_not_yet_start_msg, glob_almost_1, sec_in_min, glob_subiter_method, glob_max_minutes, glob_log10relerr, MAX_UNCHANGED, glob_log10_abserr, glob_dump_analytic, glob_h, glob_clock_start_sec, glob_normmax, glob_iter, glob_warned2, glob_abserr, glob_look_poles, glob_hmin, hours_in_day, djd_debug2, glob_hmin_init, glob_optimal_done, glob_clock_sec, glob_dump, glob_optimal_expect_sec, glob_curr_iter_when_opt, glob_hmax, glob_initial_pass, days_in_year, djd_debug, glob_max_opt_iter, glob_warned, glob_max_hours, centuries_in_millinium, glob_display_flag, glob_orig_start_sec, glob_smallish_float, glob_reached_optimal_h, min_in_hour, glob_small_float, glob_last_good_h, glob_not_yet_finished, years_in_century, glob_log10_relerr, glob_percent_done, glob_max_rel_trunc_err, glob_max_iter, array_const_2D0, array_const_1, array_const_0D0, array_const_1D0, array_1st_rel_error, array_norms, array_y, array_x, array_last_rel_error, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_tmp6, array_tmp7, array_tmp8, array_tmp9, array_m1, array_type_pole, array_y_init, array_pole, array_complex_pole, array_y_higher_work2, array_y_higher, array_y_higher_work, array_real_pole, array_poles, array_y_set_initial, glob_last; clock_sec1 := elapsed_time_seconds(); total_clock_sec := convfloat(clock_sec1) - convfloat(glob_orig_start_sec); glob_clock_sec := convfloat(clock_sec1) - convfloat(glob_clock_start_sec); left_sec := convfloat(glob_max_sec) + convfloat(glob_orig_start_sec) - convfloat(clock_sec1); expect_sec := comp_expect_sec(convfloat(x_end), convfloat(x_start), convfloat(array_x[1]) + convfloat(glob_h), convfloat(clock_sec1) - convfloat(glob_orig_start_sec)); opt_clock_sec := convfloat(clock_sec1) - convfloat(glob_optimal_clock_start_sec); glob_optimal_expect_sec := comp_expect_sec(convfloat(x_end), convfloat(x_start), convfloat(array_x[1]) + convfloat(glob_h), convfloat(opt_clock_sec)); percent_done := comp_percent(convfloat(x_end), convfloat(x_start), convfloat(array_x[1]) + convfloat(glob_h)); glob_percent_done := percent_done; omniout_str_noeol(INFO, "Total Elapsed Time "); omniout_timestr(convfloat(total_clock_sec)); omniout_str_noeol(INFO, "Elapsed Time(since restart) "); omniout_timestr(convfloat(glob_clock_sec)); if convfloat(percent_done) < convfloat(100.0) then omniout_str_noeol(INFO, "Expected Time Remaining "); omniout_timestr(convfloat(expect_sec)); omniout_str_noeol(INFO, "Optimized Time Remaining "); omniout_timestr(convfloat(glob_optimal_expect_sec)) end if; omniout_str_noeol(INFO, "Time to Timeout "); omniout_timestr(convfloat(left_sec)); omniout_float(INFO, "Percent Done ", 33, percent_done, 4, "%") end proc > # Begin Function number 6 > check_for_pole := proc() > global > DEBUGMASSIVE, > glob_max_terms, > DEBUGL, > INFO, > ALWAYS, > glob_iolevel, > #Top Generate Globals Decl > glob_log10abserr, > glob_current_iter, > glob_unchanged_h_cnt, > glob_optimal_clock_start_sec, > glob_no_eqs, > glob_max_trunc_err, > glob_relerr, > glob_html_log, > glob_log10normmin, > glob_start, > glob_max_sec, > glob_optimal_start, > glob_large_float, > glob_disp_incr, > glob_not_yet_start_msg, > glob_almost_1, > sec_in_min, > glob_subiter_method, > glob_max_minutes, > glob_log10relerr, > MAX_UNCHANGED, > glob_log10_abserr, > glob_dump_analytic, > glob_h, > glob_clock_start_sec, > glob_normmax, > glob_iter, > glob_warned2, > glob_abserr, > glob_look_poles, > glob_hmin, > hours_in_day, > djd_debug2, > glob_hmin_init, > glob_optimal_done, > glob_clock_sec, > glob_dump, > glob_optimal_expect_sec, > glob_curr_iter_when_opt, > glob_hmax, > glob_initial_pass, > days_in_year, > djd_debug, > glob_max_opt_iter, > glob_warned, > glob_max_hours, > centuries_in_millinium, > glob_display_flag, > glob_orig_start_sec, > glob_smallish_float, > glob_reached_optimal_h, > min_in_hour, > glob_small_float, > glob_last_good_h, > glob_not_yet_finished, > years_in_century, > glob_log10_relerr, > glob_percent_done, > glob_max_rel_trunc_err, > glob_max_iter, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_2D0, > array_const_1, > array_const_0D0, > array_const_1D0, > #END CONST > array_1st_rel_error, > array_norms, > array_y, > array_x, > array_last_rel_error, > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_tmp6, > array_tmp7, > array_tmp8, > array_tmp9, > array_m1, > array_type_pole, > array_y_init, > array_pole, > array_complex_pole, > array_y_higher_work2, > array_y_higher, > array_y_higher_work, > array_real_pole, > array_poles, > array_y_set_initial, > glob_last; > > local cnt, dr1, dr2, ds1, ds2, hdrc, m, n, nr1, nr2, ord_no, rad_c, rcs, rm0, rm1, rm2, rm3, rm4, found; > #TOP CHECK FOR POLE > #IN RADII REAL EQ = 1 > #Computes radius of convergence and r_order of pole from 3 adjacent Taylor series terms. EQUATUON NUMBER 1 > #Applies to pole of arbitrary r_order on the real axis, > #Due to Prof. George Corliss. > n := glob_max_terms; > m := n - 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 DEBUGMASSIVE, glob_max_terms, DEBUGL, INFO, ALWAYS, glob_iolevel, glob_log10abserr, glob_current_iter, glob_unchanged_h_cnt, glob_optimal_clock_start_sec, glob_no_eqs, glob_max_trunc_err, glob_relerr, glob_html_log, glob_log10normmin, glob_start, glob_max_sec, glob_optimal_start, glob_large_float, glob_disp_incr, glob_not_yet_start_msg, glob_almost_1, sec_in_min, glob_subiter_method, glob_max_minutes, glob_log10relerr, MAX_UNCHANGED, glob_log10_abserr, glob_dump_analytic, glob_h, glob_clock_start_sec, glob_normmax, glob_iter, glob_warned2, glob_abserr, glob_look_poles, glob_hmin, hours_in_day, djd_debug2, glob_hmin_init, glob_optimal_done, glob_clock_sec, glob_dump, glob_optimal_expect_sec, glob_curr_iter_when_opt, glob_hmax, glob_initial_pass, days_in_year, djd_debug, glob_max_opt_iter, glob_warned, glob_max_hours, centuries_in_millinium, glob_display_flag, glob_orig_start_sec, glob_smallish_float, glob_reached_optimal_h, min_in_hour, glob_small_float, glob_last_good_h, glob_not_yet_finished, years_in_century, glob_log10_relerr, glob_percent_done, glob_max_rel_trunc_err, glob_max_iter, array_const_2D0, array_const_1, array_const_0D0, array_const_1D0, array_1st_rel_error, array_norms, array_y, array_x, array_last_rel_error, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_tmp6, array_tmp7, array_tmp8, array_tmp9, array_m1, array_type_pole, array_y_init, array_pole, array_complex_pole, array_y_higher_work2, array_y_higher, array_y_higher_work, array_real_pole, array_poles, array_y_set_initial, 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 > DEBUGMASSIVE, > glob_max_terms, > DEBUGL, > INFO, > ALWAYS, > glob_iolevel, > #Top Generate Globals Decl > glob_log10abserr, > glob_current_iter, > glob_unchanged_h_cnt, > glob_optimal_clock_start_sec, > glob_no_eqs, > glob_max_trunc_err, > glob_relerr, > glob_html_log, > glob_log10normmin, > glob_start, > glob_max_sec, > glob_optimal_start, > glob_large_float, > glob_disp_incr, > glob_not_yet_start_msg, > glob_almost_1, > sec_in_min, > glob_subiter_method, > glob_max_minutes, > glob_log10relerr, > MAX_UNCHANGED, > glob_log10_abserr, > glob_dump_analytic, > glob_h, > glob_clock_start_sec, > glob_normmax, > glob_iter, > glob_warned2, > glob_abserr, > glob_look_poles, > glob_hmin, > hours_in_day, > djd_debug2, > glob_hmin_init, > glob_optimal_done, > glob_clock_sec, > glob_dump, > glob_optimal_expect_sec, > glob_curr_iter_when_opt, > glob_hmax, > glob_initial_pass, > days_in_year, > djd_debug, > glob_max_opt_iter, > glob_warned, > glob_max_hours, > centuries_in_millinium, > glob_display_flag, > glob_orig_start_sec, > glob_smallish_float, > glob_reached_optimal_h, > min_in_hour, > glob_small_float, > glob_last_good_h, > glob_not_yet_finished, > years_in_century, > glob_log10_relerr, > glob_percent_done, > glob_max_rel_trunc_err, > glob_max_iter, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_2D0, > array_const_1, > array_const_0D0, > array_const_1D0, > #END CONST > array_1st_rel_error, > array_norms, > array_y, > array_x, > array_last_rel_error, > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_tmp6, > array_tmp7, > array_tmp8, > array_tmp9, > array_m1, > array_type_pole, > array_y_init, > array_pole, > array_complex_pole, > array_y_higher_work2, > array_y_higher, > array_y_higher_work, > array_real_pole, > array_poles, > array_y_set_initial, > 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 DEBUGMASSIVE, glob_max_terms, DEBUGL, INFO, ALWAYS, glob_iolevel, glob_log10abserr, glob_current_iter, glob_unchanged_h_cnt, glob_optimal_clock_start_sec, glob_no_eqs, glob_max_trunc_err, glob_relerr, glob_html_log, glob_log10normmin, glob_start, glob_max_sec, glob_optimal_start, glob_large_float, glob_disp_incr, glob_not_yet_start_msg, glob_almost_1, sec_in_min, glob_subiter_method, glob_max_minutes, glob_log10relerr, MAX_UNCHANGED, glob_log10_abserr, glob_dump_analytic, glob_h, glob_clock_start_sec, glob_normmax, glob_iter, glob_warned2, glob_abserr, glob_look_poles, glob_hmin, hours_in_day, djd_debug2, glob_hmin_init, glob_optimal_done, glob_clock_sec, glob_dump, glob_optimal_expect_sec, glob_curr_iter_when_opt, glob_hmax, glob_initial_pass, days_in_year, djd_debug, glob_max_opt_iter, glob_warned, glob_max_hours, centuries_in_millinium, glob_display_flag, glob_orig_start_sec, glob_smallish_float, glob_reached_optimal_h, min_in_hour, glob_small_float, glob_last_good_h, glob_not_yet_finished, years_in_century, glob_log10_relerr, glob_percent_done, glob_max_rel_trunc_err, glob_max_iter, array_const_2D0, array_const_1, array_const_0D0, array_const_1D0, array_1st_rel_error, array_norms, array_y, array_x, array_last_rel_error, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_tmp6, array_tmp7, array_tmp8, array_tmp9, array_m1, array_type_pole, array_y_init, array_pole, array_complex_pole, array_y_higher_work2, array_y_higher, array_y_higher_work, array_real_pole, array_poles, array_y_set_initial, 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 > DEBUGMASSIVE, > glob_max_terms, > DEBUGL, > INFO, > ALWAYS, > glob_iolevel, > #Top Generate Globals Decl > glob_log10abserr, > glob_current_iter, > glob_unchanged_h_cnt, > glob_optimal_clock_start_sec, > glob_no_eqs, > glob_max_trunc_err, > glob_relerr, > glob_html_log, > glob_log10normmin, > glob_start, > glob_max_sec, > glob_optimal_start, > glob_large_float, > glob_disp_incr, > glob_not_yet_start_msg, > glob_almost_1, > sec_in_min, > glob_subiter_method, > glob_max_minutes, > glob_log10relerr, > MAX_UNCHANGED, > glob_log10_abserr, > glob_dump_analytic, > glob_h, > glob_clock_start_sec, > glob_normmax, > glob_iter, > glob_warned2, > glob_abserr, > glob_look_poles, > glob_hmin, > hours_in_day, > djd_debug2, > glob_hmin_init, > glob_optimal_done, > glob_clock_sec, > glob_dump, > glob_optimal_expect_sec, > glob_curr_iter_when_opt, > glob_hmax, > glob_initial_pass, > days_in_year, > djd_debug, > glob_max_opt_iter, > glob_warned, > glob_max_hours, > centuries_in_millinium, > glob_display_flag, > glob_orig_start_sec, > glob_smallish_float, > glob_reached_optimal_h, > min_in_hour, > glob_small_float, > glob_last_good_h, > glob_not_yet_finished, > years_in_century, > glob_log10_relerr, > glob_percent_done, > glob_max_rel_trunc_err, > glob_max_iter, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_2D0, > array_const_1, > array_const_0D0, > array_const_1D0, > #END CONST > array_1st_rel_error, > array_norms, > array_y, > array_x, > array_last_rel_error, > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_tmp6, > array_tmp7, > array_tmp8, > array_tmp9, > array_m1, > array_type_pole, > array_y_init, > array_pole, > array_complex_pole, > array_y_higher_work2, > array_y_higher, > array_y_higher_work, > array_real_pole, > array_poles, > array_y_set_initial, > glob_last; > > local kkk, order_d, adj2, temporary, term; > #TOP ATOMALL > #END OUTFILE1 > #BEGIN ATOMHDR1 > # emit pre mult $eq_no = 1 i = 1 > array_tmp1[1] := (array_m1[1] * (array_const_2D0[1])); > # emit pre mult $eq_no = 1 i = 1 > array_tmp2[1] := (array_tmp1[1] * (array_x[1])); > # emit pre mult $eq_no = 1 i = 1 > array_tmp3[1] := (array_x[1] * (array_x[1])); > #emit pre add $eq_no = 1 i = 1 > array_tmp4[1] := array_tmp3[1] + array_const_1D0[1]; > #emit pre div $eq_no = 1 i = 1 > array_tmp5[1] := (array_tmp2[1] / (array_tmp4[1])); > # emit pre mult $eq_no = 1 i = 1 > array_tmp6[1] := (array_x[1] * (array_x[1])); > #emit pre add $eq_no = 1 i = 1 > array_tmp7[1] := array_tmp6[1] + array_const_1D0[1]; > #emit pre div $eq_no = 1 i = 1 > array_tmp8[1] := (array_tmp5[1] / (array_tmp7[1])); > #emit pre add $eq_no = 1 i = 1 > array_tmp9[1] := array_const_0D0[1] + array_tmp8[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_tmp9[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 mult $eq_no = 1 i = 2 > array_tmp1[2] := ats(2,array_m1,array_const_2D0,1); > # emit pre mult $eq_no = 1 i = 2 > array_tmp2[2] := ats(2,array_tmp1,array_x,1); > # emit pre mult $eq_no = 1 i = 2 > array_tmp3[2] := ats(2,array_x,array_x,1); > #emit pre add $eq_no = 1 i = 2 > array_tmp4[2] := array_tmp3[2] + array_const_1D0[2]; > #emit pre div $eq_no = 1 i = 2 > array_tmp5[2] := ((array_tmp2[2] - ats(2,array_tmp4,array_tmp5,2))/array_tmp4[1]); > # emit pre mult $eq_no = 1 i = 2 > array_tmp6[2] := ats(2,array_x,array_x,1); > #emit pre add $eq_no = 1 i = 2 > array_tmp7[2] := array_tmp6[2] + array_const_1D0[2]; > #emit pre div $eq_no = 1 i = 2 > array_tmp8[2] := ((array_tmp5[2] - ats(2,array_tmp7,array_tmp8,2))/array_tmp7[1]); > #emit pre add $eq_no = 1 i = 2 > array_tmp9[2] := array_const_0D0[2] + array_tmp8[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_tmp9[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 mult $eq_no = 1 i = 3 > array_tmp1[3] := ats(3,array_m1,array_const_2D0,1); > # emit pre mult $eq_no = 1 i = 3 > array_tmp2[3] := ats(3,array_tmp1,array_x,1); > # emit pre mult $eq_no = 1 i = 3 > array_tmp3[3] := ats(3,array_x,array_x,1); > #emit pre add $eq_no = 1 i = 3 > array_tmp4[3] := array_tmp3[3] + array_const_1D0[3]; > #emit pre div $eq_no = 1 i = 3 > array_tmp5[3] := ((array_tmp2[3] - ats(3,array_tmp4,array_tmp5,2))/array_tmp4[1]); > # emit pre mult $eq_no = 1 i = 3 > array_tmp6[3] := ats(3,array_x,array_x,1); > #emit pre add $eq_no = 1 i = 3 > array_tmp7[3] := array_tmp6[3] + array_const_1D0[3]; > #emit pre div $eq_no = 1 i = 3 > array_tmp8[3] := ((array_tmp5[3] - ats(3,array_tmp7,array_tmp8,2))/array_tmp7[1]); > #emit pre add $eq_no = 1 i = 3 > array_tmp9[3] := array_const_0D0[3] + array_tmp8[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_tmp9[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 mult $eq_no = 1 i = 4 > array_tmp1[4] := ats(4,array_m1,array_const_2D0,1); > # emit pre mult $eq_no = 1 i = 4 > array_tmp2[4] := ats(4,array_tmp1,array_x,1); > # emit pre mult $eq_no = 1 i = 4 > array_tmp3[4] := ats(4,array_x,array_x,1); > #emit pre add $eq_no = 1 i = 4 > array_tmp4[4] := array_tmp3[4] + array_const_1D0[4]; > #emit pre div $eq_no = 1 i = 4 > array_tmp5[4] := ((array_tmp2[4] - ats(4,array_tmp4,array_tmp5,2))/array_tmp4[1]); > # emit pre mult $eq_no = 1 i = 4 > array_tmp6[4] := ats(4,array_x,array_x,1); > #emit pre add $eq_no = 1 i = 4 > array_tmp7[4] := array_tmp6[4] + array_const_1D0[4]; > #emit pre div $eq_no = 1 i = 4 > array_tmp8[4] := ((array_tmp5[4] - ats(4,array_tmp7,array_tmp8,2))/array_tmp7[1]); > #emit pre add $eq_no = 1 i = 4 > array_tmp9[4] := array_const_0D0[4] + array_tmp8[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_tmp9[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 mult $eq_no = 1 i = 5 > array_tmp1[5] := ats(5,array_m1,array_const_2D0,1); > # emit pre mult $eq_no = 1 i = 5 > array_tmp2[5] := ats(5,array_tmp1,array_x,1); > # emit pre mult $eq_no = 1 i = 5 > array_tmp3[5] := ats(5,array_x,array_x,1); > #emit pre add $eq_no = 1 i = 5 > array_tmp4[5] := array_tmp3[5] + array_const_1D0[5]; > #emit pre div $eq_no = 1 i = 5 > array_tmp5[5] := ((array_tmp2[5] - ats(5,array_tmp4,array_tmp5,2))/array_tmp4[1]); > # emit pre mult $eq_no = 1 i = 5 > array_tmp6[5] := ats(5,array_x,array_x,1); > #emit pre add $eq_no = 1 i = 5 > array_tmp7[5] := array_tmp6[5] + array_const_1D0[5]; > #emit pre div $eq_no = 1 i = 5 > array_tmp8[5] := ((array_tmp5[5] - ats(5,array_tmp7,array_tmp8,2))/array_tmp7[1]); > #emit pre add $eq_no = 1 i = 5 > array_tmp9[5] := array_const_0D0[5] + array_tmp8[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_tmp9[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 mult $eq_no = 1 > array_tmp1[kkk] := ats(kkk,array_m1,array_const_2D0,1); > #emit mult $eq_no = 1 > array_tmp2[kkk] := ats(kkk,array_tmp1,array_x,1); > #emit mult $eq_no = 1 > array_tmp3[kkk] := ats(kkk,array_x,array_x,1); > #emit add $eq_no = 1 > array_tmp4[kkk] := array_tmp3[kkk] + array_const_1D0[kkk]; > #emit div $eq_no = 1 > array_tmp5[kkk] := ((array_tmp2[kkk] - ats(kkk,array_tmp4,array_tmp5,2))/array_tmp4[1]); > #emit mult $eq_no = 1 > array_tmp6[kkk] := ats(kkk,array_x,array_x,1); > #emit add $eq_no = 1 > array_tmp7[kkk] := array_tmp6[kkk] + array_const_1D0[kkk]; > #emit div $eq_no = 1 > array_tmp8[kkk] := ((array_tmp5[kkk] - ats(kkk,array_tmp7,array_tmp8,2))/array_tmp7[1]); > #emit add $eq_no = 1 > array_tmp9[kkk] := array_const_0D0[kkk] + array_tmp8[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_tmp9[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 DEBUGMASSIVE, glob_max_terms, DEBUGL, INFO, ALWAYS, glob_iolevel, glob_log10abserr, glob_current_iter, glob_unchanged_h_cnt, glob_optimal_clock_start_sec, glob_no_eqs, glob_max_trunc_err, glob_relerr, glob_html_log, glob_log10normmin, glob_start, glob_max_sec, glob_optimal_start, glob_large_float, glob_disp_incr, glob_not_yet_start_msg, glob_almost_1, sec_in_min, glob_subiter_method, glob_max_minutes, glob_log10relerr, MAX_UNCHANGED, glob_log10_abserr, glob_dump_analytic, glob_h, glob_clock_start_sec, glob_normmax, glob_iter, glob_warned2, glob_abserr, glob_look_poles, glob_hmin, hours_in_day, djd_debug2, glob_hmin_init, glob_optimal_done, glob_clock_sec, glob_dump, glob_optimal_expect_sec, glob_curr_iter_when_opt, glob_hmax, glob_initial_pass, days_in_year, djd_debug, glob_max_opt_iter, glob_warned, glob_max_hours, centuries_in_millinium, glob_display_flag, glob_orig_start_sec, glob_smallish_float, glob_reached_optimal_h, min_in_hour, glob_small_float, glob_last_good_h, glob_not_yet_finished, years_in_century, glob_log10_relerr, glob_percent_done, glob_max_rel_trunc_err, glob_max_iter, array_const_2D0, array_const_1, array_const_0D0, array_const_1D0, array_1st_rel_error, array_norms, array_y, array_x, array_last_rel_error, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_tmp6, array_tmp7, array_tmp8, array_tmp9, array_m1, array_type_pole, array_y_init, array_pole, array_complex_pole, array_y_higher_work2, array_y_higher, array_y_higher_work, array_real_pole, array_poles, array_y_set_initial, glob_last; array_tmp1[1] := array_m1[1]*array_const_2D0[1]; array_tmp2[1] := array_tmp1[1]*array_x[1]; array_tmp3[1] := array_x[1]*array_x[1]; array_tmp4[1] := array_tmp3[1] + array_const_1D0[1]; array_tmp5[1] := array_tmp2[1]/array_tmp4[1]; array_tmp6[1] := array_x[1]*array_x[1]; array_tmp7[1] := array_tmp6[1] + array_const_1D0[1]; array_tmp8[1] := array_tmp5[1]/array_tmp7[1]; array_tmp9[1] := array_const_0D0[1] + array_tmp8[1]; if not array_y_set_initial[1, 2] then if 1 <= glob_max_terms then temporary := array_tmp9[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] := ats(2, array_m1, array_const_2D0, 1); array_tmp2[2] := ats(2, array_tmp1, array_x, 1); array_tmp3[2] := ats(2, array_x, array_x, 1); array_tmp4[2] := array_tmp3[2] + array_const_1D0[2]; array_tmp5[2] := (array_tmp2[2] - ats(2, array_tmp4, array_tmp5, 2))/array_tmp4[1]; array_tmp6[2] := ats(2, array_x, array_x, 1); array_tmp7[2] := array_tmp6[2] + array_const_1D0[2]; array_tmp8[2] := (array_tmp5[2] - ats(2, array_tmp7, array_tmp8, 2))/array_tmp7[1]; array_tmp9[2] := array_const_0D0[2] + array_tmp8[2]; if not array_y_set_initial[1, 3] then if 2 <= glob_max_terms then temporary := array_tmp9[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] := ats(3, array_m1, array_const_2D0, 1); array_tmp2[3] := ats(3, array_tmp1, array_x, 1); array_tmp3[3] := ats(3, array_x, array_x, 1); array_tmp4[3] := array_tmp3[3] + array_const_1D0[3]; array_tmp5[3] := (array_tmp2[3] - ats(3, array_tmp4, array_tmp5, 2))/array_tmp4[1]; array_tmp6[3] := ats(3, array_x, array_x, 1); array_tmp7[3] := array_tmp6[3] + array_const_1D0[3]; array_tmp8[3] := (array_tmp5[3] - ats(3, array_tmp7, array_tmp8, 2))/array_tmp7[1]; array_tmp9[3] := array_const_0D0[3] + array_tmp8[3]; if not array_y_set_initial[1, 4] then if 3 <= glob_max_terms then temporary := array_tmp9[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] := ats(4, array_m1, array_const_2D0, 1); array_tmp2[4] := ats(4, array_tmp1, array_x, 1); array_tmp3[4] := ats(4, array_x, array_x, 1); array_tmp4[4] := array_tmp3[4] + array_const_1D0[4]; array_tmp5[4] := (array_tmp2[4] - ats(4, array_tmp4, array_tmp5, 2))/array_tmp4[1]; array_tmp6[4] := ats(4, array_x, array_x, 1); array_tmp7[4] := array_tmp6[4] + array_const_1D0[4]; array_tmp8[4] := (array_tmp5[4] - ats(4, array_tmp7, array_tmp8, 2))/array_tmp7[1]; array_tmp9[4] := array_const_0D0[4] + array_tmp8[4]; if not array_y_set_initial[1, 5] then if 4 <= glob_max_terms then temporary := array_tmp9[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] := ats(5, array_m1, array_const_2D0, 1); array_tmp2[5] := ats(5, array_tmp1, array_x, 1); array_tmp3[5] := ats(5, array_x, array_x, 1); array_tmp4[5] := array_tmp3[5] + array_const_1D0[5]; array_tmp5[5] := (array_tmp2[5] - ats(5, array_tmp4, array_tmp5, 2))/array_tmp4[1]; array_tmp6[5] := ats(5, array_x, array_x, 1); array_tmp7[5] := array_tmp6[5] + array_const_1D0[5]; array_tmp8[5] := (array_tmp5[5] - ats(5, array_tmp7, array_tmp8, 2))/array_tmp7[1]; array_tmp9[5] := array_const_0D0[5] + array_tmp8[5]; if not array_y_set_initial[1, 6] then if 5 <= glob_max_terms then temporary := array_tmp9[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] := ats(kkk, array_m1, array_const_2D0, 1); array_tmp2[kkk] := ats(kkk, array_tmp1, array_x, 1); array_tmp3[kkk] := ats(kkk, array_x, array_x, 1); array_tmp4[kkk] := array_tmp3[kkk] + array_const_1D0[kkk]; array_tmp5[kkk] := ( array_tmp2[kkk] - ats(kkk, array_tmp4, array_tmp5, 2))/ array_tmp4[1]; array_tmp6[kkk] := ats(kkk, array_x, array_x, 1); array_tmp7[kkk] := array_tmp6[kkk] + array_const_1D0[kkk]; array_tmp8[kkk] := ( array_tmp5[kkk] - ats(kkk, array_tmp7, array_tmp8, 2))/ array_tmp7[1]; array_tmp9[kkk] := array_const_0D0[kkk] + array_tmp8[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_tmp9[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 / (x * x + 1.0); > end; exact_soln_y := proc(x) 1.0/(x*x + 1.0) 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 > DEBUGMASSIVE, > glob_max_terms, > DEBUGL, > INFO, > ALWAYS, > glob_iolevel, > #Top Generate Globals Decl > glob_log10abserr, > glob_current_iter, > glob_unchanged_h_cnt, > glob_optimal_clock_start_sec, > glob_no_eqs, > glob_max_trunc_err, > glob_relerr, > glob_html_log, > glob_log10normmin, > glob_start, > glob_max_sec, > glob_optimal_start, > glob_large_float, > glob_disp_incr, > glob_not_yet_start_msg, > glob_almost_1, > sec_in_min, > glob_subiter_method, > glob_max_minutes, > glob_log10relerr, > MAX_UNCHANGED, > glob_log10_abserr, > glob_dump_analytic, > glob_h, > glob_clock_start_sec, > glob_normmax, > glob_iter, > glob_warned2, > glob_abserr, > glob_look_poles, > glob_hmin, > hours_in_day, > djd_debug2, > glob_hmin_init, > glob_optimal_done, > glob_clock_sec, > glob_dump, > glob_optimal_expect_sec, > glob_curr_iter_when_opt, > glob_hmax, > glob_initial_pass, > days_in_year, > djd_debug, > glob_max_opt_iter, > glob_warned, > glob_max_hours, > centuries_in_millinium, > glob_display_flag, > glob_orig_start_sec, > glob_smallish_float, > glob_reached_optimal_h, > min_in_hour, > glob_small_float, > glob_last_good_h, > glob_not_yet_finished, > years_in_century, > glob_log10_relerr, > glob_percent_done, > glob_max_rel_trunc_err, > glob_max_iter, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_2D0, > array_const_1, > array_const_0D0, > array_const_1D0, > #END CONST > array_1st_rel_error, > array_norms, > array_y, > array_x, > array_last_rel_error, > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_tmp6, > array_tmp7, > array_tmp8, > array_tmp9, > array_m1, > array_type_pole, > array_y_init, > array_pole, > array_complex_pole, > array_y_higher_work2, > array_y_higher, > array_y_higher_work, > array_real_pole, > array_poles, > array_y_set_initial, > glob_last; > glob_last; > ALWAYS := 1; > INFO := 2; > DEBUGL := 3; > DEBUGMASSIVE := 4; > glob_iolevel := INFO; > DEBUGMASSIVE := 4; > glob_max_terms := 30; > DEBUGL := 3; > INFO := 2; > ALWAYS := 1; > glob_iolevel := 5; > glob_log10abserr := 0.0; > glob_current_iter := 0; > glob_unchanged_h_cnt := 0; > glob_optimal_clock_start_sec := 0.0; > glob_no_eqs := 0; > glob_max_trunc_err := 0.1e-10; > glob_relerr := 0.1e-10; > glob_html_log := true; > glob_log10normmin := 0.1; > glob_start := 0; > glob_max_sec := 10000.0; > glob_optimal_start := 0.0; > glob_large_float := 9.0e100; > glob_disp_incr := 0.1; > glob_not_yet_start_msg := true; > glob_almost_1 := 0.9990; > sec_in_min := 60.0; > glob_subiter_method := 3; > glob_max_minutes := 0.0; > glob_log10relerr := 0.0; > MAX_UNCHANGED := 10; > glob_log10_abserr := 0.1e-10; > glob_dump_analytic := false; > glob_h := 0.1; > glob_clock_start_sec := 0.0; > glob_normmax := 0.0; > glob_iter := 0; > glob_warned2 := false; > glob_abserr := 0.1e-10; > glob_look_poles := false; > glob_hmin := 0.00000000001; > hours_in_day := 24.0; > djd_debug2 := true; > glob_hmin_init := 0.001; > glob_optimal_done := false; > glob_clock_sec := 0.0; > glob_dump := false; > glob_optimal_expect_sec := 0.1; > glob_curr_iter_when_opt := 0; > glob_hmax := 1.0; > glob_initial_pass := true; > days_in_year := 365.0; > djd_debug := true; > glob_max_opt_iter := 10; > glob_warned := false; > glob_max_hours := 0.0; > centuries_in_millinium := 10.0; > glob_display_flag := true; > glob_orig_start_sec := 0.0; > glob_smallish_float := 0.1e-100; > glob_reached_optimal_h := false; > min_in_hour := 60.0; > glob_small_float := 0.1e-50; > glob_last_good_h := 0.1; > glob_not_yet_finished := true; > years_in_century := 100.0; > glob_log10_relerr := 0.1e-10; > glob_percent_done := 0.0; > glob_max_rel_trunc_err := 0.1e-10; > glob_max_iter := 1000; > #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/sing4postode.ode#################"); > omniout_str(ALWAYS,"diff ( y , x , 1 ) = m1 * 2.0 * x / (x * x + 1.0) /( x * x + 1.0);"); > omniout_str(ALWAYS,"!"); > omniout_str(ALWAYS,"#BEGIN FIRST INPUT BLOCK"); > omniout_str(ALWAYS,"Digits := 50;"); > 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 := -2.0;"); > omniout_str(ALWAYS,"x_end := 1.0;"); > omniout_str(ALWAYS,"array_y_init[0 + 1] := exact_soln_y(x_start);"); > omniout_str(ALWAYS,"glob_h := 0.1;"); > omniout_str(ALWAYS,"glob_look_poles := true;"); > omniout_str(ALWAYS,"glob_max_iter := 50;"); > 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 / (x * x + 1.0);"); > omniout_str(ALWAYS,"end;"); > omniout_str(ALWAYS,""); > omniout_str(ALWAYS,""); > omniout_str(ALWAYS,"#END USER DEF BLOCK"); > omniout_str(ALWAYS,"#######END OF ECHO OF PROBLEM#################"); > glob_unchanged_h_cnt := 0; > glob_warned := false; > glob_warned2 := false; > glob_small_float := 1.0e-200; > glob_smallish_float := 1.0e-64; > glob_large_float := 1.0e100; > glob_almost_1 := 0.99; > glob_log10_abserr := -8.0; > glob_log10_relerr := -8.0; > glob_hmax := 0.01; > #BEGIN FIRST INPUT BLOCK > #BEGIN FIRST INPUT BLOCK > Digits := 50; > 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_1st_rel_error:= Array(1..(max_terms + 1),[]); > array_norms:= Array(1..(max_terms + 1),[]); > array_y:= Array(1..(max_terms + 1),[]); > array_x:= Array(1..(max_terms + 1),[]); > array_last_rel_error:= 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_tmp3:= Array(1..(max_terms + 1),[]); > array_tmp4:= Array(1..(max_terms + 1),[]); > array_tmp5:= Array(1..(max_terms + 1),[]); > array_tmp6:= Array(1..(max_terms + 1),[]); > array_tmp7:= Array(1..(max_terms + 1),[]); > array_tmp8:= Array(1..(max_terms + 1),[]); > array_tmp9:= Array(1..(max_terms + 1),[]); > array_m1:= Array(1..(max_terms + 1),[]); > array_type_pole:= Array(1..(max_terms + 1),[]); > array_y_init:= Array(1..(max_terms + 1),[]); > array_pole:= Array(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 := Array(1..(2+ 1) ,(1..max_terms+ 1),[]); > array_y_higher_work := Array(1..(2+ 1) ,(1..max_terms+ 1),[]); > array_real_pole := Array(1..(1+ 1) ,(1..3+ 1),[]); > array_poles := Array(1..(1+ 1) ,(1..3+ 1),[]); > array_y_set_initial := Array(1..(2+ 1) ,(1..max_terms+ 1),[]); > 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_norms[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_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_tmp0[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp2[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp3[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp4[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp5[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp6[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp7[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp8[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp9[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_type_pole[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 > ; > term := 1; > while term <= max_terms do # do number 2 > array_pole[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_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[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 > ; > 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 <=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_set_initial[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > #BEGIN ARRAYS DEFINED AND INITIALIZATED > array_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_tmp9 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp9[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp8 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp8[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp7 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp7[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp6 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp6[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp5 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp5[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp4 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp4[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp3 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp3[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp2 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp2[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp1 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp0 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp0[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_m1 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_m1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_const_2D0 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_const_2D0[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_const_2D0[1] := 2.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_const_1D0 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_const_1D0[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_const_1D0[1] := 1.0; > array_m1 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms do # do number 2 > array_m1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_m1[1] := -1.0; > #END ARRAYS DEFINED AND INITIALIZATED > #TOP SECOND INPUT BLOCK > #BEGIN SECOND INPUT BLOCK > #END FIRST INPUT BLOCK > #BEGIN SECOND INPUT BLOCK > x_start := -2.0; > x_end := 1.0; > array_y_init[0 + 1] := exact_soln_y(x_start); > glob_h := 0.1; > glob_look_poles := true; > glob_max_iter := 50; > #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 ) = m1 * 2.0 * x / (x * x + 1.0) /( x * x + 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-13T04:07:44-05:00") > ; > logitem_str(html_log_file,"Maple") > ; > logitem_str(html_log_file,"sing4") > ; > logitem_str(html_log_file,"diff ( y , x , 1 ) = m1 * 2.0 * x / (x * x + 1.0) /( x * x + 1.0);") > ; > logitem_float(html_log_file,x_start) > ; > logitem_float(html_log_file,x_end) > ; > logitem_float(html_log_file,array_x[1]) > ; > logitem_float(html_log_file,glob_h) > ; > logitem_integer(html_log_file,Digits) > ; > ; > logitem_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,"sing4 diffeq.mxt") > ; > logitem_str(html_log_file,"sing4 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 DEBUGMASSIVE, glob_max_terms, DEBUGL, INFO, ALWAYS, glob_iolevel, glob_log10abserr, glob_current_iter, glob_unchanged_h_cnt, glob_optimal_clock_start_sec, glob_no_eqs, glob_max_trunc_err, glob_relerr, glob_html_log, glob_log10normmin, glob_start, glob_max_sec, glob_optimal_start, glob_large_float, glob_disp_incr, glob_not_yet_start_msg, glob_almost_1, sec_in_min, glob_subiter_method, glob_max_minutes, glob_log10relerr, MAX_UNCHANGED, glob_log10_abserr, glob_dump_analytic, glob_h, glob_clock_start_sec, glob_normmax, glob_iter, glob_warned2, glob_abserr, glob_look_poles, glob_hmin, hours_in_day, djd_debug2, glob_hmin_init, glob_optimal_done, glob_clock_sec, glob_dump, glob_optimal_expect_sec, glob_curr_iter_when_opt, glob_hmax, glob_initial_pass, days_in_year, djd_debug, glob_max_opt_iter, glob_warned, glob_max_hours, centuries_in_millinium, glob_display_flag, glob_orig_start_sec, glob_smallish_float, glob_reached_optimal_h, min_in_hour, glob_small_float, glob_last_good_h, glob_not_yet_finished, years_in_century, glob_log10_relerr, glob_percent_done, glob_max_rel_trunc_err, glob_max_iter, array_const_2D0, array_const_1, array_const_0D0, array_const_1D0, array_1st_rel_error, array_norms, array_y, array_x, array_last_rel_error, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_tmp6, array_tmp7, array_tmp8, array_tmp9, array_m1, array_type_pole, array_y_init, array_pole, array_complex_pole, array_y_higher_work2, array_y_higher, array_y_higher_work, array_real_pole, array_poles, array_y_set_initial, glob_last; glob_last; ALWAYS := 1; INFO := 2; DEBUGL := 3; DEBUGMASSIVE := 4; glob_iolevel := INFO; DEBUGMASSIVE := 4; glob_max_terms := 30; DEBUGL := 3; INFO := 2; ALWAYS := 1; glob_iolevel := 5; glob_log10abserr := 0.; glob_current_iter := 0; glob_unchanged_h_cnt := 0; glob_optimal_clock_start_sec := 0.; glob_no_eqs := 0; glob_max_trunc_err := 0.1*10^(-10); glob_relerr := 0.1*10^(-10); glob_html_log := true; glob_log10normmin := 0.1; glob_start := 0; glob_max_sec := 10000.0; glob_optimal_start := 0.; glob_large_float := 0.90*10^101; glob_disp_incr := 0.1; glob_not_yet_start_msg := true; glob_almost_1 := 0.9990; sec_in_min := 60.0; glob_subiter_method := 3; glob_max_minutes := 0.; glob_log10relerr := 0.; MAX_UNCHANGED := 10; glob_log10_abserr := 0.1*10^(-10); glob_dump_analytic := false; glob_h := 0.1; glob_clock_start_sec := 0.; glob_normmax := 0.; glob_iter := 0; glob_warned2 := false; glob_abserr := 0.1*10^(-10); glob_look_poles := false; glob_hmin := 0.1*10^(-10); hours_in_day := 24.0; djd_debug2 := true; glob_hmin_init := 0.001; glob_optimal_done := false; glob_clock_sec := 0.; glob_dump := false; glob_optimal_expect_sec := 0.1; glob_curr_iter_when_opt := 0; glob_hmax := 1.0; glob_initial_pass := true; days_in_year := 365.0; djd_debug := true; glob_max_opt_iter := 10; glob_warned := false; glob_max_hours := 0.; centuries_in_millinium := 10.0; glob_display_flag := true; glob_orig_start_sec := 0.; glob_smallish_float := 0.1*10^(-100); glob_reached_optimal_h := false; min_in_hour := 60.0; glob_small_float := 0.1*10^(-50); glob_last_good_h := 0.1; glob_not_yet_finished := true; years_in_century := 100.0; glob_log10_relerr := 0.1*10^(-10); glob_percent_done := 0.; glob_max_rel_trunc_err := 0.1*10^(-10); glob_max_iter := 1000; 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/sing4postode.ode#################"); omniout_str(ALWAYS, "diff ( y , x , 1 ) = m1 * 2.0 * x / (x * x + 1.\ 0) /( x * x + 1.0);"); omniout_str(ALWAYS, "!"); omniout_str(ALWAYS, "#BEGIN FIRST INPUT BLOCK"); omniout_str(ALWAYS, "Digits := 50;"); 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 := -2.0;"); omniout_str(ALWAYS, "x_end := 1.0;"); omniout_str(ALWAYS, "array_y_init[0 + 1] := exact_soln_y(x_start);"); omniout_str(ALWAYS, "glob_h := 0.1;"); omniout_str(ALWAYS, "glob_look_poles := true;"); omniout_str(ALWAYS, "glob_max_iter := 50;"); 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 / (x * x + 1.0);"); omniout_str(ALWAYS, "end;"); omniout_str(ALWAYS, ""); omniout_str(ALWAYS, ""); omniout_str(ALWAYS, "#END USER DEF BLOCK"); omniout_str(ALWAYS, "#######END OF ECHO OF PROBLEM#################"); glob_unchanged_h_cnt := 0; glob_warned := false; glob_warned2 := false; glob_small_float := 0.10*10^(-199); glob_smallish_float := 0.10*10^(-63); glob_large_float := 0.10*10^101; glob_almost_1 := 0.99; glob_log10_abserr := -8.0; glob_log10_relerr := -8.0; glob_hmax := 0.01; Digits := 50; max_terms := 30; glob_max_terms := max_terms; glob_html_log := true; array_1st_rel_error := Array(1 .. max_terms + 1, []); array_norms := Array(1 .. max_terms + 1, []); array_y := Array(1 .. max_terms + 1, []); array_x := Array(1 .. max_terms + 1, []); array_last_rel_error := 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_tmp3 := Array(1 .. max_terms + 1, []); array_tmp4 := Array(1 .. max_terms + 1, []); array_tmp5 := Array(1 .. max_terms + 1, []); array_tmp6 := Array(1 .. max_terms + 1, []); array_tmp7 := Array(1 .. max_terms + 1, []); array_tmp8 := Array(1 .. max_terms + 1, []); array_tmp9 := Array(1 .. max_terms + 1, []); array_m1 := Array(1 .. max_terms + 1, []); array_type_pole := Array(1 .. max_terms + 1, []); array_y_init := Array(1 .. max_terms + 1, []); array_pole := Array(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 := Array(1 .. 3, 1 .. max_terms + 1, []); array_y_higher_work := Array(1 .. 3, 1 .. max_terms + 1, []); array_real_pole := Array(1 .. 2, 1 .. 4, []); array_poles := Array(1 .. 2, 1 .. 4, []); array_y_set_initial := Array(1 .. 3, 1 .. max_terms + 1, []); 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_norms[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_last_rel_error[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp0[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp1[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp2[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp3[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp4[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp5[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp6[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp7[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp8[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp9[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_type_pole[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_y_init[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_pole[term] := 0.; term := term + 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[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 2 do term := 1; while term <= max_terms do array_y_higher_work[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 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 <= 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_set_initial[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_tmp9 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp9[term] := 0.; term := term + 1 end do; array_tmp8 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp8[term] := 0.; term := term + 1 end do; array_tmp7 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp7[term] := 0.; term := term + 1 end do; array_tmp6 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp6[term] := 0.; term := term + 1 end do; array_tmp5 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp5[term] := 0.; term := term + 1 end do; array_tmp4 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp4[term] := 0.; term := term + 1 end do; array_tmp3 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp3[term] := 0.; term := term + 1 end do; array_tmp2 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp2[term] := 0.; term := term + 1 end do; array_tmp1 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp1[term] := 0.; term := term + 1 end do; array_tmp0 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp0[term] := 0.; term := term + 1 end do; array_m1 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_m1[term] := 0.; term := term + 1 end do; array_const_2D0 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_const_2D0[term] := 0.; term := term + 1 end do; array_const_2D0[1] := 2.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_const_1D0 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_const_1D0[term] := 0.; term := term + 1 end do; array_const_1D0[1] := 1.0; array_m1 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms do array_m1[term] := 0.; term := term + 1 end do; array_m1[1] := -1.0; x_start := -2.0; x_end := 1.0; array_y_init[1] := exact_soln_y(x_start); glob_h := 0.1; glob_look_poles := true; glob_max_iter := 50; 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 ) = m1 * 2.0 * x / (x * x + 1.0)\ /( x * x + 1.0);"); omniout_int(INFO, "Iterations ", 32, glob_iter, 4, " "); prog_report(x_start, x_end); if glob_html_log then logstart(html_log_file); logitem_str(html_log_file, "2012-06-13T04:07:44-05:00"); logitem_str(html_log_file, "Maple"); logitem_str(html_log_file, "sing4"); logitem_str(html_log_file, "diff ( y , x , 1 ) = m1 * 2.0 * x / (\ x * x + 1.0) /( x * x + 1.0);"); logitem_float(html_log_file, x_start); logitem_float(html_log_file, x_end); logitem_float(html_log_file, array_x[1]); logitem_float(html_log_file, glob_h); logitem_integer(html_log_file, Digits); logitem_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, "sing4 diffeq.mxt"); logitem_str(html_log_file, "sing4 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/sing4postode.ode################# diff ( y , x , 1 ) = m1 * 2.0 * x / (x * x + 1.0) /( x * x + 1.0); ! #BEGIN FIRST INPUT BLOCK Digits := 50; max_terms := 30; ! #END FIRST INPUT BLOCK #BEGIN SECOND INPUT BLOCK x_start := -2.0; x_end := 1.0; array_y_init[0 + 1] := exact_soln_y(x_start); glob_h := 0.1; glob_look_poles := true; glob_max_iter := 50; #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 / (x * x + 1.0); end; #END USER DEF BLOCK #######END OF ECHO OF PROBLEM################# START of Soultion x[1] = -2 y[1] (analytic) = 0.2 y[1] (numeric) = 0.2 absolute error = 0 relative error = 0 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.259 Order of pole = 3.572 x[1] = -1.9999 y[1] (analytic) = 0.20001600088003840131202815962871 y[1] (numeric) = 0.20001600088003840131202814663258 absolute error = 1.299612915477496758365330e-26 relative error = 6.4975447452174219478982714516533e-24 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.259 Order of pole = 3.572 x[1] = -1.9998 y[1] (analytic) = 0.20003200352030722099290109623219 y[1] (numeric) = 0.20003200352030722099290107021885 absolute error = 2.601334060465285245783901e-26 relative error = 1.3004589339131416419334287710556e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.259 Order of pole = 3.572 x[1] = -1.9997 y[1] (analytic) = 0.20004800792103690627884260920704 y[1] (numeric) = 0.2000480079210369062788425701554 absolute error = 3.905164638857162913662054e-26 relative error = 1.9521137348184003469958537764785e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.259 Order of pole = 3.571 x[1] = -1.9996 y[1] (analytic) = 0.20006401408245793590083431815511 y[1] (numeric) = 0.20006401408245793590083426604405 absolute error = 5.211105855110177982476668e-26 relative error = 2.6047192339959650445239854527467e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.259 Order of pole = 3.571 x[1] = -1.9995 y[1] (analytic) = 0.2000800220048008200879941932776 y[1] (numeric) = 0.20008002200480082008799412808601 absolute error = 6.519158914244863325265478e-26 relative error = 3.2582757883185555460892690360370e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.259 Order of pole = 3.571 x[1] = -1.9994 y[1] (analytic) = 0.20009603168829610057095481720351 y[1] (numeric) = 0.20009603168829610057095473891026 absolute error = 7.829325021845470432994178e-26 relative error = 3.9127837547731930900301059850704e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.258 Order of pole = 3.571 x[1] = -1.9993 y[1] (analytic) = 0.20011204313317435058524137781792 y[1] (numeric) = 0.20011204313317435058524128640187 absolute error = 9.141605384060203461817128e-26 relative error = 4.5682434904612286928892248331993e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.258 Order of pole = 3.571 x[1] = -1.9992 y[1] (analytic) = 0.20012805633966617487464939165554 y[1] (numeric) = 0.20012805633966617487464928709553 absolute error = 1.0456001207601453362248512e-25 relative error = 5.2246553525983715025413516600648e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.258 Order of pole = 3.571 x[1] = -1.9991 y[1] (analytic) = 0.20014407130800220969462215742456 y[1] (numeric) = 0.20014407130800220969462203969942 absolute error = 1.1772513699746032090260748e-25 relative error = 5.8820196985147171530064794418406e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.258 Order of pole = 3.571 x[1] = -1.999 y[1] (analytic) = 0.20016008803841312281562793922579 y[1] (numeric) = 0.20016008803841312281562780831435 absolute error = 1.3091144068335406900326967e-25 relative error = 6.5403368856547761209440427458967e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.258 Order of pole = 3.571 memory used=3.8MB, alloc=3.1MB, time=0.51 x[1] = -1.9989 y[1] (analytic) = 0.20017610653112961352653687903162 y[1] (numeric) = 0.20017610653112961352653673491269 absolute error = 1.4411893521775934720424370e-25 relative error = 7.1996072715775020838232994485488e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.258 Order of pole = 3.571 x[1] = -1.9988 y[1] (analytic) = 0.20019212678638241263799763798915 y[1] (numeric) = 0.20019212678638241263799748064152 absolute error = 1.5734763269039096609015244e-25 relative error = 7.8598312139563202797652063810751e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.258 Order of pole = 3.571 x[1] = -1.9987 y[1] (analytic) = 0.2002081488044022824858137661117 y[1] (numeric) = 0.20020814880440228248581359551416 absolute error = 1.7059754519661732294022435e-25 relative error = 8.5210090705791558690510835235915e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.258 Order of pole = 3.571 x[1] = -1.9986 y[1] (analytic) = 0.20022417258542001693431979992255 y[1] (numeric) = 0.20022417258542001693431961605387 absolute error = 1.8386868483746274793816051e-25 relative error = 9.1831411993484622972933480993860e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.258 Order of pole = 3.571 x[1] = -1.9985 y[1] (analytic) = 0.20024019812966644137975708761445 y[1] (numeric) = 0.20024019812966644137975689045338 absolute error = 1.9716106371960985120228160e-25 relative error = 9.8462279582812496602635951553360e-23 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.258 Order of pole = 3.571 x[1] = -1.9984 y[1] (analytic) = 0.20025622543737241275364934128839 y[1] (numeric) = 0.20025622543737241275364913081369 absolute error = 2.1047469395540187063612257e-25 relative error = 1.0510269705509113070373304940258e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.258 Order of pole = 3.571 x[1] = -1.9983 y[1] (analytic) = 0.2002722545087688195261779158347 y[1] (numeric) = 0.20027225450876881952617769202511 absolute error = 2.2380958766284502059964243e-25 relative error = 1.1175266799278261024802441144426e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.257 Order of pole = 3.571 x[1] = -1.9982 y[1] (analytic) = 0.20028828534408658170955681401937 y[1] (numeric) = 0.20028828534408658170955657685362 absolute error = 2.3716575696561084140121657e-25 relative error = 1.1841219597949543775271202306377e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.257 Order of pole = 3.571 x[1] = -1.9981 y[1] (analytic) = 0.2003043179435566508614074173382 y[1] (numeric) = 0.20030431794355665086140716679498 absolute error = 2.5054321399303854961057924e-25 relative error = 1.2508128459998481699450198919671e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.257 Order of pole = 3.571 x[1] = -1.998 y[1] (analytic) = 0.20032035230741001008813294220117 y[1] (numeric) = 0.2003203523074100100881326782592 absolute error = 2.6394197088013738919288308e-25 relative error = 1.3175993744015293674004291068923e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.257 Order of pole = 3.571 x[1] = -1.9979 y[1] (analytic) = 0.2003363884358776740482926210092 y[1] (numeric) = 0.20033638843587767404829234364716 absolute error = 2.7736203976758898346404324e-25 relative error = 1.3844815808704925449265353132147e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.257 Order of pole = 3.571 x[1] = -1.9978 y[1] (analytic) = 0.20035242632919068895597560768514 y[1] (numeric) = 0.2003524263291906889559753168817 absolute error = 2.9080343280174968786753309e-25 relative error = 1.4514595012887078025529204376682e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.257 Order of pole = 3.571 x[1] = -1.9977 y[1] (analytic) = 0.20036846598758013258417460722055 y[1] (numeric) = 0.20036846598758013258417430295439 absolute error = 3.0426616213465294357279853e-25 relative error = 1.5185331715496236030971944036282e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.257 Order of pole = 3.571 x[1] = -1.9976 y[1] (analytic) = 0.20038450741127711426815922879986 y[1] (numeric) = 0.20038450741127711426815891104962 absolute error = 3.1775023992401163189545786e-25 relative error = 1.5857026275581696101180926223813e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.257 Order of pole = 3.571 x[1] = -1.9975 y[1] (analytic) = 0.2004005506005127749088490620628 y[1] (numeric) = 0.20040055060051277490884873080712 absolute error = 3.3125567833322042953945420e-25 relative error = 1.6529679052307595260295610795888e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.257 Order of pole = 3.571 x[1] = -1.9974 y[1] (analytic) = 0.2004165955555182869761864760661 y[1] (numeric) = 0.20041659555551828697618613128361 absolute error = 3.4478248953135816466132707e-25 relative error = 1.7203290404952939303753506590430e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.257 Order of pole = 3.571 x[1] = -1.9973 y[1] (analytic) = 0.20043264227652485451250914050516 y[1] (numeric) = 0.20043264227652485451250878217448 absolute error = 3.5833068569319017375676998e-25 relative error = 1.7877860692911631182636434710692e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.257 Order of pole = 3.571 memory used=7.6MB, alloc=4.1MB, time=1.17 x[1] = -1.9972 y[1] (analytic) = 0.2004486907637637131359222687559 y[1] (numeric) = 0.20044869076376371313592189685562 absolute error = 3.7190027899917065936964062e-25 relative error = 1.8553390275692499389612325830385e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.256 Order of pole = 3.57 x[1] = -1.9971 y[1] (analytic) = 0.20046474101746613004367058229701 y[1] (numeric) = 0.20046474101746613004367019680573 absolute error = 3.8549128163544504862359010e-25 relative error = 1.9229879512919326346467757792327e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.256 Order of pole = 3.57 x[1] = -1.997 y[1] (analytic) = 0.20048079303786340401550999607258 y[1] (numeric) = 0.20048079303786340401550959696888 absolute error = 3.9910370579385235257647786e-25 relative error = 1.9907328764330876793226447539807e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.256 Order of pole = 3.57 x[1] = -1.9969 y[1] (analytic) = 0.20049684682518686541707902435451 y[1] (numeric) = 0.20049684682518686541707861161695 absolute error = 4.1273756367192752639773846e-25 relative error = 2.0585738389780926178848890253626e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.256 Order of pole = 3.57 x[1] = -1.9968 y[1] (analytic) = 0.20051290237966787620326990666429 y[1] (numeric) = 0.20051290237966787620326948027142 absolute error = 4.2639286747290383036886665e-25 relative error = 2.1265108749238289053508347340745e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.256 Order of pole = 3.57 x[1] = -1.9967 y[1] (analytic) = 0.20052895970153782992159945331314 y[1] (numeric) = 0.20052895970153782992159901324351 absolute error = 4.4006962940571519170718688e-25 relative error = 2.1945440202786847462438372244491e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.256 Order of pole = 3.57 x[1] = -1.9966 y[1] (analytic) = 0.20054501879102815171557961011947 y[1] (numeric) = 0.2005450187910281517155791563516 absolute error = 4.5376786168499856721307336e-25 relative error = 2.2626733110625579341347059854320e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.256 Order of pole = 3.57 x[1] = -1.9965 y[1] (analytic) = 0.20056107964837029832808774186225 y[1] (numeric) = 0.20056107964837029832808727437467 absolute error = 4.6748757653109630674078668e-25 relative error = 2.3308987833068586913393199611168e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.256 Order of pole = 3.57 x[1] = -1.9964 y[1] (analytic) = 0.20057714227379575810473663402865 y[1] (numeric) = 0.20057714227379575810473615279986 absolute error = 4.8122878617005851749309308e-25 relative error = 2.3992204730545125087719515701343e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.256 Order of pole = 3.57 x[1] = -1.9963 y[1] (analytic) = 0.20059320666753605099724421241409 y[1] (numeric) = 0.20059320666753605099724371742259 absolute error = 4.9499150283364542913983202e-25 relative error = 2.4676384163599629859538155104044e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.256 Order of pole = 3.57 x[1] = -1.9962 y[1] (analytic) = 0.2006092728298227285668029801326 y[1] (numeric) = 0.20060927282982272856680247135686 absolute error = 5.0877573875932975976059803e-25 relative error = 2.5361526492891746711763600029796e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.255 Order of pole = 3.57 x[1] = -1.9961 y[1] (analytic) = 0.200625340760887373987449171595 y[1] (numeric) = 0.20062534076088737398744864901349 absolute error = 5.2258150619029908261170229e-25 relative error = 2.6047632079196359018188154182678e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.255 Order of pole = 3.57 x[1] = -1.996 y[1] (analytic) = 0.20064141046096160204943162301245 y[1] (numeric) = 0.20064141046096160204943108660363 absolute error = 5.3640881737545819371757995e-25 relative error = 2.6734701283403616448195179520792e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.255 Order of pole = 3.57 x[1] = -1.9959 y[1] (analytic) = 0.2006574819302770591625803589823 y[1] (numeric) = 0.20065748193027705916257980872461 absolute error = 5.5025768456943148028680822e-25 relative error = 2.7422734466518963373005210664382e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.255 Order of pole = 3.57 x[1] = -1.9958 y[1] (analytic) = 0.20067355516906542335967489471321 y[1] (numeric) = 0.20067355516906542335967433058509 absolute error = 5.6412812003256528995290107e-25 relative error = 2.8111731989663167273450113811989e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.255 Order of pole = 3.57 x[1] = -1.9957 y[1] (analytic) = 0.20068963017755840429981225344614 y[1] (numeric) = 0.20068963017755840429981167542601 absolute error = 5.7802013603093030084004566e-25 relative error = 2.8801694214072347149270420470923e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.255 Order of pole = 3.57 x[1] = -1.9956 y[1] (analytic) = 0.20070570695598774327177469862754 y[1] (numeric) = 0.20070570695598774327177410669379 absolute error = 5.9193374483632389245394584e-25 relative error = 2.9492621501098001929930976616075e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.255 Order of pole = 3.57 x[1] = -1.9955 y[1] (analytic) = 0.20072178550458521319739718039083 y[1] (numeric) = 0.20072178550458521319739657452187 absolute error = 6.0586895872627251739793795e-25 relative error = 3.0184514212207038886950041751435e-22 % h = 0.0001 TOP MAIN SOLVE Loop memory used=11.4MB, alloc=4.3MB, time=1.83 Complex estimate of poles used Radius of convergence = 2.255 Order of pole = 3.57 x[1] = -1.9954 y[1] (analytic) = 0.20073786582358261863493449590213 y[1] (numeric) = 0.20073786582358261863493387607634 absolute error = 6.1982578998403407391454390e-25 relative error = 3.0877372708981802047736959239889e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.255 Order of pole = 3.57 x[1] = -1.9953 y[1] (analytic) = 0.20075394791321179578242816312573 y[1] (numeric) = 0.20075394791321179578242752932148 absolute error = 6.3380425089860027925262664e-25 relative error = 3.1571197353120100610933525096905e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.255 Order of pole = 3.57 x[1] = -1.9952 y[1] (analytic) = 0.20077003177370461248107300756463 y[1] (numeric) = 0.20077003177370461248107235976028 absolute error = 6.4780435376469904386031284e-25 relative error = 3.2265988506435237363254167350798e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.255 Order of pole = 3.57 x[1] = -1.9951 y[1] (analytic) = 0.20078611740529296821858346153142 y[1] (numeric) = 0.20078611740529296821858279970531 absolute error = 6.6182611088279684640384774e-25 relative error = 3.2961746530856037097820054406802e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.254 Order of pole = 3.57 x[1] = -1.995 y[1] (analytic) = 0.20080220480820879413255957550414 y[1] (numeric) = 0.2008022048082087941325588996346 absolute error = 6.7586953455910110961254681e-25 relative error = 3.3658471788426875033982234274702e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.254 Order of pole = 3.57 x[1] = -1.9949 y[1] (analytic) = 0.20081829398268405301385274112182 y[1] (numeric) = 0.20081829398268405301385205118718 absolute error = 6.8993463710556257695000887e-25 relative error = 3.4356164641307705238628906387827e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.254 Order of pole = 3.57 x[1] = -1.9948 y[1] (analytic) = 0.20083438492895073930993112537403 y[1] (numeric) = 0.2008343849289507393099304213526 absolute error = 7.0402143083987769011175536e-25 relative error = 3.5054825451774089048971929103769e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.254 Order of pole = 3.569 x[1] = -1.9947 y[1] (analytic) = 0.20085047764724087912824481553851 y[1] (numeric) = 0.20085047764724087912824409740858 absolute error = 7.1812992808549096734946010e-25 relative error = 3.5754454582217223496807647922142e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.254 Order of pole = 3.569 x[1] = -1.9946 y[1] (analytic) = 0.20086657213778653023959067442068 y[1] (numeric) = 0.20086657213778653023958994216054 absolute error = 7.3226014117159738262193405e-25 relative error = 3.6455052395143969734247137301169e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.254 Order of pole = 3.569 x[1] = -1.9945 y[1] (analytic) = 0.2008826684008197820814769054487 y[1] (numeric) = 0.20088266840081978208147615903661 absolute error = 7.4641208243314474557302929e-25 relative error = 3.7156619253176881460910933897560e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.254 Order of pole = 3.569 x[1] = -1.9944 y[1] (analytic) = 0.20089876643657275576148732717724 y[1] (numeric) = 0.20089876643657275576148656659147 absolute error = 7.6058576421083608233662651e-25 relative error = 3.7859155519054233352583341927834e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.254 Order of pole = 3.569 x[1] = -1.9943 y[1] (analytic) = 0.20091486624527760406064535675327 y[1] (numeric) = 0.20091486624527760406064458197207 absolute error = 7.7478119885113201716887009e-25 relative error = 3.8562661555630049491321380285372e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.254 Order of pole = 3.569 x[1] = -1.9942 y[1] (analytic) = 0.20093096782716651143677770189642 y[1] (numeric) = 0.20093096782716651143677691289802 absolute error = 7.8899839870625315490781486e-25 relative error = 3.9267137725874131797013440941399e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.254 Order of pole = 3.569 x[1] = -1.9941 y[1] (analytic) = 0.2009470711824716940278777609467 y[1] (numeric) = 0.20094707118247169402787695770932 absolute error = 8.0323737613418246426064842e-25 relative error = 3.9972584392872088460382717104595e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.254 Order of pole = 3.569 x[1] = -1.994 y[1] (analytic) = 0.20096317631142539965546873053169 y[1] (numeric) = 0.20096317631142539965546791303355 absolute error = 8.1749814349866766191865303e-25 relative error = 4.0679001919825362377430465487891e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.253 Order of pole = 3.569 x[1] = -1.9939 y[1] (analytic) = 0.20097928321425990782796642040548 y[1] (numeric) = 0.20097928321425990782796558862476 absolute error = 8.3178071316922359750007062e-25 relative error = 4.1386390670051259585314143544998e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.253 Order of pole = 3.569 x[1] = -1.9938 y[1] (analytic) = 0.20099539189120752974404177501089 y[1] (numeric) = 0.20099539189120752974404092892579 absolute error = 8.4608509752113463932103491e-25 relative error = 4.2094751006982977699655483848139e-22 % h = 0.0001 TOP MAIN SOLVE Loop memory used=15.2MB, alloc=4.3MB, time=2.51 Complex estimate of poles used Radius of convergence = 2.253 Order of pole = 3.569 x[1] = -1.9937 y[1] (analytic) = 0.20101150234250060829598310131678 y[1] (numeric) = 0.20101150234250060829598224090547 absolute error = 8.6041130893545706099473389e-25 relative error = 4.2804083294169634353273530369601e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.253 Order of pole = 3.569 x[1] = -1.9936 y[1] (analytic) = 0.20102761456837151807305800248155 y[1] (numeric) = 0.20102761456837151807305712772219 absolute error = 8.7475935979902142885896652e-25 relative error = 4.3514387895276295636337691203567e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.253 Order of pole = 3.569 x[1] = -1.9935 y[1] (analytic) = 0.20104372856905266536487501689396 y[1] (numeric) = 0.20104372856905266536487412776469 absolute error = 8.8912926250443499023225677e-25 relative error = 4.4225665174084004537935824868285e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.253 Order of pole = 3.569 x[1] = -1.9934 y[1] (analytic) = 0.201059844344776488164744962142 y[1] (numeric) = 0.20105984434477648816474405862097 absolute error = 9.0352102945008406249868860e-25 relative error = 4.4937915494489809389052400638354e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.253 Order of pole = 3.569 x[1] = -1.9933 y[1] (analytic) = 0.20107596189577545617304198346042 y[1] (numeric) = 0.20107596189577545617304106552575 absolute error = 9.1793467304013642302162483e-25 relative error = 4.5651139220506792306951740452946e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.253 Order of pole = 3.569 x[1] = -1.9932 y[1] (analytic) = 0.20109208122228207080056430620706 y[1] (numeric) = 0.20109208122228207080056337383686 absolute error = 9.3237020568454369988647335e-25 relative error = 4.6365336716264097640961374254077e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.253 Order of pole = 3.569 x[1] = -1.9931 y[1] (analytic) = 0.20110820232452886517189469191813 y[1] (numeric) = 0.20110820232452886517189374509049 absolute error = 9.4682763979904376347266356e-25 relative error = 4.7080508346006960419650512192561e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.253 Order of pole = 3.569 x[1] = -1.993 y[1] (analytic) = 0.2011243252027484041287605974921 y[1] (numeric) = 0.20112432520274840412875963618511 absolute error = 9.6130698780516311885499595e-25 relative error = 4.7796654474096734799398637582016e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.253 Order of pole = 3.569 x[1] = -1.9929 y[1] (analytic) = 0.20114044985717328423339403705177 y[1] (numeric) = 0.20114044985717328423339306124351 absolute error = 9.7580826213021929903452794e-25 relative error = 4.8513775465010922514349234370575e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.252 Order of pole = 3.569 x[1] = -1.9928 y[1] (analytic) = 0.20115657628803613377189114603375 y[1] (numeric) = 0.20115657628803613377189015570228 absolute error = 9.9033147520732325899915847e-25 relative error = 4.9231871683343201327743631024391e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.252 Order of pole = 3.569 x[1] = -1.9927 y[1] (analytic) = 0.20117270449556961275757144705431 y[1] (numeric) = 0.20117270449556961275757044217768 absolute error = 1.00487663947538177061407437e-24 relative error = 4.9950943493803453484629969024192e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.252 Order of pole = 3.569 x[1] = -1.9926 y[1] (analytic) = 0.20118883448000641293433681710041 y[1] (numeric) = 0.20118883448000641293433579765665 absolute error = 1.01944376737909981834222080e-24 relative error = 5.0670991261217794165942266843310e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.252 Order of pole = 3.569 x[1] = -1.9925 y[1] (analytic) = 0.20120496624157925778003015559432 y[1] (numeric) = 0.20120496624157925778002912156144 absolute error = 1.03403287136898299579495849e-24 relative error = 5.1392015350528599943944571617151e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.252 Order of pole = 3.569 x[1] = -1.9924 y[1] (analytic) = 0.20122109978052090250979375288008 y[1] (numeric) = 0.20122109978052090250979270423611 absolute error = 1.04864396390133990311307012e-24 relative error = 5.2114016126794537239035170792821e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.252 Order of pole = 3.569 x[1] = -1.9923 y[1] (analytic) = 0.20123723509706413407942735867985 y[1] (numeric) = 0.20123723509706413407942629540279 absolute error = 1.06327705743828454517827819e-24 relative error = 5.2836993955190590777905836018619e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.252 Order of pole = 3.568 x[1] = -1.9922 y[1] (analytic) = 0.2012533721914417711887459500677 y[1] (numeric) = 0.20125337219144177118874487213554 absolute error = 1.07793216444773873065543671e-24 relative error = 5.3560949201008092053051070014174e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.252 Order of pole = 3.568 x[1] = -1.9921 y[1] (analytic) = 0.20126951106388666428493719850846 y[1] (numeric) = 0.20126951106388666428493610589916 absolute error = 1.09260929740343447186555862e-24 relative error = 5.4285882229654747783622305771215e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.252 Order of pole = 3.568 x[1] = -1.992 y[1] (analytic) = 0.20128565171463169556591863550872 y[1] (numeric) = 0.20128565171463169556591752820025 absolute error = 1.10730846878491638548984136e-24 relative error = 5.5011793406654668377622032263270e-22 % h = 0.0001 TOP MAIN SOLVE Loop memory used=19.0MB, alloc=4.3MB, time=3.18 Complex estimate of poles used Radius of convergence = 2.252 Order of pole = 3.568 x[1] = -1.9919 y[1] (analytic) = 0.201301794143909778983694516427 y[1] (numeric) = 0.20130179414390977898369339439731 absolute error = 1.12202969107754409410485219e-24 relative error = 5.5738683097648396395432779583962e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.251 Order of pole = 3.568 x[1] = -1.9918 y[1] (analytic) = 0.20131793835195386024771238198974 y[1] (numeric) = 0.20131793835195386024771124521676 absolute error = 1.13677297677249462854903542e-24 relative error = 5.6466551668392935014675923753656e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.251 Order of pole = 3.568 x[1] = -1.9917 y[1] (analytic) = 0.20133408433899691682821931705952 y[1] (numeric) = 0.20133408433899691682821816552119 absolute error = 1.15153833836676483112070317e-24 relative error = 5.7195399484761776496395244099974e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.251 Order of pole = 3.568 x[1] = -1.9916 y[1] (analytic) = 0.20135023210527195795961790620178 y[1] (numeric) = 0.201350232105271957959616739876 absolute error = 1.16632578836317375960767143e-24 relative error = 5.7925226912744930652560173072481e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.251 Order of pole = 3.568 x[1] = -1.9915 y[1] (analytic) = 0.2013663816510120246438218855958 y[1] (numeric) = 0.20136638165101202464382070446047 absolute error = 1.18113533927036509214870301e-24 relative error = 5.8656034318448953314883668914525e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.251 Order of pole = 3.568 x[1] = -1.9914 y[1] (analytic) = 0.20138253297645018965361149083578 y[1] (numeric) = 0.20138253297645018965361029486877 absolute error = 1.19596700360280953292691878e-24 relative error = 5.9387822068096974804949631688810e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.251 Order of pole = 3.568 x[1] = -1.9913 y[1] (analytic) = 0.20139868608181955753598850016725 y[1] (numeric) = 0.20139868608181955753598728934645 absolute error = 1.21082079388080721869533886e-24 relative error = 6.0120590528028728405644795578703e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.251 Order of pole = 3.568 x[1] = -1.9912 y[1] (analytic) = 0.20141484096735326461553097270413 y[1] (numeric) = 0.20141484096735326461552974700741 absolute error = 1.22569672263049012613471476e-24 relative error = 6.0854340064700578833889997127590e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.251 Order of pole = 3.568 x[1] = -1.9911 y[1] (analytic) = 0.20143099763328447899774768117117 y[1] (numeric) = 0.20143099763328447899774644057637 absolute error = 1.24059480238382448004381400e-24 relative error = 6.1589071044685550714665744921069e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.251 Order of pole = 3.568 x[1] = -1.991 y[1] (analytic) = 0.20144715607984640057243223871649 y[1] (numeric) = 0.20144715607984640057243098320145 absolute error = 1.25551504567861316236231810e-24 relative error = 6.2324783834673357056326983961661e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.251 Order of pole = 3.568 x[1] = -1.9909 y[1] (analytic) = 0.20146331630727226101701691933857 y[1] (numeric) = 0.2014633163072722610170156488811 absolute error = 1.27045746505849812202649514e-24 relative error = 6.3061478801470427727201962909665e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.251 Order of pole = 3.568 x[1] = -1.9908 y[1] (analytic) = 0.2014794783157953237999261714718 y[1] (numeric) = 0.20147947831579532379992488604973 absolute error = 1.28542207307296278565780779e-24 relative error = 6.3799156311999937933470097001793e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.25 Order of pole = 3.568 x[1] = -1.9907 y[1] (analytic) = 0.2014956421056488841839298242745 y[1] (numeric) = 0.20149564210564888418392852386562 absolute error = 1.30040888227733446908461759e-24 relative error = 6.4537816733301836698313713042274e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.25 Order of pole = 3.568 x[1] = -1.9906 y[1] (analytic) = 0.20151180767706626922949598616288 y[1] (numeric) = 0.20151180767706626922949467074497 absolute error = 1.31541790523278678969714642e-24 relative error = 6.5277460432532875342338570344657e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.25 Order of pole = 3.568 x[1] = -1.9905 y[1] (analytic) = 0.20152797503028083779814363513441 y[1] (numeric) = 0.20152797503028083779814230468525 absolute error = 1.33044915450634207963585554e-24 relative error = 6.6018087776966635965258023254425e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.25 Order of pole = 3.568 x[1] = -1.9904 y[1] (analytic) = 0.20154414416552598055579490042365 y[1] (numeric) = 0.20154414416552598055579355492101 absolute error = 1.34550264267087379981340310e-24 relative error = 6.6759699133993559928835716241897e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.25 Order of pole = 3.568 x[1] = -1.9903 y[1] (analytic) = 0.20156031508303511997612703503331 y[1] (numeric) = 0.20156031508303511997612567445493 absolute error = 1.36057838230510895477034031e-24 relative error = 6.7502294871120976341081666872918e-22 % h = 0.0001 TOP MAIN SOLVE Loop memory used=22.8MB, alloc=4.3MB, time=3.86 Complex estimate of poles used Radius of convergence = 2.25 Order of pole = 3.568 x[1] = -1.9902 y[1] (analytic) = 0.20157648778304171034392407868317 y[1] (numeric) = 0.20157648778304171034392270300679 absolute error = 1.37567638599363050836470683e-24 relative error = 6.8245875355973130541696609887080e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.25 Order of pole = 3.568 x[1] = -1.9901 y[1] (analytic) = 0.20159266226577923775842821071911 y[1] (numeric) = 0.20159266226577923775842681992244 absolute error = 1.39079666632687980029568562e-24 relative error = 6.8990440956291212588759459295956e-22 % h = 0.0001 TOP MAIN SOLVE Loop Complex estimate of poles used Radius of convergence = 2.25 Order of pole = 3.568 x[1] = -1.99 y[1] (analytic) = 0.20160883853148122013669079252434 y[1] (numeric) = 0.20160883853148122013668938658511 absolute error = 1.40593923590115896346147734e-24 relative error = 6.9735992039933385746652737541340e-22 % h = 0.0001 Finished! Maximum Iterations Reached before Solution Completed! diff ( y , x , 1 ) = m1 * 2.0 * x / (x * x + 1.0) /( x * x + 1.0); Iterations = 100 Total Elapsed Time = 3 Seconds Elapsed Time(since restart) = 3 Seconds Expected Time Remaining = 19 Minutes 3 Seconds Optimized Time Remaining = 18 Minutes 58 Seconds Time to Timeout = 14 Minutes 56 Seconds Percent Done = 0.3367 % > quit memory used=23.5MB, alloc=4.3MB, time=3.96