|\^/| Maple 12 (IBM INTEL LINUX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2008 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > #BEGIN OUTFILE1 > > # Begin Function number 3 > display_alot := proc(iter) > global > ALWAYS, > DEBUGL, > glob_iolevel, > glob_max_terms, > DEBUGMASSIVE, > INFO, > #Top Generate Globals Decl > MAX_UNCHANGED, > glob_smallish_float, > glob_small_float, > glob_hmin, > glob_html_log, > glob_warned, > hours_in_day, > glob_look_poles, > glob_large_float, > glob_max_opt_iter, > glob_log10relerr, > glob_current_iter, > glob_curr_iter_when_opt, > glob_unchanged_h_cnt, > glob_no_eqs, > glob_hmax, > years_in_century, > glob_display_flag, > glob_log10abserr, > glob_initial_pass, > min_in_hour, > glob_normmax, > glob_optimal_start, > glob_hmin_init, > glob_h, > days_in_year, > glob_percent_done, > glob_max_rel_trunc_err, > glob_max_iter, > glob_max_hours, > glob_relerr, > glob_abserr, > glob_log10_relerr, > glob_dump_analytic, > glob_almost_1, > djd_debug, > glob_optimal_expect_sec, > glob_max_minutes, > glob_max_sec, > glob_warned2, > glob_disp_incr, > glob_optimal_done, > glob_not_yet_finished, > glob_log10normmin, > glob_orig_start_sec, > glob_max_trunc_err, > glob_last_good_h, > sec_in_min, > glob_optimal_clock_start_sec, > glob_reached_optimal_h, > glob_not_yet_start_msg, > glob_clock_start_sec, > centuries_in_millinium, > glob_subiter_method, > glob_iter, > glob_start, > glob_log10_abserr, > glob_clock_sec, > djd_debug2, > glob_dump, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_0D0, > array_const_1, > #END CONST > array_m1, > array_type_pole, > array_1st_rel_error, > array_pole, > array_y, > array_x, > array_last_rel_error, > array_tmp1_g, > array_tmp0, > array_tmp1, > array_tmp2, > array_y_init, > array_norms, > array_complex_pole, > array_real_pole, > array_y_higher, > array_poles, > array_y_higher_work2, > array_y_set_initial, > array_y_higher_work, > glob_last; > > local abserr, analytic_val_y, ind_var, numeric_val, relerr, term_no; > #TOP DISPLAY ALOT > if (iter >= 0) then # if number 1 > ind_var := array_x[1]; > omniout_float(ALWAYS,"x[1] ",33,ind_var,20," "); > analytic_val_y := exact_soln_y(ind_var); > omniout_float(ALWAYS,"y[1] (analytic) ",33,analytic_val_y,20," "); > term_no := 1; > numeric_val := array_y[term_no]; > abserr := abs(numeric_val - analytic_val_y); > omniout_float(ALWAYS,"y[1] (numeric) ",33,numeric_val,20," "); > if (abs(analytic_val_y) <> 0.0) then # if number 2 > relerr := abserr*100.0/abs(analytic_val_y); > else > relerr := -1.0 ; > fi;# end if 2 > ; > if glob_iter = 1 then # if number 2 > array_1st_rel_error[1] := relerr; > else > array_last_rel_error[1] := relerr; > fi;# end if 2 > ; > omniout_float(ALWAYS,"absolute error ",4,abserr,20," "); > omniout_float(ALWAYS,"relative error ",4,relerr,20,"%"); > omniout_float(ALWAYS,"h ",4,glob_h,20," "); > #BOTTOM DISPLAY ALOT > fi;# end if 1 > ; > # End Function number 3 > end; display_alot := proc(iter) local abserr, analytic_val_y, ind_var, numeric_val, relerr, term_no; global ALWAYS, DEBUGL, glob_iolevel, glob_max_terms, DEBUGMASSIVE, INFO, MAX_UNCHANGED, glob_smallish_float, glob_small_float, glob_hmin, glob_html_log, glob_warned, hours_in_day, glob_look_poles, glob_large_float, glob_max_opt_iter, glob_log10relerr, glob_current_iter, glob_curr_iter_when_opt, glob_unchanged_h_cnt, glob_no_eqs, glob_hmax, years_in_century, glob_display_flag, glob_log10abserr, glob_initial_pass, min_in_hour, glob_normmax, glob_optimal_start, glob_hmin_init, glob_h, days_in_year, glob_percent_done, glob_max_rel_trunc_err, glob_max_iter, glob_max_hours, glob_relerr, glob_abserr, glob_log10_relerr, glob_dump_analytic, glob_almost_1, djd_debug, glob_optimal_expect_sec, glob_max_minutes, glob_max_sec, glob_warned2, glob_disp_incr, glob_optimal_done, glob_not_yet_finished, glob_log10normmin, glob_orig_start_sec, glob_max_trunc_err, glob_last_good_h, sec_in_min, glob_optimal_clock_start_sec, glob_reached_optimal_h, glob_not_yet_start_msg, glob_clock_start_sec, centuries_in_millinium, glob_subiter_method, glob_iter, glob_start, glob_log10_abserr, glob_clock_sec, djd_debug2, glob_dump, array_const_0D0, array_const_1, array_m1, array_type_pole, array_1st_rel_error, array_pole, array_y, array_x, array_last_rel_error, array_tmp1_g, array_tmp0, array_tmp1, array_tmp2, array_y_init, array_norms, array_complex_pole, array_real_pole, array_y_higher, array_poles, array_y_higher_work2, array_y_set_initial, array_y_higher_work, glob_last; if 0 <= iter then ind_var := array_x[1]; omniout_float(ALWAYS, "x[1] ", 33, ind_var, 20, " "); analytic_val_y := exact_soln_y(ind_var); omniout_float(ALWAYS, "y[1] (analytic) ", 33, analytic_val_y, 20, " "); term_no := 1; numeric_val := array_y[term_no]; abserr := abs(numeric_val - analytic_val_y); omniout_float(ALWAYS, "y[1] (numeric) ", 33, numeric_val, 20, " "); if abs(analytic_val_y) <> 0. then relerr := abserr*100.0/abs(analytic_val_y) else relerr := -1.0 end if; if glob_iter = 1 then array_1st_rel_error[1] := relerr else array_last_rel_error[1] := relerr end if; omniout_float(ALWAYS, "absolute error ", 4, abserr, 20, " "); omniout_float(ALWAYS, "relative error ", 4, relerr, 20, "%"); omniout_float(ALWAYS, "h ", 4, glob_h, 20, " ") end if end proc > # Begin Function number 4 > adjust_for_pole := proc(h_param) > global > ALWAYS, > DEBUGL, > glob_iolevel, > glob_max_terms, > DEBUGMASSIVE, > INFO, > #Top Generate Globals Decl > MAX_UNCHANGED, > glob_smallish_float, > glob_small_float, > glob_hmin, > glob_html_log, > glob_warned, > hours_in_day, > glob_look_poles, > glob_large_float, > glob_max_opt_iter, > glob_log10relerr, > glob_current_iter, > glob_curr_iter_when_opt, > glob_unchanged_h_cnt, > glob_no_eqs, > glob_hmax, > years_in_century, > glob_display_flag, > glob_log10abserr, > glob_initial_pass, > min_in_hour, > glob_normmax, > glob_optimal_start, > glob_hmin_init, > glob_h, > days_in_year, > glob_percent_done, > glob_max_rel_trunc_err, > glob_max_iter, > glob_max_hours, > glob_relerr, > glob_abserr, > glob_log10_relerr, > glob_dump_analytic, > glob_almost_1, > djd_debug, > glob_optimal_expect_sec, > glob_max_minutes, > glob_max_sec, > glob_warned2, > glob_disp_incr, > glob_optimal_done, > glob_not_yet_finished, > glob_log10normmin, > glob_orig_start_sec, > glob_max_trunc_err, > glob_last_good_h, > sec_in_min, > glob_optimal_clock_start_sec, > glob_reached_optimal_h, > glob_not_yet_start_msg, > glob_clock_start_sec, > centuries_in_millinium, > glob_subiter_method, > glob_iter, > glob_start, > glob_log10_abserr, > glob_clock_sec, > djd_debug2, > glob_dump, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_0D0, > array_const_1, > #END CONST > array_m1, > array_type_pole, > array_1st_rel_error, > array_pole, > array_y, > array_x, > array_last_rel_error, > array_tmp1_g, > array_tmp0, > array_tmp1, > array_tmp2, > array_y_init, > array_norms, > array_complex_pole, > array_real_pole, > array_y_higher, > array_poles, > array_y_higher_work2, > array_y_set_initial, > array_y_higher_work, > glob_last; > > local hnew, sz2, tmp; > #TOP ADJUST FOR POLE > > hnew := h_param; > glob_normmax := glob_small_float; > if (abs(array_y_higher[1,1]) > glob_small_float) then # if number 1 > tmp := abs(array_y_higher[1,1]); > if (tmp < glob_normmax) then # if number 2 > glob_normmax := tmp; > fi;# end if 2 > fi;# end if 1 > ; > if (glob_look_poles and (abs(array_pole[1]) > glob_small_float) and (array_pole[1] <> glob_large_float)) then # if number 1 > sz2 := array_pole[1]/10.0; > if (sz2 < hnew) then # if number 2 > omniout_float(INFO,"glob_h adjusted to ",20,h_param,12,"due to singularity."); > omniout_str(INFO,"Reached Optimal"); > newline(); > return(hnew); > fi;# end if 2 > fi;# end if 1 > ; > if (not glob_reached_optimal_h) then # if number 1 > glob_reached_optimal_h := true; > glob_curr_iter_when_opt := glob_current_iter; > glob_optimal_clock_start_sec := elapsed_time_seconds(); > glob_optimal_start := array_x[1]; > fi;# end if 1 > ; > hnew := sz2; > #END block > #BOTTOM ADJUST FOR POLE > # End Function number 4 > end; adjust_for_pole := proc(h_param) local hnew, sz2, tmp; global ALWAYS, DEBUGL, glob_iolevel, glob_max_terms, DEBUGMASSIVE, INFO, MAX_UNCHANGED, glob_smallish_float, glob_small_float, glob_hmin, glob_html_log, glob_warned, hours_in_day, glob_look_poles, glob_large_float, glob_max_opt_iter, glob_log10relerr, glob_current_iter, glob_curr_iter_when_opt, glob_unchanged_h_cnt, glob_no_eqs, glob_hmax, years_in_century, glob_display_flag, glob_log10abserr, glob_initial_pass, min_in_hour, glob_normmax, glob_optimal_start, glob_hmin_init, glob_h, days_in_year, glob_percent_done, glob_max_rel_trunc_err, glob_max_iter, glob_max_hours, glob_relerr, glob_abserr, glob_log10_relerr, glob_dump_analytic, glob_almost_1, djd_debug, glob_optimal_expect_sec, glob_max_minutes, glob_max_sec, glob_warned2, glob_disp_incr, glob_optimal_done, glob_not_yet_finished, glob_log10normmin, glob_orig_start_sec, glob_max_trunc_err, glob_last_good_h, sec_in_min, glob_optimal_clock_start_sec, glob_reached_optimal_h, glob_not_yet_start_msg, glob_clock_start_sec, centuries_in_millinium, glob_subiter_method, glob_iter, glob_start, glob_log10_abserr, glob_clock_sec, djd_debug2, glob_dump, array_const_0D0, array_const_1, array_m1, array_type_pole, array_1st_rel_error, array_pole, array_y, array_x, array_last_rel_error, array_tmp1_g, array_tmp0, array_tmp1, array_tmp2, array_y_init, array_norms, array_complex_pole, array_real_pole, array_y_higher, array_poles, array_y_higher_work2, array_y_set_initial, array_y_higher_work, glob_last; hnew := h_param; glob_normmax := glob_small_float; if glob_small_float < abs(array_y_higher[1, 1]) then tmp := abs(array_y_higher[1, 1]); if tmp < glob_normmax then glob_normmax := tmp end if end if; if glob_look_poles and glob_small_float < abs(array_pole[1]) and array_pole[1] <> glob_large_float then sz2 := array_pole[1]/10.0; if sz2 < hnew then omniout_float(INFO, "glob_h adjusted to ", 20, h_param, 12, "due to singularity."); omniout_str(INFO, "Reached Optimal"); newline(); return hnew end if end if; if not glob_reached_optimal_h then glob_reached_optimal_h := true; glob_curr_iter_when_opt := glob_current_iter; glob_optimal_clock_start_sec := elapsed_time_seconds(); glob_optimal_start := array_x[1] end if; hnew := sz2 end proc > # Begin Function number 5 > prog_report := proc(x_start,x_end) > global > ALWAYS, > DEBUGL, > glob_iolevel, > glob_max_terms, > DEBUGMASSIVE, > INFO, > #Top Generate Globals Decl > MAX_UNCHANGED, > glob_smallish_float, > glob_small_float, > glob_hmin, > glob_html_log, > glob_warned, > hours_in_day, > glob_look_poles, > glob_large_float, > glob_max_opt_iter, > glob_log10relerr, > glob_current_iter, > glob_curr_iter_when_opt, > glob_unchanged_h_cnt, > glob_no_eqs, > glob_hmax, > years_in_century, > glob_display_flag, > glob_log10abserr, > glob_initial_pass, > min_in_hour, > glob_normmax, > glob_optimal_start, > glob_hmin_init, > glob_h, > days_in_year, > glob_percent_done, > glob_max_rel_trunc_err, > glob_max_iter, > glob_max_hours, > glob_relerr, > glob_abserr, > glob_log10_relerr, > glob_dump_analytic, > glob_almost_1, > djd_debug, > glob_optimal_expect_sec, > glob_max_minutes, > glob_max_sec, > glob_warned2, > glob_disp_incr, > glob_optimal_done, > glob_not_yet_finished, > glob_log10normmin, > glob_orig_start_sec, > glob_max_trunc_err, > glob_last_good_h, > sec_in_min, > glob_optimal_clock_start_sec, > glob_reached_optimal_h, > glob_not_yet_start_msg, > glob_clock_start_sec, > centuries_in_millinium, > glob_subiter_method, > glob_iter, > glob_start, > glob_log10_abserr, > glob_clock_sec, > djd_debug2, > glob_dump, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_0D0, > array_const_1, > #END CONST > array_m1, > array_type_pole, > array_1st_rel_error, > array_pole, > array_y, > array_x, > array_last_rel_error, > array_tmp1_g, > array_tmp0, > array_tmp1, > array_tmp2, > array_y_init, > array_norms, > array_complex_pole, > array_real_pole, > array_y_higher, > array_poles, > array_y_higher_work2, > array_y_set_initial, > array_y_higher_work, > glob_last; > > local clock_sec, opt_clock_sec, clock_sec1, expect_sec, left_sec, percent_done, total_clock_sec; > #TOP PROGRESS REPORT > clock_sec1 := elapsed_time_seconds(); > total_clock_sec := convfloat(clock_sec1) - convfloat(glob_orig_start_sec); > glob_clock_sec := convfloat(clock_sec1) - convfloat(glob_clock_start_sec); > left_sec := convfloat(glob_max_sec) + convfloat(glob_orig_start_sec) - convfloat(clock_sec1); > expect_sec := comp_expect_sec(convfloat(x_end),convfloat(x_start),convfloat(array_x[1]) + convfloat(glob_h) ,convfloat( clock_sec1) - convfloat(glob_orig_start_sec)); > opt_clock_sec := convfloat( clock_sec1) - convfloat(glob_optimal_clock_start_sec); > glob_optimal_expect_sec := comp_expect_sec(convfloat(x_end),convfloat(x_start),convfloat(array_x[1]) +convfloat( glob_h) ,convfloat( opt_clock_sec)); > percent_done := comp_percent(convfloat(x_end),convfloat(x_start),convfloat(array_x[1]) + convfloat(glob_h)); > glob_percent_done := percent_done; > omniout_str_noeol(INFO,"Total Elapsed Time "); > omniout_timestr(convfloat(total_clock_sec)); > omniout_str_noeol(INFO,"Elapsed Time(since restart) "); > omniout_timestr(convfloat(glob_clock_sec)); > if convfloat(percent_done) < convfloat(100.0) then # if number 1 > omniout_str_noeol(INFO,"Expected Time Remaining "); > omniout_timestr(convfloat(expect_sec)); > omniout_str_noeol(INFO,"Optimized Time Remaining "); > omniout_timestr(convfloat(glob_optimal_expect_sec)); > fi;# end if 1 > ; > omniout_str_noeol(INFO,"Time to Timeout "); > omniout_timestr(convfloat(left_sec)); > omniout_float(INFO, "Percent Done ",33,percent_done,4,"%"); > #BOTTOM PROGRESS REPORT > # End Function number 5 > end; prog_report := proc(x_start, x_end) local clock_sec, opt_clock_sec, clock_sec1, expect_sec, left_sec, percent_done, total_clock_sec; global ALWAYS, DEBUGL, glob_iolevel, glob_max_terms, DEBUGMASSIVE, INFO, MAX_UNCHANGED, glob_smallish_float, glob_small_float, glob_hmin, glob_html_log, glob_warned, hours_in_day, glob_look_poles, glob_large_float, glob_max_opt_iter, glob_log10relerr, glob_current_iter, glob_curr_iter_when_opt, glob_unchanged_h_cnt, glob_no_eqs, glob_hmax, years_in_century, glob_display_flag, glob_log10abserr, glob_initial_pass, min_in_hour, glob_normmax, glob_optimal_start, glob_hmin_init, glob_h, days_in_year, glob_percent_done, glob_max_rel_trunc_err, glob_max_iter, glob_max_hours, glob_relerr, glob_abserr, glob_log10_relerr, glob_dump_analytic, glob_almost_1, djd_debug, glob_optimal_expect_sec, glob_max_minutes, glob_max_sec, glob_warned2, glob_disp_incr, glob_optimal_done, glob_not_yet_finished, glob_log10normmin, glob_orig_start_sec, glob_max_trunc_err, glob_last_good_h, sec_in_min, glob_optimal_clock_start_sec, glob_reached_optimal_h, glob_not_yet_start_msg, glob_clock_start_sec, centuries_in_millinium, glob_subiter_method, glob_iter, glob_start, glob_log10_abserr, glob_clock_sec, djd_debug2, glob_dump, array_const_0D0, array_const_1, array_m1, array_type_pole, array_1st_rel_error, array_pole, array_y, array_x, array_last_rel_error, array_tmp1_g, array_tmp0, array_tmp1, array_tmp2, array_y_init, array_norms, array_complex_pole, array_real_pole, array_y_higher, array_poles, array_y_higher_work2, array_y_set_initial, array_y_higher_work, glob_last; clock_sec1 := elapsed_time_seconds(); total_clock_sec := convfloat(clock_sec1) - convfloat(glob_orig_start_sec); glob_clock_sec := convfloat(clock_sec1) - convfloat(glob_clock_start_sec); left_sec := convfloat(glob_max_sec) + convfloat(glob_orig_start_sec) - convfloat(clock_sec1); expect_sec := comp_expect_sec(convfloat(x_end), convfloat(x_start), convfloat(array_x[1]) + convfloat(glob_h), convfloat(clock_sec1) - convfloat(glob_orig_start_sec)); opt_clock_sec := convfloat(clock_sec1) - convfloat(glob_optimal_clock_start_sec); glob_optimal_expect_sec := comp_expect_sec(convfloat(x_end), convfloat(x_start), convfloat(array_x[1]) + convfloat(glob_h), convfloat(opt_clock_sec)); percent_done := comp_percent(convfloat(x_end), convfloat(x_start), convfloat(array_x[1]) + convfloat(glob_h)); glob_percent_done := percent_done; omniout_str_noeol(INFO, "Total Elapsed Time "); omniout_timestr(convfloat(total_clock_sec)); omniout_str_noeol(INFO, "Elapsed Time(since restart) "); omniout_timestr(convfloat(glob_clock_sec)); if convfloat(percent_done) < convfloat(100.0) then omniout_str_noeol(INFO, "Expected Time Remaining "); omniout_timestr(convfloat(expect_sec)); omniout_str_noeol(INFO, "Optimized Time Remaining "); omniout_timestr(convfloat(glob_optimal_expect_sec)) end if; omniout_str_noeol(INFO, "Time to Timeout "); omniout_timestr(convfloat(left_sec)); omniout_float(INFO, "Percent Done ", 33, percent_done, 4, "%") end proc > # Begin Function number 6 > check_for_pole := proc() > global > ALWAYS, > DEBUGL, > glob_iolevel, > glob_max_terms, > DEBUGMASSIVE, > INFO, > #Top Generate Globals Decl > MAX_UNCHANGED, > glob_smallish_float, > glob_small_float, > glob_hmin, > glob_html_log, > glob_warned, > hours_in_day, > glob_look_poles, > glob_large_float, > glob_max_opt_iter, > glob_log10relerr, > glob_current_iter, > glob_curr_iter_when_opt, > glob_unchanged_h_cnt, > glob_no_eqs, > glob_hmax, > years_in_century, > glob_display_flag, > glob_log10abserr, > glob_initial_pass, > min_in_hour, > glob_normmax, > glob_optimal_start, > glob_hmin_init, > glob_h, > days_in_year, > glob_percent_done, > glob_max_rel_trunc_err, > glob_max_iter, > glob_max_hours, > glob_relerr, > glob_abserr, > glob_log10_relerr, > glob_dump_analytic, > glob_almost_1, > djd_debug, > glob_optimal_expect_sec, > glob_max_minutes, > glob_max_sec, > glob_warned2, > glob_disp_incr, > glob_optimal_done, > glob_not_yet_finished, > glob_log10normmin, > glob_orig_start_sec, > glob_max_trunc_err, > glob_last_good_h, > sec_in_min, > glob_optimal_clock_start_sec, > glob_reached_optimal_h, > glob_not_yet_start_msg, > glob_clock_start_sec, > centuries_in_millinium, > glob_subiter_method, > glob_iter, > glob_start, > glob_log10_abserr, > glob_clock_sec, > djd_debug2, > glob_dump, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_0D0, > array_const_1, > #END CONST > array_m1, > array_type_pole, > array_1st_rel_error, > array_pole, > array_y, > array_x, > array_last_rel_error, > array_tmp1_g, > array_tmp0, > array_tmp1, > array_tmp2, > array_y_init, > array_norms, > array_complex_pole, > array_real_pole, > array_y_higher, > array_poles, > array_y_higher_work2, > array_y_set_initial, > array_y_higher_work, > glob_last; > > local cnt, dr1, dr2, ds1, ds2, hdrc, m, n, nr1, nr2, ord_no, rad_c, rcs, rm0, rm1, rm2, rm3, rm4, found; > #TOP CHECK FOR POLE > #IN RADII REAL EQ = 1 > #Computes radius of convergence and r_order of pole from 3 adjacent Taylor series terms. EQUATUON NUMBER 1 > #Applies to pole of arbitrary r_order on the real axis, > #Due to Prof. George Corliss. > n := glob_max_terms; > m := n - 1 - 1; > while ((m >= 10) and ((abs(array_y_higher[1,m]) < glob_small_float) or (abs(array_y_higher[1,m-1]) < glob_small_float) or (abs(array_y_higher[1,m-2]) < glob_small_float ))) do # do number 2 > m := m - 1; > od;# end do number 2 > ; > if (m > 10) then # if number 1 > rm0 := array_y_higher[1,m]/array_y_higher[1,m-1]; > rm1 := array_y_higher[1,m-1]/array_y_higher[1,m-2]; > hdrc := convfloat(m-1)*rm0-convfloat(m-2)*rm1; > if (abs(hdrc) > glob_small_float) then # if number 2 > rcs := glob_h/hdrc; > ord_no := convfloat(m-1)*rm0/hdrc - convfloat(m) + 2.0; > array_real_pole[1,1] := rcs; > array_real_pole[1,2] := ord_no; > else > array_real_pole[1,1] := glob_large_float; > array_real_pole[1,2] := glob_large_float; > fi;# end if 2 > else > array_real_pole[1,1] := glob_large_float; > array_real_pole[1,2] := glob_large_float; > fi;# end if 1 > ; > #BOTTOM RADII REAL EQ = 1 > #TOP RADII COMPLEX EQ = 1 > #Computes radius of convergence for complex conjugate pair of poles. > #from 6 adjacent Taylor series terms > #Also computes r_order of poles. > #Due to Manuel Prieto. > #With a correction by Dennis J. Darland > n := glob_max_terms - 1 - 1; > cnt := 0; > while ((cnt < 5) and (n >= 10)) do # do number 2 > if (abs(array_y_higher[1,n]) > glob_small_float) then # if number 1 > cnt := cnt + 1; > else > cnt := 0; > fi;# end if 1 > ; > n := n - 1; > od;# end do number 2 > ; > m := n + cnt; > if (m <= 10) then # if number 1 > array_complex_pole[1,1] := glob_large_float; > array_complex_pole[1,2] := glob_large_float; > elif (abs(array_y_higher[1,m]) >= (glob_large_float)) or (abs(array_y_higher[1,m-1]) >=(glob_large_float)) or (abs(array_y_higher[1,m-2]) >= (glob_large_float)) or (abs(array_y_higher[1,m-3]) >= (glob_large_float)) or (abs(array_y_higher[1,m-4]) >= (glob_large_float)) or (abs(array_y_higher[1,m-5]) >= (glob_large_float)) then # if number 2 > array_complex_pole[1,1] := glob_large_float; > array_complex_pole[1,2] := glob_large_float; > else > rm0 := (array_y_higher[1,m])/(array_y_higher[1,m-1]); > rm1 := (array_y_higher[1,m-1])/(array_y_higher[1,m-2]); > rm2 := (array_y_higher[1,m-2])/(array_y_higher[1,m-3]); > rm3 := (array_y_higher[1,m-3])/(array_y_higher[1,m-4]); > rm4 := (array_y_higher[1,m-4])/(array_y_higher[1,m-5]); > nr1 := convfloat(m-1)*rm0 - 2.0*convfloat(m-2)*rm1 + convfloat(m-3)*rm2; > nr2 := convfloat(m-2)*rm1 - 2.0*convfloat(m-3)*rm2 + convfloat(m-4)*rm3; > dr1 := (-1.0)/rm1 + 2.0/rm2 - 1.0/rm3; > dr2 := (-1.0)/rm2 + 2.0/rm3 - 1.0/rm4; > ds1 := 3.0/rm1 - 8.0/rm2 + 5.0/rm3; > ds2 := 3.0/rm2 - 8.0/rm3 + 5.0/rm4; > if ((abs(nr1 * dr2 - nr2 * dr1) <= glob_small_float) or (abs(dr1) <= glob_small_float)) then # if number 3 > array_complex_pole[1,1] := glob_large_float; > array_complex_pole[1,2] := glob_large_float; > else > if (abs(nr1*dr2 - nr2 * dr1) > glob_small_float) then # if number 4 > rcs := ((ds1*dr2 - ds2*dr1 +dr1*dr2)/(nr1*dr2 - nr2 * dr1)); > #(Manuels) rcs := (ds1*dr2 - ds2*dr1)/(nr1*dr2 - nr2 * dr1) > ord_no := (rcs*nr1 - ds1)/(2.0*dr1) -convfloat(m)/2.0; > if (abs(rcs) > glob_small_float) then # if number 5 > if (rcs > 0.0) then # if number 6 > rad_c := sqrt(rcs) * glob_h; > else > rad_c := glob_large_float; > fi;# end if 6 > else > rad_c := glob_large_float; > ord_no := glob_large_float; > fi;# end if 5 > else > rad_c := glob_large_float; > ord_no := glob_large_float; > fi;# end if 4 > fi;# end if 3 > ; > array_complex_pole[1,1] := rad_c; > array_complex_pole[1,2] := ord_no; > fi;# end if 2 > ; > #BOTTOM RADII COMPLEX EQ = 1 > found := false; > #TOP WHICH RADII EQ = 1 > if not found and ((array_real_pole[1,1] = glob_large_float) or (array_real_pole[1,2] = glob_large_float)) and ((array_complex_pole[1,1] <> glob_large_float) and (array_complex_pole[1,2] <> glob_large_float)) and ((array_complex_pole[1,1] > 0.0) and (array_complex_pole[1,2] > 0.0)) then # if number 2 > array_poles[1,1] := array_complex_pole[1,1]; > array_poles[1,2] := array_complex_pole[1,2]; > found := true; > array_type_pole[1] := 2; > if (glob_display_flag) then # if number 3 > omniout_str(ALWAYS,"Complex estimate of poles used"); > fi;# end if 3 > ; > fi;# end if 2 > ; > if not found and ((array_real_pole[1,1] <> glob_large_float) and (array_real_pole[1,2] <> glob_large_float) and (array_real_pole[1,1] > 0.0) and (array_real_pole[1,2] > 0.0) and ((array_complex_pole[1,1] = glob_large_float) or (array_complex_pole[1,2] = glob_large_float) or (array_complex_pole[1,1] <= 0.0 ) or (array_complex_pole[1,2] <= 0.0))) then # if number 2 > array_poles[1,1] := array_real_pole[1,1]; > array_poles[1,2] := array_real_pole[1,2]; > found := true; > array_type_pole[1] := 1; > if (glob_display_flag) then # if number 3 > omniout_str(ALWAYS,"Real estimate of pole used"); > fi;# end if 3 > ; > fi;# end if 2 > ; > if not found and (((array_real_pole[1,1] = glob_large_float) or (array_real_pole[1,2] = glob_large_float)) and ((array_complex_pole[1,1] = glob_large_float) or (array_complex_pole[1,2] = glob_large_float))) then # if number 2 > array_poles[1,1] := glob_large_float; > array_poles[1,2] := glob_large_float; > found := true; > array_type_pole[1] := 3; > if (glob_display_flag) then # if number 3 > omniout_str(ALWAYS,"NO POLE"); > fi;# end if 3 > ; > fi;# end if 2 > ; > if not found and ((array_real_pole[1,1] < array_complex_pole[1,1]) and (array_real_pole[1,1] > 0.0) and (array_real_pole[1,2] > 0.0)) then # if number 2 > array_poles[1,1] := array_real_pole[1,1]; > array_poles[1,2] := array_real_pole[1,2]; > found := true; > array_type_pole[1] := 1; > if (glob_display_flag) then # if number 3 > omniout_str(ALWAYS,"Real estimate of pole used"); > fi;# end if 3 > ; > fi;# end if 2 > ; > if not found and ((array_complex_pole[1,1] <> glob_large_float) and (array_complex_pole[1,2] <> glob_large_float) and (array_complex_pole[1,1] > 0.0) and (array_complex_pole[1,2] > 0.0)) then # if number 2 > array_poles[1,1] := array_complex_pole[1,1]; > array_poles[1,2] := array_complex_pole[1,2]; > array_type_pole[1] := 2; > found := true; > if (glob_display_flag) then # if number 3 > omniout_str(ALWAYS,"Complex estimate of poles used"); > fi;# end if 3 > ; > fi;# end if 2 > ; > if not found then # if number 2 > array_poles[1,1] := glob_large_float; > array_poles[1,2] := glob_large_float; > array_type_pole[1] := 3; > if (glob_display_flag) then # if number 3 > omniout_str(ALWAYS,"NO POLE"); > fi;# end if 3 > ; > fi;# end if 2 > ; > #BOTTOM WHICH RADII EQ = 1 > array_pole[1] := glob_large_float; > array_pole[2] := glob_large_float; > #TOP WHICH RADIUS EQ = 1 > if array_pole[1] > array_poles[1,1] then # if number 2 > array_pole[1] := array_poles[1,1]; > array_pole[2] := array_poles[1,2]; > fi;# end if 2 > ; > #BOTTOM WHICH RADIUS EQ = 1 > #BOTTOM CHECK FOR POLE > display_pole(); > # End Function number 6 > end; check_for_pole := proc() local cnt, dr1, dr2, ds1, ds2, hdrc, m, n, nr1, nr2, ord_no, rad_c, rcs, rm0, rm1, rm2, rm3, rm4, found; global ALWAYS, DEBUGL, glob_iolevel, glob_max_terms, DEBUGMASSIVE, INFO, MAX_UNCHANGED, glob_smallish_float, glob_small_float, glob_hmin, glob_html_log, glob_warned, hours_in_day, glob_look_poles, glob_large_float, glob_max_opt_iter, glob_log10relerr, glob_current_iter, glob_curr_iter_when_opt, glob_unchanged_h_cnt, glob_no_eqs, glob_hmax, years_in_century, glob_display_flag, glob_log10abserr, glob_initial_pass, min_in_hour, glob_normmax, glob_optimal_start, glob_hmin_init, glob_h, days_in_year, glob_percent_done, glob_max_rel_trunc_err, glob_max_iter, glob_max_hours, glob_relerr, glob_abserr, glob_log10_relerr, glob_dump_analytic, glob_almost_1, djd_debug, glob_optimal_expect_sec, glob_max_minutes, glob_max_sec, glob_warned2, glob_disp_incr, glob_optimal_done, glob_not_yet_finished, glob_log10normmin, glob_orig_start_sec, glob_max_trunc_err, glob_last_good_h, sec_in_min, glob_optimal_clock_start_sec, glob_reached_optimal_h, glob_not_yet_start_msg, glob_clock_start_sec, centuries_in_millinium, glob_subiter_method, glob_iter, glob_start, glob_log10_abserr, glob_clock_sec, djd_debug2, glob_dump, array_const_0D0, array_const_1, array_m1, array_type_pole, array_1st_rel_error, array_pole, array_y, array_x, array_last_rel_error, array_tmp1_g, array_tmp0, array_tmp1, array_tmp2, array_y_init, array_norms, array_complex_pole, array_real_pole, array_y_higher, array_poles, array_y_higher_work2, array_y_set_initial, array_y_higher_work, glob_last; n := glob_max_terms; m := n - 2; while 10 <= m and (abs(array_y_higher[1, m]) < glob_small_float or abs(array_y_higher[1, m - 1]) < glob_small_float or abs(array_y_higher[1, m - 2]) < glob_small_float) do m := m - 1 end do; if 10 < m then rm0 := array_y_higher[1, m]/array_y_higher[1, m - 1]; rm1 := array_y_higher[1, m - 1]/array_y_higher[1, m - 2]; hdrc := convfloat(m - 1)*rm0 - convfloat(m - 2)*rm1; if glob_small_float < abs(hdrc) then rcs := glob_h/hdrc; ord_no := convfloat(m - 1)*rm0/hdrc - convfloat(m) + 2.0; array_real_pole[1, 1] := rcs; array_real_pole[1, 2] := ord_no else array_real_pole[1, 1] := glob_large_float; array_real_pole[1, 2] := glob_large_float end if else array_real_pole[1, 1] := glob_large_float; array_real_pole[1, 2] := glob_large_float end if; n := glob_max_terms - 2; cnt := 0; while cnt < 5 and 10 <= n do if glob_small_float < abs(array_y_higher[1, n]) then cnt := cnt + 1 else cnt := 0 end if; n := n - 1 end do; m := n + cnt; if m <= 10 then array_complex_pole[1, 1] := glob_large_float; array_complex_pole[1, 2] := glob_large_float elif glob_large_float <= abs(array_y_higher[1, m]) or glob_large_float <= abs(array_y_higher[1, m - 1]) or glob_large_float <= abs(array_y_higher[1, m - 2]) or glob_large_float <= abs(array_y_higher[1, m - 3]) or glob_large_float <= abs(array_y_higher[1, m - 4]) or glob_large_float <= abs(array_y_higher[1, m - 5]) then array_complex_pole[1, 1] := glob_large_float; array_complex_pole[1, 2] := glob_large_float else rm0 := array_y_higher[1, m]/array_y_higher[1, m - 1]; rm1 := array_y_higher[1, m - 1]/array_y_higher[1, m - 2]; rm2 := array_y_higher[1, m - 2]/array_y_higher[1, m - 3]; rm3 := array_y_higher[1, m - 3]/array_y_higher[1, m - 4]; rm4 := array_y_higher[1, m - 4]/array_y_higher[1, m - 5]; nr1 := convfloat(m - 1)*rm0 - 2.0*convfloat(m - 2)*rm1 + convfloat(m - 3)*rm2; nr2 := convfloat(m - 2)*rm1 - 2.0*convfloat(m - 3)*rm2 + convfloat(m - 4)*rm3; dr1 := (-1)*(1.0)/rm1 + 2.0/rm2 - 1.0/rm3; dr2 := (-1)*(1.0)/rm2 + 2.0/rm3 - 1.0/rm4; ds1 := 3.0/rm1 - 8.0/rm2 + 5.0/rm3; ds2 := 3.0/rm2 - 8.0/rm3 + 5.0/rm4; if abs(nr1*dr2 - nr2*dr1) <= glob_small_float or abs(dr1) <= glob_small_float then array_complex_pole[1, 1] := glob_large_float; array_complex_pole[1, 2] := glob_large_float else if glob_small_float < abs(nr1*dr2 - nr2*dr1) then rcs := (ds1*dr2 - ds2*dr1 + dr1*dr2)/(nr1*dr2 - nr2*dr1); ord_no := (rcs*nr1 - ds1)/(2.0*dr1) - convfloat(m)/2.0; if glob_small_float < abs(rcs) then if 0. < rcs then rad_c := sqrt(rcs)*glob_h else rad_c := glob_large_float end if else rad_c := glob_large_float; ord_no := glob_large_float end if else rad_c := glob_large_float; ord_no := glob_large_float end if end if; array_complex_pole[1, 1] := rad_c; array_complex_pole[1, 2] := ord_no end if; found := false; if not found and (array_real_pole[1, 1] = glob_large_float or array_real_pole[1, 2] = glob_large_float) and array_complex_pole[1, 1] <> glob_large_float and array_complex_pole[1, 2] <> glob_large_float and 0. < array_complex_pole[1, 1] and 0. < array_complex_pole[1, 2] then array_poles[1, 1] := array_complex_pole[1, 1]; array_poles[1, 2] := array_complex_pole[1, 2]; found := true; array_type_pole[1] := 2; if glob_display_flag then omniout_str(ALWAYS, "Complex estimate of poles used") end if end if; if not found and array_real_pole[1, 1] <> glob_large_float and array_real_pole[1, 2] <> glob_large_float and 0. < array_real_pole[1, 1] and 0. < array_real_pole[1, 2] and ( array_complex_pole[1, 1] = glob_large_float or array_complex_pole[1, 2] = glob_large_float or array_complex_pole[1, 1] <= 0. or array_complex_pole[1, 2] <= 0.) then array_poles[1, 1] := array_real_pole[1, 1]; array_poles[1, 2] := array_real_pole[1, 2]; found := true; array_type_pole[1] := 1; if glob_display_flag then omniout_str(ALWAYS, "Real estimate of pole used") end if end if; if not found and (array_real_pole[1, 1] = glob_large_float or array_real_pole[1, 2] = glob_large_float) and ( array_complex_pole[1, 1] = glob_large_float or array_complex_pole[1, 2] = glob_large_float) then array_poles[1, 1] := glob_large_float; array_poles[1, 2] := glob_large_float; found := true; array_type_pole[1] := 3; if glob_display_flag then omniout_str(ALWAYS, "NO POLE") end if end if; if not found and array_real_pole[1, 1] < array_complex_pole[1, 1] and 0. < array_real_pole[1, 1] and 0. < array_real_pole[1, 2] then array_poles[1, 1] := array_real_pole[1, 1]; array_poles[1, 2] := array_real_pole[1, 2]; found := true; array_type_pole[1] := 1; if glob_display_flag then omniout_str(ALWAYS, "Real estimate of pole used") end if end if; if not found and array_complex_pole[1, 1] <> glob_large_float and array_complex_pole[1, 2] <> glob_large_float and 0. < array_complex_pole[1, 1] and 0. < array_complex_pole[1, 2] then array_poles[1, 1] := array_complex_pole[1, 1]; array_poles[1, 2] := array_complex_pole[1, 2]; array_type_pole[1] := 2; found := true; if glob_display_flag then omniout_str(ALWAYS, "Complex estimate of poles used") end if end if; if not found then array_poles[1, 1] := glob_large_float; array_poles[1, 2] := glob_large_float; array_type_pole[1] := 3; if glob_display_flag then omniout_str(ALWAYS, "NO POLE") end if end if; array_pole[1] := glob_large_float; array_pole[2] := glob_large_float; if array_poles[1, 1] < array_pole[1] then array_pole[1] := array_poles[1, 1]; array_pole[2] := array_poles[1, 2] end if; display_pole() end proc > # Begin Function number 7 > get_norms := proc() > global > ALWAYS, > DEBUGL, > glob_iolevel, > glob_max_terms, > DEBUGMASSIVE, > INFO, > #Top Generate Globals Decl > MAX_UNCHANGED, > glob_smallish_float, > glob_small_float, > glob_hmin, > glob_html_log, > glob_warned, > hours_in_day, > glob_look_poles, > glob_large_float, > glob_max_opt_iter, > glob_log10relerr, > glob_current_iter, > glob_curr_iter_when_opt, > glob_unchanged_h_cnt, > glob_no_eqs, > glob_hmax, > years_in_century, > glob_display_flag, > glob_log10abserr, > glob_initial_pass, > min_in_hour, > glob_normmax, > glob_optimal_start, > glob_hmin_init, > glob_h, > days_in_year, > glob_percent_done, > glob_max_rel_trunc_err, > glob_max_iter, > glob_max_hours, > glob_relerr, > glob_abserr, > glob_log10_relerr, > glob_dump_analytic, > glob_almost_1, > djd_debug, > glob_optimal_expect_sec, > glob_max_minutes, > glob_max_sec, > glob_warned2, > glob_disp_incr, > glob_optimal_done, > glob_not_yet_finished, > glob_log10normmin, > glob_orig_start_sec, > glob_max_trunc_err, > glob_last_good_h, > sec_in_min, > glob_optimal_clock_start_sec, > glob_reached_optimal_h, > glob_not_yet_start_msg, > glob_clock_start_sec, > centuries_in_millinium, > glob_subiter_method, > glob_iter, > glob_start, > glob_log10_abserr, > glob_clock_sec, > djd_debug2, > glob_dump, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_0D0, > array_const_1, > #END CONST > array_m1, > array_type_pole, > array_1st_rel_error, > array_pole, > array_y, > array_x, > array_last_rel_error, > array_tmp1_g, > array_tmp0, > array_tmp1, > array_tmp2, > array_y_init, > array_norms, > array_complex_pole, > array_real_pole, > array_y_higher, > array_poles, > array_y_higher_work2, > array_y_set_initial, > array_y_higher_work, > glob_last; > > local iii; > if (not glob_initial_pass) then # if number 2 > set_z(array_norms,glob_max_terms+1); > #TOP GET NORMS > iii := 1; > while (iii <= glob_max_terms) do # do number 2 > if (abs(array_y[iii]) > array_norms[iii]) then # if number 3 > array_norms[iii] := abs(array_y[iii]); > fi;# end if 3 > ; > iii := iii + 1; > od;# end do number 2 > #GET NORMS > ; > fi;# end if 2 > ; > # End Function number 7 > end; get_norms := proc() local iii; global ALWAYS, DEBUGL, glob_iolevel, glob_max_terms, DEBUGMASSIVE, INFO, MAX_UNCHANGED, glob_smallish_float, glob_small_float, glob_hmin, glob_html_log, glob_warned, hours_in_day, glob_look_poles, glob_large_float, glob_max_opt_iter, glob_log10relerr, glob_current_iter, glob_curr_iter_when_opt, glob_unchanged_h_cnt, glob_no_eqs, glob_hmax, years_in_century, glob_display_flag, glob_log10abserr, glob_initial_pass, min_in_hour, glob_normmax, glob_optimal_start, glob_hmin_init, glob_h, days_in_year, glob_percent_done, glob_max_rel_trunc_err, glob_max_iter, glob_max_hours, glob_relerr, glob_abserr, glob_log10_relerr, glob_dump_analytic, glob_almost_1, djd_debug, glob_optimal_expect_sec, glob_max_minutes, glob_max_sec, glob_warned2, glob_disp_incr, glob_optimal_done, glob_not_yet_finished, glob_log10normmin, glob_orig_start_sec, glob_max_trunc_err, glob_last_good_h, sec_in_min, glob_optimal_clock_start_sec, glob_reached_optimal_h, glob_not_yet_start_msg, glob_clock_start_sec, centuries_in_millinium, glob_subiter_method, glob_iter, glob_start, glob_log10_abserr, glob_clock_sec, djd_debug2, glob_dump, array_const_0D0, array_const_1, array_m1, array_type_pole, array_1st_rel_error, array_pole, array_y, array_x, array_last_rel_error, array_tmp1_g, array_tmp0, array_tmp1, array_tmp2, array_y_init, array_norms, array_complex_pole, array_real_pole, array_y_higher, array_poles, array_y_higher_work2, array_y_set_initial, array_y_higher_work, glob_last; if not glob_initial_pass then set_z(array_norms, glob_max_terms + 1); iii := 1; while iii <= glob_max_terms do if array_norms[iii] < abs(array_y[iii]) then array_norms[iii] := abs(array_y[iii]) end if; iii := iii + 1 end do end if end proc > # Begin Function number 8 > atomall := proc() > global > ALWAYS, > DEBUGL, > glob_iolevel, > glob_max_terms, > DEBUGMASSIVE, > INFO, > #Top Generate Globals Decl > MAX_UNCHANGED, > glob_smallish_float, > glob_small_float, > glob_hmin, > glob_html_log, > glob_warned, > hours_in_day, > glob_look_poles, > glob_large_float, > glob_max_opt_iter, > glob_log10relerr, > glob_current_iter, > glob_curr_iter_when_opt, > glob_unchanged_h_cnt, > glob_no_eqs, > glob_hmax, > years_in_century, > glob_display_flag, > glob_log10abserr, > glob_initial_pass, > min_in_hour, > glob_normmax, > glob_optimal_start, > glob_hmin_init, > glob_h, > days_in_year, > glob_percent_done, > glob_max_rel_trunc_err, > glob_max_iter, > glob_max_hours, > glob_relerr, > glob_abserr, > glob_log10_relerr, > glob_dump_analytic, > glob_almost_1, > djd_debug, > glob_optimal_expect_sec, > glob_max_minutes, > glob_max_sec, > glob_warned2, > glob_disp_incr, > glob_optimal_done, > glob_not_yet_finished, > glob_log10normmin, > glob_orig_start_sec, > glob_max_trunc_err, > glob_last_good_h, > sec_in_min, > glob_optimal_clock_start_sec, > glob_reached_optimal_h, > glob_not_yet_start_msg, > glob_clock_start_sec, > centuries_in_millinium, > glob_subiter_method, > glob_iter, > glob_start, > glob_log10_abserr, > glob_clock_sec, > djd_debug2, > glob_dump, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_0D0, > array_const_1, > #END CONST > array_m1, > array_type_pole, > array_1st_rel_error, > array_pole, > array_y, > array_x, > array_last_rel_error, > array_tmp1_g, > array_tmp0, > array_tmp1, > array_tmp2, > array_y_init, > array_norms, > array_complex_pole, > array_real_pole, > array_y_higher, > array_poles, > array_y_higher_work2, > array_y_set_initial, > array_y_higher_work, > glob_last; > > local kkk, order_d, adj2, temporary, term; > #TOP ATOMALL > #END OUTFILE1 > #BEGIN ATOMHDR1 > #emit pre cosh $eq_no = 1 > array_tmp1_g[1] := sinh(array_x[1]); > array_tmp1[1] := cosh(array_x[1]); > #emit pre add $eq_no = 1 i = 1 > array_tmp2[1] := array_const_0D0[1] + array_tmp1[1]; > #emit pre assign xxx $eq_no = 1 i = 1 $min_hdrs = 5 > if not array_y_set_initial[1,2] then # if number 1 > if (1 <= glob_max_terms) then # if number 2 > temporary := array_tmp2[1] * (glob_h ^ (1)) * factorial_3(0,1); > array_y[2] := temporary; > array_y_higher[1,2] := temporary; > temporary := temporary / glob_h * (2.0); > array_y_higher[2,1] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 2; > #END ATOMHDR1 > #BEGIN ATOMHDR2 > #emit pre cosh $eq_no = 1 > array_tmp1_g[2] := att(1,array_tmp1,array_x,1); > array_tmp1[2] := att(1,array_tmp1_g,array_x,1); > #emit pre add $eq_no = 1 i = 2 > array_tmp2[2] := array_const_0D0[2] + array_tmp1[2]; > #emit pre assign xxx $eq_no = 1 i = 2 $min_hdrs = 5 > if not array_y_set_initial[1,3] then # if number 1 > if (2 <= glob_max_terms) then # if number 2 > temporary := array_tmp2[2] * (glob_h ^ (1)) * factorial_3(1,2); > array_y[3] := temporary; > array_y_higher[1,3] := temporary; > temporary := temporary / glob_h * (2.0); > array_y_higher[2,2] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 3; > #END ATOMHDR2 > #BEGIN ATOMHDR3 > #emit pre cosh $eq_no = 1 > array_tmp1_g[3] := att(2,array_tmp1,array_x,1); > array_tmp1[3] := att(2,array_tmp1_g,array_x,1); > #emit pre add $eq_no = 1 i = 3 > array_tmp2[3] := array_const_0D0[3] + array_tmp1[3]; > #emit pre assign xxx $eq_no = 1 i = 3 $min_hdrs = 5 > if not array_y_set_initial[1,4] then # if number 1 > if (3 <= glob_max_terms) then # if number 2 > temporary := array_tmp2[3] * (glob_h ^ (1)) * factorial_3(2,3); > array_y[4] := temporary; > array_y_higher[1,4] := temporary; > temporary := temporary / glob_h * (2.0); > array_y_higher[2,3] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 4; > #END ATOMHDR3 > #BEGIN ATOMHDR4 > #emit pre cosh $eq_no = 1 > array_tmp1_g[4] := att(3,array_tmp1,array_x,1); > array_tmp1[4] := att(3,array_tmp1_g,array_x,1); > #emit pre add $eq_no = 1 i = 4 > array_tmp2[4] := array_const_0D0[4] + array_tmp1[4]; > #emit pre assign xxx $eq_no = 1 i = 4 $min_hdrs = 5 > if not array_y_set_initial[1,5] then # if number 1 > if (4 <= glob_max_terms) then # if number 2 > temporary := array_tmp2[4] * (glob_h ^ (1)) * factorial_3(3,4); > array_y[5] := temporary; > array_y_higher[1,5] := temporary; > temporary := temporary / glob_h * (2.0); > array_y_higher[2,4] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 5; > #END ATOMHDR4 > #BEGIN ATOMHDR5 > #emit pre cosh $eq_no = 1 > array_tmp1_g[5] := att(4,array_tmp1,array_x,1); > array_tmp1[5] := att(4,array_tmp1_g,array_x,1); > #emit pre add $eq_no = 1 i = 5 > array_tmp2[5] := array_const_0D0[5] + array_tmp1[5]; > #emit pre assign xxx $eq_no = 1 i = 5 $min_hdrs = 5 > if not array_y_set_initial[1,6] then # if number 1 > if (5 <= glob_max_terms) then # if number 2 > temporary := array_tmp2[5] * (glob_h ^ (1)) * factorial_3(4,5); > array_y[6] := temporary; > array_y_higher[1,6] := temporary; > temporary := temporary / glob_h * (2.0); > array_y_higher[2,5] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 6; > #END ATOMHDR5 > #BEGIN OUTFILE3 > #Top Atomall While Loop-- outfile3 > while (kkk <= glob_max_terms) do # do number 1 > #END OUTFILE3 > #BEGIN OUTFILE4 > #emit cosh $eq_no = 1 > array_tmp1_g[kkk] := att(kkk-1,array_tmp1,array_x,1); > array_tmp1[kkk] := att(kkk-1,array_tmp1_g,array_x,1); > #emit add $eq_no = 1 > array_tmp2[kkk] := array_const_0D0[kkk] + array_tmp1[kkk]; > #emit assign $eq_no = 1 > order_d := 1; > if (kkk + order_d + 1 <= glob_max_terms) then # if number 1 > if not array_y_set_initial[1,kkk + order_d] then # if number 2 > temporary := array_tmp2[kkk] * (glob_h ^ (order_d)) / factorial_3((kkk - 1),(kkk + order_d - 1)); > array_y[kkk + order_d] := temporary; > array_y_higher[1,kkk + order_d] := temporary; > term := kkk + order_d - 1; > adj2 := 2; > while (adj2 <= order_d + 1) and (term >= 1) do # do number 2 > temporary := temporary / glob_h * convfp(adj2); > array_y_higher[adj2,term] := temporary; > adj2 := adj2 + 1; > term := term - 1; > od;# end do number 2 > fi;# end if 2 > fi;# end if 1 > ; > kkk := kkk + 1; > od;# end do number 1 > ; > #BOTTOM ATOMALL > #END OUTFILE4 > #BEGIN OUTFILE5 > # End Function number 8 > end; atomall := proc() local kkk, order_d, adj2, temporary, term; global ALWAYS, DEBUGL, glob_iolevel, glob_max_terms, DEBUGMASSIVE, INFO, MAX_UNCHANGED, glob_smallish_float, glob_small_float, glob_hmin, glob_html_log, glob_warned, hours_in_day, glob_look_poles, glob_large_float, glob_max_opt_iter, glob_log10relerr, glob_current_iter, glob_curr_iter_when_opt, glob_unchanged_h_cnt, glob_no_eqs, glob_hmax, years_in_century, glob_display_flag, glob_log10abserr, glob_initial_pass, min_in_hour, glob_normmax, glob_optimal_start, glob_hmin_init, glob_h, days_in_year, glob_percent_done, glob_max_rel_trunc_err, glob_max_iter, glob_max_hours, glob_relerr, glob_abserr, glob_log10_relerr, glob_dump_analytic, glob_almost_1, djd_debug, glob_optimal_expect_sec, glob_max_minutes, glob_max_sec, glob_warned2, glob_disp_incr, glob_optimal_done, glob_not_yet_finished, glob_log10normmin, glob_orig_start_sec, glob_max_trunc_err, glob_last_good_h, sec_in_min, glob_optimal_clock_start_sec, glob_reached_optimal_h, glob_not_yet_start_msg, glob_clock_start_sec, centuries_in_millinium, glob_subiter_method, glob_iter, glob_start, glob_log10_abserr, glob_clock_sec, djd_debug2, glob_dump, array_const_0D0, array_const_1, array_m1, array_type_pole, array_1st_rel_error, array_pole, array_y, array_x, array_last_rel_error, array_tmp1_g, array_tmp0, array_tmp1, array_tmp2, array_y_init, array_norms, array_complex_pole, array_real_pole, array_y_higher, array_poles, array_y_higher_work2, array_y_set_initial, array_y_higher_work, glob_last; array_tmp1_g[1] := sinh(array_x[1]); array_tmp1[1] := cosh(array_x[1]); array_tmp2[1] := array_const_0D0[1] + array_tmp1[1]; if not array_y_set_initial[1, 2] then if 1 <= glob_max_terms then temporary := array_tmp2[1]*glob_h*factorial_3(0, 1); array_y[2] := temporary; array_y_higher[1, 2] := temporary; temporary := temporary*2.0/glob_h; array_y_higher[2, 1] := temporary end if end if; kkk := 2; array_tmp1_g[2] := att(1, array_tmp1, array_x, 1); array_tmp1[2] := att(1, array_tmp1_g, array_x, 1); array_tmp2[2] := array_const_0D0[2] + array_tmp1[2]; if not array_y_set_initial[1, 3] then if 2 <= glob_max_terms then temporary := array_tmp2[2]*glob_h*factorial_3(1, 2); array_y[3] := temporary; array_y_higher[1, 3] := temporary; temporary := temporary*2.0/glob_h; array_y_higher[2, 2] := temporary end if end if; kkk := 3; array_tmp1_g[3] := att(2, array_tmp1, array_x, 1); array_tmp1[3] := att(2, array_tmp1_g, array_x, 1); array_tmp2[3] := array_const_0D0[3] + array_tmp1[3]; if not array_y_set_initial[1, 4] then if 3 <= glob_max_terms then temporary := array_tmp2[3]*glob_h*factorial_3(2, 3); array_y[4] := temporary; array_y_higher[1, 4] := temporary; temporary := temporary*2.0/glob_h; array_y_higher[2, 3] := temporary end if end if; kkk := 4; array_tmp1_g[4] := att(3, array_tmp1, array_x, 1); array_tmp1[4] := att(3, array_tmp1_g, array_x, 1); array_tmp2[4] := array_const_0D0[4] + array_tmp1[4]; if not array_y_set_initial[1, 5] then if 4 <= glob_max_terms then temporary := array_tmp2[4]*glob_h*factorial_3(3, 4); array_y[5] := temporary; array_y_higher[1, 5] := temporary; temporary := temporary*2.0/glob_h; array_y_higher[2, 4] := temporary end if end if; kkk := 5; array_tmp1_g[5] := att(4, array_tmp1, array_x, 1); array_tmp1[5] := att(4, array_tmp1_g, array_x, 1); array_tmp2[5] := array_const_0D0[5] + array_tmp1[5]; if not array_y_set_initial[1, 6] then if 5 <= glob_max_terms then temporary := array_tmp2[5]*glob_h*factorial_3(4, 5); array_y[6] := temporary; array_y_higher[1, 6] := temporary; temporary := temporary*2.0/glob_h; array_y_higher[2, 5] := temporary end if end if; kkk := 6; while kkk <= glob_max_terms do array_tmp1_g[kkk] := att(kkk - 1, array_tmp1, array_x, 1); array_tmp1[kkk] := att(kkk - 1, array_tmp1_g, array_x, 1); array_tmp2[kkk] := array_const_0D0[kkk] + array_tmp1[kkk]; order_d := 1; if kkk + order_d + 1 <= glob_max_terms then if not array_y_set_initial[1, kkk + order_d] then temporary := array_tmp2[kkk]*glob_h^order_d/ factorial_3(kkk - 1, kkk + order_d - 1); array_y[kkk + order_d] := temporary; array_y_higher[1, kkk + order_d] := temporary; term := kkk + order_d - 1; adj2 := 2; while adj2 <= order_d + 1 and 1 <= term do temporary := temporary*convfp(adj2)/glob_h; array_y_higher[adj2, term] := temporary; adj2 := adj2 + 1; term := term - 1 end do end if end if; kkk := kkk + 1 end do end proc > #BEGIN ATS LIBRARY BLOCK > omniout_str := proc(iolevel,str) > global glob_iolevel; > if (glob_iolevel >= iolevel) then > printf("%s\n",str); > fi; > # End Function number 1 > end; omniout_str := proc(iolevel, str) global glob_iolevel; if iolevel <= glob_iolevel then printf("%s\n", str) end if end proc > omniout_str_noeol := proc(iolevel,str) > global glob_iolevel; > if (glob_iolevel >= iolevel) then > printf("%s",str); > fi; > # End Function number 1 > end; omniout_str_noeol := proc(iolevel, str) global glob_iolevel; if iolevel <= glob_iolevel then printf("%s", str) end if end proc > omniout_labstr := proc(iolevel,label,str) > global glob_iolevel; > if (glob_iolevel >= iolevel) then > print(label,str); > fi; > # End Function number 1 > end; omniout_labstr := proc(iolevel, label, str) global glob_iolevel; if iolevel <= glob_iolevel then print(label, str) end if end proc > omniout_float := proc(iolevel,prelabel,prelen,value,vallen,postlabel) > global glob_iolevel; > if (glob_iolevel >= iolevel) then > if vallen = 4 then > printf("%-30s = %-42.4g %s \n",prelabel,value, postlabel); > else > printf("%-30s = %-42.32g %s \n",prelabel,value, postlabel); > fi; > fi; > # End Function number 1 > end; omniout_float := proc(iolevel, prelabel, prelen, value, vallen, postlabel) global glob_iolevel; if iolevel <= glob_iolevel then if vallen = 4 then printf("%-30s = %-42.4g %s \n", prelabel, value, postlabel) else printf("%-30s = %-42.32g %s \n", prelabel, value, postlabel) end if end if end proc > omniout_int := proc(iolevel,prelabel,prelen,value,vallen,postlabel) > global glob_iolevel; > if (glob_iolevel >= iolevel) then > if vallen = 5 then > printf("%-30s = %-32d %s\n",prelabel,value, postlabel); > else > printf("%-30s = %-32d %s \n",prelabel,value, postlabel); > fi; > fi; > # End Function number 1 > end; omniout_int := proc(iolevel, prelabel, prelen, value, vallen, postlabel) global glob_iolevel; if iolevel <= glob_iolevel then if vallen = 5 then printf("%-30s = %-32d %s\n", prelabel, value, postlabel) else printf("%-30s = %-32d %s \n", prelabel, value, postlabel) end if end if end proc > omniout_float_arr := proc(iolevel,prelabel,elemnt,prelen,value,vallen,postlabel) > global glob_iolevel; > if (glob_iolevel >= iolevel) then > print(prelabel,"[",elemnt,"]",value, postlabel); > fi; > # End Function number 1 > end; omniout_float_arr := proc( iolevel, prelabel, elemnt, prelen, value, vallen, postlabel) global glob_iolevel; if iolevel <= glob_iolevel then print(prelabel, "[", elemnt, "]", value, postlabel) end if end proc > dump_series := proc(iolevel,dump_label,series_name, > array_series,numb) > global glob_iolevel; > local i; > if (glob_iolevel >= iolevel) then > i := 1; > while (i <= numb) do > print(dump_label,series_name > ,i,array_series[i]); > i := i + 1; > od; > fi; > # End Function number 1 > end; dump_series := proc(iolevel, dump_label, series_name, array_series, numb) local i; global glob_iolevel; if iolevel <= glob_iolevel then i := 1; while i <= numb do print(dump_label, series_name, i, array_series[i]); i := i + 1 end do end if end proc > dump_series_2 := proc(iolevel,dump_label,series_name2, > array_series2,numb,subnum,array_x) > global glob_iolevel; > local i,sub,ts_term; > if (glob_iolevel >= iolevel) then > sub := 1; > while (sub <= subnum) do > i := 1; > while (i <= numb) do > print(dump_label,series_name2,sub,i,array_series2[sub,i]); > od; > sub := sub + 1; > od; > fi; > # End Function number 1 > end; dump_series_2 := proc( iolevel, dump_label, series_name2, array_series2, numb, subnum, array_x) local i, sub, ts_term; global glob_iolevel; if iolevel <= glob_iolevel then sub := 1; while sub <= subnum do i := 1; while i <= numb do print(dump_label, series_name2, sub, i, array_series2[sub, i]) end do; sub := sub + 1 end do end if end proc > cs_info := proc(iolevel,str) > global glob_iolevel,glob_correct_start_flag,glob_h,glob_reached_optimal_h; > if (glob_iolevel >= iolevel) then > print("cs_info " , str , " glob_correct_start_flag = " , glob_correct_start_flag , "glob_h := " , glob_h , "glob_reached_optimal_h := " , glob_reached_optimal_h) > fi; > # End Function number 1 > end; cs_info := proc(iolevel, str) global glob_iolevel, glob_correct_start_flag, glob_h, glob_reached_optimal_h; if iolevel <= glob_iolevel then print("cs_info ", str, " glob_correct_start_flag = ", glob_correct_start_flag, "glob_h := ", glob_h, "glob_reached_optimal_h := ", glob_reached_optimal_h) end if end proc > # Begin Function number 2 > logitem_time := proc(fd,secs_in) > global centuries_in_millinium, days_in_year, hours_in_day, min_in_hour, sec_in_min, years_in_century; > local cent_int, centuries, days, days_int, hours, hours_int, millinium_int, milliniums, minutes, minutes_int, sec_in_millinium, sec_int, seconds, secs, years, years_int; > secs := (secs_in); > if (secs > 0.0) then # if number 1 > sec_in_millinium := convfloat(sec_in_min * min_in_hour * hours_in_day * days_in_year * years_in_century * centuries_in_millinium); > milliniums := convfloat(secs / sec_in_millinium); > millinium_int := floor(milliniums); > centuries := (milliniums - millinium_int)*centuries_in_millinium; > cent_int := floor(centuries); > years := (centuries - cent_int) * years_in_century; > years_int := floor(years); > days := (years - years_int) * days_in_year; > days_int := floor(days); > hours := (days - days_int) * hours_in_day; > hours_int := floor(hours); > minutes := (hours - hours_int) * min_in_hour; > minutes_int := floor(minutes); > seconds := (minutes - minutes_int) * sec_in_min; > sec_int := floor(seconds); > fprintf(fd,""); > if (millinium_int > 0) then # if number 2 > fprintf(fd,"%d Millinia %d Centuries %d Years %d Days %d Hours %d Minutes %d Seconds",millinium_int,cent_int,years_int,days_int,hours_int,minutes_int,sec_int); > elif (cent_int > 0) then # if number 3 > fprintf(fd,"%d Centuries %d Years %d Days %d Hours %d Minutes %d Seconds",cent_int,years_int,days_int,hours_int,minutes_int,sec_int); > elif (years_int > 0) then # if number 4 > fprintf(fd,"%d Years %d Days %d Hours %d Minutes %d Seconds",years_int,days_int,hours_int,minutes_int,sec_int); > elif (days_int > 0) then # if number 5 > fprintf(fd,"%d Days %d Hours %d Minutes %d Seconds",days_int,hours_int,minutes_int,sec_int); > elif (hours_int > 0) then # if number 6 > fprintf(fd,"%d Hours %d Minutes %d Seconds",hours_int,minutes_int,sec_int); > elif (minutes_int > 0) then # if number 7 > fprintf(fd,"%d Minutes %d Seconds",minutes_int,sec_int); > else > fprintf(fd,"%d Seconds",sec_int); > fi;# end if 7 > else > fprintf(fd,"Unknown"); > fi;# end if 6 > fprintf(fd,""); > # End Function number 2 > end; logitem_time := proc(fd, secs_in) local cent_int, centuries, days, days_int, hours, hours_int, millinium_int, milliniums, minutes, minutes_int, sec_in_millinium, sec_int, seconds, secs, years, years_int; global centuries_in_millinium, days_in_year, hours_in_day, min_in_hour, sec_in_min, years_in_century; secs := secs_in; if 0. < secs then sec_in_millinium := convfloat(sec_in_min*min_in_hour*hours_in_day* days_in_year*years_in_century*centuries_in_millinium); milliniums := convfloat(secs/sec_in_millinium); millinium_int := floor(milliniums); centuries := (milliniums - millinium_int)*centuries_in_millinium; cent_int := floor(centuries); years := (centuries - cent_int)*years_in_century; years_int := floor(years); days := (years - years_int)*days_in_year; days_int := floor(days); hours := (days - days_int)*hours_in_day; hours_int := floor(hours); minutes := (hours - hours_int)*min_in_hour; minutes_int := floor(minutes); seconds := (minutes - minutes_int)*sec_in_min; sec_int := floor(seconds); fprintf(fd, ""); if 0 < millinium_int then fprintf(fd, "%d Millinia %d Centuries %\ d Years %d Days %d Hours %d Minutes %d Seconds", millinium_int, cent_int, years_int, days_int, hours_int, minutes_int, sec_int) elif 0 < cent_int then fprintf(fd, "%d Centuries %d Years %d Days %d Hours %d Minutes %d Seconds", cent_int, years_int, days_int, hours_int, minutes_int, sec_int) elif 0 < years_int then fprintf(fd, "%d Years %d Days %d Hours %d Minutes %d Seconds", years_int, days_int, hours_int, minutes_int, sec_int) elif 0 < days_int then fprintf(fd, "%d Days %d Hours %d Minutes %d Seconds", days_int, hours_int, minutes_int, sec_int) elif 0 < hours_int then fprintf(fd, "%d Hours %d Minutes %d Seconds", hours_int, minutes_int, sec_int) elif 0 < minutes_int then fprintf(fd, "%d Minutes %d Seconds", minutes_int, sec_int) else fprintf(fd, "%d Seconds", sec_int) end if else fprintf(fd, "Unknown") end if; fprintf(fd, "") end proc > omniout_timestr := proc (secs_in) > global centuries_in_millinium, days_in_year, hours_in_day, min_in_hour, sec_in_min, years_in_century; > local cent_int, centuries, days, days_int, hours, hours_int, millinium_int, milliniums, minutes, minutes_int, sec_in_millinium, sec_int, seconds, secs, years, years_int; > secs := convfloat(secs_in); > if (secs > 0.0) then # if number 6 > sec_in_millinium := convfloat(sec_in_min * min_in_hour * hours_in_day * days_in_year * years_in_century * centuries_in_millinium); > milliniums := convfloat(secs / sec_in_millinium); > millinium_int := floor(milliniums); > centuries := (milliniums - millinium_int)*centuries_in_millinium; > cent_int := floor(centuries); > years := (centuries - cent_int) * years_in_century; > years_int := floor(years); > days := (years - years_int) * days_in_year; > days_int := floor(days); > hours := (days - days_int) * hours_in_day; > hours_int := floor(hours); > minutes := (hours - hours_int) * min_in_hour; > minutes_int := floor(minutes); > seconds := (minutes - minutes_int) * sec_in_min; > sec_int := floor(seconds); > > if (millinium_int > 0) then # if number 7 > printf(" = %d Millinia %d Centuries %d Years %d Days %d Hours %d Minutes %d Seconds\n",millinium_int,cent_int,years_int,days_int,hours_int,minutes_int,sec_int); > elif (cent_int > 0) then # if number 8 > printf(" = %d Centuries %d Years %d Days %d Hours %d Minutes %d Seconds\n",cent_int,years_int,days_int,hours_int,minutes_int,sec_int); > elif (years_int > 0) then # if number 9 > printf(" = %d Years %d Days %d Hours %d Minutes %d Seconds\n",years_int,days_int,hours_int,minutes_int,sec_int); > elif (days_int > 0) then # if number 10 > printf(" = %d Days %d Hours %d Minutes %d Seconds\n",days_int,hours_int,minutes_int,sec_int); > elif (hours_int > 0) then # if number 11 > printf(" = %d Hours %d Minutes %d Seconds\n",hours_int,minutes_int,sec_int); > elif (minutes_int > 0) then # if number 12 > printf(" = %d Minutes %d Seconds\n",minutes_int,sec_int); > else > printf(" = %d Seconds\n",sec_int); > fi;# end if 12 > else > printf(" Unknown\n"); > fi;# end if 11 > # End Function number 2 > end; omniout_timestr := proc(secs_in) local cent_int, centuries, days, days_int, hours, hours_int, millinium_int, milliniums, minutes, minutes_int, sec_in_millinium, sec_int, seconds, secs, years, years_int; global centuries_in_millinium, days_in_year, hours_in_day, min_in_hour, sec_in_min, years_in_century; secs := convfloat(secs_in); if 0. < secs then sec_in_millinium := convfloat(sec_in_min*min_in_hour*hours_in_day* days_in_year*years_in_century*centuries_in_millinium); milliniums := convfloat(secs/sec_in_millinium); millinium_int := floor(milliniums); centuries := (milliniums - millinium_int)*centuries_in_millinium; cent_int := floor(centuries); years := (centuries - cent_int)*years_in_century; years_int := floor(years); days := (years - years_int)*days_in_year; days_int := floor(days); hours := (days - days_int)*hours_in_day; hours_int := floor(hours); minutes := (hours - hours_int)*min_in_hour; minutes_int := floor(minutes); seconds := (minutes - minutes_int)*sec_in_min; sec_int := floor(seconds); if 0 < millinium_int then printf(" = %d Millinia %d Centuries %d\ Years %d Days %d Hours %d Minutes %d Seconds\n", millinium_int, cent_int, years_int, days_int, hours_int, minutes_int, sec_int) elif 0 < cent_int then printf(" = %d Centuries %d Years %d Days \ %d Hours %d Minutes %d Seconds\n", cent_int, years_int, days_int, hours_int, minutes_int, sec_int) elif 0 < years_int then printf( " = %d Years %d Days %d Hours %d Minutes %d Seconds\n", years_int, days_int, hours_int, minutes_int, sec_int) elif 0 < days_int then printf( " = %d Days %d Hours %d Minutes %d Seconds\n", days_int, hours_int, minutes_int, sec_int) elif 0 < hours_int then printf( " = %d Hours %d Minutes %d Seconds\n", hours_int, minutes_int, sec_int) elif 0 < minutes_int then printf(" = %d Minutes %d Seconds\n", minutes_int, sec_int) else printf(" = %d Seconds\n", sec_int) end if else printf(" Unknown\n") end if end proc > > # Begin Function number 3 > ats := proc( > mmm_ats,array_a,array_b,jjj_ats) > local iii_ats, lll_ats,ma_ats, ret_ats; > ret_ats := 0.0; > if (jjj_ats <= mmm_ats) then # if number 11 > ma_ats := mmm_ats + 1; > iii_ats := jjj_ats; > while (iii_ats <= mmm_ats) do # do number 1 > lll_ats := ma_ats - iii_ats; > ret_ats := ret_ats + array_a[iii_ats]*array_b[lll_ats]; > iii_ats := iii_ats + 1; > od;# end do number 1 > fi;# end if 11 > ; > ret_ats > # End Function number 3 > end; ats := proc(mmm_ats, array_a, array_b, jjj_ats) local iii_ats, lll_ats, ma_ats, ret_ats; ret_ats := 0.; if jjj_ats <= mmm_ats then ma_ats := mmm_ats + 1; iii_ats := jjj_ats; while iii_ats <= mmm_ats do lll_ats := ma_ats - iii_ats; ret_ats := ret_ats + array_a[iii_ats]*array_b[lll_ats]; iii_ats := iii_ats + 1 end do end if; ret_ats end proc > > # Begin Function number 4 > att := proc( > mmm_att,array_aa,array_bb,jjj_att) > global glob_max_terms; > local al_att, iii_att,lll_att, ma_att, ret_att; > ret_att := 0.0; > if (jjj_att <= mmm_att) then # if number 11 > ma_att := mmm_att + 2; > iii_att := jjj_att; > while (iii_att <= mmm_att) do # do number 1 > lll_att := ma_att - iii_att; > al_att := (lll_att - 1); > if (lll_att <= glob_max_terms) then # if number 12 > ret_att := ret_att + array_aa[iii_att]*array_bb[lll_att]* convfp(al_att); > fi;# end if 12 > ; > iii_att := iii_att + 1; > od;# end do number 1 > ; > ret_att := ret_att / convfp(mmm_att) ; > fi;# end if 11 > ; > ret_att; > # End Function number 4 > end; att := proc(mmm_att, array_aa, array_bb, jjj_att) local al_att, iii_att, lll_att, ma_att, ret_att; global glob_max_terms; ret_att := 0.; if jjj_att <= mmm_att then ma_att := mmm_att + 2; iii_att := jjj_att; while iii_att <= mmm_att do lll_att := ma_att - iii_att; al_att := lll_att - 1; if lll_att <= glob_max_terms then ret_att := ret_att + array_aa[iii_att]*array_bb[lll_att]*convfp(al_att) end if; iii_att := iii_att + 1 end do; ret_att := ret_att/convfp(mmm_att) end if; ret_att end proc > # Begin Function number 5 > display_pole := proc() > global ALWAYS,glob_display_flag, glob_large_float, array_pole; > if ((array_pole[1] <> glob_large_float) and (array_pole[1] > 0.0) and (array_pole[2] <> glob_large_float) and (array_pole[2]> 0.0) and glob_display_flag) then # if number 11 > omniout_float(ALWAYS,"Radius of convergence ",4, array_pole[1],4," "); > omniout_float(ALWAYS,"Order of pole ",4, array_pole[2],4," "); > fi;# end if 11 > # End Function number 5 > end; display_pole := proc() global ALWAYS, glob_display_flag, glob_large_float, array_pole; if array_pole[1] <> glob_large_float and 0. < array_pole[1] and array_pole[2] <> glob_large_float and 0. < array_pole[2] and glob_display_flag then omniout_float(ALWAYS, "Radius of convergence ", 4, array_pole[1], 4, " "); omniout_float(ALWAYS, "Order of pole ", 4, array_pole[2], 4, " ") end if end proc > # Begin Function number 6 > logditto := proc(file) > fprintf(file,""); > fprintf(file,"ditto"); > fprintf(file,""); > # End Function number 6 > end; logditto := proc(file) fprintf(file, ""); fprintf(file, "ditto"); fprintf(file, "") end proc > # Begin Function number 7 > logitem_integer := proc(file,n) > fprintf(file,""); > fprintf(file,"%d",n); > fprintf(file,""); > # End Function number 7 > end; logitem_integer := proc(file, n) fprintf(file, ""); fprintf(file, "%d", n); fprintf(file, "") end proc > # Begin Function number 8 > logitem_str := proc(file,str) > fprintf(file,""); > fprintf(file,str); > fprintf(file,""); > # End Function number 8 > end; logitem_str := proc(file, str) fprintf(file, ""); fprintf(file, str); fprintf(file, "") end proc > # Begin Function number 9 > log_revs := proc(file,revs) > fprintf(file,revs); > # End Function number 9 > end; log_revs := proc(file, revs) fprintf(file, revs) end proc > # Begin Function number 10 > logitem_float := proc(file,x) > fprintf(file,""); > fprintf(file,"%g",x); > fprintf(file,""); > # End Function number 10 > end; logitem_float := proc(file, x) fprintf(file, ""); fprintf(file, "%g", x); fprintf(file, "") end proc > # Begin Function number 11 > logitem_pole := proc(file,pole) > fprintf(file,""); > if pole = 0 then # if number 11 > fprintf(file,"NA"); > elif pole = 1 then # if number 12 > fprintf(file,"Real"); > elif pole = 2 then # if number 13 > fprintf(file,"Complex"); > else > fprintf(file,"No Pole"); > fi;# end if 13 > fprintf(file,""); > # End Function number 11 > end; logitem_pole := proc(file, pole) fprintf(file, ""); if pole = 0 then fprintf(file, "NA") elif pole = 1 then fprintf(file, "Real") elif pole = 2 then fprintf(file, "Complex") else fprintf(file, "No Pole") end if; fprintf(file, "") end proc > # Begin Function number 12 > logstart := proc(file) > fprintf(file,""); > # End Function number 12 > end; logstart := proc(file) fprintf(file, "") end proc > # Begin Function number 13 > logend := proc(file) > fprintf(file,"\n"); > # End Function number 13 > end; logend := proc(file) fprintf(file, "\n") end proc > # Begin Function number 14 > chk_data := proc() > global glob_max_iter,ALWAYS, glob_max_terms; > local errflag; > errflag := false; > > if ((glob_max_terms < 15) or (glob_max_terms > 512)) then # if number 13 > omniout_str(ALWAYS,"Illegal max_terms = -- Using 30"); > glob_max_terms := 30; > fi;# end if 13 > ; > if (glob_max_iter < 2) then # if number 13 > omniout_str(ALWAYS,"Illegal max_iter"); > errflag := true; > fi;# end if 13 > ; > if (errflag) then # if number 13 > > quit; > fi;# end if 13 > # End Function number 14 > end; chk_data := proc() local errflag; global glob_max_iter, ALWAYS, glob_max_terms; errflag := false; if glob_max_terms < 15 or 512 < glob_max_terms then omniout_str(ALWAYS, "Illegal max_terms = -- Using 30"); glob_max_terms := 30 end if; if glob_max_iter < 2 then omniout_str(ALWAYS, "Illegal max_iter"); errflag := true end if; if errflag then quit end if end proc > > # Begin Function number 15 > comp_expect_sec := proc(t_end2,t_start2,t2,clock_sec) > global glob_small_float; > local ms2, rrr, sec_left, sub1, sub2; > ; > ms2 := clock_sec; > sub1 := (t_end2-t_start2); > sub2 := (t2-t_start2); > if (sub1 = 0.0) then # if number 13 > sec_left := 0.0; > else > if (abs(sub2) > 0.0) then # if number 14 > rrr := (sub1/sub2); > sec_left := rrr * ms2 - ms2; > else > sec_left := 0.0; > fi;# end if 14 > fi;# end if 13 > ; > sec_left; > # End Function number 15 > end; comp_expect_sec := proc(t_end2, t_start2, t2, clock_sec) local ms2, rrr, sec_left, sub1, sub2; global glob_small_float; ms2 := clock_sec; sub1 := t_end2 - t_start2; sub2 := t2 - t_start2; if sub1 = 0. then sec_left := 0. else if 0. < abs(sub2) then rrr := sub1/sub2; sec_left := rrr*ms2 - ms2 else sec_left := 0. end if end if; sec_left end proc > > # Begin Function number 16 > comp_percent := proc(t_end2,t_start2,t2) > global glob_small_float; > local rrr, sub1, sub2; > sub1 := (t_end2-t_start2); > sub2 := (t2-t_start2); > if (abs(sub2) > glob_small_float) then # if number 13 > rrr := (100.0*sub2)/sub1; > else > rrr := 0.0; > fi;# end if 13 > ; > rrr > # End Function number 16 > end; comp_percent := proc(t_end2, t_start2, t2) local rrr, sub1, sub2; global glob_small_float; sub1 := t_end2 - t_start2; sub2 := t2 - t_start2; if glob_small_float < abs(sub2) then rrr := 100.0*sub2/sub1 else rrr := 0. end if; rrr end proc > > # Begin Function number 17 > factorial_1 := proc(nnn) > nnn!; > > # End Function number 17 > end; factorial_1 := proc(nnn) nnn! end proc > > # Begin Function number 18 > factorial_3 := proc(mmm2,nnn2) > (mmm2!)/(nnn2!); > > # End Function number 18 > end; factorial_3 := proc(mmm2, nnn2) mmm2!/nnn2! end proc > # Begin Function number 19 > convfp := proc(mmm) > (mmm); > > # End Function number 19 > end; convfp := proc(mmm) mmm end proc > # Begin Function number 20 > convfloat := proc(mmm) > (mmm); > > # End Function number 20 > end; convfloat := proc(mmm) mmm end proc > elapsed_time_seconds := proc() > time(); > end; elapsed_time_seconds := proc() time() end proc > > > > #END ATS LIBRARY BLOCK > #BEGIN USER DEF BLOCK > #BEGIN USER DEF BLOCK > exact_soln_y := proc(x) > 1.0 + sinh(x); > end; exact_soln_y := proc(x) 1.0 + sinh(x) end proc > > #END USER DEF BLOCK > #END USER DEF BLOCK > #END OUTFILE5 > # Begin Function number 2 > mainprog := proc() > #BEGIN OUTFIEMAIN > local d1,d2,d3,d4,est_err_2,niii,done_once, > term,ord,order_diff,term_no,html_log_file, > rows,r_order,sub_iter,calc_term,iii,temp_sum,current_iter, > x_start,x_end > ,it, log10norm, max_terms, opt_iter, tmp; > #Top Generate Globals Definition > #Bottom Generate Globals Deninition > global > ALWAYS, > DEBUGL, > glob_iolevel, > glob_max_terms, > DEBUGMASSIVE, > INFO, > #Top Generate Globals Decl > MAX_UNCHANGED, > glob_smallish_float, > glob_small_float, > glob_hmin, > glob_html_log, > glob_warned, > hours_in_day, > glob_look_poles, > glob_large_float, > glob_max_opt_iter, > glob_log10relerr, > glob_current_iter, > glob_curr_iter_when_opt, > glob_unchanged_h_cnt, > glob_no_eqs, > glob_hmax, > years_in_century, > glob_display_flag, > glob_log10abserr, > glob_initial_pass, > min_in_hour, > glob_normmax, > glob_optimal_start, > glob_hmin_init, > glob_h, > days_in_year, > glob_percent_done, > glob_max_rel_trunc_err, > glob_max_iter, > glob_max_hours, > glob_relerr, > glob_abserr, > glob_log10_relerr, > glob_dump_analytic, > glob_almost_1, > djd_debug, > glob_optimal_expect_sec, > glob_max_minutes, > glob_max_sec, > glob_warned2, > glob_disp_incr, > glob_optimal_done, > glob_not_yet_finished, > glob_log10normmin, > glob_orig_start_sec, > glob_max_trunc_err, > glob_last_good_h, > sec_in_min, > glob_optimal_clock_start_sec, > glob_reached_optimal_h, > glob_not_yet_start_msg, > glob_clock_start_sec, > centuries_in_millinium, > glob_subiter_method, > glob_iter, > glob_start, > glob_log10_abserr, > glob_clock_sec, > djd_debug2, > glob_dump, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_0D0, > array_const_1, > #END CONST > array_m1, > array_type_pole, > array_1st_rel_error, > array_pole, > array_y, > array_x, > array_last_rel_error, > array_tmp1_g, > array_tmp0, > array_tmp1, > array_tmp2, > array_y_init, > array_norms, > array_complex_pole, > array_real_pole, > array_y_higher, > array_poles, > array_y_higher_work2, > array_y_set_initial, > array_y_higher_work, > glob_last; > glob_last; > ALWAYS := 1; > INFO := 2; > DEBUGL := 3; > DEBUGMASSIVE := 4; > glob_iolevel := INFO; > ALWAYS := 1; > DEBUGL := 3; > glob_iolevel := 5; > glob_max_terms := 30; > DEBUGMASSIVE := 4; > INFO := 2; > MAX_UNCHANGED := 10; > glob_smallish_float := 0.1e-100; > glob_small_float := 0.1e-50; > glob_hmin := 0.00000000001; > glob_html_log := true; > glob_warned := false; > hours_in_day := 24.0; > glob_look_poles := false; > glob_large_float := 9.0e100; > glob_max_opt_iter := 10; > glob_log10relerr := 0.0; > glob_current_iter := 0; > glob_curr_iter_when_opt := 0; > glob_unchanged_h_cnt := 0; > glob_no_eqs := 0; > glob_hmax := 1.0; > years_in_century := 100.0; > glob_display_flag := true; > glob_log10abserr := 0.0; > glob_initial_pass := true; > min_in_hour := 60.0; > glob_normmax := 0.0; > glob_optimal_start := 0.0; > glob_hmin_init := 0.001; > glob_h := 0.1; > days_in_year := 365.0; > glob_percent_done := 0.0; > glob_max_rel_trunc_err := 0.1e-10; > glob_max_iter := 1000; > glob_max_hours := 0.0; > glob_relerr := 0.1e-10; > glob_abserr := 0.1e-10; > glob_log10_relerr := 0.1e-10; > glob_dump_analytic := false; > glob_almost_1 := 0.9990; > djd_debug := true; > glob_optimal_expect_sec := 0.1; > glob_max_minutes := 0.0; > glob_max_sec := 10000.0; > glob_warned2 := false; > glob_disp_incr := 0.1; > glob_optimal_done := false; > glob_not_yet_finished := true; > glob_log10normmin := 0.1; > glob_orig_start_sec := 0.0; > glob_max_trunc_err := 0.1e-10; > glob_last_good_h := 0.1; > sec_in_min := 60.0; > glob_optimal_clock_start_sec := 0.0; > glob_reached_optimal_h := false; > glob_not_yet_start_msg := true; > glob_clock_start_sec := 0.0; > centuries_in_millinium := 10.0; > glob_subiter_method := 3; > glob_iter := 0; > glob_start := 0; > glob_log10_abserr := 0.1e-10; > glob_clock_sec := 0.0; > djd_debug2 := true; > 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_no_eqs := 1; > glob_iter := -1; > opt_iter := -1; > glob_max_iter := 50000; > glob_max_hours := 0.0; > glob_max_minutes := 15.0; > omniout_str(ALWAYS,"##############ECHO OF PROBLEM#################"); > omniout_str(ALWAYS,"##############temp/coshpostode.ode#################"); > omniout_str(ALWAYS,"diff ( y , x , 1 ) = cosh ( x ) ;"); > omniout_str(ALWAYS,"!"); > omniout_str(ALWAYS,"#BEGIN FIRST INPUT BLOCK"); > omniout_str(ALWAYS,"Digits := 32;"); > omniout_str(ALWAYS,"max_terms := 30;"); > omniout_str(ALWAYS,"!"); > omniout_str(ALWAYS,"#END FIRST INPUT BLOCK"); > omniout_str(ALWAYS,"#BEGIN SECOND INPUT BLOCK"); > omniout_str(ALWAYS,"x_start := 0.1;"); > omniout_str(ALWAYS,"x_end := 2.0 ;"); > omniout_str(ALWAYS,"array_y_init[0 + 1] := exact_soln_y(x_start);"); > omniout_str(ALWAYS,"glob_h := 0.00001 ;"); > omniout_str(ALWAYS,"glob_look_poles := true;"); > omniout_str(ALWAYS,"glob_max_iter := 100;"); > omniout_str(ALWAYS,"#END SECOND INPUT BLOCK"); > omniout_str(ALWAYS,"#BEGIN OVERRIDE BLOCK"); > omniout_str(ALWAYS,"glob_h := 0.0001 ;"); > omniout_str(ALWAYS,"glob_look_poles := true;"); > omniout_str(ALWAYS,"glob_max_iter := 100;"); > omniout_str(ALWAYS,"glob_max_minutes := 15;"); > omniout_str(ALWAYS,"#END OVERRIDE BLOCK"); > omniout_str(ALWAYS,"!"); > omniout_str(ALWAYS,"#BEGIN USER DEF BLOCK"); > omniout_str(ALWAYS,"exact_soln_y := proc(x)"); > omniout_str(ALWAYS,"1.0 + sinh(x);"); > omniout_str(ALWAYS,"end;"); > omniout_str(ALWAYS,""); > omniout_str(ALWAYS,"#END USER DEF BLOCK"); > omniout_str(ALWAYS,"#######END OF ECHO OF PROBLEM#################"); > glob_unchanged_h_cnt := 0; > glob_warned := false; > glob_warned2 := false; > glob_small_float := 1.0e-200; > glob_smallish_float := 1.0e-64; > glob_large_float := 1.0e100; > glob_almost_1 := 0.99; > glob_log10_abserr := -8.0; > glob_log10_relerr := -8.0; > glob_hmax := 0.01; > #BEGIN FIRST INPUT BLOCK > #BEGIN FIRST INPUT BLOCK > Digits := 32; > max_terms := 30; > #END FIRST INPUT BLOCK > #START OF INITS AFTER INPUT BLOCK > glob_max_terms := max_terms; > glob_html_log := true; > #END OF INITS AFTER INPUT BLOCK > array_m1:= Array(1..(max_terms + 1),[]); > array_type_pole:= Array(1..(max_terms + 1),[]); > array_1st_rel_error:= Array(1..(max_terms + 1),[]); > array_pole:= Array(1..(max_terms + 1),[]); > array_y:= Array(1..(max_terms + 1),[]); > array_x:= Array(1..(max_terms + 1),[]); > array_last_rel_error:= Array(1..(max_terms + 1),[]); > array_tmp1_g:= Array(1..(max_terms + 1),[]); > array_tmp0:= Array(1..(max_terms + 1),[]); > array_tmp1:= Array(1..(max_terms + 1),[]); > array_tmp2:= Array(1..(max_terms + 1),[]); > array_y_init:= Array(1..(max_terms + 1),[]); > array_norms:= Array(1..(max_terms + 1),[]); > array_complex_pole := Array(1..(1+ 1) ,(1..3+ 1),[]); > array_real_pole := Array(1..(1+ 1) ,(1..3+ 1),[]); > array_y_higher := Array(1..(2+ 1) ,(1..max_terms+ 1),[]); > array_poles := Array(1..(1+ 1) ,(1..3+ 1),[]); > array_y_higher_work2 := Array(1..(2+ 1) ,(1..max_terms+ 1),[]); > array_y_set_initial := Array(1..(2+ 1) ,(1..max_terms+ 1),[]); > array_y_higher_work := Array(1..(2+ 1) ,(1..max_terms+ 1),[]); > term := 1; > while term <= max_terms do # do number 2 > array_m1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_type_pole[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_1st_rel_error[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_pole[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_y[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_x[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_last_rel_error[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp1_g[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp0[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp2[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_y_init[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_norms[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > ord := 1; > while ord <=1 do # do number 2 > term := 1; > while term <= 3 do # do number 3 > array_complex_pole[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while ord <=1 do # do number 2 > term := 1; > while term <= 3 do # do number 3 > array_real_pole[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while ord <=2 do # do number 2 > term := 1; > while term <= max_terms do # do number 3 > array_y_higher[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while ord <=1 do # do number 2 > term := 1; > while term <= 3 do # do number 3 > array_poles[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while ord <=2 do # do number 2 > term := 1; > while term <= max_terms do # do number 3 > array_y_higher_work2[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while ord <=2 do # do number 2 > term := 1; > while term <= max_terms do # do number 3 > array_y_set_initial[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while ord <=2 do # do number 2 > term := 1; > while term <= max_terms do # do number 3 > array_y_higher_work[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > #BEGIN ARRAYS DEFINED AND INITIALIZATED > array_x := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_x[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_y := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_y[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp1_g := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp1_g[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp2 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp2[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp1 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp0 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp0[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_const_0D0 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_const_0D0[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_const_0D0[1] := 0.0; > array_const_1 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_const_1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_const_1[1] := 1; > array_m1 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms do # do number 2 > array_m1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_m1[1] := -1.0; > #END ARRAYS DEFINED AND INITIALIZATED > #TOP SECOND INPUT BLOCK > #BEGIN SECOND INPUT BLOCK > #END FIRST INPUT BLOCK > #BEGIN SECOND INPUT BLOCK > x_start := 0.1; > x_end := 2.0 ; > array_y_init[0 + 1] := exact_soln_y(x_start); > glob_h := 0.00001 ; > glob_look_poles := true; > glob_max_iter := 100; > #END SECOND INPUT BLOCK > #BEGIN OVERRIDE BLOCK > glob_h := 0.0001 ; > glob_look_poles := true; > glob_max_iter := 100; > glob_max_minutes := 15; > #END OVERRIDE BLOCK > #END SECOND INPUT BLOCK > #BEGIN INITS AFTER SECOND INPUT BLOCK > glob_last_good_h := glob_h; > glob_max_terms := max_terms; > glob_max_sec := convfloat(60.0) * convfloat(glob_max_minutes) + convfloat(3600.0) * convfloat(glob_max_hours); > glob_abserr := 10.0 ^ (glob_log10_abserr); > glob_relerr := 10.0 ^ (glob_log10_relerr); > chk_data(); > #AFTER INITS AFTER SECOND INPUT BLOCK > array_y_set_initial[1,1] := true; > array_y_set_initial[1,2] := false; > array_y_set_initial[1,3] := false; > array_y_set_initial[1,4] := false; > array_y_set_initial[1,5] := false; > array_y_set_initial[1,6] := false; > array_y_set_initial[1,7] := false; > array_y_set_initial[1,8] := false; > array_y_set_initial[1,9] := false; > array_y_set_initial[1,10] := false; > array_y_set_initial[1,11] := false; > array_y_set_initial[1,12] := false; > array_y_set_initial[1,13] := false; > array_y_set_initial[1,14] := false; > array_y_set_initial[1,15] := false; > array_y_set_initial[1,16] := false; > array_y_set_initial[1,17] := false; > array_y_set_initial[1,18] := false; > array_y_set_initial[1,19] := false; > array_y_set_initial[1,20] := false; > array_y_set_initial[1,21] := false; > array_y_set_initial[1,22] := false; > array_y_set_initial[1,23] := false; > array_y_set_initial[1,24] := false; > array_y_set_initial[1,25] := false; > array_y_set_initial[1,26] := false; > array_y_set_initial[1,27] := false; > array_y_set_initial[1,28] := false; > array_y_set_initial[1,29] := false; > array_y_set_initial[1,30] := false; > if glob_html_log then # if number 2 > html_log_file := fopen("html/entry.html",WRITE,TEXT); > fi;# end if 2 > ; > #BEGIN SOLUTION CODE > omniout_str(ALWAYS,"START of Soultion"); > #Start Series -- INITIALIZE FOR SOLUTION > array_x[1] := x_start; > array_x[2] := glob_h; > order_diff := 1; > #Start Series array_y > term_no := 1; > while (term_no <= order_diff) do # do number 2 > array_y[term_no] := array_y_init[term_no] * glob_h ^ (term_no - 1) / factorial_1(term_no - 1); > term_no := term_no + 1; > od;# end do number 2 > ; > rows := order_diff; > r_order := 1; > while (r_order <= rows) do # do number 2 > term_no := 1; > while (term_no <= (rows - r_order + 1)) do # do number 3 > it := term_no + r_order - 1; > array_y_higher[r_order,term_no] := array_y_init[it]* (glob_h ^ (term_no - 1)) / ((factorial_1(term_no - 1))); > term_no := term_no + 1; > od;# end do number 3 > ; > r_order := r_order + 1; > od;# end do number 2 > ; > current_iter := 1; > glob_clock_start_sec := elapsed_time_seconds(); > start_array_y(); > if (abs(array_y_higher[1,1]) > glob_small_float) then # if number 2 > tmp := abs(array_y_higher[1,1]); > log10norm := (log10(tmp)); > if (log10norm < glob_log10normmin) then # if number 3 > glob_log10normmin := log10norm; > fi;# end if 3 > fi;# end if 2 > ; > display_alot(current_iter) > ; > glob_clock_sec := elapsed_time_seconds(); > glob_current_iter := 0; > glob_iter := 0; > omniout_str(DEBUGL," "); > glob_reached_optimal_h := true; > glob_optimal_clock_start_sec := elapsed_time_seconds(); > while ((glob_current_iter < glob_max_iter) and (array_x[1] <= x_end ) and ((convfloat(glob_clock_sec) - convfloat(glob_orig_start_sec)) < convfloat(glob_max_sec))) do # do number 2 > #left paren 0001C > omniout_str(INFO," "); > omniout_str(INFO,"TOP MAIN SOLVE Loop"); > glob_iter := glob_iter + 1; > glob_clock_sec := elapsed_time_seconds(); > glob_current_iter := glob_current_iter + 1; > atomall(); > if (glob_look_poles) then # if number 2 > #left paren 0004C > check_for_pole(); > fi;# end if 2 > ;#was right paren 0004C > array_x[1] := array_x[1] + glob_h; > array_x[2] := glob_h; > #Jump Series array_y > order_diff := 1; > #START PART 1 SUM AND ADJUST > #START SUM AND ADJUST EQ =1 > #sum_and_adjust array_y > #BEFORE ADJUST SUBSERIES EQ =1 > ord := 2; > calc_term := 1; > #adjust_subseriesarray_y > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > array_y_higher_work[2,iii] := array_y_higher[2,iii] / (glob_h ^ (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1); > iii := iii - 1; > od;# end do number 3 > ; > #AFTER ADJUST SUBSERIES EQ =1 > #BEFORE SUM SUBSERIES EQ =1 > temp_sum := 0.0; > ord := 2; > calc_term := 1; > #sum_subseriesarray_y > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_y_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_y_higher_work2[ord,calc_term] := temp_sum * (glob_h ^ (calc_term - 1)) / (convfp(calc_term - 1)!); > #AFTER SUM SUBSERIES EQ =1 > #BEFORE ADJUST SUBSERIES EQ =1 > ord := 1; > calc_term := 2; > #adjust_subseriesarray_y > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > array_y_higher_work[1,iii] := array_y_higher[1,iii] / (glob_h ^ (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1); > iii := iii - 1; > od;# end do number 3 > ; > #AFTER ADJUST SUBSERIES EQ =1 > #BEFORE SUM SUBSERIES EQ =1 > temp_sum := 0.0; > ord := 1; > calc_term := 2; > #sum_subseriesarray_y > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_y_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_y_higher_work2[ord,calc_term] := temp_sum * (glob_h ^ (calc_term - 1)) / (convfp(calc_term - 1)!); > #AFTER SUM SUBSERIES EQ =1 > #BEFORE ADJUST SUBSERIES EQ =1 > ord := 1; > calc_term := 1; > #adjust_subseriesarray_y > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > array_y_higher_work[1,iii] := array_y_higher[1,iii] / (glob_h ^ (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1); > iii := iii - 1; > od;# end do number 3 > ; > #AFTER ADJUST SUBSERIES EQ =1 > #BEFORE SUM SUBSERIES EQ =1 > temp_sum := 0.0; > ord := 1; > calc_term := 1; > #sum_subseriesarray_y > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_y_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_y_higher_work2[ord,calc_term] := temp_sum * (glob_h ^ (calc_term - 1)) / (convfp(calc_term - 1)!); > #AFTER SUM SUBSERIES EQ =1 > #END SUM AND ADJUST EQ =1 > #END PART 1 > #START PART 2 MOVE TERMS to REGULAR Array > term_no := glob_max_terms; > while (term_no >= 1) do # do number 3 > array_y[term_no] := array_y_higher_work2[1,term_no]; > ord := 1; > while ord <= order_diff do # do number 4 > array_y_higher[ord,term_no] := array_y_higher_work2[ord,term_no]; > ord := ord + 1; > od;# end do number 4 > ; > term_no := term_no - 1; > od;# end do number 3 > ; > #END PART 2 HEVE MOVED TERMS to REGULAR Array > display_alot(current_iter) > ; > od;# end do number 2 > ;#right paren 0001C > omniout_str(ALWAYS,"Finished!"); > if (glob_iter >= glob_max_iter) then # if number 2 > omniout_str(ALWAYS,"Maximum Iterations Reached before Solution Completed!") > fi;# end if 2 > ; > if (elapsed_time_seconds() - convfloat(glob_orig_start_sec) >= convfloat(glob_max_sec )) then # if number 2 > omniout_str(ALWAYS,"Maximum Time Reached before Solution Completed!") > fi;# end if 2 > ; > glob_clock_sec := elapsed_time_seconds(); > omniout_str(INFO,"diff ( y , x , 1 ) = cosh ( x ) ;"); > omniout_int(INFO,"Iterations ",32,glob_iter,4," ") > ; > prog_report(x_start,x_end); > if glob_html_log then # if number 2 > logstart(html_log_file); > logitem_str(html_log_file,"2012-06-13T01:29:51-05:00") > ; > logitem_str(html_log_file,"Maple") > ; > logitem_str(html_log_file,"cosh") > ; > logitem_str(html_log_file,"diff ( y , x , 1 ) = cosh ( x ) ;") > ; > logitem_float(html_log_file,x_start) > ; > logitem_float(html_log_file,x_end) > ; > logitem_float(html_log_file,array_x[1]) > ; > logitem_float(html_log_file,glob_h) > ; > logitem_integer(html_log_file,Digits) > ; > ; > logitem_integer(html_log_file,glob_max_terms) > ; > logitem_float(html_log_file,array_1st_rel_error[1]) > ; > logitem_float(html_log_file,array_last_rel_error[1]) > ; > logitem_integer(html_log_file,glob_iter) > ; > logitem_pole(html_log_file,array_type_pole[1]) > ; > if array_type_pole[1] = 1 or array_type_pole[1] = 2 then # if number 3 > logitem_float(html_log_file,array_pole[1]) > ; > logitem_float(html_log_file,array_pole[2]) > ; > 0; > else > logitem_str(html_log_file,"NA") > ; > logitem_str(html_log_file,"NA") > ; > 0; > fi;# end if 3 > ; > logitem_time(html_log_file,convfloat(glob_clock_sec)) > ; > if glob_percent_done < 100.0 then # if number 3 > logitem_time(html_log_file,convfloat(glob_optimal_expect_sec)) > ; > 0 > else > logitem_str(html_log_file,"Done") > ; > 0 > fi;# end if 3 > ; > log_revs(html_log_file," 090 ") > ; > logitem_str(html_log_file,"cosh diffeq.mxt") > ; > logitem_str(html_log_file,"cosh maple results") > ; > logitem_str(html_log_file,"Test of revised logic - mostly affecting systems of eqs") > ; > logend(html_log_file) > ; > ; > fi;# end if 2 > ; > if glob_html_log then # if number 2 > fclose(html_log_file); > fi;# end if 2 > ; > ;; > #END OUTFILEMAIN > # End Function number 8 > end; mainprog := proc() local d1, d2, d3, d4, est_err_2, niii, done_once, term, ord, order_diff, term_no, html_log_file, rows, r_order, sub_iter, calc_term, iii, temp_sum, current_iter, x_start, x_end, it, log10norm, max_terms, opt_iter, tmp; global ALWAYS, DEBUGL, glob_iolevel, glob_max_terms, DEBUGMASSIVE, INFO, MAX_UNCHANGED, glob_smallish_float, glob_small_float, glob_hmin, glob_html_log, glob_warned, hours_in_day, glob_look_poles, glob_large_float, glob_max_opt_iter, glob_log10relerr, glob_current_iter, glob_curr_iter_when_opt, glob_unchanged_h_cnt, glob_no_eqs, glob_hmax, years_in_century, glob_display_flag, glob_log10abserr, glob_initial_pass, min_in_hour, glob_normmax, glob_optimal_start, glob_hmin_init, glob_h, days_in_year, glob_percent_done, glob_max_rel_trunc_err, glob_max_iter, glob_max_hours, glob_relerr, glob_abserr, glob_log10_relerr, glob_dump_analytic, glob_almost_1, djd_debug, glob_optimal_expect_sec, glob_max_minutes, glob_max_sec, glob_warned2, glob_disp_incr, glob_optimal_done, glob_not_yet_finished, glob_log10normmin, glob_orig_start_sec, glob_max_trunc_err, glob_last_good_h, sec_in_min, glob_optimal_clock_start_sec, glob_reached_optimal_h, glob_not_yet_start_msg, glob_clock_start_sec, centuries_in_millinium, glob_subiter_method, glob_iter, glob_start, glob_log10_abserr, glob_clock_sec, djd_debug2, glob_dump, array_const_0D0, array_const_1, array_m1, array_type_pole, array_1st_rel_error, array_pole, array_y, array_x, array_last_rel_error, array_tmp1_g, array_tmp0, array_tmp1, array_tmp2, array_y_init, array_norms, array_complex_pole, array_real_pole, array_y_higher, array_poles, array_y_higher_work2, array_y_set_initial, array_y_higher_work, glob_last; glob_last; ALWAYS := 1; INFO := 2; DEBUGL := 3; DEBUGMASSIVE := 4; glob_iolevel := INFO; ALWAYS := 1; DEBUGL := 3; glob_iolevel := 5; glob_max_terms := 30; DEBUGMASSIVE := 4; INFO := 2; MAX_UNCHANGED := 10; glob_smallish_float := 0.1*10^(-100); glob_small_float := 0.1*10^(-50); glob_hmin := 0.1*10^(-10); glob_html_log := true; glob_warned := false; hours_in_day := 24.0; glob_look_poles := false; glob_large_float := 0.90*10^101; glob_max_opt_iter := 10; glob_log10relerr := 0.; glob_current_iter := 0; glob_curr_iter_when_opt := 0; glob_unchanged_h_cnt := 0; glob_no_eqs := 0; glob_hmax := 1.0; years_in_century := 100.0; glob_display_flag := true; glob_log10abserr := 0.; glob_initial_pass := true; min_in_hour := 60.0; glob_normmax := 0.; glob_optimal_start := 0.; glob_hmin_init := 0.001; glob_h := 0.1; days_in_year := 365.0; glob_percent_done := 0.; glob_max_rel_trunc_err := 0.1*10^(-10); glob_max_iter := 1000; glob_max_hours := 0.; glob_relerr := 0.1*10^(-10); glob_abserr := 0.1*10^(-10); glob_log10_relerr := 0.1*10^(-10); glob_dump_analytic := false; glob_almost_1 := 0.9990; djd_debug := true; glob_optimal_expect_sec := 0.1; glob_max_minutes := 0.; glob_max_sec := 10000.0; glob_warned2 := false; glob_disp_incr := 0.1; glob_optimal_done := false; glob_not_yet_finished := true; glob_log10normmin := 0.1; glob_orig_start_sec := 0.; glob_max_trunc_err := 0.1*10^(-10); glob_last_good_h := 0.1; sec_in_min := 60.0; glob_optimal_clock_start_sec := 0.; glob_reached_optimal_h := false; glob_not_yet_start_msg := true; glob_clock_start_sec := 0.; centuries_in_millinium := 10.0; glob_subiter_method := 3; glob_iter := 0; glob_start := 0; glob_log10_abserr := 0.1*10^(-10); glob_clock_sec := 0.; djd_debug2 := true; glob_dump := false; glob_orig_start_sec := elapsed_time_seconds(); MAX_UNCHANGED := 10; glob_curr_iter_when_opt := 0; glob_display_flag := true; glob_no_eqs := 1; glob_iter := -1; opt_iter := -1; glob_max_iter := 50000; glob_max_hours := 0.; glob_max_minutes := 15.0; omniout_str(ALWAYS, "##############ECHO OF PROBLEM#################"); omniout_str(ALWAYS, "##############temp/coshpostode.ode#################"); omniout_str(ALWAYS, "diff ( y , x , 1 ) = cosh ( x ) ;"); omniout_str(ALWAYS, "!"); omniout_str(ALWAYS, "#BEGIN FIRST INPUT BLOCK"); omniout_str(ALWAYS, "Digits := 32;"); omniout_str(ALWAYS, "max_terms := 30;"); omniout_str(ALWAYS, "!"); omniout_str(ALWAYS, "#END FIRST INPUT BLOCK"); omniout_str(ALWAYS, "#BEGIN SECOND INPUT BLOCK"); omniout_str(ALWAYS, "x_start := 0.1;"); omniout_str(ALWAYS, "x_end := 2.0 ;"); omniout_str(ALWAYS, "array_y_init[0 + 1] := exact_soln_y(x_start);"); omniout_str(ALWAYS, "glob_h := 0.00001 ;"); omniout_str(ALWAYS, "glob_look_poles := true;"); omniout_str(ALWAYS, "glob_max_iter := 100;"); omniout_str(ALWAYS, "#END SECOND INPUT BLOCK"); omniout_str(ALWAYS, "#BEGIN OVERRIDE BLOCK"); omniout_str(ALWAYS, "glob_h := 0.0001 ;"); omniout_str(ALWAYS, "glob_look_poles := true;"); omniout_str(ALWAYS, "glob_max_iter := 100;"); omniout_str(ALWAYS, "glob_max_minutes := 15;"); omniout_str(ALWAYS, "#END OVERRIDE BLOCK"); omniout_str(ALWAYS, "!"); omniout_str(ALWAYS, "#BEGIN USER DEF BLOCK"); omniout_str(ALWAYS, "exact_soln_y := proc(x)"); omniout_str(ALWAYS, "1.0 +\t\tsinh(x);"); omniout_str(ALWAYS, "end;"); omniout_str(ALWAYS, ""); omniout_str(ALWAYS, "#END USER DEF BLOCK"); omniout_str(ALWAYS, "#######END OF ECHO OF PROBLEM#################"); glob_unchanged_h_cnt := 0; glob_warned := false; glob_warned2 := false; glob_small_float := 0.10*10^(-199); glob_smallish_float := 0.10*10^(-63); glob_large_float := 0.10*10^101; glob_almost_1 := 0.99; glob_log10_abserr := -8.0; glob_log10_relerr := -8.0; glob_hmax := 0.01; Digits := 32; max_terms := 30; glob_max_terms := max_terms; glob_html_log := true; array_m1 := Array(1 .. max_terms + 1, []); array_type_pole := Array(1 .. max_terms + 1, []); array_1st_rel_error := Array(1 .. max_terms + 1, []); array_pole := Array(1 .. max_terms + 1, []); array_y := Array(1 .. max_terms + 1, []); array_x := Array(1 .. max_terms + 1, []); array_last_rel_error := Array(1 .. max_terms + 1, []); array_tmp1_g := Array(1 .. max_terms + 1, []); array_tmp0 := Array(1 .. max_terms + 1, []); array_tmp1 := Array(1 .. max_terms + 1, []); array_tmp2 := Array(1 .. max_terms + 1, []); array_y_init := Array(1 .. max_terms + 1, []); array_norms := Array(1 .. max_terms + 1, []); array_complex_pole := Array(1 .. 2, 1 .. 4, []); array_real_pole := Array(1 .. 2, 1 .. 4, []); array_y_higher := Array(1 .. 3, 1 .. max_terms + 1, []); array_poles := Array(1 .. 2, 1 .. 4, []); array_y_higher_work2 := Array(1 .. 3, 1 .. max_terms + 1, []); array_y_set_initial := Array(1 .. 3, 1 .. max_terms + 1, []); array_y_higher_work := Array(1 .. 3, 1 .. max_terms + 1, []); term := 1; while term <= max_terms do array_m1[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_type_pole[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_1st_rel_error[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_pole[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_y[term] := 0.; term := term + 1 end do ; term := 1; while term <= max_terms do array_x[term] := 0.; term := term + 1 end do ; term := 1; while term <= max_terms do array_last_rel_error[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp1_g[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp0[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp1[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp2[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_y_init[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_norms[term] := 0.; term := term + 1 end do; ord := 1; while ord <= 1 do term := 1; while term <= 3 do array_complex_pole[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 1 do term := 1; while term <= 3 do array_real_pole[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 2 do term := 1; while term <= max_terms do array_y_higher[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 1 do term := 1; while term <= 3 do array_poles[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 2 do term := 1; while term <= max_terms do array_y_higher_work2[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 2 do term := 1; while term <= max_terms do array_y_set_initial[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 2 do term := 1; while term <= max_terms do array_y_higher_work[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; array_x := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_x[term] := 0.; term := term + 1 end do; array_y := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_y[term] := 0.; term := term + 1 end do; array_tmp1_g := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp1_g[term] := 0.; term := term + 1 end do; array_tmp2 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp2[term] := 0.; term := term + 1 end do; array_tmp1 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp1[term] := 0.; term := term + 1 end do; array_tmp0 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp0[term] := 0.; term := term + 1 end do; array_const_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_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 := 2.0; array_y_init[1] := exact_soln_y(x_start); glob_h := 0.00001; glob_look_poles := true; glob_max_iter := 100; glob_h := 0.0001; glob_look_poles := true; glob_max_iter := 100; glob_max_minutes := 15; glob_last_good_h := glob_h; glob_max_terms := max_terms; glob_max_sec := convfloat(60.0)*convfloat(glob_max_minutes) + convfloat(3600.0)*convfloat(glob_max_hours); glob_abserr := 10.0^glob_log10_abserr; glob_relerr := 10.0^glob_log10_relerr; chk_data(); array_y_set_initial[1, 1] := true; array_y_set_initial[1, 2] := false; array_y_set_initial[1, 3] := false; array_y_set_initial[1, 4] := false; array_y_set_initial[1, 5] := false; array_y_set_initial[1, 6] := false; array_y_set_initial[1, 7] := false; array_y_set_initial[1, 8] := false; array_y_set_initial[1, 9] := false; array_y_set_initial[1, 10] := false; array_y_set_initial[1, 11] := false; array_y_set_initial[1, 12] := false; array_y_set_initial[1, 13] := false; array_y_set_initial[1, 14] := false; array_y_set_initial[1, 15] := false; array_y_set_initial[1, 16] := false; array_y_set_initial[1, 17] := false; array_y_set_initial[1, 18] := false; array_y_set_initial[1, 19] := false; array_y_set_initial[1, 20] := false; array_y_set_initial[1, 21] := false; array_y_set_initial[1, 22] := false; array_y_set_initial[1, 23] := false; array_y_set_initial[1, 24] := false; array_y_set_initial[1, 25] := false; array_y_set_initial[1, 26] := false; array_y_set_initial[1, 27] := false; array_y_set_initial[1, 28] := false; array_y_set_initial[1, 29] := false; array_y_set_initial[1, 30] := false; if glob_html_log then html_log_file := fopen("html/entry.html", WRITE, TEXT) end if; omniout_str(ALWAYS, "START of Soultion"); array_x[1] := x_start; array_x[2] := glob_h; order_diff := 1; term_no := 1; while term_no <= order_diff do array_y[term_no] := array_y_init[term_no]*glob_h^(term_no - 1)/ factorial_1(term_no - 1); term_no := term_no + 1 end do; rows := order_diff; r_order := 1; while r_order <= rows do term_no := 1; while term_no <= rows - r_order + 1 do it := term_no + r_order - 1; array_y_higher[r_order, term_no] := array_y_init[it]* glob_h^(term_no - 1)/factorial_1(term_no - 1); term_no := term_no + 1 end do; r_order := r_order + 1 end do; current_iter := 1; glob_clock_start_sec := elapsed_time_seconds(); start_array_y(); if glob_small_float < abs(array_y_higher[1, 1]) then tmp := abs(array_y_higher[1, 1]); log10norm := log10(tmp); if log10norm < glob_log10normmin then glob_log10normmin := log10norm end if end if; display_alot(current_iter); glob_clock_sec := elapsed_time_seconds(); glob_current_iter := 0; glob_iter := 0; omniout_str(DEBUGL, " "); glob_reached_optimal_h := true; glob_optimal_clock_start_sec := elapsed_time_seconds(); while glob_current_iter < glob_max_iter and array_x[1] <= x_end and convfloat(glob_clock_sec) - convfloat(glob_orig_start_sec) < convfloat(glob_max_sec) do omniout_str(INFO, " "); omniout_str(INFO, "TOP MAIN SOLVE Loop"); glob_iter := glob_iter + 1; glob_clock_sec := elapsed_time_seconds(); glob_current_iter := glob_current_iter + 1; atomall(); if glob_look_poles then check_for_pole() end if; array_x[1] := array_x[1] + glob_h; array_x[2] := glob_h; order_diff := 1; ord := 2; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do array_y_higher_work[2, iii] := array_y_higher[2, iii]/( glob_h^(calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; temp_sum := 0.; ord := 2; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do temp_sum := temp_sum + array_y_higher_work[ord, iii]; iii := iii - 1 end do; array_y_higher_work2[ord, calc_term] := temp_sum*glob_h^(calc_term - 1)/convfp(calc_term - 1)!; ord := 1; calc_term := 2; iii := glob_max_terms; while calc_term <= iii do array_y_higher_work[1, iii] := array_y_higher[1, iii]/( glob_h^(calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; temp_sum := 0.; ord := 1; calc_term := 2; iii := glob_max_terms; while calc_term <= iii do temp_sum := temp_sum + array_y_higher_work[ord, iii]; iii := iii - 1 end do; array_y_higher_work2[ord, calc_term] := temp_sum*glob_h^(calc_term - 1)/convfp(calc_term - 1)!; ord := 1; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do array_y_higher_work[1, iii] := array_y_higher[1, iii]/( glob_h^(calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; temp_sum := 0.; ord := 1; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do temp_sum := temp_sum + array_y_higher_work[ord, iii]; iii := iii - 1 end do; array_y_higher_work2[ord, calc_term] := temp_sum*glob_h^(calc_term - 1)/convfp(calc_term - 1)!; term_no := glob_max_terms; while 1 <= term_no do array_y[term_no] := array_y_higher_work2[1, term_no]; ord := 1; while ord <= order_diff do array_y_higher[ord, term_no] := array_y_higher_work2[ord, term_no]; ord := ord + 1 end do; term_no := term_no - 1 end do; display_alot(current_iter) end do; omniout_str(ALWAYS, "Finished!"); if glob_max_iter <= glob_iter then omniout_str(ALWAYS, "Maximum Iterations Reached before Solution Completed!") end if; if convfloat(glob_max_sec) <= elapsed_time_seconds() - convfloat(glob_orig_start_sec) then omniout_str(ALWAYS, "Maximum Time Reached before Solution Completed!") end if; glob_clock_sec := elapsed_time_seconds(); omniout_str(INFO, "diff ( y , x , 1 ) = cosh ( x ) ;"); omniout_int(INFO, "Iterations ", 32, glob_iter, 4, " "); prog_report(x_start, x_end); if glob_html_log then logstart(html_log_file); logitem_str(html_log_file, "2012-06-13T01:29:51-05:00"); logitem_str(html_log_file, "Maple"); logitem_str(html_log_file, "cosh"); logitem_str(html_log_file, "diff ( y , x , 1 ) = cosh ( x ) ;"); logitem_float(html_log_file, x_start); logitem_float(html_log_file, x_end); logitem_float(html_log_file, array_x[1]); logitem_float(html_log_file, glob_h); logitem_integer(html_log_file, Digits); logitem_integer(html_log_file, glob_max_terms); logitem_float(html_log_file, array_1st_rel_error[1]); logitem_float(html_log_file, array_last_rel_error[1]); logitem_integer(html_log_file, glob_iter); logitem_pole(html_log_file, array_type_pole[1]); if array_type_pole[1] = 1 or array_type_pole[1] = 2 then logitem_float(html_log_file, array_pole[1]); logitem_float(html_log_file, array_pole[2]); 0 else logitem_str(html_log_file, "NA"); logitem_str(html_log_file, "NA"); 0 end if; logitem_time(html_log_file, convfloat(glob_clock_sec)); if glob_percent_done < 100.0 then logitem_time(html_log_file, convfloat(glob_optimal_expect_sec)) ; 0 else logitem_str(html_log_file, "Done"); 0 end if; log_revs(html_log_file, " 090 "); logitem_str(html_log_file, "cosh diffeq.mxt"); logitem_str(html_log_file, "cosh maple results"); logitem_str(html_log_file, "Test of revised logic - mostly affecting systems of eqs"); logend(html_log_file) end if; if glob_html_log then fclose(html_log_file) end if end proc > mainprog(); ##############ECHO OF PROBLEM################# ##############temp/coshpostode.ode################# diff ( y , x , 1 ) = cosh ( x ) ; ! #BEGIN FIRST INPUT BLOCK Digits := 32; max_terms := 30; ! #END FIRST INPUT BLOCK #BEGIN SECOND INPUT BLOCK x_start := 0.1; x_end := 2.0 ; array_y_init[0 + 1] := exact_soln_y(x_start); glob_h := 0.00001 ; glob_look_poles := true; glob_max_iter := 100; #END SECOND INPUT BLOCK #BEGIN OVERRIDE BLOCK glob_h := 0.0001 ; glob_look_poles := true; glob_max_iter := 100; glob_max_minutes := 15; #END OVERRIDE BLOCK ! #BEGIN USER DEF BLOCK exact_soln_y := proc(x) 1.0 + sinh(x); end; #END USER DEF BLOCK #######END OF ECHO OF PROBLEM################# START of Soultion x[1] = 0.1 y[1] (analytic) = 1.1001667500198440258237293835219 y[1] (numeric) = 1.1001667500198440258237293835219 absolute error = 0 relative error = 0 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1001 y[1] (analytic) = 1.1002672509376508573949694866538 y[1] (numeric) = 1.100267250937650857394969491524 absolute error = 4.8702e-27 relative error = 4.4263791327512491269921828487192e-25 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1002 y[1] (analytic) = 1.1003677528581301991782785884944 y[1] (numeric) = 1.1003677528581301991782785982396 absolute error = 9.7452e-27 relative error = 8.8563118781766437335536548647111e-25 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1003 y[1] (analytic) = 1.100468255782287070379287622881 y[1] (numeric) = 1.1004682557822870703792876375061 absolute error = 1.46251e-26 relative error = 1.3289888120946744035061761876105e-24 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1004 y[1] (analytic) = 1.1005687597111265002404028261919 y[1] (numeric) = 1.1005687597111265002404028457019 absolute error = 1.95100e-26 relative error = 1.7727197712863408592703630286098e-24 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1005 y[1] (analytic) = 1.100669264645653528050856029779 y[1] (numeric) = 1.1006692646456535280508560541786 absolute error = 2.43996e-26 relative error = 2.2167967057620293337756275830067e-24 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1006 y[1] (analytic) = 1.100769770586873203156755052868 y[1] (numeric) = 1.1007697705868732031567550821622 absolute error = 2.92942e-26 relative error = 2.6612467731905333681420895800343e-24 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1007 y[1] (analytic) = 1.1008702775357905849711341960284 y[1] (numeric) = 1.1008702775357905849711342302221 absolute error = 3.41937e-26 relative error = 3.1060607864297910136807891608987e-24 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1008 y[1] (analytic) = 1.1009707854934107429840048353119 y[1] (numeric) = 1.10097078549341074298400487441 absolute error = 3.90981e-26 relative error = 3.5512386445820001498616378168450e-24 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1009 y[1] (analytic) = 1.1010712944607387567724061171611 y[1] (numeric) = 1.1010712944607387567724061611684 absolute error = 4.40073e-26 relative error = 3.9967711647185423966413724246238e-24 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.101 y[1] (analytic) = 1.1011718044387797160104557541879 y[1] (numeric) = 1.1011718044387797160104558031093 absolute error = 4.89214e-26 relative error = 4.4426673297300006881870183663177e-24 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1011 y[1] (analytic) = 1.1012723154285387204794009219234 y[1] (numeric) = 1.1012723154285387204794009757639 absolute error = 5.38405e-26 relative error = 4.8889361192239737461866826414455e-24 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1012 y[1] (analytic) = 1.1013728274310208800776692566388 y[1] (numeric) = 1.1013728274310208800776693154032 absolute error = 5.87644e-26 relative error = 5.3355592707938331471073008559397e-24 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1013 y[1] (analytic) = 1.1014733404472313148309199543376 y[1] (numeric) = 1.1014733404472313148309200180308 absolute error = 6.36932e-26 relative error = 5.7825457649423130427059465104714e-24 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1014 y[1] (analytic) = 1.1015738544781751549020949710211 y[1] (numeric) = 1.101573854478175154902095039648 absolute error = 6.86269e-26 relative error = 6.2298955009702134359115822292001e-24 % h = 0.0001 TOP MAIN SOLVE Loop memory used=3.8MB, alloc=2.9MB, time=0.20 NO POLE x[1] = 0.1015 y[1] (analytic) = 1.1016743695248575406014703243258 y[1] (numeric) = 1.1016743695248575406014703978913 absolute error = 7.35655e-26 relative error = 6.6776083782114448825051753220549e-24 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1016 y[1] (analytic) = 1.1017748855882836223967074966348 y[1] (numeric) = 1.1017748855882836223967075751437 absolute error = 7.85089e-26 relative error = 7.1256752197687660757414846248061e-24 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1017 y[1] (analytic) = 1.1018754026694585609229049397626 y[1] (numeric) = 1.1018754026694585609229050232198 absolute error = 8.34572e-26 relative error = 7.5741050029624407247070842378579e-24 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1018 y[1] (analytic) = 1.1019759207693875269926496813146 y[1] (numeric) = 1.101975920769387526992649769725 absolute error = 8.84104e-26 relative error = 8.0228976272251780558635285222974e-24 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1019 y[1] (analytic) = 1.1020764398890757016060690328212 y[1] (numeric) = 1.1020764398890757016060691261898 absolute error = 9.33686e-26 relative error = 8.4720620658034913990168319839645e-24 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.102 y[1] (analytic) = 1.1021769600295282759608823997477 y[1] (numeric) = 1.1021769600295282759608824980793 absolute error = 9.83316e-26 relative error = 8.9215800698070853537816903010816e-24 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1021 y[1] (analytic) = 1.1022774811917504514624531934796 y[1] (numeric) = 1.1022774811917504514624532967791 absolute error = 1.032995e-25 relative error = 9.3714606133761868954687623178519e-24 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1022 y[1] (analytic) = 1.1023780033767474397338408453848 y[1] (numeric) = 1.102378003376747439733840953657 absolute error = 1.082722e-25 relative error = 9.8216945247769985972247154129901e-24 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1023 y[1] (analytic) = 1.1024785265855244626258529230522 y[1] (numeric) = 1.1024785265855244626258530363021 absolute error = 1.132499e-25 relative error = 1.0272299847031503225973262984741e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1024 y[1] (analytic) = 1.102579050819086752227097348809 y[1] (numeric) = 1.1025790508190867522270974670414 absolute error = 1.182324e-25 relative error = 1.0723258338000092741318966945418e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1025 y[1] (analytic) = 1.102679576078439550874034720614 y[1] (numeric) = 1.1026795760784395508740348438339 absolute error = 1.232199e-25 relative error = 1.1174588037462181428069821630091e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1026 y[1] (analytic) = 1.1027801023645881111610307354315 y[1] (numeric) = 1.1027801023645881111610308636438 absolute error = 1.282123e-25 relative error = 1.1626279774642865851358336765840e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1027 y[1] (analytic) = 1.1028806296785376959504087151832 y[1] (numeric) = 1.1028806296785376959504088483926 absolute error = 1.332094e-25 relative error = 1.2078315314942763180253664854864e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1028 y[1] (analytic) = 1.1029811580212935783825022353791 y[1] (numeric) = 1.1029811580212935783825023735907 absolute error = 1.382116e-25 relative error = 1.2530730828434673859510018122592e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1029 y[1] (analytic) = 1.1030816873938610418857078565303 y[1] (numeric) = 1.1030816873938610418857079997488 absolute error = 1.432185e-25 relative error = 1.2983489947908372013254349108055e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.103 y[1] (analytic) = 1.1031822177972453801865379584404 y[1] (numeric) = 1.1031822177972453801865381066708 absolute error = 1.482304e-25 relative error = 1.3436619772205516762137999302273e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1031 y[1] (analytic) = 1.1032827492324518973196736774795 y[1] (numeric) = 1.1032827492324518973196738307267 absolute error = 1.532472e-25 relative error = 1.3890111134848549429030661813101e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1032 y[1] (analytic) = 1.1033832817004859076380179469394 y[1] (numeric) = 1.1033832817004859076380181052082 absolute error = 1.582688e-25 relative error = 1.4343954872696917139421591274428e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1033 y[1] (analytic) = 1.1034838152023527358227486405706 y[1] (numeric) = 1.103483815202352735822748803866 absolute error = 1.632954e-25 relative error = 1.4798169012570021260474068104849e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1034 y[1] (analytic) = 1.1035843497390577168933718194031 y[1] (numeric) = 1.1035843497390577168933719877299 absolute error = 1.683268e-25 relative error = 1.5252735329184473828773056220225e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1035 y[1] (analytic) = 1.1036848853116061962177750819492 y[1] (numeric) = 1.1036848853116061962177752553123 absolute error = 1.733631e-25 relative error = 1.5707662785565279303357046568819e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1036 y[1] (analytic) = 1.1037854219210035295222810178911 y[1] (numeric) = 1.1037854219210035295222811962954 absolute error = 1.784043e-25 relative error = 1.6162951281736366421915379357261e-23 % h = 0.0001 TOP MAIN SOLVE Loop memory used=7.6MB, alloc=4.0MB, time=0.44 NO POLE x[1] = 0.1037 y[1] (analytic) = 1.1038859595682550829017007653524 y[1] (numeric) = 1.1038859595682550829017009488028 absolute error = 1.834504e-25 relative error = 1.6618600717754392300792199822670e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1038 y[1] (analytic) = 1.1039864982543662328293876718548 y[1] (numeric) = 1.1039864982543662328293878603562 absolute error = 1.885014e-25 relative error = 1.7074610993708725162780989025213e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1039 y[1] (analytic) = 1.1040870379803423661672910590597 y[1] (numeric) = 1.1040870379803423661672912526169 absolute error = 1.935572e-25 relative error = 1.7530972952464475402192586037672e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.104 y[1] (analytic) = 1.1041875787471888801760100913961 y[1] (numeric) = 1.1041875787471888801760102900141 absolute error = 1.986180e-25 relative error = 1.7987704609514985085151576862498e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1041 y[1] (analytic) = 1.1042881205559111825248477486752 y[1] (numeric) = 1.1042881205559111825248479523589 absolute error = 2.036837e-25 relative error = 1.8444796806965858869883589332728e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1042 y[1] (analytic) = 1.1043886634075146913018649027918 y[1] (numeric) = 1.104388663407514691301865111546 absolute error = 2.087542e-25 relative error = 1.8902240390253860603467690275149e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1043 y[1] (analytic) = 1.104489207303004835023934498613 y[1] (numeric) = 1.1044892073030048350239347124426 absolute error = 2.138296e-25 relative error = 1.9360044316063482335101825700047e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1044 y[1] (analytic) = 1.1045897522433870526467958391554 y[1] (numeric) = 1.1045897522433870526467960580654 absolute error = 2.189100e-25 relative error = 1.9818217537814439586397959251662e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1045 y[1] (analytic) = 1.1046902982296667935751089751513 y[1] (numeric) = 1.1046902982296667935751091991464 absolute error = 2.239951e-25 relative error = 2.0276732796419569708637981108269e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1046 y[1] (analytic) = 1.1047908452628495176725091991029 y[1] (numeric) = 1.1047908452628495176725094281881 absolute error = 2.290852e-25 relative error = 2.0735617151633486818992719789466e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1047 y[1] (analytic) = 1.1048913933439406952716616439278 y[1] (numeric) = 1.1048913933439406952716618781079 absolute error = 2.341801e-25 relative error = 2.1194852400040578223012546403258e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1048 y[1] (analytic) = 1.1049919424739458071843159862935 y[1] (numeric) = 1.1049919424739458071843162255734 absolute error = 2.392799e-25 relative error = 2.1654447494366402721832813565213e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1049 y[1] (analytic) = 1.1050924926538703447113612547435 y[1] (numeric) = 1.1050924926538703447113614991282 absolute error = 2.443847e-25 relative error = 2.2114411384074485418914930667561e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.105 y[1] (analytic) = 1.1051930438847198096528807427147 y[1] (numeric) = 1.105193043884719809652880992209 absolute error = 2.494943e-25 relative error = 2.2574725870788613735989591442822e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1051 y[1] (analytic) = 1.1052935961674997143182070265462 y[1] (numeric) = 1.105293596167499714318207281155 absolute error = 2.546088e-25 relative error = 2.3035399904860732674262390242060e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1052 y[1] (analytic) = 1.1053941495032155815359770885814 y[1] (numeric) = 1.1053941495032155815359773483096 absolute error = 2.597282e-25 relative error = 2.3496433386835512017191091636684e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1053 y[1] (analytic) = 1.1054947038928729446641875454627 y[1] (numeric) = 1.1054947038928729446641878103151 absolute error = 2.648524e-25 relative error = 2.3957817171566052482747700553608e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1054 y[1] (analytic) = 1.1055952593374773476002499817194 y[1] (numeric) = 1.105595259337477347600250251701 absolute error = 2.699816e-25 relative error = 2.4419569251932680853977086605555e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1055 y[1] (analytic) = 1.105695815838034344791046388751 y[1] (numeric) = 1.1056958158380343447910466638666 absolute error = 2.751156e-25 relative error = 2.4881671437951770468797510095000e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1056 y[1] (analytic) = 1.1057963733955495012429847093035 y[1] (numeric) = 1.1057963733955495012429849895581 absolute error = 2.802546e-25 relative error = 2.5344141719277584738025027296941e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1057 y[1] (analytic) = 1.1058969320110283925320544875428 y[1] (numeric) = 1.1058969320110283925320547729411 absolute error = 2.853983e-25 relative error = 2.5806952866847623005909718471496e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1058 y[1] (analytic) = 1.1059974916854766048138826248219 y[1] (numeric) = 1.105997491685476604813882915369 absolute error = 2.905471e-25 relative error = 2.6270140952781268987259718934310e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE memory used=11.4MB, alloc=4.1MB, time=0.68 x[1] = 0.1059 y[1] (analytic) = 1.1060980524198997348337892412466 y[1] (numeric) = 1.1060980524198997348337895369473 absolute error = 2.957007e-25 relative error = 2.6733678750547637147012479402225e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.106 y[1] (analytic) = 1.1061986142153033899368436431364 y[1] (numeric) = 1.1061986142153033899368439439956 absolute error = 3.008592e-25 relative error = 2.7197575203384109339201505772732e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1061 y[1] (analytic) = 1.1062991770726931880779203964839 y[1] (numeric) = 1.1062991770726931880779207025064 absolute error = 3.060225e-25 relative error = 2.7661821172980203736420884507487e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1062 y[1] (analytic) = 1.1063997409930747578317555065116 y[1] (numeric) = 1.1063997409930747578317558177024 absolute error = 3.111908e-25 relative error = 2.8126434639317926567741827685358e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1063 y[1] (analytic) = 1.106500305977453738403002703428 y[1] (numeric) = 1.106500305977453738403003019792 absolute error = 3.163640e-25 relative error = 2.8591406463329644419952206914192e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1064 y[1] (analytic) = 1.1066008720268357796362898344824 y[1] (numeric) = 1.1066008720268357796362901560245 absolute error = 3.215421e-25 relative error = 2.9056736545947923147039786628234e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1065 y[1] (analytic) = 1.1067014391422265420262753624195 y[1] (numeric) = 1.1067014391422265420262756891445 absolute error = 3.267250e-25 relative error = 2.9522415752276914582824188086255e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1066 y[1] (analytic) = 1.1068020073246316967277049704342 y[1] (numeric) = 1.1068020073246316967277053023471 absolute error = 3.319129e-25 relative error = 2.9988462055856025097136509752619e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1067 y[1] (analytic) = 1.106902576575056925565468273728 y[1] (numeric) = 1.1069025765750569255654686108336 absolute error = 3.371056e-25 relative error = 3.0454857286813942151409064751039e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1068 y[1] (analytic) = 1.1070031468945079210446556377655 y[1] (numeric) = 1.1070031468945079210446559800687 absolute error = 3.423032e-25 relative error = 3.0921610382072369089527054715195e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1069 y[1] (analytic) = 1.1071037182839903863606151033344 y[1] (numeric) = 1.1071037182839903863606154508401 absolute error = 3.475057e-25 relative error = 3.1388721242724527573949503047488e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.107 y[1] (analytic) = 1.1072042907445100354090094185068 y[1] (numeric) = 1.1072042907445100354090097712199 absolute error = 3.527131e-25 relative error = 3.1856189769895803986108788807458e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1071 y[1] (analytic) = 1.1073048642770725927958731776047 y[1] (numeric) = 1.1073048642770725927958735355301 absolute error = 3.579254e-25 relative error = 3.2324015864743732503626494862256e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1072 y[1] (analytic) = 1.1074054388826837938476700672684 y[1] (numeric) = 1.1074054388826837938476704304109 absolute error = 3.631425e-25 relative error = 3.2792190398341591826837953974169e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1073 y[1] (analytic) = 1.1075060145623493846213502197295 y[1] (numeric) = 1.107506014562349384621350588094 absolute error = 3.683645e-25 relative error = 3.3260722303667646973581924650326e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1074 y[1] (analytic) = 1.1076065913170751219144076733889 y[1] (numeric) = 1.1076065913170751219144080469804 absolute error = 3.735915e-25 relative error = 3.3729620510451780495518734340454e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1075 y[1] (analytic) = 1.1077071691478667732749379408003 y[1] (numeric) = 1.1077071691478667732749383196236 absolute error = 3.788233e-25 relative error = 3.4198866862206905070076569357449e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1076 y[1] (analytic) = 1.1078077480557301170116956841592 y[1] (numeric) = 1.1078077480557301170116960682192 absolute error = 3.840600e-25 relative error = 3.4668470289546956746999618154599e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1077 y[1] (analytic) = 1.1079083280416709422041524983988 y[1] (numeric) = 1.1079083280416709422041528877005 absolute error = 3.893017e-25 relative error = 3.5138439719839120217616495354514e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1078 y[1] (analytic) = 1.1080089091066950487125548019937 y[1] (numeric) = 1.1080089091066950487125551965419 absolute error = 3.945482e-25 relative error = 3.5608757001610644934913267350664e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1079 y[1] (analytic) = 1.10810949125180824718798183557 y[1] (numeric) = 1.1081094912518082471879822353695 absolute error = 3.997995e-25 relative error = 3.6079422038733268079978148732465e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.108 y[1] (analytic) = 1.1082100744780163590824037684248 y[1] (numeric) = 1.1082100744780163590824041734806 absolute error = 4.050558e-25 relative error = 3.6550452782229703533831296112383e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1081 y[1] (analytic) = 1.1083106587863252166587399130543 y[1] (numeric) = 1.1083106587863252166587403233713 absolute error = 4.103170e-25 relative error = 3.7021840108379426552147548031901e-23 % h = 0.0001 TOP MAIN SOLVE Loop memory used=15.2MB, alloc=4.1MB, time=0.93 NO POLE x[1] = 0.1082 y[1] (analytic) = 1.1084112441777406630009170477914 y[1] (numeric) = 1.1084112441777406630009174633745 absolute error = 4.155831e-25 relative error = 3.7493583918692064022413644009816e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1083 y[1] (analytic) = 1.1085118306532685520239278476534 y[1] (numeric) = 1.1085118306532685520239282685074 absolute error = 4.208540e-25 relative error = 3.7965675093605648218467219100045e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1084 y[1] (analytic) = 1.1086124182139147484838894235 y[1] (numeric) = 1.1086124182139147484838898496298 absolute error = 4.261298e-25 relative error = 3.8438122557434241802741143093940e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1085 y[1] (analytic) = 1.1087130068606851279881019696032 y[1] (numeric) = 1.1087130068606851279881024010137 absolute error = 4.314105e-25 relative error = 3.8910926211782839402603792620614e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1086 y[1] (analytic) = 1.1088135965945855770051075197284 y[1] (numeric) = 1.1088135965945855770051079564245 absolute error = 4.366961e-25 relative error = 3.9384085958288331202670768535089e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1087 y[1] (analytic) = 1.1089141874166219928747488118284 y[1] (numeric) = 1.1089141874166219928747492538151 absolute error = 4.419867e-25 relative error = 3.9857610716449822814005291497500e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1088 y[1] (analytic) = 1.1090147793278002838182282614504 y[1] (numeric) = 1.1090147793278002838182287087324 absolute error = 4.472820e-25 relative error = 4.0331473334476935400832161146910e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1089 y[1] (analytic) = 1.1091153723291263689481670439558 y[1] (numeric) = 1.1091153723291263689481674965381 absolute error = 4.525823e-25 relative error = 4.0805700767593155199706881399266e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.109 y[1] (analytic) = 1.1092159664216061782786642856553 y[1] (numeric) = 1.1092159664216061782786647435428 absolute error = 4.578875e-25 relative error = 4.1280283899732450539551218000480e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1091 y[1] (analytic) = 1.1093165616062456527353563639582 y[1] (numeric) = 1.1093165616062456527353568271558 absolute error = 4.631976e-25 relative error = 4.1755222632690938254129388168571e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1092 y[1] (analytic) = 1.1094171578840507441654763166371 y[1] (numeric) = 1.1094171578840507441654767851496 absolute error = 4.685125e-25 relative error = 4.2230507854554558781440451106337e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1093 y[1] (analytic) = 1.1095177552560274153479133603084 y[1] (numeric) = 1.1095177552560274153479138341408 absolute error = 4.738324e-25 relative error = 4.2706157495484200590363930849754e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1094 y[1] (analytic) = 1.10961835372318164000327251823 y[1] (numeric) = 1.1096183537231816400032729973871 absolute error = 4.791571e-25 relative error = 4.3182153430704349086329764490028e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1095 y[1] (analytic) = 1.1097189532865194028039343575153 y[1] (numeric) = 1.109718953286519402803934842002 absolute error = 4.844867e-25 relative error = 4.3658504575879755512841184213122e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1096 y[1] (analytic) = 1.1098195539470466993841148358658 y[1] (numeric) = 1.1098195539470466993841153256869 absolute error = 4.898211e-25 relative error = 4.4135201822491140401955051625976e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1097 y[1] (analytic) = 1.1099201557057695363499252579211 y[1] (numeric) = 1.1099201557057695363499257530817 absolute error = 4.951606e-25 relative error = 4.4612272103946087366691043940702e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1098 y[1] (analytic) = 1.1100207585636939312894323413291 y[1] (numeric) = 1.110020758563693931289432841834 absolute error = 5.005049e-25 relative error = 4.5089688290841148708248451995413e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.1099 y[1] (analytic) = 1.1101213625218259127827183926345 y[1] (numeric) = 1.1101213625218259127827188984886 absolute error = 5.058541e-25 relative error = 4.5567459295699706533376424174892e-23 % h = 0.0001 TOP MAIN SOLVE Loop NO POLE x[1] = 0.11 y[1] (analytic) = 1.1102219675811715204119415930882 y[1] (numeric) = 1.1102219675811715204119421042964 absolute error = 5.112082e-25 relative error = 4.6045585020603017257105687853892e-23 % h = 0.0001 Finished! Maximum Iterations Reached before Solution Completed! diff ( y , x , 1 ) = cosh ( x ) ; Iterations = 100 Total Elapsed Time = 1 Seconds Elapsed Time(since restart) = 1 Seconds Expected Time Remaining = 3 Minutes 22 Seconds Optimized Time Remaining = 3 Minutes 21 Seconds Time to Timeout = 14 Minutes 58 Seconds Percent Done = 0.5316 % > quit memory used=18.4MB, alloc=4.1MB, time=1.12