|\^/| 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 > > display_alot := proc(iter) > global > DEBUGL, > INFO, > ALWAYS, > glob_max_terms, > glob_iolevel, > DEBUGMASSIVE, #Top Generate Globals Decl > glob_iter, > glob_max_sec, > glob_warned, > glob_hmin_init, > days_in_year, > sec_in_min, > glob_display_flag, > glob_normmax, > glob_last_good_h, > glob_hmin, > glob_not_yet_start_msg, > years_in_century, > glob_max_opt_iter, > glob_max_minutes, > glob_log10abserr, > glob_warned2, > glob_smallish_float, > glob_optimal_start, > glob_max_hours, > glob_h, > MAX_UNCHANGED, > glob_curr_iter_when_opt, > glob_orig_start_sec, > glob_max_rel_trunc_err, > glob_hmax, > glob_unchanged_h_cnt, > glob_no_eqs, > glob_dump_analytic, > glob_large_float, > glob_log10normmin, > glob_optimal_clock_start_sec, > glob_log10relerr, > glob_optimal_done, > glob_clock_start_sec, > glob_almost_1, > centuries_in_millinium, > glob_reached_optimal_h, > min_in_hour, > djd_debug, > glob_max_trunc_err, > glob_max_order, > glob_max_iter, > glob_log10_abserr, > glob_initial_pass, > glob_not_yet_finished, > glob_clock_sec, > djd_debug2, > glob_current_iter, > glob_start, > glob_small_float, > glob_relerr, > glob_abserr, > glob_log10_relerr, > glob_look_poles, > glob_disp_incr, > hours_in_day, > glob_dump, #Bottom Generate Globals Decl #BEGIN CONST > array_const_0D0, > array_const_0, > array_const_1, #END CONST > array_y1_init, > array_m1, > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_y2_init, > array_pole, > array_y1, > array_y2, > array_norms, > array_x, > array_y2_higher_work2, > array_complex_pole, > array_y1_higher, > array_real_pole, > array_y2_higher_work, > array_y2_higher, > array_y1_higher_work2, > array_y1_higher_work, > array_poles, > glob_last; > > local abserr, analytic_val_y, ind_var, numeric_val, relerr, term_no; #TOP DISPLAY ALOT > if (iter >= 0) then > ind_var := array_x[1]; > omniout_float(ALWAYS,"x[1] ",33,ind_var,20," "); > analytic_val_y := exact_soln_y1(ind_var); > omniout_float(ALWAYS,"y1[1] (analytic) ",33,analytic_val_y,20," "); > term_no := 1; > numeric_val := array_y1[term_no]; > abserr := abs(numeric_val - analytic_val_y); > omniout_float(ALWAYS,"y1[1] (numeric) ",33,numeric_val,20," "); > if (abs(analytic_val_y) <> 0.0) then > relerr := abserr*100.0/abs(analytic_val_y); > else > relerr := -1.0 ; > fi;; > omniout_float(ALWAYS,"absolute error ",4,abserr,20," "); > omniout_float(ALWAYS,"relative error ",4,relerr,20,"%"); > omniout_float(ALWAYS,"h ",4,glob_h,20," "); > ; > analytic_val_y := exact_soln_y2(ind_var); > omniout_float(ALWAYS,"y2[1] (analytic) ",33,analytic_val_y,20," "); > term_no := 1; > numeric_val := array_y2[term_no]; > abserr := abs(numeric_val - analytic_val_y); > omniout_float(ALWAYS,"y2[1] (numeric) ",33,numeric_val,20," "); > if (abs(analytic_val_y) <> 0.0) then > relerr := abserr*100.0/abs(analytic_val_y); > else > relerr := -1.0 ; > fi;; > 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; display_alot := proc(iter) local abserr, analytic_val_y, ind_var, numeric_val, relerr, term_no; global DEBUGL, INFO, ALWAYS, glob_max_terms, glob_iolevel, DEBUGMASSIVE, glob_iter, glob_max_sec, glob_warned, glob_hmin_init, days_in_year, sec_in_min, glob_display_flag, glob_normmax, glob_last_good_h, glob_hmin, glob_not_yet_start_msg, years_in_century, glob_max_opt_iter, glob_max_minutes, glob_log10abserr, glob_warned2, glob_smallish_float, glob_optimal_start, glob_max_hours, glob_h, MAX_UNCHANGED, glob_curr_iter_when_opt, glob_orig_start_sec, glob_max_rel_trunc_err, glob_hmax, glob_unchanged_h_cnt, glob_no_eqs, glob_dump_analytic, glob_large_float, glob_log10normmin, glob_optimal_clock_start_sec, glob_log10relerr, glob_optimal_done, glob_clock_start_sec, glob_almost_1, centuries_in_millinium, glob_reached_optimal_h, min_in_hour, djd_debug, glob_max_trunc_err, glob_max_order, glob_max_iter, glob_log10_abserr, glob_initial_pass, glob_not_yet_finished, glob_clock_sec, djd_debug2, glob_current_iter, glob_start, glob_small_float, glob_relerr, glob_abserr, glob_log10_relerr, glob_look_poles, glob_disp_incr, hours_in_day, glob_dump, array_const_0D0, array_const_0, array_const_1, array_y1_init, array_m1, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_y2_init, array_pole, array_y1, array_y2, array_norms, array_x, array_y2_higher_work2, array_complex_pole, array_y1_higher, array_real_pole, array_y2_higher_work, array_y2_higher, array_y1_higher_work2, array_y1_higher_work, array_poles, 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_y1(ind_var); omniout_float(ALWAYS, "y1[1] (analytic) ", 33, analytic_val_y, 20, " "); term_no := 1; numeric_val := array_y1[term_no]; abserr := abs(numeric_val - analytic_val_y); omniout_float(ALWAYS, "y1[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; omniout_float(ALWAYS, "absolute error ", 4, abserr, 20, " "); omniout_float(ALWAYS, "relative error ", 4, relerr, 20, "%"); omniout_float(ALWAYS, "h ", 4, glob_h, 20, " "); analytic_val_y := exact_soln_y2(ind_var); omniout_float(ALWAYS, "y2[1] (analytic) ", 33, analytic_val_y, 20, " "); term_no := 1; numeric_val := array_y2[term_no]; abserr := abs(numeric_val - analytic_val_y); omniout_float(ALWAYS, "y2[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; 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 > adjust_for_pole := proc(h_param) > global > DEBUGL, > INFO, > ALWAYS, > glob_max_terms, > glob_iolevel, > DEBUGMASSIVE, #Top Generate Globals Decl > glob_iter, > glob_max_sec, > glob_warned, > glob_hmin_init, > days_in_year, > sec_in_min, > glob_display_flag, > glob_normmax, > glob_last_good_h, > glob_hmin, > glob_not_yet_start_msg, > years_in_century, > glob_max_opt_iter, > glob_max_minutes, > glob_log10abserr, > glob_warned2, > glob_smallish_float, > glob_optimal_start, > glob_max_hours, > glob_h, > MAX_UNCHANGED, > glob_curr_iter_when_opt, > glob_orig_start_sec, > glob_max_rel_trunc_err, > glob_hmax, > glob_unchanged_h_cnt, > glob_no_eqs, > glob_dump_analytic, > glob_large_float, > glob_log10normmin, > glob_optimal_clock_start_sec, > glob_log10relerr, > glob_optimal_done, > glob_clock_start_sec, > glob_almost_1, > centuries_in_millinium, > glob_reached_optimal_h, > min_in_hour, > djd_debug, > glob_max_trunc_err, > glob_max_order, > glob_max_iter, > glob_log10_abserr, > glob_initial_pass, > glob_not_yet_finished, > glob_clock_sec, > djd_debug2, > glob_current_iter, > glob_start, > glob_small_float, > glob_relerr, > glob_abserr, > glob_log10_relerr, > glob_look_poles, > glob_disp_incr, > hours_in_day, > glob_dump, #Bottom Generate Globals Decl #BEGIN CONST > array_const_0D0, > array_const_0, > array_const_1, #END CONST > array_y1_init, > array_m1, > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_y2_init, > array_pole, > array_y1, > array_y2, > array_norms, > array_x, > array_y2_higher_work2, > array_complex_pole, > array_y1_higher, > array_real_pole, > array_y2_higher_work, > array_y2_higher, > array_y1_higher_work2, > array_y1_higher_work, > array_poles, > glob_last; > > local hnew, sz2, tmp; #TOP ADJUST FOR POLE > > hnew := h_param; > glob_normmax := glob_small_float; > if (abs(array_y1_higher[1,1]) > glob_small_float) then > tmp := abs(array_y1_higher[1,1]); > if (tmp < glob_normmax) then > glob_normmax := tmp; > fi; > fi;; > if (abs(array_y2_higher[1,1]) > glob_small_float) then > tmp := abs(array_y2_higher[1,1]); > if (tmp < glob_normmax) then > glob_normmax := tmp; > fi; > fi;; > if (glob_look_poles and (abs(array_pole[1]) > glob_small_float) 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); > fi; > fi;; > 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]; > fi;; > hnew := sz2; > #END block #BOTTOM ADJUST FOR POLE > end; adjust_for_pole := proc(h_param) local hnew, sz2, tmp; global DEBUGL, INFO, ALWAYS, glob_max_terms, glob_iolevel, DEBUGMASSIVE, glob_iter, glob_max_sec, glob_warned, glob_hmin_init, days_in_year, sec_in_min, glob_display_flag, glob_normmax, glob_last_good_h, glob_hmin, glob_not_yet_start_msg, years_in_century, glob_max_opt_iter, glob_max_minutes, glob_log10abserr, glob_warned2, glob_smallish_float, glob_optimal_start, glob_max_hours, glob_h, MAX_UNCHANGED, glob_curr_iter_when_opt, glob_orig_start_sec, glob_max_rel_trunc_err, glob_hmax, glob_unchanged_h_cnt, glob_no_eqs, glob_dump_analytic, glob_large_float, glob_log10normmin, glob_optimal_clock_start_sec, glob_log10relerr, glob_optimal_done, glob_clock_start_sec, glob_almost_1, centuries_in_millinium, glob_reached_optimal_h, min_in_hour, djd_debug, glob_max_trunc_err, glob_max_order, glob_max_iter, glob_log10_abserr, glob_initial_pass, glob_not_yet_finished, glob_clock_sec, djd_debug2, glob_current_iter, glob_start, glob_small_float, glob_relerr, glob_abserr, glob_log10_relerr, glob_look_poles, glob_disp_incr, hours_in_day, glob_dump, array_const_0D0, array_const_0, array_const_1, array_y1_init, array_m1, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_y2_init, array_pole, array_y1, array_y2, array_norms, array_x, array_y2_higher_work2, array_complex_pole, array_y1_higher, array_real_pole, array_y2_higher_work, array_y2_higher, array_y1_higher_work2, array_y1_higher_work, array_poles, glob_last; hnew := h_param; glob_normmax := glob_small_float; if glob_small_float < abs(array_y1_higher[1, 1]) then tmp := abs(array_y1_higher[1, 1]); if tmp < glob_normmax then glob_normmax := tmp end if end if; if glob_small_float < abs(array_y2_higher[1, 1]) then tmp := abs(array_y2_higher[1, 1]); if tmp < glob_normmax then glob_normmax := tmp end if end if; if glob_look_poles and glob_small_float < 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 > prog_report := proc(x_start,x_end) > global > DEBUGL, > INFO, > ALWAYS, > glob_max_terms, > glob_iolevel, > DEBUGMASSIVE, #Top Generate Globals Decl > glob_iter, > glob_max_sec, > glob_warned, > glob_hmin_init, > days_in_year, > sec_in_min, > glob_display_flag, > glob_normmax, > glob_last_good_h, > glob_hmin, > glob_not_yet_start_msg, > years_in_century, > glob_max_opt_iter, > glob_max_minutes, > glob_log10abserr, > glob_warned2, > glob_smallish_float, > glob_optimal_start, > glob_max_hours, > glob_h, > MAX_UNCHANGED, > glob_curr_iter_when_opt, > glob_orig_start_sec, > glob_max_rel_trunc_err, > glob_hmax, > glob_unchanged_h_cnt, > glob_no_eqs, > glob_dump_analytic, > glob_large_float, > glob_log10normmin, > glob_optimal_clock_start_sec, > glob_log10relerr, > glob_optimal_done, > glob_clock_start_sec, > glob_almost_1, > centuries_in_millinium, > glob_reached_optimal_h, > min_in_hour, > djd_debug, > glob_max_trunc_err, > glob_max_order, > glob_max_iter, > glob_log10_abserr, > glob_initial_pass, > glob_not_yet_finished, > glob_clock_sec, > djd_debug2, > glob_current_iter, > glob_start, > glob_small_float, > glob_relerr, > glob_abserr, > glob_log10_relerr, > glob_look_poles, > glob_disp_incr, > hours_in_day, > glob_dump, #Bottom Generate Globals Decl #BEGIN CONST > array_const_0D0, > array_const_0, > array_const_1, #END CONST > array_y1_init, > array_m1, > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_y2_init, > array_pole, > array_y1, > array_y2, > array_norms, > array_x, > array_y2_higher_work2, > array_complex_pole, > array_y1_higher, > array_real_pole, > array_y2_higher_work, > array_y2_higher, > array_y1_higher_work2, > array_y1_higher_work, > array_poles, > glob_last; > > local clock_sec, opt_clock_sec, clock_sec1, expect_sec, left_sec, optimal_expect_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); > clock_sec := convfloat(clock_sec1) - convfloat(glob_clock_start_sec); > left_sec := convfloat(glob_max_sec) + convfloat(glob_orig_start_sec) - convfloat(clock_sec1); > if (glob_reached_optimal_h) then > 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); > 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)); > else > expect_sec := convfloat( 0.0); > optimal_expect_sec := convfloat(0.0); > fi;; > omniout_str_noeol(INFO,"Total Elapsed Time "); > omniout_timestr(convfloat(total_clock_sec)); > omniout_str_noeol(INFO,"Elapsed Time(since restart) "); > omniout_timestr(convfloat(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(optimal_expect_sec)); > fi;; > omniout_str_noeol(INFO,"Time to Timeout "); > omniout_timestr(convfloat(left_sec)); > omniout_float(INFO, "Percent Done ",33,percent_done,4,"%"); #BOTTOM PROGRESS REPORT > end; prog_report := proc(x_start, x_end) local clock_sec, opt_clock_sec, clock_sec1, expect_sec, left_sec, optimal_expect_sec, percent_done, total_clock_sec; global DEBUGL, INFO, ALWAYS, glob_max_terms, glob_iolevel, DEBUGMASSIVE, glob_iter, glob_max_sec, glob_warned, glob_hmin_init, days_in_year, sec_in_min, glob_display_flag, glob_normmax, glob_last_good_h, glob_hmin, glob_not_yet_start_msg, years_in_century, glob_max_opt_iter, glob_max_minutes, glob_log10abserr, glob_warned2, glob_smallish_float, glob_optimal_start, glob_max_hours, glob_h, MAX_UNCHANGED, glob_curr_iter_when_opt, glob_orig_start_sec, glob_max_rel_trunc_err, glob_hmax, glob_unchanged_h_cnt, glob_no_eqs, glob_dump_analytic, glob_large_float, glob_log10normmin, glob_optimal_clock_start_sec, glob_log10relerr, glob_optimal_done, glob_clock_start_sec, glob_almost_1, centuries_in_millinium, glob_reached_optimal_h, min_in_hour, djd_debug, glob_max_trunc_err, glob_max_order, glob_max_iter, glob_log10_abserr, glob_initial_pass, glob_not_yet_finished, glob_clock_sec, djd_debug2, glob_current_iter, glob_start, glob_small_float, glob_relerr, glob_abserr, glob_log10_relerr, glob_look_poles, glob_disp_incr, hours_in_day, glob_dump, array_const_0D0, array_const_0, array_const_1, array_y1_init, array_m1, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_y2_init, array_pole, array_y1, array_y2, array_norms, array_x, array_y2_higher_work2, array_complex_pole, array_y1_higher, array_real_pole, array_y2_higher_work, array_y2_higher, array_y1_higher_work2, array_y1_higher_work, array_poles, glob_last; clock_sec1 := elapsed_time_seconds(); total_clock_sec := convfloat(clock_sec1) - convfloat(glob_orig_start_sec); clock_sec := convfloat(clock_sec1) - convfloat(glob_clock_start_sec); left_sec := convfloat(glob_max_sec) + convfloat(glob_orig_start_sec) - convfloat(clock_sec1); if glob_reached_optimal_h then 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) ; 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)) else expect_sec := convfloat(0.); optimal_expect_sec := convfloat(0.) end if; omniout_str_noeol(INFO, "Total Elapsed Time "); omniout_timestr(convfloat(total_clock_sec)); omniout_str_noeol(INFO, "Elapsed Time(since restart) "); omniout_timestr(convfloat(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(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 > check_for_pole := proc() > global > DEBUGL, > INFO, > ALWAYS, > glob_max_terms, > glob_iolevel, > DEBUGMASSIVE, #Top Generate Globals Decl > glob_iter, > glob_max_sec, > glob_warned, > glob_hmin_init, > days_in_year, > sec_in_min, > glob_display_flag, > glob_normmax, > glob_last_good_h, > glob_hmin, > glob_not_yet_start_msg, > years_in_century, > glob_max_opt_iter, > glob_max_minutes, > glob_log10abserr, > glob_warned2, > glob_smallish_float, > glob_optimal_start, > glob_max_hours, > glob_h, > MAX_UNCHANGED, > glob_curr_iter_when_opt, > glob_orig_start_sec, > glob_max_rel_trunc_err, > glob_hmax, > glob_unchanged_h_cnt, > glob_no_eqs, > glob_dump_analytic, > glob_large_float, > glob_log10normmin, > glob_optimal_clock_start_sec, > glob_log10relerr, > glob_optimal_done, > glob_clock_start_sec, > glob_almost_1, > centuries_in_millinium, > glob_reached_optimal_h, > min_in_hour, > djd_debug, > glob_max_trunc_err, > glob_max_order, > glob_max_iter, > glob_log10_abserr, > glob_initial_pass, > glob_not_yet_finished, > glob_clock_sec, > djd_debug2, > glob_current_iter, > glob_start, > glob_small_float, > glob_relerr, > glob_abserr, > glob_log10_relerr, > glob_look_poles, > glob_disp_incr, > hours_in_day, > glob_dump, #Bottom Generate Globals Decl #BEGIN CONST > array_const_0D0, > array_const_0, > array_const_1, #END CONST > array_y1_init, > array_m1, > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_y2_init, > array_pole, > array_y1, > array_y2, > array_norms, > array_x, > array_y2_higher_work2, > array_complex_pole, > array_y1_higher, > array_real_pole, > array_y2_higher_work, > array_y2_higher, > array_y1_higher_work2, > array_y1_higher_work, > array_poles, > 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 > 3) and ((abs(array_y1_higher[1,m]) < glob_small_float) or (abs(array_y1_higher[1,m-1]) < glob_small_float) or (abs(array_y1_higher[1,m-2]) < glob_small_float ))) do > m := m - 1; > od;; > if (m > 3) then > rm0 := array_y1_higher[1,m]/array_y1_higher[1,m-1]; > rm1 := array_y1_higher[1,m-1]/array_y1_higher[1,m-2]; > hdrc := convfloat(m-1)*rm0-convfloat(m-2)*rm1; > if (abs(hdrc) > glob_small_float) 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; > fi; > else > array_real_pole[1,1] := glob_large_float; > array_real_pole[1,2] := glob_large_float; > fi;; #BOTTOM RADII REAL EQ = 1 #IN RADII REAL EQ = 2 #Computes radius of convergence and r_order of pole from 3 adjacent Taylor series terms. EQUATUON NUMBER 2 #Applies to pole of arbitrary r_order on the real axis, #Due to Prof. George Corliss. > n := glob_max_terms; > m := n - 1 - 1; > while ((m > 3) and ((abs(array_y2_higher[1,m]) < glob_small_float) or (abs(array_y2_higher[1,m-1]) < glob_small_float) or (abs(array_y2_higher[1,m-2]) < glob_small_float ))) do > m := m - 1; > od;; > if (m > 3) then > rm0 := array_y2_higher[1,m]/array_y2_higher[1,m-1]; > rm1 := array_y2_higher[1,m-1]/array_y2_higher[1,m-2]; > hdrc := convfloat(m-1)*rm0-convfloat(m-2)*rm1; > if (abs(hdrc) > glob_small_float) then > rcs := glob_h/hdrc; > ord_no := convfloat(m-1)*rm0/hdrc - convfloat(m) + 2.0; > array_real_pole[2,1] := rcs; > array_real_pole[2,2] := ord_no; > else > array_real_pole[2,1] := glob_large_float; > array_real_pole[2,2] := glob_large_float; > fi; > else > array_real_pole[2,1] := glob_large_float; > array_real_pole[2,2] := glob_large_float; > fi;; #BOTTOM RADII REAL EQ = 2 #TOP RADII COMPLEX EQ = 1 #Computes radius of convergence for complex conjugate pair of poles. #from 6 adjacent Taylor series terms #Also computes r_order of poles. #Due to Manuel Prieto. #With a correction by Dennis J. Darland > n := glob_max_terms - 1- 1; > cnt := 0; > while ((cnt < 5) and (n >= 1)) do > if (abs(array_y1_higher[1,n]) > glob_small_float) then > cnt := cnt + 1; > else > cnt := 0; > fi;; > n := n - 1; > od;; > m := n + cnt; > if (m < 6) then > array_complex_pole[1,1] := glob_large_float; > array_complex_pole[1,2] := glob_large_float; > fi;; > if (abs(array_y1_higher[1,m]) >= (glob_large_float)) or (abs(array_y1_higher[1,m-1]) >=(glob_large_float)) or (abs(array_y1_higher[1,m-2]) >= (glob_large_float)) or (abs(array_y1_higher[1,m-3]) >= (glob_large_float)) or (abs(array_y1_higher[1,m-4]) >= (glob_large_float)) or (abs(array_y1_higher[1,m-5]) >= (glob_large_float)) then > array_complex_pole[1,1] := glob_large_float; > array_complex_pole[1,2] := glob_large_float; > else > rm0 := (array_y1_higher[1,m])/(array_y1_higher[1,m-1]); > rm1 := (array_y1_higher[1,m-1])/(array_y1_higher[1,m-2]); > rm2 := (array_y1_higher[1,m-2])/(array_y1_higher[1,m-3]); > rm3 := (array_y1_higher[1,m-3])/(array_y1_higher[1,m-4]); > rm4 := (array_y1_higher[1,m-4])/(array_y1_higher[1,m-5]); > nr1 := convfloat(m-1)*rm0 - 2.0*convfloat(m-2)*rm1 + convfloat(m-3)*rm2; > nr2 := convfloat(m-2)*rm1 - 2.0*convfloat(m-3)*rm2 + convfloat(m-4)*rm3; > dr1 := (-1.0)/rm1 + 2.0/rm2 - 1.0/rm3; > dr2 := (-1.0)/rm2 + 2.0/rm3 - 1.0/rm4; > ds1 := 3.0/rm1 - 8.0/rm2 + 5.0/rm3; > ds2 := 3.0/rm2 - 8.0/rm3 + 5.0/rm4; > if ((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 (abs(nr1*dr2 - nr2 * dr1) > glob_small_float) then > 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 (rcs > 0.0) then > rad_c := sqrt(rcs) * glob_h; > else > rad_c := glob_large_float; > fi; > else > rad_c := glob_large_float; > ord_no := glob_large_float; > fi; > else > rad_c := glob_large_float; > ord_no := glob_large_float; > fi; > fi;; > array_complex_pole[1,1] := rad_c; > array_complex_pole[1,2] := ord_no; > fi;; #BOTTOM RADII COMPLEX EQ = 1 #TOP RADII COMPLEX EQ = 2 #Computes radius of convergence for complex conjugate pair of poles. #from 6 adjacent Taylor series terms #Also computes r_order of poles. #Due to Manuel Prieto. #With a correction by Dennis J. Darland > n := glob_max_terms - 1- 1; > cnt := 0; > while ((cnt < 5) and (n >= 1)) do > if (abs(array_y2_higher[1,n]) > glob_small_float) then > cnt := cnt + 1; > else > cnt := 0; > fi;; > n := n - 1; > od;; > m := n + cnt; > if (m < 6) then > array_complex_pole[2,1] := glob_large_float; > array_complex_pole[2,2] := glob_large_float; > fi;; > if (abs(array_y2_higher[1,m]) >= (glob_large_float)) or (abs(array_y2_higher[1,m-1]) >=(glob_large_float)) or (abs(array_y2_higher[1,m-2]) >= (glob_large_float)) or (abs(array_y2_higher[1,m-3]) >= (glob_large_float)) or (abs(array_y2_higher[1,m-4]) >= (glob_large_float)) or (abs(array_y2_higher[1,m-5]) >= (glob_large_float)) then > array_complex_pole[2,1] := glob_large_float; > array_complex_pole[2,2] := glob_large_float; > else > rm0 := (array_y2_higher[1,m])/(array_y2_higher[1,m-1]); > rm1 := (array_y2_higher[1,m-1])/(array_y2_higher[1,m-2]); > rm2 := (array_y2_higher[1,m-2])/(array_y2_higher[1,m-3]); > rm3 := (array_y2_higher[1,m-3])/(array_y2_higher[1,m-4]); > rm4 := (array_y2_higher[1,m-4])/(array_y2_higher[1,m-5]); > nr1 := convfloat(m-1)*rm0 - 2.0*convfloat(m-2)*rm1 + convfloat(m-3)*rm2; > nr2 := convfloat(m-2)*rm1 - 2.0*convfloat(m-3)*rm2 + convfloat(m-4)*rm3; > dr1 := (-1.0)/rm1 + 2.0/rm2 - 1.0/rm3; > dr2 := (-1.0)/rm2 + 2.0/rm3 - 1.0/rm4; > ds1 := 3.0/rm1 - 8.0/rm2 + 5.0/rm3; > ds2 := 3.0/rm2 - 8.0/rm3 + 5.0/rm4; > if ((abs(nr1 * dr2 - nr2 * dr1) <= glob_small_float) or (abs(dr1) <= glob_small_float)) then > array_complex_pole[2,1] := glob_large_float; > array_complex_pole[2,2] := glob_large_float; > else > if (abs(nr1*dr2 - nr2 * dr1) > glob_small_float) then > 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 (rcs > 0.0) then > rad_c := sqrt(rcs) * glob_h; > else > rad_c := glob_large_float; > fi; > else > rad_c := glob_large_float; > ord_no := glob_large_float; > fi; > else > rad_c := glob_large_float; > ord_no := glob_large_float; > fi; > fi;; > array_complex_pole[2,1] := rad_c; > array_complex_pole[2,2] := ord_no; > fi;; #BOTTOM RADII COMPLEX EQ = 2 > found := false; #TOP WHICH RADII EQ = 1 > if not found and ((array_real_pole[1,1] = glob_large_float) or (array_real_pole[1,2] = glob_large_float)) and ((array_complex_pole[1,1] <> glob_large_float) and (array_complex_pole[1,2] <> glob_large_float)) and ((array_complex_pole[1,1] > 0.0) and (array_complex_pole[1,2] > 0.0)) then > array_poles[1,1] := array_complex_pole[1,1]; > array_poles[1,2] := array_complex_pole[1,2]; > found := true; > if (glob_display_flag) then > omniout_str(ALWAYS,"Complex estimate of poles used"); > fi;; > fi;; > 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 > array_poles[1,1] := array_real_pole[1,1]; > array_poles[1,2] := array_real_pole[1,2]; > found := true; > if (glob_display_flag) then > omniout_str(ALWAYS,"Real estimate of pole used"); > fi;; > fi;; > 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; > if (glob_display_flag) then > omniout_str(ALWAYS,"NO POLE"); > fi;; > fi;; > 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 > array_poles[1,1] := array_real_pole[1,1]; > array_poles[1,2] := array_real_pole[1,2]; > found := true; > if (glob_display_flag) then > omniout_str(ALWAYS,"Real estimate of pole used"); > fi;; > fi;; > 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 > array_poles[1,1] := array_complex_pole[1,1]; > array_poles[1,2] := array_complex_pole[1,2]; > found := true; > if (glob_display_flag) then > omniout_str(ALWAYS,"Complex estimate of poles used"); > fi;; > fi;; > if not found then > array_poles[1,1] := glob_large_float; > array_poles[1,2] := glob_large_float; > if (glob_display_flag) then > omniout_str(ALWAYS,"NO POLE"); > fi;; > fi;; #BOTTOM WHICH RADII EQ = 1 > found := false; #TOP WHICH RADII EQ = 2 > if not found and ((array_real_pole[2,1] = glob_large_float) or (array_real_pole[2,2] = glob_large_float)) and ((array_complex_pole[2,1] <> glob_large_float) and (array_complex_pole[2,2] <> glob_large_float)) and ((array_complex_pole[2,1] > 0.0) and (array_complex_pole[2,2] > 0.0)) then > array_poles[2,1] := array_complex_pole[2,1]; > array_poles[2,2] := array_complex_pole[2,2]; > found := true; > if (glob_display_flag) then > omniout_str(ALWAYS,"Complex estimate of poles used"); > fi;; > fi;; > if not found and ((array_real_pole[2,1] <> glob_large_float) and (array_real_pole[2,2] <> glob_large_float) and (array_real_pole[2,1] > 0.0) and (array_real_pole[2,2] > 0.0) and ((array_complex_pole[2,1] = glob_large_float) or (array_complex_pole[2,2] = glob_large_float) or (array_complex_pole[2,1] <= 0.0 ) or (array_complex_pole[2,2] <= 0.0))) then > array_poles[2,1] := array_real_pole[2,1]; > array_poles[2,2] := array_real_pole[2,2]; > found := true; > if (glob_display_flag) then > omniout_str(ALWAYS,"Real estimate of pole used"); > fi;; > fi;; > if not found and (((array_real_pole[2,1] = glob_large_float) or (array_real_pole[2,2] = glob_large_float)) and ((array_complex_pole[2,1] = glob_large_float) or (array_complex_pole[2,2] = glob_large_float))) then > array_poles[2,1] := glob_large_float; > array_poles[2,2] := glob_large_float; > found := true; > if (glob_display_flag) then > omniout_str(ALWAYS,"NO POLE"); > fi;; > fi;; > if not found and ((array_real_pole[2,1] < array_complex_pole[2,1]) and (array_real_pole[2,1] > 0.0) and (array_real_pole[2,2] > 0.0)) then > array_poles[2,1] := array_real_pole[2,1]; > array_poles[2,2] := array_real_pole[2,2]; > found := true; > if (glob_display_flag) then > omniout_str(ALWAYS,"Real estimate of pole used"); > fi;; > fi;; > if not found and ((array_complex_pole[2,1] <> glob_large_float) and (array_complex_pole[2,2] <> glob_large_float) and (array_complex_pole[2,1] > 0.0) and (array_complex_pole[2,2] > 0.0)) then > array_poles[2,1] := array_complex_pole[2,1]; > array_poles[2,2] := array_complex_pole[2,2]; > found := true; > if (glob_display_flag) then > omniout_str(ALWAYS,"Complex estimate of poles used"); > fi;; > fi;; > if not found then > array_poles[2,1] := glob_large_float; > array_poles[2,2] := glob_large_float; > if (glob_display_flag) then > omniout_str(ALWAYS,"NO POLE"); > fi;; > fi;; #BOTTOM WHICH RADII EQ = 2 > array_pole[1] := glob_large_float; > array_pole[2] := glob_large_float; #TOP WHICH RADIUS EQ = 1 > if array_pole[1] > array_poles[1,1] then > array_pole[1] := array_poles[1,1]; > array_pole[2] := array_poles[1,2]; > fi;; #BOTTOM WHICH RADIUS EQ = 1 #TOP WHICH RADIUS EQ = 2 > if array_pole[1] > array_poles[2,1] then > array_pole[1] := array_poles[2,1]; > array_pole[2] := array_poles[2,2]; > fi;; #BOTTOM WHICH RADIUS EQ = 2 #BOTTOM CHECK FOR POLE > display_pole(); > end; check_for_pole := proc() local cnt, dr1, dr2, ds1, ds2, hdrc, m, n, nr1, nr2, ord_no, rad_c, rcs, rm0, rm1, rm2, rm3, rm4, found; global DEBUGL, INFO, ALWAYS, glob_max_terms, glob_iolevel, DEBUGMASSIVE, glob_iter, glob_max_sec, glob_warned, glob_hmin_init, days_in_year, sec_in_min, glob_display_flag, glob_normmax, glob_last_good_h, glob_hmin, glob_not_yet_start_msg, years_in_century, glob_max_opt_iter, glob_max_minutes, glob_log10abserr, glob_warned2, glob_smallish_float, glob_optimal_start, glob_max_hours, glob_h, MAX_UNCHANGED, glob_curr_iter_when_opt, glob_orig_start_sec, glob_max_rel_trunc_err, glob_hmax, glob_unchanged_h_cnt, glob_no_eqs, glob_dump_analytic, glob_large_float, glob_log10normmin, glob_optimal_clock_start_sec, glob_log10relerr, glob_optimal_done, glob_clock_start_sec, glob_almost_1, centuries_in_millinium, glob_reached_optimal_h, min_in_hour, djd_debug, glob_max_trunc_err, glob_max_order, glob_max_iter, glob_log10_abserr, glob_initial_pass, glob_not_yet_finished, glob_clock_sec, djd_debug2, glob_current_iter, glob_start, glob_small_float, glob_relerr, glob_abserr, glob_log10_relerr, glob_look_poles, glob_disp_incr, hours_in_day, glob_dump, array_const_0D0, array_const_0, array_const_1, array_y1_init, array_m1, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_y2_init, array_pole, array_y1, array_y2, array_norms, array_x, array_y2_higher_work2, array_complex_pole, array_y1_higher, array_real_pole, array_y2_higher_work, array_y2_higher, array_y1_higher_work2, array_y1_higher_work, array_poles, glob_last; n := glob_max_terms; m := n - 2; while 3 < m and (abs(array_y1_higher[1, m]) < glob_small_float or abs(array_y1_higher[1, m - 1]) < glob_small_float or abs(array_y1_higher[1, m - 2]) < glob_small_float) do m := m - 1 end do; if 3 < m then rm0 := array_y1_higher[1, m]/array_y1_higher[1, m - 1]; rm1 := array_y1_higher[1, m - 1]/array_y1_higher[1, m - 2]; hdrc := convfloat(m - 1)*rm0 - convfloat(m - 2)*rm1; if glob_small_float < 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; m := n - 2; while 3 < m and (abs(array_y2_higher[1, m]) < glob_small_float or abs(array_y2_higher[1, m - 1]) < glob_small_float or abs(array_y2_higher[1, m - 2]) < glob_small_float) do m := m - 1 end do; if 3 < m then rm0 := array_y2_higher[1, m]/array_y2_higher[1, m - 1]; rm1 := array_y2_higher[1, m - 1]/array_y2_higher[1, m - 2]; hdrc := convfloat(m - 1)*rm0 - convfloat(m - 2)*rm1; if glob_small_float < abs(hdrc) then rcs := glob_h/hdrc; ord_no := convfloat(m - 1)*rm0/hdrc - convfloat(m) + 2.0; array_real_pole[2, 1] := rcs; array_real_pole[2, 2] := ord_no else array_real_pole[2, 1] := glob_large_float; array_real_pole[2, 2] := glob_large_float end if else array_real_pole[2, 1] := glob_large_float; array_real_pole[2, 2] := glob_large_float end if; n := glob_max_terms - 2; cnt := 0; while cnt < 5 and 1 <= n do if glob_small_float < abs(array_y1_higher[1, n]) then cnt := cnt + 1 else cnt := 0 end if; n := n - 1 end do; m := n + cnt; if m < 6 then array_complex_pole[1, 1] := glob_large_float; array_complex_pole[1, 2] := glob_large_float end if; if glob_large_float <= abs(array_y1_higher[1, m]) or glob_large_float <= abs(array_y1_higher[1, m - 1]) or glob_large_float <= abs(array_y1_higher[1, m - 2]) or glob_large_float <= abs(array_y1_higher[1, m - 3]) or glob_large_float <= abs(array_y1_higher[1, m - 4]) or glob_large_float <= abs(array_y1_higher[1, m - 5]) then array_complex_pole[1, 1] := glob_large_float; array_complex_pole[1, 2] := glob_large_float else rm0 := array_y1_higher[1, m]/array_y1_higher[1, m - 1]; rm1 := array_y1_higher[1, m - 1]/array_y1_higher[1, m - 2]; rm2 := array_y1_higher[1, m - 2]/array_y1_higher[1, m - 3]; rm3 := array_y1_higher[1, m - 3]/array_y1_higher[1, m - 4]; rm4 := array_y1_higher[1, m - 4]/array_y1_higher[1, m - 5]; nr1 := convfloat(m - 1)*rm0 - 2.0*convfloat(m - 2)*rm1 + convfloat(m - 3)*rm2; nr2 := convfloat(m - 2)*rm1 - 2.0*convfloat(m - 3)*rm2 + convfloat(m - 4)*rm3; dr1 := (-1)*(1.0)/rm1 + 2.0/rm2 - 1.0/rm3; dr2 := (-1)*(1.0)/rm2 + 2.0/rm3 - 1.0/rm4; ds1 := 3.0/rm1 - 8.0/rm2 + 5.0/rm3; ds2 := 3.0/rm2 - 8.0/rm3 + 5.0/rm4; if 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; n := glob_max_terms - 2; cnt := 0; while cnt < 5 and 1 <= n do if glob_small_float < abs(array_y2_higher[1, n]) then cnt := cnt + 1 else cnt := 0 end if; n := n - 1 end do; m := n + cnt; if m < 6 then array_complex_pole[2, 1] := glob_large_float; array_complex_pole[2, 2] := glob_large_float end if; if glob_large_float <= abs(array_y2_higher[1, m]) or glob_large_float <= abs(array_y2_higher[1, m - 1]) or glob_large_float <= abs(array_y2_higher[1, m - 2]) or glob_large_float <= abs(array_y2_higher[1, m - 3]) or glob_large_float <= abs(array_y2_higher[1, m - 4]) or glob_large_float <= abs(array_y2_higher[1, m - 5]) then array_complex_pole[2, 1] := glob_large_float; array_complex_pole[2, 2] := glob_large_float else rm0 := array_y2_higher[1, m]/array_y2_higher[1, m - 1]; rm1 := array_y2_higher[1, m - 1]/array_y2_higher[1, m - 2]; rm2 := array_y2_higher[1, m - 2]/array_y2_higher[1, m - 3]; rm3 := array_y2_higher[1, m - 3]/array_y2_higher[1, m - 4]; rm4 := array_y2_higher[1, m - 4]/array_y2_higher[1, m - 5]; nr1 := convfloat(m - 1)*rm0 - 2.0*convfloat(m - 2)*rm1 + convfloat(m - 3)*rm2; nr2 := convfloat(m - 2)*rm1 - 2.0*convfloat(m - 3)*rm2 + convfloat(m - 4)*rm3; dr1 := (-1)*(1.0)/rm1 + 2.0/rm2 - 1.0/rm3; dr2 := (-1)*(1.0)/rm2 + 2.0/rm3 - 1.0/rm4; ds1 := 3.0/rm1 - 8.0/rm2 + 5.0/rm3; ds2 := 3.0/rm2 - 8.0/rm3 + 5.0/rm4; if abs(nr1*dr2 - nr2*dr1) <= glob_small_float or abs(dr1) <= glob_small_float then array_complex_pole[2, 1] := glob_large_float; array_complex_pole[2, 2] := glob_large_float else if glob_small_float < 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[2, 1] := rad_c; array_complex_pole[2, 2] := ord_no end if; found := false; if not found and (array_real_pole[1, 1] = glob_large_float or array_real_pole[1, 2] = glob_large_float) and array_complex_pole[1, 1] <> glob_large_float and array_complex_pole[1, 2] <> glob_large_float and 0. < array_complex_pole[1, 1] and 0. < array_complex_pole[1, 2] then array_poles[1, 1] := array_complex_pole[1, 1]; array_poles[1, 2] := array_complex_pole[1, 2]; found := true; 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; 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; 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; 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]; 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; if glob_display_flag then omniout_str(ALWAYS, "NO POLE") end if end if; found := false; if not found and (array_real_pole[2, 1] = glob_large_float or array_real_pole[2, 2] = glob_large_float) and array_complex_pole[2, 1] <> glob_large_float and array_complex_pole[2, 2] <> glob_large_float and 0. < array_complex_pole[2, 1] and 0. < array_complex_pole[2, 2] then array_poles[2, 1] := array_complex_pole[2, 1]; array_poles[2, 2] := array_complex_pole[2, 2]; found := true; if glob_display_flag then omniout_str(ALWAYS, "Complex estimate of poles used") end if end if; if not found and array_real_pole[2, 1] <> glob_large_float and array_real_pole[2, 2] <> glob_large_float and 0. < array_real_pole[2, 1] and 0. < array_real_pole[2, 2] and ( array_complex_pole[2, 1] = glob_large_float or array_complex_pole[2, 2] = glob_large_float or array_complex_pole[2, 1] <= 0. or array_complex_pole[2, 2] <= 0.) then array_poles[2, 1] := array_real_pole[2, 1]; array_poles[2, 2] := array_real_pole[2, 2]; found := true; if glob_display_flag then omniout_str(ALWAYS, "Real estimate of pole used") end if end if; if not found and (array_real_pole[2, 1] = glob_large_float or array_real_pole[2, 2] = glob_large_float) and ( array_complex_pole[2, 1] = glob_large_float or array_complex_pole[2, 2] = glob_large_float) then array_poles[2, 1] := glob_large_float; array_poles[2, 2] := glob_large_float; found := true; if glob_display_flag then omniout_str(ALWAYS, "NO POLE") end if end if; if not found and array_real_pole[2, 1] < array_complex_pole[2, 1] and 0. < array_real_pole[2, 1] and 0. < array_real_pole[2, 2] then array_poles[2, 1] := array_real_pole[2, 1]; array_poles[2, 2] := array_real_pole[2, 2]; found := true; if glob_display_flag then omniout_str(ALWAYS, "Real estimate of pole used") end if end if; if not found and array_complex_pole[2, 1] <> glob_large_float and array_complex_pole[2, 2] <> glob_large_float and 0. < array_complex_pole[2, 1] and 0. < array_complex_pole[2, 2] then array_poles[2, 1] := array_complex_pole[2, 1]; array_poles[2, 2] := array_complex_pole[2, 2]; found := true; if glob_display_flag then omniout_str(ALWAYS, "Complex estimate of poles used") end if end if; if not found then array_poles[2, 1] := glob_large_float; array_poles[2, 2] := glob_large_float; 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; if array_poles[2, 1] < array_pole[1] then array_pole[1] := array_poles[2, 1]; array_pole[2] := array_poles[2, 2] end if; display_pole() end proc > get_norms := proc() > global > DEBUGL, > INFO, > ALWAYS, > glob_max_terms, > glob_iolevel, > DEBUGMASSIVE, #Top Generate Globals Decl > glob_iter, > glob_max_sec, > glob_warned, > glob_hmin_init, > days_in_year, > sec_in_min, > glob_display_flag, > glob_normmax, > glob_last_good_h, > glob_hmin, > glob_not_yet_start_msg, > years_in_century, > glob_max_opt_iter, > glob_max_minutes, > glob_log10abserr, > glob_warned2, > glob_smallish_float, > glob_optimal_start, > glob_max_hours, > glob_h, > MAX_UNCHANGED, > glob_curr_iter_when_opt, > glob_orig_start_sec, > glob_max_rel_trunc_err, > glob_hmax, > glob_unchanged_h_cnt, > glob_no_eqs, > glob_dump_analytic, > glob_large_float, > glob_log10normmin, > glob_optimal_clock_start_sec, > glob_log10relerr, > glob_optimal_done, > glob_clock_start_sec, > glob_almost_1, > centuries_in_millinium, > glob_reached_optimal_h, > min_in_hour, > djd_debug, > glob_max_trunc_err, > glob_max_order, > glob_max_iter, > glob_log10_abserr, > glob_initial_pass, > glob_not_yet_finished, > glob_clock_sec, > djd_debug2, > glob_current_iter, > glob_start, > glob_small_float, > glob_relerr, > glob_abserr, > glob_log10_relerr, > glob_look_poles, > glob_disp_incr, > hours_in_day, > glob_dump, #Bottom Generate Globals Decl #BEGIN CONST > array_const_0D0, > array_const_0, > array_const_1, #END CONST > array_y1_init, > array_m1, > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_y2_init, > array_pole, > array_y1, > array_y2, > array_norms, > array_x, > array_y2_higher_work2, > array_complex_pole, > array_y1_higher, > array_real_pole, > array_y2_higher_work, > array_y2_higher, > array_y1_higher_work2, > array_y1_higher_work, > array_poles, > glob_last; > > local iii; > if (not glob_initial_pass) then > set_z(array_norms,glob_max_terms+1); #TOP GET NORMS > iii := 1; > while (iii <= glob_max_terms) do > if (abs(array_y1[iii]) > array_norms[iii]) then > array_norms[iii] := abs(array_y1[iii]); > fi;; > iii := iii + 1; > od; > ; > iii := 1; > while (iii <= glob_max_terms) do > if (abs(array_y2[iii]) > array_norms[iii]) then > array_norms[iii] := abs(array_y2[iii]); > fi;; > iii := iii + 1; > od; #GET NORMS > ; > fi;; > end; get_norms := proc() local iii; global DEBUGL, INFO, ALWAYS, glob_max_terms, glob_iolevel, DEBUGMASSIVE, glob_iter, glob_max_sec, glob_warned, glob_hmin_init, days_in_year, sec_in_min, glob_display_flag, glob_normmax, glob_last_good_h, glob_hmin, glob_not_yet_start_msg, years_in_century, glob_max_opt_iter, glob_max_minutes, glob_log10abserr, glob_warned2, glob_smallish_float, glob_optimal_start, glob_max_hours, glob_h, MAX_UNCHANGED, glob_curr_iter_when_opt, glob_orig_start_sec, glob_max_rel_trunc_err, glob_hmax, glob_unchanged_h_cnt, glob_no_eqs, glob_dump_analytic, glob_large_float, glob_log10normmin, glob_optimal_clock_start_sec, glob_log10relerr, glob_optimal_done, glob_clock_start_sec, glob_almost_1, centuries_in_millinium, glob_reached_optimal_h, min_in_hour, djd_debug, glob_max_trunc_err, glob_max_order, glob_max_iter, glob_log10_abserr, glob_initial_pass, glob_not_yet_finished, glob_clock_sec, djd_debug2, glob_current_iter, glob_start, glob_small_float, glob_relerr, glob_abserr, glob_log10_relerr, glob_look_poles, glob_disp_incr, hours_in_day, glob_dump, array_const_0D0, array_const_0, array_const_1, array_y1_init, array_m1, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_y2_init, array_pole, array_y1, array_y2, array_norms, array_x, array_y2_higher_work2, array_complex_pole, array_y1_higher, array_real_pole, array_y2_higher_work, array_y2_higher, array_y1_higher_work2, array_y1_higher_work, array_poles, 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_y1[iii]) then array_norms[iii] := abs(array_y1[iii]) end if; iii := iii + 1 end do; iii := 1; while iii <= glob_max_terms do if array_norms[iii] < abs(array_y2[iii]) then array_norms[iii] := abs(array_y2[iii]) end if; iii := iii + 1 end do end if end proc > atomall := proc() > global > DEBUGL, > INFO, > ALWAYS, > glob_max_terms, > glob_iolevel, > DEBUGMASSIVE, #Top Generate Globals Decl > glob_iter, > glob_max_sec, > glob_warned, > glob_hmin_init, > days_in_year, > sec_in_min, > glob_display_flag, > glob_normmax, > glob_last_good_h, > glob_hmin, > glob_not_yet_start_msg, > years_in_century, > glob_max_opt_iter, > glob_max_minutes, > glob_log10abserr, > glob_warned2, > glob_smallish_float, > glob_optimal_start, > glob_max_hours, > glob_h, > MAX_UNCHANGED, > glob_curr_iter_when_opt, > glob_orig_start_sec, > glob_max_rel_trunc_err, > glob_hmax, > glob_unchanged_h_cnt, > glob_no_eqs, > glob_dump_analytic, > glob_large_float, > glob_log10normmin, > glob_optimal_clock_start_sec, > glob_log10relerr, > glob_optimal_done, > glob_clock_start_sec, > glob_almost_1, > centuries_in_millinium, > glob_reached_optimal_h, > min_in_hour, > djd_debug, > glob_max_trunc_err, > glob_max_order, > glob_max_iter, > glob_log10_abserr, > glob_initial_pass, > glob_not_yet_finished, > glob_clock_sec, > djd_debug2, > glob_current_iter, > glob_start, > glob_small_float, > glob_relerr, > glob_abserr, > glob_log10_relerr, > glob_look_poles, > glob_disp_incr, > hours_in_day, > glob_dump, #Bottom Generate Globals Decl #BEGIN CONST > array_const_0D0, > array_const_0, > array_const_1, #END CONST > array_y1_init, > array_m1, > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_y2_init, > array_pole, > array_y1, > array_y2, > array_norms, > array_x, > array_y2_higher_work2, > array_complex_pole, > array_y1_higher, > array_real_pole, > array_y2_higher_work, > array_y2_higher, > array_y1_higher_work2, > array_y1_higher_work, > array_poles, > glob_last; > > local kkk, order_d, adj2, temporary, term; #TOP ATOMALL #END OUTFILE1 #BEGIN ATOMHDR1 #emit pre diff $eq_no = 1 i = 1 > array_tmp1[1] := array_y2_higher[1,1]; # emit pre mult $eq_no = 1 i = 1 > array_tmp2[1] := (array_m1[1] * (array_tmp1[1])); #emit pre add $eq_no = 1 i = 1 > array_tmp3[1] := array_const_0D0[1] + array_tmp2[1]; #emit pre assign xxx $eq_no = 1 i = 1 $min_hdrs = 5 > if (1 <= glob_max_terms) then > temporary := array_tmp3[1] * (glob_h ^ (1)) * factorial_3(0,1); > array_y1[2] := temporary; > array_y1_higher[1,2] := temporary; > temporary := temporary / glob_h * (2.0); > array_y1_higher[2,1] := temporary > ; > fi;; > kkk := 2; #emit pre diff $eq_no = 2 i = 1 > array_tmp5[1] := array_y1_higher[1,1]; #emit pre assign xxx $eq_no = 2 i = 1 $min_hdrs = 5 > if (1 <= glob_max_terms) then > temporary := array_tmp5[1] * (glob_h ^ (1)) * factorial_3(0,1); > array_y2[2] := temporary; > array_y2_higher[1,2] := temporary; > temporary := temporary / glob_h * (2.0); > array_y2_higher[2,1] := temporary > ; > fi;; > kkk := 2; #END ATOMHDR1 #BEGIN ATOMHDR2 #emit pre diff $eq_no = 1 i = 2 > array_tmp1[2] := array_y2_higher[1,2]; # emit pre mult $eq_no = 1 i = 2 > array_tmp2[2] := ats(2,array_m1,array_tmp1,1); #emit pre add $eq_no = 1 i = 2 > array_tmp3[2] := array_const_0D0[2] + array_tmp2[2]; #emit pre assign xxx $eq_no = 1 i = 2 $min_hdrs = 5 > if (2 <= glob_max_terms) then > temporary := array_tmp3[2] * (glob_h ^ (1)) * factorial_3(1,2); > array_y1[3] := temporary; > array_y1_higher[1,3] := temporary; > temporary := temporary / glob_h * (2.0); > array_y1_higher[2,2] := temporary > ; > fi;; > kkk := 3; #emit pre diff $eq_no = 2 i = 2 > array_tmp5[2] := array_y1_higher[1,2]; #emit pre assign xxx $eq_no = 2 i = 2 $min_hdrs = 5 > if (2 <= glob_max_terms) then > temporary := array_tmp5[2] * (glob_h ^ (1)) * factorial_3(1,2); > array_y2[3] := temporary; > array_y2_higher[1,3] := temporary; > temporary := temporary / glob_h * (2.0); > array_y2_higher[2,2] := temporary > ; > fi;; > kkk := 3; #END ATOMHDR2 #BEGIN ATOMHDR3 #emit pre diff $eq_no = 1 i = 3 > array_tmp1[3] := array_y2_higher[1,3]; # emit pre mult $eq_no = 1 i = 3 > array_tmp2[3] := ats(3,array_m1,array_tmp1,1); #emit pre add $eq_no = 1 i = 3 > array_tmp3[3] := array_const_0D0[3] + array_tmp2[3]; #emit pre assign xxx $eq_no = 1 i = 3 $min_hdrs = 5 > if (3 <= glob_max_terms) then > temporary := array_tmp3[3] * (glob_h ^ (1)) * factorial_3(2,3); > array_y1[4] := temporary; > array_y1_higher[1,4] := temporary; > temporary := temporary / glob_h * (2.0); > array_y1_higher[2,3] := temporary > ; > fi;; > kkk := 4; #emit pre diff $eq_no = 2 i = 3 > array_tmp5[3] := array_y1_higher[1,3]; #emit pre assign xxx $eq_no = 2 i = 3 $min_hdrs = 5 > if (3 <= glob_max_terms) then > temporary := array_tmp5[3] * (glob_h ^ (1)) * factorial_3(2,3); > array_y2[4] := temporary; > array_y2_higher[1,4] := temporary; > temporary := temporary / glob_h * (2.0); > array_y2_higher[2,3] := temporary > ; > fi;; > kkk := 4; #END ATOMHDR3 #BEGIN ATOMHDR4 #emit pre diff $eq_no = 1 i = 4 > array_tmp1[4] := array_y2_higher[1,4]; # emit pre mult $eq_no = 1 i = 4 > array_tmp2[4] := ats(4,array_m1,array_tmp1,1); #emit pre add $eq_no = 1 i = 4 > array_tmp3[4] := array_const_0D0[4] + array_tmp2[4]; #emit pre assign xxx $eq_no = 1 i = 4 $min_hdrs = 5 > if (4 <= glob_max_terms) then > temporary := array_tmp3[4] * (glob_h ^ (1)) * factorial_3(3,4); > array_y1[5] := temporary; > array_y1_higher[1,5] := temporary; > temporary := temporary / glob_h * (2.0); > array_y1_higher[2,4] := temporary > ; > fi;; > kkk := 5; #emit pre diff $eq_no = 2 i = 4 > array_tmp5[4] := array_y1_higher[1,4]; #emit pre assign xxx $eq_no = 2 i = 4 $min_hdrs = 5 > if (4 <= glob_max_terms) then > temporary := array_tmp5[4] * (glob_h ^ (1)) * factorial_3(3,4); > array_y2[5] := temporary; > array_y2_higher[1,5] := temporary; > temporary := temporary / glob_h * (2.0); > array_y2_higher[2,4] := temporary > ; > fi;; > kkk := 5; #END ATOMHDR4 #BEGIN ATOMHDR5 #emit pre diff $eq_no = 1 i = 5 > array_tmp1[5] := array_y2_higher[1,5]; # emit pre mult $eq_no = 1 i = 5 > array_tmp2[5] := ats(5,array_m1,array_tmp1,1); #emit pre add $eq_no = 1 i = 5 > array_tmp3[5] := array_const_0D0[5] + array_tmp2[5]; #emit pre assign xxx $eq_no = 1 i = 5 $min_hdrs = 5 > if (5 <= glob_max_terms) then > temporary := array_tmp3[5] * (glob_h ^ (1)) * factorial_3(4,5); > array_y1[6] := temporary; > array_y1_higher[1,6] := temporary; > temporary := temporary / glob_h * (2.0); > array_y1_higher[2,5] := temporary > ; > fi;; > kkk := 6; #emit pre diff $eq_no = 2 i = 5 > array_tmp5[5] := array_y1_higher[1,5]; #emit pre assign xxx $eq_no = 2 i = 5 $min_hdrs = 5 > if (5 <= glob_max_terms) then > temporary := array_tmp5[5] * (glob_h ^ (1)) * factorial_3(4,5); > array_y2[6] := temporary; > array_y2_higher[1,6] := temporary; > temporary := temporary / glob_h * (2.0); > array_y2_higher[2,5] := temporary > ; > fi;; > kkk := 6; #END ATOMHDR5 #BEGIN OUTFILE3 #Top Atomall While Loop-- outfile3 > while (kkk <= glob_max_terms) do #END OUTFILE3 #BEGIN OUTFILE4 #emit diff $eq_no = 1 > array_tmp1[kkk] := array_y2_higher[1,kkk]; #emit mult $eq_no = 1 > array_tmp2[kkk] := ats(kkk,array_m1,array_tmp1,1); #emit add $eq_no = 1 > array_tmp3[kkk] := array_const_0D0[kkk] + array_tmp2[kkk]; #emit assign $eq_no = 1 > order_d := 1; > if (kkk + order_d + 1 <= glob_max_terms) then > temporary := array_tmp3[kkk] * (glob_h ^ (order_d)) / factorial_3((kkk - 1),(kkk + order_d - 1)); > array_y1[kkk + order_d] := temporary; > array_y1_higher[1,kkk + order_d] := temporary; > term := kkk + order_d - 1; > adj2 := 2; > while (adj2 <= order_d + 1) and (term >= 1) do > temporary := temporary / glob_h * convfp(adj2); > array_y1_higher[adj2,term] := temporary; > adj2 := adj2 + 1; > term := term - 1; > od; > fi;; #emit diff $eq_no = 2 > array_tmp5[kkk] := array_y1_higher[1,kkk]; #emit assign $eq_no = 2 > order_d := 1; > if (kkk + order_d + 1 <= glob_max_terms) then > temporary := array_tmp5[kkk] * (glob_h ^ (order_d)) / factorial_3((kkk - 1),(kkk + order_d - 1)); > array_y2[kkk + order_d] := temporary; > array_y2_higher[1,kkk + order_d] := temporary; > term := kkk + order_d - 1; > adj2 := 2; > while (adj2 <= order_d + 1) and (term >= 1) do > temporary := temporary / glob_h * convfp(adj2); > array_y2_higher[adj2,term] := temporary; > adj2 := adj2 + 1; > term := term - 1; > od; > fi;; > kkk := kkk + 1; > od;; #BOTTOM ATOMALL #END OUTFILE4 #BEGIN OUTFILE5 > end; atomall := proc() local kkk, order_d, adj2, temporary, term; global DEBUGL, INFO, ALWAYS, glob_max_terms, glob_iolevel, DEBUGMASSIVE, glob_iter, glob_max_sec, glob_warned, glob_hmin_init, days_in_year, sec_in_min, glob_display_flag, glob_normmax, glob_last_good_h, glob_hmin, glob_not_yet_start_msg, years_in_century, glob_max_opt_iter, glob_max_minutes, glob_log10abserr, glob_warned2, glob_smallish_float, glob_optimal_start, glob_max_hours, glob_h, MAX_UNCHANGED, glob_curr_iter_when_opt, glob_orig_start_sec, glob_max_rel_trunc_err, glob_hmax, glob_unchanged_h_cnt, glob_no_eqs, glob_dump_analytic, glob_large_float, glob_log10normmin, glob_optimal_clock_start_sec, glob_log10relerr, glob_optimal_done, glob_clock_start_sec, glob_almost_1, centuries_in_millinium, glob_reached_optimal_h, min_in_hour, djd_debug, glob_max_trunc_err, glob_max_order, glob_max_iter, glob_log10_abserr, glob_initial_pass, glob_not_yet_finished, glob_clock_sec, djd_debug2, glob_current_iter, glob_start, glob_small_float, glob_relerr, glob_abserr, glob_log10_relerr, glob_look_poles, glob_disp_incr, hours_in_day, glob_dump, array_const_0D0, array_const_0, array_const_1, array_y1_init, array_m1, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_y2_init, array_pole, array_y1, array_y2, array_norms, array_x, array_y2_higher_work2, array_complex_pole, array_y1_higher, array_real_pole, array_y2_higher_work, array_y2_higher, array_y1_higher_work2, array_y1_higher_work, array_poles, glob_last; array_tmp1[1] := array_y2_higher[1, 1]; array_tmp2[1] := array_m1[1]*array_tmp1[1]; array_tmp3[1] := array_const_0D0[1] + array_tmp2[1]; if 1 <= glob_max_terms then temporary := array_tmp3[1]*glob_h*factorial_3(0, 1); array_y1[2] := temporary; array_y1_higher[1, 2] := temporary; temporary := temporary*2.0/glob_h; array_y1_higher[2, 1] := temporary end if; kkk := 2; array_tmp5[1] := array_y1_higher[1, 1]; if 1 <= glob_max_terms then temporary := array_tmp5[1]*glob_h*factorial_3(0, 1); array_y2[2] := temporary; array_y2_higher[1, 2] := temporary; temporary := temporary*2.0/glob_h; array_y2_higher[2, 1] := temporary end if; kkk := 2; array_tmp1[2] := array_y2_higher[1, 2]; array_tmp2[2] := ats(2, array_m1, array_tmp1, 1); array_tmp3[2] := array_const_0D0[2] + array_tmp2[2]; if 2 <= glob_max_terms then temporary := array_tmp3[2]*glob_h*factorial_3(1, 2); array_y1[3] := temporary; array_y1_higher[1, 3] := temporary; temporary := temporary*2.0/glob_h; array_y1_higher[2, 2] := temporary end if; kkk := 3; array_tmp5[2] := array_y1_higher[1, 2]; if 2 <= glob_max_terms then temporary := array_tmp5[2]*glob_h*factorial_3(1, 2); array_y2[3] := temporary; array_y2_higher[1, 3] := temporary; temporary := temporary*2.0/glob_h; array_y2_higher[2, 2] := temporary end if; kkk := 3; array_tmp1[3] := array_y2_higher[1, 3]; array_tmp2[3] := ats(3, array_m1, array_tmp1, 1); array_tmp3[3] := array_const_0D0[3] + array_tmp2[3]; if 3 <= glob_max_terms then temporary := array_tmp3[3]*glob_h*factorial_3(2, 3); array_y1[4] := temporary; array_y1_higher[1, 4] := temporary; temporary := temporary*2.0/glob_h; array_y1_higher[2, 3] := temporary end if; kkk := 4; array_tmp5[3] := array_y1_higher[1, 3]; if 3 <= glob_max_terms then temporary := array_tmp5[3]*glob_h*factorial_3(2, 3); array_y2[4] := temporary; array_y2_higher[1, 4] := temporary; temporary := temporary*2.0/glob_h; array_y2_higher[2, 3] := temporary end if; kkk := 4; array_tmp1[4] := array_y2_higher[1, 4]; array_tmp2[4] := ats(4, array_m1, array_tmp1, 1); array_tmp3[4] := array_const_0D0[4] + array_tmp2[4]; if 4 <= glob_max_terms then temporary := array_tmp3[4]*glob_h*factorial_3(3, 4); array_y1[5] := temporary; array_y1_higher[1, 5] := temporary; temporary := temporary*2.0/glob_h; array_y1_higher[2, 4] := temporary end if; kkk := 5; array_tmp5[4] := array_y1_higher[1, 4]; if 4 <= glob_max_terms then temporary := array_tmp5[4]*glob_h*factorial_3(3, 4); array_y2[5] := temporary; array_y2_higher[1, 5] := temporary; temporary := temporary*2.0/glob_h; array_y2_higher[2, 4] := temporary end if; kkk := 5; array_tmp1[5] := array_y2_higher[1, 5]; array_tmp2[5] := ats(5, array_m1, array_tmp1, 1); array_tmp3[5] := array_const_0D0[5] + array_tmp2[5]; if 5 <= glob_max_terms then temporary := array_tmp3[5]*glob_h*factorial_3(4, 5); array_y1[6] := temporary; array_y1_higher[1, 6] := temporary; temporary := temporary*2.0/glob_h; array_y1_higher[2, 5] := temporary end if; kkk := 6; array_tmp5[5] := array_y1_higher[1, 5]; if 5 <= glob_max_terms then temporary := array_tmp5[5]*glob_h*factorial_3(4, 5); array_y2[6] := temporary; array_y2_higher[1, 6] := temporary; temporary := temporary*2.0/glob_h; array_y2_higher[2, 5] := temporary end if; kkk := 6; while kkk <= glob_max_terms do array_tmp1[kkk] := array_y2_higher[1, kkk]; array_tmp2[kkk] := ats(kkk, array_m1, array_tmp1, 1); array_tmp3[kkk] := array_const_0D0[kkk] + array_tmp2[kkk]; order_d := 1; if kkk + order_d + 1 <= glob_max_terms then temporary := array_tmp3[kkk]*glob_h^order_d/ factorial_3(kkk - 1, kkk + order_d - 1); array_y1[kkk + order_d] := temporary; array_y1_higher[1, kkk + order_d] := temporary; term := kkk + order_d - 1; adj2 := 2; while adj2 <= order_d + 1 and 1 <= term do temporary := temporary*convfp(adj2)/glob_h; array_y1_higher[adj2, term] := temporary; adj2 := adj2 + 1; term := term - 1 end do end if; array_tmp5[kkk] := array_y1_higher[1, kkk]; order_d := 1; if kkk + order_d + 1 <= glob_max_terms then temporary := array_tmp5[kkk]*glob_h^order_d/ factorial_3(kkk - 1, kkk + order_d - 1); array_y2[kkk + order_d] := temporary; array_y2_higher[1, kkk + order_d] := temporary; term := kkk + order_d - 1; adj2 := 2; while adj2 <= order_d + 1 and 1 <= term do temporary := temporary*convfp(adj2)/glob_h; array_y2_higher[adj2, term] := temporary; adj2 := adj2 + 1; term := term - 1 end do end if; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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 > 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 > 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 > 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 > 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 > 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 > printf(" = %d Days %d Hours %d Minutes %d Seconds\n",days_int,hours_int,minutes_int,sec_int); > elif (hours_int > 0) then > printf(" = %d Hours %d Minutes %d Seconds\n",hours_int,minutes_int,sec_int); > elif (minutes_int > 0) then > printf(" = %d Minutes %d Seconds\n",minutes_int,sec_int); > else > printf(" = %d Seconds\n",sec_int); > fi; > else > printf(" Unknown\n"); > fi; > 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 > > 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 > 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; > od; > fi;; > ret_ats > 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 > > 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 > 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); > fi;; > iii_att := iii_att + 1; > od;; > ret_att := ret_att / convfp(mmm_att) ; > fi;; > ret_att; > 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 > 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 > omniout_float(ALWAYS,"Radius of convergence = " ,4, array_pole[1],4," "); > omniout_float(ALWAYS,"Order of pole = ",4, array_pole[2],4," "); > fi; > 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 > 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 > omniout_str(ALWAYS,"Illegal max_terms = -- Using 30"); > glob_max_terms := 30; > fi;; > if (glob_max_iter < 2) then > omniout_str(ALWAYS,"Illegal max_iter"); > errflag := true; > fi;; > if (errflag) then > > quit; > fi; > 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 > > 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 > sec_left := 0.0; > else > if (abs(sub2) > glob_small_float) then > rrr := (sub1/sub2); > sec_left := rrr * ms2 - ms2; > else > sec_left := -1.0; > fi; > fi;; > sec_left; > 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 glob_small_float < abs(sub2) then rrr := sub1/sub2; sec_left := rrr*ms2 - ms2 else sec_left := -1.0 end if end if; sec_left end proc > > 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 > rrr := (100.0*sub2)/sub1; > else > rrr := 0.0; > fi;; > rrr > end; comp_percent := proc(t_end2, t_start2, t2) local rrr, sub1, sub2; global glob_small_float; sub1 := t_end2 - t_start2; sub2 := t2 - t_start2; if glob_small_float < abs(sub2) then rrr := 100.0*sub2/sub1 else rrr := 0. end if; rrr end proc > > factorial_1 := proc(nnn) > nnn!; > > end; factorial_1 := proc(nnn) nnn! end proc > > factorial_3 := proc(mmm2,nnn2) > (mmm2!)/(nnn2!); > > end; factorial_3 := proc(mmm2, nnn2) mmm2!/nnn2! end proc > convfp := proc(mmm) > (mmm); > > end; convfp := proc(mmm) mmm end proc > convfloat := proc(mmm) > (mmm); > > 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 > exact_soln_y1 := proc(x) > evalf(cos(x)); > end; exact_soln_y1 := proc(x) evalf(cos(x)) end proc > exact_soln_y2 := proc(x) > evalf(sin(x)); > end; exact_soln_y2 := proc(x) evalf(sin(x)) end proc > > #END USER DEF BLOCK #END OUTFILE5 > mainprog := proc() #BEGIN OUTFIEMAIN > local d1,d2,d3,d4,est_err_2,niii,done_once, > term,ord,order_diff,term_no, > 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 > DEBUGL, > INFO, > ALWAYS, > glob_max_terms, > glob_iolevel, > DEBUGMASSIVE, #Top Generate Globals Decl > glob_iter, > glob_max_sec, > glob_warned, > glob_hmin_init, > days_in_year, > sec_in_min, > glob_display_flag, > glob_normmax, > glob_last_good_h, > glob_hmin, > glob_not_yet_start_msg, > years_in_century, > glob_max_opt_iter, > glob_max_minutes, > glob_log10abserr, > glob_warned2, > glob_smallish_float, > glob_optimal_start, > glob_max_hours, > glob_h, > MAX_UNCHANGED, > glob_curr_iter_when_opt, > glob_orig_start_sec, > glob_max_rel_trunc_err, > glob_hmax, > glob_unchanged_h_cnt, > glob_no_eqs, > glob_dump_analytic, > glob_large_float, > glob_log10normmin, > glob_optimal_clock_start_sec, > glob_log10relerr, > glob_optimal_done, > glob_clock_start_sec, > glob_almost_1, > centuries_in_millinium, > glob_reached_optimal_h, > min_in_hour, > djd_debug, > glob_max_trunc_err, > glob_max_order, > glob_max_iter, > glob_log10_abserr, > glob_initial_pass, > glob_not_yet_finished, > glob_clock_sec, > djd_debug2, > glob_current_iter, > glob_start, > glob_small_float, > glob_relerr, > glob_abserr, > glob_log10_relerr, > glob_look_poles, > glob_disp_incr, > hours_in_day, > glob_dump, #Bottom Generate Globals Decl #BEGIN CONST > array_const_0D0, > array_const_0, > array_const_1, #END CONST > array_y1_init, > array_m1, > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_y2_init, > array_pole, > array_y1, > array_y2, > array_norms, > array_x, > array_y2_higher_work2, > array_complex_pole, > array_y1_higher, > array_real_pole, > array_y2_higher_work, > array_y2_higher, > array_y1_higher_work2, > array_y1_higher_work, > array_poles, > glob_last; > glob_last; > ALWAYS := 1; > INFO := 2; > DEBUGL := 3; > DEBUGMASSIVE := 4; > glob_iolevel := INFO; > DEBUGL := 3; > INFO := 2; > ALWAYS := 1; > glob_max_terms := 30; > glob_iolevel := 5; > DEBUGMASSIVE := 4; > glob_iter := 0; > glob_max_sec := 10000.0; > glob_warned := false; > glob_hmin_init := 0.001; > days_in_year := 365.0; > sec_in_min := 60.0; > glob_display_flag := true; > glob_normmax := 0.0; > glob_last_good_h := 0.1; > glob_hmin := 0.00000000001; > glob_not_yet_start_msg := true; > years_in_century := 100.0; > glob_max_opt_iter := 10; > glob_max_minutes := 0.0; > glob_log10abserr := 0.0; > glob_warned2 := false; > glob_smallish_float := 0.1e-100; > glob_optimal_start := 0.0; > glob_max_hours := 0.0; > glob_h := 0.1; > MAX_UNCHANGED := 10; > glob_curr_iter_when_opt := 0; > glob_orig_start_sec := 0.0; > glob_max_rel_trunc_err := 0.1e-10; > glob_hmax := 1.0; > glob_unchanged_h_cnt := 0; > glob_no_eqs := 0; > glob_dump_analytic := false; > glob_large_float := 9.0e100; > glob_log10normmin := 0.1; > glob_optimal_clock_start_sec := 0.0; > glob_log10relerr := 0.0; > glob_optimal_done := false; > glob_clock_start_sec := 0.0; > glob_almost_1 := 0.9990; > centuries_in_millinium := 10.0; > glob_reached_optimal_h := false; > min_in_hour := 60.0; > djd_debug := true; > glob_max_trunc_err := 0.1e-10; > glob_max_order := 30; > glob_max_iter := 1000; > glob_log10_abserr := 0.1e-10; > glob_initial_pass := true; > glob_not_yet_finished := true; > glob_clock_sec := 0.0; > djd_debug2 := true; > glob_current_iter := 0; > glob_start := 0; > glob_small_float := 0.1e-50; > glob_relerr := 0.1e-10; > glob_abserr := 0.1e-10; > glob_log10_relerr := 0.1e-10; > glob_look_poles := false; > glob_disp_incr := 0.1; > hours_in_day := 24.0; > glob_dump := false; #Write Set Defaults > glob_orig_start_sec := elapsed_time_seconds(); > MAX_UNCHANGED := 10; > glob_curr_iter_when_opt := 0; > glob_display_flag := true; > glob_max_order := 1; > glob_no_eqs := 2; > glob_iter := -1; > opt_iter := -1; > glob_max_iter := 50000; > glob_max_hours := 0.0; > glob_max_minutes := 15.0; > omniout_str(ALWAYS,"##############ECHO OF PROBLEM#################"); > omniout_str(ALWAYS,"##############mtest2map.ode#################"); > omniout_str(ALWAYS,"diff ( y1 , x , 1 ) = m1 * diff(y2,x,0) ;"); > omniout_str(ALWAYS,"diff ( y2 , x , 1 ) = diff(y1,x,0) ;"); > omniout_str(ALWAYS,"!"); > omniout_str(ALWAYS,"Digits := 32;"); > omniout_str(ALWAYS,"max_terms := 30;"); > omniout_str(ALWAYS,"!"); > omniout_str(ALWAYS,"x_start := 0.1;"); > omniout_str(ALWAYS,"x_end := 10.0;"); > omniout_str(ALWAYS,"array_y1_init[1] := exact_soln_y1(x_start);"); > omniout_str(ALWAYS,"array_y2_init[1] := exact_soln_y2(x_start);"); > omniout_str(ALWAYS,"glob_h := 0.00001 ;"); > omniout_str(ALWAYS,"glob_look_poles := true;"); > omniout_str(ALWAYS,"glob_max_iter := 10;"); > omniout_str(ALWAYS,"glob_progress_ind := 1;"); > omniout_str(ALWAYS,"!"); > omniout_str(ALWAYS,"exact_soln_y1 := proc(x)"); > omniout_str(ALWAYS,"evalf(cos(x));"); > omniout_str(ALWAYS,"end;"); > omniout_str(ALWAYS,"exact_soln_y2 := proc(x) "); > omniout_str(ALWAYS,"evalf(sin(x));"); > omniout_str(ALWAYS,"end;"); > omniout_str(ALWAYS,""); > omniout_str(ALWAYS,""); > 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 > Digits := 32; > max_terms := 30; #END FIRST INPUT BLOCK #START OF INITS AFTER INPUT BLOCK > glob_max_terms := max_terms; #END OF INITS AFTER INPUT BLOCK > array_y1_init:= Array(1..(max_terms + 1),[]); > array_m1:= Array(1..(max_terms + 1),[]); > array_tmp0:= Array(1..(max_terms + 1),[]); > array_tmp1:= Array(1..(max_terms + 1),[]); > array_tmp2:= Array(1..(max_terms + 1),[]); > array_tmp3:= Array(1..(max_terms + 1),[]); > array_tmp4:= Array(1..(max_terms + 1),[]); > array_tmp5:= Array(1..(max_terms + 1),[]); > array_y2_init:= Array(1..(max_terms + 1),[]); > array_pole:= Array(1..(max_terms + 1),[]); > array_y1:= Array(1..(max_terms + 1),[]); > array_y2:= Array(1..(max_terms + 1),[]); > array_norms:= Array(1..(max_terms + 1),[]); > array_x:= Array(1..(max_terms + 1),[]); > array_y2_higher_work2 := Array(1..(2+ 1) ,(1..max_terms+ 1),[]); > array_complex_pole := Array(1..(2+ 1) ,(1..3+ 1),[]); > array_y1_higher := Array(1..(2+ 1) ,(1..max_terms+ 1),[]); > array_real_pole := Array(1..(2+ 1) ,(1..3+ 1),[]); > array_y2_higher_work := Array(1..(2+ 1) ,(1..max_terms+ 1),[]); > array_y2_higher := Array(1..(2+ 1) ,(1..max_terms+ 1),[]); > array_y1_higher_work2 := Array(1..(2+ 1) ,(1..max_terms+ 1),[]); > array_y1_higher_work := Array(1..(2+ 1) ,(1..max_terms+ 1),[]); > array_poles := Array(1..(2+ 1) ,(1..3+ 1),[]); > term := 1; > while term <= max_terms do > array_y1_init[term] := 0.0; > term := term + 1; > od;; > term := 1; > while term <= max_terms do > array_m1[term] := 0.0; > term := term + 1; > od;; > term := 1; > while term <= max_terms do > array_tmp0[term] := 0.0; > term := term + 1; > od;; > term := 1; > while term <= max_terms do > array_tmp1[term] := 0.0; > term := term + 1; > od;; > term := 1; > while term <= max_terms do > array_tmp2[term] := 0.0; > term := term + 1; > od;; > term := 1; > while term <= max_terms do > array_tmp3[term] := 0.0; > term := term + 1; > od;; > term := 1; > while term <= max_terms do > array_tmp4[term] := 0.0; > term := term + 1; > od;; > term := 1; > while term <= max_terms do > array_tmp5[term] := 0.0; > term := term + 1; > od;; > term := 1; > while term <= max_terms do > array_y2_init[term] := 0.0; > term := term + 1; > od;; > term := 1; > while term <= max_terms do > array_pole[term] := 0.0; > term := term + 1; > od;; > term := 1; > while term <= max_terms do > array_y1[term] := 0.0; > term := term + 1; > od;; > term := 1; > while term <= max_terms do > array_y2[term] := 0.0; > term := term + 1; > od;; > term := 1; > while term <= max_terms do > array_norms[term] := 0.0; > term := term + 1; > od;; > term := 1; > while term <= max_terms do > array_x[term] := 0.0; > term := term + 1; > od;; > ord := 1; > while ord <=2 do > term := 1; > while term <= max_terms do > array_y2_higher_work2[ord,term] := 0.0; > term := term + 1; > od;; > ord := ord + 1; > od;; > ord := 1; > while ord <=2 do > term := 1; > while term <= 3 do > array_complex_pole[ord,term] := 0.0; > term := term + 1; > od;; > ord := ord + 1; > od;; > ord := 1; > while ord <=2 do > term := 1; > while term <= max_terms do > array_y1_higher[ord,term] := 0.0; > term := term + 1; > od;; > ord := ord + 1; > od;; > ord := 1; > while ord <=2 do > term := 1; > while term <= 3 do > array_real_pole[ord,term] := 0.0; > term := term + 1; > od;; > ord := ord + 1; > od;; > ord := 1; > while ord <=2 do > term := 1; > while term <= max_terms do > array_y2_higher_work[ord,term] := 0.0; > term := term + 1; > od;; > ord := ord + 1; > od;; > ord := 1; > while ord <=2 do > term := 1; > while term <= max_terms do > array_y2_higher[ord,term] := 0.0; > term := term + 1; > od;; > ord := ord + 1; > od;; > ord := 1; > while ord <=2 do > term := 1; > while term <= max_terms do > array_y1_higher_work2[ord,term] := 0.0; > term := term + 1; > od;; > ord := ord + 1; > od;; > ord := 1; > while ord <=2 do > term := 1; > while term <= max_terms do > array_y1_higher_work[ord,term] := 0.0; > term := term + 1; > od;; > ord := ord + 1; > od;; > ord := 1; > while ord <=2 do > term := 1; > while term <= 3 do > array_poles[ord,term] := 0.0; > term := term + 1; > od;; > ord := ord + 1; > od;; #BEGIN ARRAYS DEFINED AND INITIALIZATED > array_tmp5 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do > array_tmp5[term] := 0.0; > term := term + 1; > od;; > array_tmp4 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do > array_tmp4[term] := 0.0; > term := term + 1; > od;; > array_tmp3 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do > array_tmp3[term] := 0.0; > term := term + 1; > od;; > array_tmp2 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do > array_tmp2[term] := 0.0; > term := term + 1; > od;; > array_tmp1 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do > array_tmp1[term] := 0.0; > term := term + 1; > od;; > array_tmp0 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do > array_tmp0[term] := 0.0; > term := term + 1; > od;; > array_m1 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do > array_m1[term] := 0.0; > term := term + 1; > od;; > array_y2 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do > array_y2[term] := 0.0; > term := term + 1; > od;; > array_y1 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do > array_y1[term] := 0.0; > term := term + 1; > od;; > array_x := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do > array_x[term] := 0.0; > term := term + 1; > od;; > array_const_0D0 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do > array_const_0D0[term] := 0.0; > term := term + 1; > od;; > array_const_0D0[1] := 0.0; > array_const_0 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do > array_const_0[term] := 0.0; > term := term + 1; > od;; > array_const_0[1] := 0; > array_const_1 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do > array_const_1[term] := 0.0; > term := term + 1; > od;; > array_const_1[1] := 1; > array_m1 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms do > array_m1[term] := 0.0; > term := term + 1; > od;; > array_m1[1] := -1.0; #END ARRAYS DEFINED AND INITIALIZATED #TOP SECOND INPUT BLOCK #BEGIN SECOND INPUT BLOCK > x_start := 0.1; > x_end := 10.0; > array_y1_init[1] := exact_soln_y1(x_start); > array_y2_init[1] := exact_soln_y2(x_start); > glob_h := 0.00001 ; > glob_look_poles := true; > glob_max_iter := 10; > glob_progress_ind := 1; #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 #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_y1 > term_no := 1; > while (term_no <= order_diff) do > array_y1[term_no] := array_y1_init[term_no] * glob_h ^ (term_no - 1) / factorial_1(term_no - 1); > term_no := term_no + 1; > od;; > rows := order_diff; > r_order := 1; > while (r_order <= rows) do > term_no := 1; > while (term_no <= (rows - r_order + 1)) do > it := term_no + r_order - 1; > array_y1_higher[r_order,term_no] := array_y1_init[it]* (glob_h ^ (term_no - 1)) / ((factorial_1(term_no - 1))); > term_no := term_no + 1; > od;; > r_order := r_order + 1; > od; > ; > order_diff := 1; #Start Series array_y2 > term_no := 1; > while (term_no <= order_diff) do > array_y2[term_no] := array_y2_init[term_no] * glob_h ^ (term_no - 1) / factorial_1(term_no - 1); > term_no := term_no + 1; > od;; > rows := order_diff; > r_order := 1; > while (r_order <= rows) do > term_no := 1; > while (term_no <= (rows - r_order + 1)) do > it := term_no + r_order - 1; > array_y2_higher[r_order,term_no] := array_y2_init[it]* (glob_h ^ (term_no - 1)) / ((factorial_1(term_no - 1))); > term_no := term_no + 1; > od;; > r_order := r_order + 1; > od; > ; > current_iter := 1; > glob_clock_start_sec := elapsed_time_seconds(); > start_array_y1(); > if (abs(array_y1_higher[1,1]) > glob_small_float) then > tmp := abs(array_y1_higher[1,1]); > log10norm := (log10(tmp)); > if (log10norm < glob_log10normmin) then > glob_log10normmin := log10norm; > fi; > fi;; > display_alot(current_iter) > ; > start_array_y2(); > if (abs(array_y2_higher[1,1]) > glob_small_float) then > tmp := abs(array_y2_higher[1,1]); > log10norm := (log10(tmp)); > if (log10norm < glob_log10normmin) then > glob_log10normmin := log10norm; > fi; > fi;; > 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 #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; > sub_iter := 1; > while sub_iter <= 2 do > atomall() > ; > sub_iter := sub_iter + 1; > od;; > if (glob_look_poles) then #left paren 0004C > check_for_pole(); > fi;;#was right paren 0004C > array_x[1] := array_x[1] + glob_h; > array_x[2] := glob_h; > order_diff := 1; #Jump Series array_y1 #START PART 1 SUM AND ADJUST #START SUM AND ADJUST EQ =1 #sum_and_adjust array_y1 > order_diff := 1; #BEFORE ADJUST SUBSERIES EQ =1 > order_diff := 1; > ord := 2; > calc_term := 1; #adjust_subseriesarray_y1 > iii := glob_max_terms; > while (iii >= calc_term) do > array_y1_higher_work[2,iii] := array_y1_higher[2,iii] / (glob_h ^ (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1); > iii := iii - 1; > od;; #AFTER ADJUST SUBSERIES EQ =1 #BEFORE SUM SUBSERIES EQ =1 > order_diff := 1; > temp_sum := 0.0; > ord := 2; > calc_term := 1; #sum_subseriesarray_y1 > iii := glob_max_terms; > while (iii >= calc_term) do > temp_sum := temp_sum + array_y1_higher_work[ord,iii]; > iii := iii - 1; > od;; > array_y1_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 > order_diff := 1; > ord := 1; > calc_term := 2; #adjust_subseriesarray_y1 > iii := glob_max_terms; > while (iii >= calc_term) do > array_y1_higher_work[1,iii] := array_y1_higher[1,iii] / (glob_h ^ (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1); > iii := iii - 1; > od;; #AFTER ADJUST SUBSERIES EQ =1 #BEFORE SUM SUBSERIES EQ =1 > order_diff := 1; > temp_sum := 0.0; > ord := 1; > calc_term := 2; #sum_subseriesarray_y1 > iii := glob_max_terms; > while (iii >= calc_term) do > temp_sum := temp_sum + array_y1_higher_work[ord,iii]; > iii := iii - 1; > od;; > array_y1_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 > order_diff := 1; > ord := 1; > calc_term := 1; #adjust_subseriesarray_y1 > iii := glob_max_terms; > while (iii >= calc_term) do > array_y1_higher_work[1,iii] := array_y1_higher[1,iii] / (glob_h ^ (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1); > iii := iii - 1; > od;; #AFTER ADJUST SUBSERIES EQ =1 #BEFORE SUM SUBSERIES EQ =1 > order_diff := 1; > temp_sum := 0.0; > ord := 1; > calc_term := 1; #sum_subseriesarray_y1 > iii := glob_max_terms; > while (iii >= calc_term) do > temp_sum := temp_sum + array_y1_higher_work[ord,iii]; > iii := iii - 1; > od;; > array_y1_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 > array_y1[term_no] := array_y1_higher_work2[1,term_no]; > ord := 1; > while ord <= order_diff do > array_y1_higher[ord,term_no] := array_y1_higher_work2[ord,term_no]; > ord := ord + 1; > od;; > term_no := term_no - 1; > od;; #END PART 2 HEVE MOVED TERMS to REGULAR Array > order_diff := 1; #Jump Series array_y2 #START PART 1 SUM AND ADJUST #START SUM AND ADJUST EQ =2 #sum_and_adjust array_y2 > order_diff := 1; #BEFORE ADJUST SUBSERIES EQ =2 > order_diff := 1; > ord := 2; > calc_term := 1; #adjust_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do > array_y2_higher_work[2,iii] := array_y2_higher[2,iii] / (glob_h ^ (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1); > iii := iii - 1; > od;; #AFTER ADJUST SUBSERIES EQ =2 #BEFORE SUM SUBSERIES EQ =2 > order_diff := 1; > temp_sum := 0.0; > ord := 2; > calc_term := 1; #sum_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do > temp_sum := temp_sum + array_y2_higher_work[ord,iii]; > iii := iii - 1; > od;; > array_y2_higher_work2[ord,calc_term] := temp_sum * (glob_h ^ (calc_term - 1)) / (convfp(calc_term - 1)!); #AFTER SUM SUBSERIES EQ =2 #BEFORE ADJUST SUBSERIES EQ =2 > order_diff := 1; > ord := 1; > calc_term := 2; #adjust_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do > array_y2_higher_work[1,iii] := array_y2_higher[1,iii] / (glob_h ^ (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1); > iii := iii - 1; > od;; #AFTER ADJUST SUBSERIES EQ =2 #BEFORE SUM SUBSERIES EQ =2 > order_diff := 1; > temp_sum := 0.0; > ord := 1; > calc_term := 2; #sum_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do > temp_sum := temp_sum + array_y2_higher_work[ord,iii]; > iii := iii - 1; > od;; > array_y2_higher_work2[ord,calc_term] := temp_sum * (glob_h ^ (calc_term - 1)) / (convfp(calc_term - 1)!); #AFTER SUM SUBSERIES EQ =2 #BEFORE ADJUST SUBSERIES EQ =2 > order_diff := 1; > ord := 1; > calc_term := 1; #adjust_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do > array_y2_higher_work[1,iii] := array_y2_higher[1,iii] / (glob_h ^ (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1); > iii := iii - 1; > od;; #AFTER ADJUST SUBSERIES EQ =2 #BEFORE SUM SUBSERIES EQ =2 > order_diff := 1; > temp_sum := 0.0; > ord := 1; > calc_term := 1; #sum_subseriesarray_y2 > iii := glob_max_terms; > while (iii >= calc_term) do > temp_sum := temp_sum + array_y2_higher_work[ord,iii]; > iii := iii - 1; > od;; > array_y2_higher_work2[ord,calc_term] := temp_sum * (glob_h ^ (calc_term - 1)) / (convfp(calc_term - 1)!); #AFTER SUM SUBSERIES EQ =2 #END SUM AND ADJUST EQ =2 #END PART 1 #START PART 2 MOVE TERMS to REGULAR Array > term_no := glob_max_terms; > while (term_no >= 1) do > array_y2[term_no] := array_y2_higher_work2[1,term_no]; > ord := 1; > while ord <= order_diff do > array_y2_higher[ord,term_no] := array_y2_higher_work2[ord,term_no]; > ord := ord + 1; > od;; > term_no := term_no - 1; > od;; #END PART 2 HEVE MOVED TERMS to REGULAR Array > display_alot(current_iter) > ; > od;;#right paren 0001C > omniout_str(ALWAYS,"Finished!"); > if (glob_iter >= glob_max_iter) then > omniout_str(ALWAYS,"Maximum Iterations Reached before Solution Completed!") > fi;; > if (elapsed_time_seconds() - convfloat(glob_orig_start_sec) >= convfloat(glob_max_sec )) then > omniout_str(ALWAYS,"Maximum Time Reached before Solution Completed!") > fi;; > glob_clock_sec := elapsed_time_seconds(); > omniout_int(INFO,"Iterations ",32,glob_iter,4," ") > ; > prog_report(x_start,x_end) > ; #END OUTFILEMAIN > end; Warning, `glob_progress_ind` is implicitly declared local to procedure `mainprog` mainprog := proc() local d1, d2, d3, d4, est_err_2, niii, done_once, term, ord, order_diff, term_no, rows, r_order, sub_iter, calc_term, iii, temp_sum, current_iter, x_start, x_end, it, log10norm, max_terms, opt_iter, tmp, glob_progress_ind; global DEBUGL, INFO, ALWAYS, glob_max_terms, glob_iolevel, DEBUGMASSIVE, glob_iter, glob_max_sec, glob_warned, glob_hmin_init, days_in_year, sec_in_min, glob_display_flag, glob_normmax, glob_last_good_h, glob_hmin, glob_not_yet_start_msg, years_in_century, glob_max_opt_iter, glob_max_minutes, glob_log10abserr, glob_warned2, glob_smallish_float, glob_optimal_start, glob_max_hours, glob_h, MAX_UNCHANGED, glob_curr_iter_when_opt, glob_orig_start_sec, glob_max_rel_trunc_err, glob_hmax, glob_unchanged_h_cnt, glob_no_eqs, glob_dump_analytic, glob_large_float, glob_log10normmin, glob_optimal_clock_start_sec, glob_log10relerr, glob_optimal_done, glob_clock_start_sec, glob_almost_1, centuries_in_millinium, glob_reached_optimal_h, min_in_hour, djd_debug, glob_max_trunc_err, glob_max_order, glob_max_iter, glob_log10_abserr, glob_initial_pass, glob_not_yet_finished, glob_clock_sec, djd_debug2, glob_current_iter, glob_start, glob_small_float, glob_relerr, glob_abserr, glob_log10_relerr, glob_look_poles, glob_disp_incr, hours_in_day, glob_dump, array_const_0D0, array_const_0, array_const_1, array_y1_init, array_m1, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_y2_init, array_pole, array_y1, array_y2, array_norms, array_x, array_y2_higher_work2, array_complex_pole, array_y1_higher, array_real_pole, array_y2_higher_work, array_y2_higher, array_y1_higher_work2, array_y1_higher_work, array_poles, glob_last; glob_last; ALWAYS := 1; INFO := 2; DEBUGL := 3; DEBUGMASSIVE := 4; glob_iolevel := INFO; DEBUGL := 3; INFO := 2; ALWAYS := 1; glob_max_terms := 30; glob_iolevel := 5; DEBUGMASSIVE := 4; glob_iter := 0; glob_max_sec := 10000.0; glob_warned := false; glob_hmin_init := 0.001; days_in_year := 365.0; sec_in_min := 60.0; glob_display_flag := true; glob_normmax := 0.; glob_last_good_h := 0.1; glob_hmin := 0.1*10^(-10); glob_not_yet_start_msg := true; years_in_century := 100.0; glob_max_opt_iter := 10; glob_max_minutes := 0.; glob_log10abserr := 0.; glob_warned2 := false; glob_smallish_float := 0.1*10^(-100); glob_optimal_start := 0.; glob_max_hours := 0.; glob_h := 0.1; MAX_UNCHANGED := 10; glob_curr_iter_when_opt := 0; glob_orig_start_sec := 0.; glob_max_rel_trunc_err := 0.1*10^(-10); glob_hmax := 1.0; glob_unchanged_h_cnt := 0; glob_no_eqs := 0; glob_dump_analytic := false; glob_large_float := 0.90*10^101; glob_log10normmin := 0.1; glob_optimal_clock_start_sec := 0.; glob_log10relerr := 0.; glob_optimal_done := false; glob_clock_start_sec := 0.; glob_almost_1 := 0.9990; centuries_in_millinium := 10.0; glob_reached_optimal_h := false; min_in_hour := 60.0; djd_debug := true; glob_max_trunc_err := 0.1*10^(-10); glob_max_order := 30; glob_max_iter := 1000; glob_log10_abserr := 0.1*10^(-10); glob_initial_pass := true; glob_not_yet_finished := true; glob_clock_sec := 0.; djd_debug2 := true; glob_current_iter := 0; glob_start := 0; glob_small_float := 0.1*10^(-50); glob_relerr := 0.1*10^(-10); glob_abserr := 0.1*10^(-10); glob_log10_relerr := 0.1*10^(-10); glob_look_poles := false; glob_disp_incr := 0.1; hours_in_day := 24.0; glob_dump := false; glob_orig_start_sec := elapsed_time_seconds(); MAX_UNCHANGED := 10; glob_curr_iter_when_opt := 0; glob_display_flag := true; glob_max_order := 1; glob_no_eqs := 2; glob_iter := -1; opt_iter := -1; glob_max_iter := 50000; glob_max_hours := 0.; glob_max_minutes := 15.0; omniout_str(ALWAYS, "##############ECHO OF PROBLEM#################"); omniout_str(ALWAYS, "##############mtest2map.ode#################"); omniout_str(ALWAYS, "diff ( y1 , x , 1 ) = m1 * diff(y2,x,0) ;"); omniout_str(ALWAYS, "diff ( y2 , x , 1 ) = diff(y1,x,0) ;"); omniout_str(ALWAYS, "!"); omniout_str(ALWAYS, "Digits := 32;"); omniout_str(ALWAYS, "max_terms := 30;"); omniout_str(ALWAYS, "!"); omniout_str(ALWAYS, "x_start := 0.1;"); omniout_str(ALWAYS, "x_end := 10.0;"); omniout_str(ALWAYS, "array_y1_init[1] := exact_soln_y1(x_start);"); omniout_str(ALWAYS, "array_y2_init[1] := exact_soln_y2(x_start);"); omniout_str(ALWAYS, "glob_h := 0.00001 ;"); omniout_str(ALWAYS, "glob_look_poles := true;"); omniout_str(ALWAYS, "glob_max_iter := 10;"); omniout_str(ALWAYS, "glob_progress_ind := 1;"); omniout_str(ALWAYS, "!"); omniout_str(ALWAYS, "exact_soln_y1 := proc(x)"); omniout_str(ALWAYS, "evalf(cos(x));"); omniout_str(ALWAYS, "end;"); omniout_str(ALWAYS, "exact_soln_y2 := proc(x) "); omniout_str(ALWAYS, "evalf(sin(x));"); omniout_str(ALWAYS, "end;"); omniout_str(ALWAYS, ""); omniout_str(ALWAYS, ""); omniout_str(ALWAYS, "#######END OF ECHO OF PROBLEM#################"); glob_unchanged_h_cnt := 0; glob_warned := false; glob_warned2 := false; glob_small_float := 0.10*10^(-199); glob_smallish_float := 0.10*10^(-63); glob_large_float := 0.10*10^101; glob_almost_1 := 0.99; glob_log10_abserr := -8.0; glob_log10_relerr := -8.0; glob_hmax := 0.01; Digits := 32; max_terms := 30; glob_max_terms := max_terms; array_y1_init := Array(1 .. max_terms + 1, []); array_m1 := Array(1 .. max_terms + 1, []); array_tmp0 := Array(1 .. max_terms + 1, []); array_tmp1 := Array(1 .. max_terms + 1, []); array_tmp2 := Array(1 .. max_terms + 1, []); array_tmp3 := Array(1 .. max_terms + 1, []); array_tmp4 := Array(1 .. max_terms + 1, []); array_tmp5 := Array(1 .. max_terms + 1, []); array_y2_init := Array(1 .. max_terms + 1, []); array_pole := Array(1 .. max_terms + 1, []); array_y1 := Array(1 .. max_terms + 1, []); array_y2 := Array(1 .. max_terms + 1, []); array_norms := Array(1 .. max_terms + 1, []); array_x := Array(1 .. max_terms + 1, []); array_y2_higher_work2 := Array(1 .. 3, 1 .. max_terms + 1, []); array_complex_pole := Array(1 .. 3, 1 .. 4, []); array_y1_higher := Array(1 .. 3, 1 .. max_terms + 1, []); array_real_pole := Array(1 .. 3, 1 .. 4, []); array_y2_higher_work := Array(1 .. 3, 1 .. max_terms + 1, []); array_y2_higher := Array(1 .. 3, 1 .. max_terms + 1, []); array_y1_higher_work2 := Array(1 .. 3, 1 .. max_terms + 1, []); array_y1_higher_work := Array(1 .. 3, 1 .. max_terms + 1, []); array_poles := Array(1 .. 3, 1 .. 4, []); term := 1; while term <= max_terms do array_y1_init[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_m1[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp0[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp1[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp2[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_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_y2_init[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_pole[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_y1[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_y2[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_norms[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_x[term] := 0.; term := term + 1 end do ; ord := 1; while ord <= 2 do term := 1; while term <= max_terms do array_y2_higher_work2[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 2 do term := 1; while term <= 3 do array_complex_pole[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 2 do term := 1; while term <= max_terms do array_y1_higher[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 2 do term := 1; while term <= 3 do array_real_pole[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 2 do term := 1; while term <= max_terms do array_y2_higher_work[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 2 do term := 1; while term <= max_terms do array_y2_higher[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 2 do term := 1; while term <= max_terms do array_y1_higher_work2[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 2 do term := 1; while term <= max_terms do array_y1_higher_work[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 2 do term := 1; while term <= 3 do array_poles[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; array_tmp5 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp5[term] := 0.; term := term + 1 end do; array_tmp4 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp4[term] := 0.; term := term + 1 end do; array_tmp3 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp3[term] := 0.; term := term + 1 end do; array_tmp2 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp2[term] := 0.; term := term + 1 end do; array_tmp1 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp1[term] := 0.; term := term + 1 end do; array_tmp0 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp0[term] := 0.; term := term + 1 end do; array_m1 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_m1[term] := 0.; term := term + 1 end do; array_y2 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_y2[term] := 0.; term := term + 1 end do; array_y1 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_y1[term] := 0.; term := term + 1 end do; array_x := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_x[term] := 0.; term := term + 1 end do; array_const_0D0 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_const_0D0[term] := 0.; term := term + 1 end do; array_const_0D0[1] := 0.; array_const_0 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_const_0[term] := 0.; term := term + 1 end do; array_const_0[1] := 0; array_const_1 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_const_1[term] := 0.; term := term + 1 end do; array_const_1[1] := 1; array_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 := 0.1; x_end := 10.0; array_y1_init[1] := exact_soln_y1(x_start); array_y2_init[1] := exact_soln_y2(x_start); glob_h := 0.00001; glob_look_poles := true; glob_max_iter := 10; glob_progress_ind := 1; 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(); 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_y1[term_no] := array_y1_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_y1_higher[r_order, term_no] := array_y1_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; order_diff := 1; term_no := 1; while term_no <= order_diff do array_y2[term_no] := array_y2_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_y2_higher[r_order, term_no] := array_y2_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_y1(); if glob_small_float < abs(array_y1_higher[1, 1]) then tmp := abs(array_y1_higher[1, 1]); log10norm := log10(tmp); if log10norm < glob_log10normmin then glob_log10normmin := log10norm end if end if; display_alot(current_iter); start_array_y2(); if glob_small_float < abs(array_y2_higher[1, 1]) then tmp := abs(array_y2_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; sub_iter := 1; while sub_iter <= 2 do atomall(); sub_iter := sub_iter + 1 end do; 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; order_diff := 1; order_diff := 1; ord := 2; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do array_y1_higher_work[2, iii] := array_y1_higher[2, iii]/( glob_h^(calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; order_diff := 1; temp_sum := 0.; ord := 2; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do temp_sum := temp_sum + array_y1_higher_work[ord, iii]; iii := iii - 1 end do; array_y1_higher_work2[ord, calc_term] := temp_sum*glob_h^(calc_term - 1)/convfp(calc_term - 1)!; order_diff := 1; ord := 1; calc_term := 2; iii := glob_max_terms; while calc_term <= iii do array_y1_higher_work[1, iii] := array_y1_higher[1, iii]/( glob_h^(calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; order_diff := 1; temp_sum := 0.; ord := 1; calc_term := 2; iii := glob_max_terms; while calc_term <= iii do temp_sum := temp_sum + array_y1_higher_work[ord, iii]; iii := iii - 1 end do; array_y1_higher_work2[ord, calc_term] := temp_sum*glob_h^(calc_term - 1)/convfp(calc_term - 1)!; order_diff := 1; ord := 1; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do array_y1_higher_work[1, iii] := array_y1_higher[1, iii]/( glob_h^(calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; order_diff := 1; temp_sum := 0.; ord := 1; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do temp_sum := temp_sum + array_y1_higher_work[ord, iii]; iii := iii - 1 end do; array_y1_higher_work2[ord, calc_term] := temp_sum*glob_h^(calc_term - 1)/convfp(calc_term - 1)!; term_no := glob_max_terms; while 1 <= term_no do array_y1[term_no] := array_y1_higher_work2[1, term_no]; ord := 1; while ord <= order_diff do array_y1_higher[ord, term_no] := array_y1_higher_work2[ord, term_no]; ord := ord + 1 end do; term_no := term_no - 1 end do; order_diff := 1; order_diff := 1; order_diff := 1; ord := 2; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do array_y2_higher_work[2, iii] := array_y2_higher[2, iii]/( glob_h^(calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; order_diff := 1; temp_sum := 0.; ord := 2; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do temp_sum := temp_sum + array_y2_higher_work[ord, iii]; iii := iii - 1 end do; array_y2_higher_work2[ord, calc_term] := temp_sum*glob_h^(calc_term - 1)/convfp(calc_term - 1)!; order_diff := 1; ord := 1; calc_term := 2; iii := glob_max_terms; while calc_term <= iii do array_y2_higher_work[1, iii] := array_y2_higher[1, iii]/( glob_h^(calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; order_diff := 1; temp_sum := 0.; ord := 1; calc_term := 2; iii := glob_max_terms; while calc_term <= iii do temp_sum := temp_sum + array_y2_higher_work[ord, iii]; iii := iii - 1 end do; array_y2_higher_work2[ord, calc_term] := temp_sum*glob_h^(calc_term - 1)/convfp(calc_term - 1)!; order_diff := 1; ord := 1; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do array_y2_higher_work[1, iii] := array_y2_higher[1, iii]/( glob_h^(calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; order_diff := 1; temp_sum := 0.; ord := 1; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do temp_sum := temp_sum + array_y2_higher_work[ord, iii]; iii := iii - 1 end do; array_y2_higher_work2[ord, calc_term] := temp_sum*glob_h^(calc_term - 1)/convfp(calc_term - 1)!; term_no := glob_max_terms; while 1 <= term_no do array_y2[term_no] := array_y2_higher_work2[1, term_no]; ord := 1; while ord <= order_diff do array_y2_higher[ord, term_no] := array_y2_higher_work2[ord, term_no]; ord := ord + 1 end do; term_no := term_no - 1 end do; 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_int(INFO, "Iterations ", 32, glob_iter, 4, " "); prog_report(x_start, x_end) end proc > mainprog(); ##############ECHO OF PROBLEM################# ##############mtest2map.ode################# diff ( y1 , x , 1 ) = m1 * diff(y2,x,0) ; diff ( y2 , x , 1 ) = diff(y1,x,0) ; ! Digits := 32; max_terms := 30; ! x_start := 0.1; x_end := 10.0; array_y1_init[1] := exact_soln_y1(x_start); array_y2_init[1] := exact_soln_y2(x_start); glob_h := 0.00001 ; glob_look_poles := true; glob_max_iter := 10; glob_progress_ind := 1; ! exact_soln_y1 := proc(x) evalf(cos(x)); end; exact_soln_y2 := proc(x) evalf(sin(x)); end; #######END OF ECHO OF PROBLEM################# START of Soultion x[1] = 0.1 y1[1] (analytic) = 0.99500416527802576609556198780387 y1[1] (numeric) = 0.99500416527802576609556198780387 absolute error = 0 relative error = 0 % h = 1e-05 y2[1] (analytic) = 0.099833416646828152306814198410622 y2[1] (numeric) = 0.099833416646828152306814198410622 absolute error = 0 relative error = 0 % h = 1e-05 x[1] = 0.1 y1[1] (analytic) = 0.99500416527802576609556198780387 y1[1] (numeric) = 0.99500416527802576609556198780387 absolute error = 0 relative error = 0 % h = 1e-05 y2[1] (analytic) = 0.099833416646828152306814198410622 y2[1] (numeric) = 0.099833416646828152306814198410622 absolute error = 0 relative error = 0 % h = 1e-05 TOP MAIN SOLVE Loop NO POLE NO POLE x[1] = 0.10001 y1[1] (analytic) = 0.99500316689410910618945499081414 y1[1] (numeric) = 0.99500316689410910618945499081409 absolute error = 5e-32 relative error = 5.0251096341808059296954844747265e-30 % h = 1e-05 y2[1] (analytic) = 0.099843366683489095898147798163638 y2[1] (numeric) = 0.099843366683489095898147798163633 absolute error = 5e-33 relative error = 5.0078439520678145486617712428739e-30 % h = 1e-05 TOP MAIN SOLVE Loop NO POLE NO POLE x[1] = 0.10002 y1[1] (analytic) = 0.9950021684106921295947662525112 y1[1] (numeric) = 0.9950021684106921295947662525111 absolute error = 1.0e-31 relative error = 1.0050229353743930640154216985548e-29 % h = 1e-05 y2[1] (analytic) = 0.099853316710165702821215691132408 y2[1] (numeric) = 0.099853316710165702821215691132398 absolute error = 1.0e-32 relative error = 1.0014689876577666436873340178964e-29 % h = 1e-05 TOP MAIN SOLVE Loop NO POLE NO POLE x[1] = 0.10003 y1[1] (analytic) = 0.99500116982777493615983746972246 y1[1] (numeric) = 0.99500116982777493615983746972231 absolute error = 1.5e-31 relative error = 1.5075359160227273595852677425759e-29 % h = 1e-05 y2[1] (analytic) = 0.099863266726856978073350224916315 y2[1] (numeric) = 0.0998632667268569780733502249163 absolute error = 1.5e-32 relative error = 1.5020538073351387155394142167129e-29 % h = 1e-05 TOP MAIN SOLVE Loop NO POLE NO POLE x[1] = 0.10004 y1[1] (analytic) = 0.99500017114535762574296036095926 y1[1] (numeric) = 0.99500017114535762574296036095906 absolute error = 2.0e-31 relative error = 2.0100499055168744469584672358996e-29 % h = 1e-05 y2[1] (analytic) = 0.099873216733561926652882280281826 y2[1] (numeric) = 0.099873216733561926652882280281806 absolute error = 2.0e-32 relative error = 2.0025388842090928352829323125191e-29 % h = 1e-05 TOP MAIN SOLVE Loop NO POLE NO POLE x[1] = 0.10005 y1[1] (analytic) = 0.99499917236344029821237665643104 y1[1] (numeric) = 0.9949991723634402982123766564308 absolute error = 2.4e-31 relative error = 2.4120623078502012618037529241336e-29 % h = 1e-05 y2[1] (analytic) = 0.099883166730279553559141370662659 y2[1] (numeric) = 0.099883166730279553559141370662635 absolute error = 2.4e-32 relative error = 2.4028072783083284875885724414775e-29 % h = 1e-05 TOP MAIN SOLVE Loop NO POLE NO POLE x[1] = 0.10006 y1[1] (analytic) = 0.99499817348202305344627808805855 y1[1] (numeric) = 0.99499817348202305344627808805827 absolute error = 2.8e-31 relative error = 2.8140755175472575731085845835111e-29 % h = 1e-05 y2[1] (analytic) = 0.099893116717008863792455741659854 y2[1] (numeric) = 0.099893116717008863792455741659824 absolute error = 3.0e-32 relative error = 3.0032099293676238992674803240429e-29 % h = 1e-05 TOP MAIN SOLVE Loop NO POLE NO POLE x[1] = 0.10007 y1[1] (analytic) = 0.99499717450110599133280637948601 y1[1] (numeric) = 0.99499717450110599133280637948567 absolute error = 3.4e-31 relative error = 3.4170951306517712351575368801094e-29 % h = 1e-05 y2[1] (analytic) = 0.099903066693748862354152470541733 y2[1] (numeric) = 0.099903066693748862354152470541698 absolute error = 3.5e-32 relative error = 3.5033959575327051532687609256370e-29 % h = 1e-05 TOP MAIN SOLVE Loop NO POLE NO POLE x[1] = 0.10008 y1[1] (analytic) = 0.99499617542068921177005323609226 y1[1] (numeric) = 0.99499617542068921177005323609187 absolute error = 3.9e-31 relative error = 3.9196130561517596517030900322248e-29 % h = 1e-05 y2[1] (analytic) = 0.099913016660498554246557565743775 y2[1] (numeric) = 0.099913016660498554246557565743735 absolute error = 4.0e-32 relative error = 4.0034823626553890387466941621091e-29 % h = 1e-05 TOP MAIN SOLVE Loop NO POLE NO POLE memory used=3.8MB, alloc=3.0MB, time=0.17 x[1] = 0.10009 y1[1] (analytic) = 0.99499517624077281466606033500102 y1[1] (numeric) = 0.99499517624077281466606033500058 absolute error = 4.4e-31 relative error = 4.4221319912562780441464128511811e-29 % h = 1e-05 y2[1] (analytic) = 0.099922966617256944472996066368378 y2[1] (numeric) = 0.099922966617256944472996066368333 absolute error = 4.5e-32 relative error = 4.5034691746460205928001761127495e-29 % h = 1e-05 TOP MAIN SOLVE Loop NO POLE NO POLE x[1] = 0.1001 y1[1] (analytic) = 0.99499417696135689993881931509004 y1[1] (numeric) = 0.99499417696135689993881931508955 absolute error = 4.9e-31 relative error = 4.9246519361191234564721864478165e-29 % h = 1e-05 y2[1] (analytic) = 0.099932916564023038037792141684529 y2[1] (numeric) = 0.099932916564023038037792141684479 absolute error = 5.0e-32 relative error = 5.0033564234029927605268935619188e-29 % h = 1e-05 Finished! Maximum Iterations Reached before Solution Completed! Iterations = 10 Total Elapsed Time = 0 Seconds Elapsed Time(since restart) = 0 Seconds Expected Time Remaining = 3 Hours 44 Minutes 59 Seconds Optimized Time Remaining = 3 Hours 28 Minutes 29 Seconds Time to Timeout = 14 Minutes 59 Seconds Percent Done = 0.001111 % > quit memory used=4.1MB, alloc=3.0MB, time=0.18