#BEGIN OUTFILE1 # Begin Function number 3 display_poles := proc() global ALWAYS,glob_display_flag, glob_large_float, array_pole, glob_type_given_pole,array_given_rad_poles,array_given_ord_poles, array_complex_poles,array_poles,array_real_poles,array_x ; local rad_given; if (glob_type_given_pole = 4) then # if number 1 rad_given := sqrt(expt(array_x[1] - array_given_rad_poles[1,1],2.0) + expt(array_given_rad_poles[1,2],2.0)) ; omniout_float(ALWAYS,"Radius of convergence (given) for eq 1 ",4, rad_given,4," "); omniout_float(ALWAYS,"Order of pole (given) ",4, array_given_ord_poles[1,1],4," "); elif (glob_type_given_pole = 3) then # if number 2 omniout_str(ALWAYS,"NO POLE (given) for Equation 1"); else omniout_str(ALWAYS,"NO INFO (given) for Equation 1"); fi;# end if 2; if (array_poles[1,1] <> glob_large_float) then # if number 2 omniout_float(ALWAYS,"Radius of convergence (ratio test) for eq 1 ",4, array_poles[1,1],4," "); omniout_str(ALWAYS,"Order of pole (ratio test) Not computed"); else omniout_str(ALWAYS,"NO POLE (ratio test) for Equation 1"); fi;# end if 2; if ((array_real_poles[1,1] > 0.0) and (array_real_poles[1,1] <> glob_large_float)) then # if number 2 omniout_float(ALWAYS,"Radius of convergence (three term test) for eq 1 ",4, array_real_poles[1,1],4," "); omniout_float(ALWAYS,"Order of pole (three term test) ",4, array_real_poles[1,2],4," "); else omniout_str(ALWAYS,"NO REAL POLE (three term test) for Equation 1"); fi;# end if 2; if ((array_complex_poles[1,1] > 0.0) and (array_complex_poles[1,1] <> glob_large_float)) then # if number 2 omniout_float(ALWAYS,"Radius of convergence (six term test) for eq 1 ",4, array_complex_poles[1,1],4," "); omniout_float(ALWAYS,"Order of pole (six term test) ",4, array_complex_poles[1,2],4," "); else omniout_str(ALWAYS,"NO COMPLEX POLE (six term test) for Equation 1"); fi;# end if 2 ; end; # End Function number 3 # Begin Function number 4 check_sign := proc( x0 ,xf) local ret; if (xf > x0) then # if number 2 ret := 1.0; else ret := -1.0; fi;# end if 2; ret;; end; # End Function number 4 # Begin Function number 5 est_size_answer := proc() global glob_max_terms, glob_iolevel, glob_yes_pole, glob_no_pole, glob_not_given, ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, #Top Generate Globals Decl MAX_UNCHANGED, glob_check_sign, glob_desired_digits_correct, glob_max_estimated_step_error, glob_ratio_of_radius, glob_percent_done, glob_subiter_method, glob_total_exp_sec, glob_optimal_expect_sec, glob_html_log, glob_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug, glob_display_flag, glob_djd_debug2, glob_sec_in_minute, glob_min_in_hour, glob_hours_in_day, glob_days_in_year, glob_sec_in_hour, glob_sec_in_day, glob_sec_in_year, glob_almost_1, glob_clock_sec, glob_clock_start_sec, glob_not_yet_finished, glob_initial_pass, glob_not_yet_start_msg, glob_reached_optimal_h, glob_optimal_done, glob_disp_incr, glob_h, glob_max_h, glob_min_h, glob_type_given_pole, glob_large_float, glob_last_good_h, glob_look_poles, glob_neg_h, glob_display_interval, glob_next_display, glob_dump_analytic, glob_abserr, glob_relerr, glob_max_hours, glob_max_iter, glob_max_rel_trunc_err, glob_max_trunc_err, glob_no_eqs, glob_optimal_clock_start_sec, glob_optimal_start, glob_small_float, glob_smallish_float, glob_unchanged_h_cnt, glob_warned, glob_warned2, glob_max_sec, glob_orig_start_sec, glob_start, glob_curr_iter_when_opt, glob_current_iter, glob_iter, glob_normmax, glob_max_minutes, #Bottom Generate Globals Decl #BEGIN CONST array_const_1, array_const_0D0, array_const_2D0, array_const_1D0, #END CONST array_y_init, array_norms, array_fact_1, array_pole, array_real_pole, array_complex_pole, array_1st_rel_error, array_last_rel_error, array_type_pole, array_type_real_pole, array_type_complex_pole, array_y, array_x, array_tmp0, array_tmp1_g, array_tmp1, array_tmp2, array_tmp3, array_tmp4_c1, array_tmp4_a1, array_tmp4_a2, array_tmp4, array_tmp5_g, array_tmp5, array_tmp6, array_tmp7, array_tmp8, array_tmp9, array_tmp10_g, array_tmp10, array_tmp11, array_tmp12_g, array_tmp12, array_tmp13, array_tmp14, array_tmp15, array_tmp16, array_m1, array_y_higher, array_y_higher_work, array_y_higher_work2, array_y_set_initial, array_poles, array_given_rad_poles, array_given_ord_poles, array_real_poles, array_complex_poles, array_fact_2, glob_last; local min_size; min_size := glob_large_float; if (omniabs(array_y[1]) < min_size) then # if number 2 min_size := omniabs(array_y[1]); omniout_float(ALWAYS,"min_size",32,min_size,32,""); fi;# end if 2; if (min_size < 1.0) then # if number 2 min_size := 1.0; omniout_float(ALWAYS,"min_size",32,min_size,32,""); fi;# end if 2; min_size; end; # End Function number 5 # Begin Function number 6 test_suggested_h := proc() global glob_max_terms, glob_iolevel, glob_yes_pole, glob_no_pole, glob_not_given, ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, #Top Generate Globals Decl MAX_UNCHANGED, glob_check_sign, glob_desired_digits_correct, glob_max_estimated_step_error, glob_ratio_of_radius, glob_percent_done, glob_subiter_method, glob_total_exp_sec, glob_optimal_expect_sec, glob_html_log, glob_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug, glob_display_flag, glob_djd_debug2, glob_sec_in_minute, glob_min_in_hour, glob_hours_in_day, glob_days_in_year, glob_sec_in_hour, glob_sec_in_day, glob_sec_in_year, glob_almost_1, glob_clock_sec, glob_clock_start_sec, glob_not_yet_finished, glob_initial_pass, glob_not_yet_start_msg, glob_reached_optimal_h, glob_optimal_done, glob_disp_incr, glob_h, glob_max_h, glob_min_h, glob_type_given_pole, glob_large_float, glob_last_good_h, glob_look_poles, glob_neg_h, glob_display_interval, glob_next_display, glob_dump_analytic, glob_abserr, glob_relerr, glob_max_hours, glob_max_iter, glob_max_rel_trunc_err, glob_max_trunc_err, glob_no_eqs, glob_optimal_clock_start_sec, glob_optimal_start, glob_small_float, glob_smallish_float, glob_unchanged_h_cnt, glob_warned, glob_warned2, glob_max_sec, glob_orig_start_sec, glob_start, glob_curr_iter_when_opt, glob_current_iter, glob_iter, glob_normmax, glob_max_minutes, #Bottom Generate Globals Decl #BEGIN CONST array_const_1, array_const_0D0, array_const_2D0, array_const_1D0, #END CONST array_y_init, array_norms, array_fact_1, array_pole, array_real_pole, array_complex_pole, array_1st_rel_error, array_last_rel_error, array_type_pole, array_type_real_pole, array_type_complex_pole, array_y, array_x, array_tmp0, array_tmp1_g, array_tmp1, array_tmp2, array_tmp3, array_tmp4_c1, array_tmp4_a1, array_tmp4_a2, array_tmp4, array_tmp5_g, array_tmp5, array_tmp6, array_tmp7, array_tmp8, array_tmp9, array_tmp10_g, array_tmp10, array_tmp11, array_tmp12_g, array_tmp12, array_tmp13, array_tmp14, array_tmp15, array_tmp16, array_m1, array_y_higher, array_y_higher_work, array_y_higher_work2, array_y_set_initial, array_poles, array_given_rad_poles, array_given_ord_poles, array_real_poles, array_complex_poles, array_fact_2, glob_last; local max_estimated_step_error,hn_div_ho,hn_div_ho_2,hn_div_ho_3,no_terms,est_tmp; max_estimated_step_error := 0.0; no_terms := glob_max_terms; hn_div_ho := 0.5; hn_div_ho_2 := 0.25; hn_div_ho_3 := 0.125; omniout_float(ALWAYS,"hn_div_ho",32,hn_div_ho,32,""); omniout_float(ALWAYS,"hn_div_ho_2",32,hn_div_ho_2,32,""); omniout_float(ALWAYS,"hn_div_ho_3",32,hn_div_ho_3,32,""); est_tmp := omniabs(array_y[no_terms-3] + array_y[no_terms - 2] * hn_div_ho + array_y[no_terms - 1] * hn_div_ho_2 + array_y[no_terms] * hn_div_ho_3); if (est_tmp >= max_estimated_step_error) then # if number 2 max_estimated_step_error := est_tmp; fi;# end if 2; omniout_float(ALWAYS,"max_estimated_step_error",32,max_estimated_step_error,32,""); max_estimated_step_error; end; # End Function number 6 # Begin Function number 7 reached_interval := proc() global glob_max_terms, glob_iolevel, glob_yes_pole, glob_no_pole, glob_not_given, ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, #Top Generate Globals Decl MAX_UNCHANGED, glob_check_sign, glob_desired_digits_correct, glob_max_estimated_step_error, glob_ratio_of_radius, glob_percent_done, glob_subiter_method, glob_total_exp_sec, glob_optimal_expect_sec, glob_html_log, glob_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug, glob_display_flag, glob_djd_debug2, glob_sec_in_minute, glob_min_in_hour, glob_hours_in_day, glob_days_in_year, glob_sec_in_hour, glob_sec_in_day, glob_sec_in_year, glob_almost_1, glob_clock_sec, glob_clock_start_sec, glob_not_yet_finished, glob_initial_pass, glob_not_yet_start_msg, glob_reached_optimal_h, glob_optimal_done, glob_disp_incr, glob_h, glob_max_h, glob_min_h, glob_type_given_pole, glob_large_float, glob_last_good_h, glob_look_poles, glob_neg_h, glob_display_interval, glob_next_display, glob_dump_analytic, glob_abserr, glob_relerr, glob_max_hours, glob_max_iter, glob_max_rel_trunc_err, glob_max_trunc_err, glob_no_eqs, glob_optimal_clock_start_sec, glob_optimal_start, glob_small_float, glob_smallish_float, glob_unchanged_h_cnt, glob_warned, glob_warned2, glob_max_sec, glob_orig_start_sec, glob_start, glob_curr_iter_when_opt, glob_current_iter, glob_iter, glob_normmax, glob_max_minutes, #Bottom Generate Globals Decl #BEGIN CONST array_const_1, array_const_0D0, array_const_2D0, array_const_1D0, #END CONST array_y_init, array_norms, array_fact_1, array_pole, array_real_pole, array_complex_pole, array_1st_rel_error, array_last_rel_error, array_type_pole, array_type_real_pole, array_type_complex_pole, array_y, array_x, array_tmp0, array_tmp1_g, array_tmp1, array_tmp2, array_tmp3, array_tmp4_c1, array_tmp4_a1, array_tmp4_a2, array_tmp4, array_tmp5_g, array_tmp5, array_tmp6, array_tmp7, array_tmp8, array_tmp9, array_tmp10_g, array_tmp10, array_tmp11, array_tmp12_g, array_tmp12, array_tmp13, array_tmp14, array_tmp15, array_tmp16, array_m1, array_y_higher, array_y_higher_work, array_y_higher_work2, array_y_set_initial, array_poles, array_given_rad_poles, array_given_ord_poles, array_real_poles, array_complex_poles, array_fact_2, glob_last; local ret; if (glob_check_sign * (array_x[1]) >= glob_check_sign * glob_next_display) then # if number 2 ret := true; else ret := false; fi;# end if 2; return(ret); end; # End Function number 7 # Begin Function number 8 display_alot := proc(iter) global glob_max_terms, glob_iolevel, glob_yes_pole, glob_no_pole, glob_not_given, ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, #Top Generate Globals Decl MAX_UNCHANGED, glob_check_sign, glob_desired_digits_correct, glob_max_estimated_step_error, glob_ratio_of_radius, glob_percent_done, glob_subiter_method, glob_total_exp_sec, glob_optimal_expect_sec, glob_html_log, glob_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug, glob_display_flag, glob_djd_debug2, glob_sec_in_minute, glob_min_in_hour, glob_hours_in_day, glob_days_in_year, glob_sec_in_hour, glob_sec_in_day, glob_sec_in_year, glob_almost_1, glob_clock_sec, glob_clock_start_sec, glob_not_yet_finished, glob_initial_pass, glob_not_yet_start_msg, glob_reached_optimal_h, glob_optimal_done, glob_disp_incr, glob_h, glob_max_h, glob_min_h, glob_type_given_pole, glob_large_float, glob_last_good_h, glob_look_poles, glob_neg_h, glob_display_interval, glob_next_display, glob_dump_analytic, glob_abserr, glob_relerr, glob_max_hours, glob_max_iter, glob_max_rel_trunc_err, glob_max_trunc_err, glob_no_eqs, glob_optimal_clock_start_sec, glob_optimal_start, glob_small_float, glob_smallish_float, glob_unchanged_h_cnt, glob_warned, glob_warned2, glob_max_sec, glob_orig_start_sec, glob_start, glob_curr_iter_when_opt, glob_current_iter, glob_iter, glob_normmax, glob_max_minutes, #Bottom Generate Globals Decl #BEGIN CONST array_const_1, array_const_0D0, array_const_2D0, array_const_1D0, #END CONST array_y_init, array_norms, array_fact_1, array_pole, array_real_pole, array_complex_pole, array_1st_rel_error, array_last_rel_error, array_type_pole, array_type_real_pole, array_type_complex_pole, array_y, array_x, array_tmp0, array_tmp1_g, array_tmp1, array_tmp2, array_tmp3, array_tmp4_c1, array_tmp4_a1, array_tmp4_a2, array_tmp4, array_tmp5_g, array_tmp5, array_tmp6, array_tmp7, array_tmp8, array_tmp9, array_tmp10_g, array_tmp10, array_tmp11, array_tmp12_g, array_tmp12, array_tmp13, array_tmp14, array_tmp15, array_tmp16, array_m1, array_y_higher, array_y_higher_work, array_y_higher_work2, array_y_set_initial, array_poles, array_given_rad_poles, array_given_ord_poles, array_real_poles, array_complex_poles, array_fact_2, glob_last; local abserr, analytic_val_y, ind_var, numeric_val, relerr, term_no; #TOP DISPLAY ALOT if (reached_interval()) then # if number 2 if (iter >= 0) then # if number 3 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 := omniabs(numeric_val - analytic_val_y); omniout_float(ALWAYS,"y[1] (numeric) ",33,numeric_val,20," "); if (omniabs(analytic_val_y) <> 0.0) then # if number 4 relerr := abserr*100.0/omniabs(analytic_val_y); if (relerr > 0.0000000000000000000000000000000001) then # if number 5 glob_good_digits := -trunc(log10(relerr)) + 3; else glob_good_digits := Digits; fi;# end if 5; else relerr := -1.0 ; glob_good_digits := -1; fi;# end if 4; if (glob_iter = 1) then # if number 4 array_1st_rel_error[1] := relerr; else array_last_rel_error[1] := relerr; fi;# end if 4; omniout_float(ALWAYS,"absolute error ",4,abserr,20," "); omniout_float(ALWAYS,"relative error ",4,relerr,20,"%"); omniout_int(INFO,"Correct digits ",32,glob_good_digits,4," ") ; omniout_float(ALWAYS,"h ",4,glob_h,20," "); fi;# end if 3; #BOTTOM DISPLAY ALOT fi;# end if 2; end; # End Function number 8 # Begin Function number 9 adjust_for_pole := proc(h_param) global glob_max_terms, glob_iolevel, glob_yes_pole, glob_no_pole, glob_not_given, ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, #Top Generate Globals Decl MAX_UNCHANGED, glob_check_sign, glob_desired_digits_correct, glob_max_estimated_step_error, glob_ratio_of_radius, glob_percent_done, glob_subiter_method, glob_total_exp_sec, glob_optimal_expect_sec, glob_html_log, glob_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug, glob_display_flag, glob_djd_debug2, glob_sec_in_minute, glob_min_in_hour, glob_hours_in_day, glob_days_in_year, glob_sec_in_hour, glob_sec_in_day, glob_sec_in_year, glob_almost_1, glob_clock_sec, glob_clock_start_sec, glob_not_yet_finished, glob_initial_pass, glob_not_yet_start_msg, glob_reached_optimal_h, glob_optimal_done, glob_disp_incr, glob_h, glob_max_h, glob_min_h, glob_type_given_pole, glob_large_float, glob_last_good_h, glob_look_poles, glob_neg_h, glob_display_interval, glob_next_display, glob_dump_analytic, glob_abserr, glob_relerr, glob_max_hours, glob_max_iter, glob_max_rel_trunc_err, glob_max_trunc_err, glob_no_eqs, glob_optimal_clock_start_sec, glob_optimal_start, glob_small_float, glob_smallish_float, glob_unchanged_h_cnt, glob_warned, glob_warned2, glob_max_sec, glob_orig_start_sec, glob_start, glob_curr_iter_when_opt, glob_current_iter, glob_iter, glob_normmax, glob_max_minutes, #Bottom Generate Globals Decl #BEGIN CONST array_const_1, array_const_0D0, array_const_2D0, array_const_1D0, #END CONST array_y_init, array_norms, array_fact_1, array_pole, array_real_pole, array_complex_pole, array_1st_rel_error, array_last_rel_error, array_type_pole, array_type_real_pole, array_type_complex_pole, array_y, array_x, array_tmp0, array_tmp1_g, array_tmp1, array_tmp2, array_tmp3, array_tmp4_c1, array_tmp4_a1, array_tmp4_a2, array_tmp4, array_tmp5_g, array_tmp5, array_tmp6, array_tmp7, array_tmp8, array_tmp9, array_tmp10_g, array_tmp10, array_tmp11, array_tmp12_g, array_tmp12, array_tmp13, array_tmp14, array_tmp15, array_tmp16, array_m1, array_y_higher, array_y_higher_work, array_y_higher_work2, array_y_set_initial, array_poles, array_given_rad_poles, array_given_ord_poles, array_real_poles, array_complex_poles, array_fact_2, glob_last; local hnew, sz2, tmp; #TOP ADJUST FOR POLE hnew := h_param; glob_normmax := glob_small_float; if (omniabs(array_y_higher[1,1]) > glob_small_float) then # if number 2 tmp := omniabs(array_y_higher[1,1]); if (tmp < glob_normmax) then # if number 3 glob_normmax := tmp; fi;# end if 3 fi;# end if 2; if (glob_look_poles and (omniabs(array_pole[1]) > glob_small_float) and (array_pole[1] <> glob_large_float)) then # if number 2 sz2 := array_pole[1]/10.0; if (sz2 < hnew) then # if number 3 omniout_float(INFO,"glob_h adjusted to ",20,h_param,12,"due to singularity."); omniout_str(INFO,"Reached Optimal"); return(hnew); fi;# end if 3 fi;# end if 2; if ( not glob_reached_optimal_h) then # if number 2 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 2; hnew := sz2; ;#END block return(hnew); #BOTTOM ADJUST FOR POLE end; # End Function number 9 # Begin Function number 10 prog_report := proc(x_start,x_end) global glob_max_terms, glob_iolevel, glob_yes_pole, glob_no_pole, glob_not_given, ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, #Top Generate Globals Decl MAX_UNCHANGED, glob_check_sign, glob_desired_digits_correct, glob_max_estimated_step_error, glob_ratio_of_radius, glob_percent_done, glob_subiter_method, glob_total_exp_sec, glob_optimal_expect_sec, glob_html_log, glob_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug, glob_display_flag, glob_djd_debug2, glob_sec_in_minute, glob_min_in_hour, glob_hours_in_day, glob_days_in_year, glob_sec_in_hour, glob_sec_in_day, glob_sec_in_year, glob_almost_1, glob_clock_sec, glob_clock_start_sec, glob_not_yet_finished, glob_initial_pass, glob_not_yet_start_msg, glob_reached_optimal_h, glob_optimal_done, glob_disp_incr, glob_h, glob_max_h, glob_min_h, glob_type_given_pole, glob_large_float, glob_last_good_h, glob_look_poles, glob_neg_h, glob_display_interval, glob_next_display, glob_dump_analytic, glob_abserr, glob_relerr, glob_max_hours, glob_max_iter, glob_max_rel_trunc_err, glob_max_trunc_err, glob_no_eqs, glob_optimal_clock_start_sec, glob_optimal_start, glob_small_float, glob_smallish_float, glob_unchanged_h_cnt, glob_warned, glob_warned2, glob_max_sec, glob_orig_start_sec, glob_start, glob_curr_iter_when_opt, glob_current_iter, glob_iter, glob_normmax, glob_max_minutes, #Bottom Generate Globals Decl #BEGIN CONST array_const_1, array_const_0D0, array_const_2D0, array_const_1D0, #END CONST array_y_init, array_norms, array_fact_1, array_pole, array_real_pole, array_complex_pole, array_1st_rel_error, array_last_rel_error, array_type_pole, array_type_real_pole, array_type_complex_pole, array_y, array_x, array_tmp0, array_tmp1_g, array_tmp1, array_tmp2, array_tmp3, array_tmp4_c1, array_tmp4_a1, array_tmp4_a2, array_tmp4, array_tmp5_g, array_tmp5, array_tmp6, array_tmp7, array_tmp8, array_tmp9, array_tmp10_g, array_tmp10, array_tmp11, array_tmp12_g, array_tmp12, array_tmp13, array_tmp14, array_tmp15, array_tmp16, array_m1, array_y_higher, array_y_higher_work, array_y_higher_work2, array_y_set_initial, array_poles, array_given_rad_poles, array_given_ord_poles, array_real_poles, array_complex_poles, array_fact_2, 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)); glob_total_exp_sec := glob_optimal_expect_sec + total_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 2 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)); omniout_str_noeol(INFO,"Expected Total Time "); omniout_timestr(convfloat(glob_total_exp_sec)); fi;# end if 2; 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; # End Function number 10 # Begin Function number 11 check_for_pole := proc() global glob_max_terms, glob_iolevel, glob_yes_pole, glob_no_pole, glob_not_given, ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, #Top Generate Globals Decl MAX_UNCHANGED, glob_check_sign, glob_desired_digits_correct, glob_max_estimated_step_error, glob_ratio_of_radius, glob_percent_done, glob_subiter_method, glob_total_exp_sec, glob_optimal_expect_sec, glob_html_log, glob_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug, glob_display_flag, glob_djd_debug2, glob_sec_in_minute, glob_min_in_hour, glob_hours_in_day, glob_days_in_year, glob_sec_in_hour, glob_sec_in_day, glob_sec_in_year, glob_almost_1, glob_clock_sec, glob_clock_start_sec, glob_not_yet_finished, glob_initial_pass, glob_not_yet_start_msg, glob_reached_optimal_h, glob_optimal_done, glob_disp_incr, glob_h, glob_max_h, glob_min_h, glob_type_given_pole, glob_large_float, glob_last_good_h, glob_look_poles, glob_neg_h, glob_display_interval, glob_next_display, glob_dump_analytic, glob_abserr, glob_relerr, glob_max_hours, glob_max_iter, glob_max_rel_trunc_err, glob_max_trunc_err, glob_no_eqs, glob_optimal_clock_start_sec, glob_optimal_start, glob_small_float, glob_smallish_float, glob_unchanged_h_cnt, glob_warned, glob_warned2, glob_max_sec, glob_orig_start_sec, glob_start, glob_curr_iter_when_opt, glob_current_iter, glob_iter, glob_normmax, glob_max_minutes, #Bottom Generate Globals Decl #BEGIN CONST array_const_1, array_const_0D0, array_const_2D0, array_const_1D0, #END CONST array_y_init, array_norms, array_fact_1, array_pole, array_real_pole, array_complex_pole, array_1st_rel_error, array_last_rel_error, array_type_pole, array_type_real_pole, array_type_complex_pole, array_y, array_x, array_tmp0, array_tmp1_g, array_tmp1, array_tmp2, array_tmp3, array_tmp4_c1, array_tmp4_a1, array_tmp4_a2, array_tmp4, array_tmp5_g, array_tmp5, array_tmp6, array_tmp7, array_tmp8, array_tmp9, array_tmp10_g, array_tmp10, array_tmp11, array_tmp12_g, array_tmp12, array_tmp13, array_tmp14, array_tmp15, array_tmp16, array_m1, array_y_higher, array_y_higher_work, array_y_higher_work2, array_y_set_initial, array_poles, array_given_rad_poles, array_given_ord_poles, array_real_poles, array_complex_poles, array_fact_2, glob_last; local cnt, dr1, dr2, ds1, ds2, hdrc, m, n, nr1, nr2, ord_no, rad_c, rcs, rm0, rm1, rm2, rm3, rm4, found_sing, h_new, ratio, term, local_test, tmp_rad, tmp_ratio, prev_tmp_rad; #TOP CHECK FOR POLE array_pole[1] := glob_large_float; array_pole[2] := glob_large_float; tmp_rad := glob_large_float; prev_tmp_rad := glob_large_float; tmp_ratio := glob_large_float; rad_c := glob_large_float; array_poles[1,1] := glob_large_float; array_poles[1,2] := glob_large_float; #TOP radius ratio test in Henrici1 found_sing := 1; n := glob_max_terms - 1 - 10; cnt := 0; while ((cnt < 5) and (found_sing = 1)) do # do number 1 if ((omniabs(array_y_higher[1,n]) = 0.0) or (omniabs(array_y_higher[1,n+1]) = 0.0)) then # if number 2 found_sing := 0; else tmp_rad := omniabs(array_y_higher[1,n] * glob_h / array_y_higher[1,n + 1]); tmp_ratio := tmp_rad / prev_tmp_rad; if ((cnt > 0 ) and (tmp_ratio < 2.0) and (tmp_ratio > 0.5)) then # if number 3 if (tmp_rad < rad_c) then # if number 4 rad_c := tmp_rad; fi;# end if 4; elif (cnt = 0) then # if number 4 if (tmp_rad < rad_c) then # if number 5 rad_c := tmp_rad; fi;# end if 5; elif (cnt > 0) then # if number 5 found_sing := 0; fi;# end if 5 fi;# end if 4; prev_tmp_rad := tmp_rad;; cnt := cnt + 1; n := n + 1; od;# end do number 1; if (found_sing = 1) then # if number 4 if (rad_c < array_pole[1]) then # if number 5 array_pole[1] := rad_c; array_poles[1,1] := rad_c; fi;# end if 5; fi;# end if 4; #BOTTOM radius ratio test in Henrici1 #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 ((omniabs(array_y_higher[1,m]) = 0.0) or (omniabs(array_y_higher[1,m-1]) = 0.0) or (omniabs(array_y_higher[1,m-2]) = 0.0))) do # do number 1 m := m - 1; od;# end do number 1; if (m > 10) then # if number 4 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)*rm0-convfloat(m-1)*rm1; if (omniabs(hdrc) > 0.0) then # if number 5 rcs := glob_h/hdrc; ord_no := (rm1*convfloat((m-2)*(m-2))-rm0*convfloat(m-3))/hdrc; array_real_poles[1,1] := rcs; array_real_poles[1,2] := ord_no; else array_real_poles[1,1] := glob_large_float; array_real_poles[1,2] := glob_large_float; fi;# end if 5 else array_real_poles[1,1] := glob_large_float; array_real_poles[1,2] := glob_large_float; fi;# end if 4; #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 1 if (omniabs(array_y_higher[1,n]) <> 0.0) then # if number 4 cnt := cnt + 1; else cnt := 0; fi;# end if 4; n := n - 1; od;# end do number 1; m := n + cnt; if (m <= 10) then # if number 4 rad_c := glob_large_float; ord_no := 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 ((omniabs(nr1 * dr2 - nr2 * dr1) = 0.0) or (omniabs(dr1) = 0.0)) then # if number 5 rad_c := glob_large_float; ord_no := glob_large_float; else if (omniabs(nr1*dr2 - nr2 * dr1) <> 0.0) then # if number 6 rcs := ((ds1*dr2 - ds2*dr1 +dr1*dr2)/(nr1*dr2 - nr2 * dr1)); #(Manuels) rcs := (ds1*dr2 - ds2*dr1)/(nr1*dr2 - nr2 * dr1) ord_no := (rcs*nr1 - ds1)/(2.0*dr1) -convfloat(m)/2.0; if (omniabs(rcs) <> 0.0) then # if number 7 if (rcs > 0.0) then # if number 8 rad_c := sqrt(rcs) * omniabs(glob_h); else rad_c := glob_large_float; fi;# end if 8 else rad_c := glob_large_float; ord_no := glob_large_float; fi;# end if 7 else rad_c := glob_large_float; ord_no := glob_large_float; fi;# end if 6 fi;# end if 5; array_complex_poles[1,1] := rad_c; array_complex_poles[1,2] := ord_no; fi;# end if 4; #BOTTOM RADII COMPLEX EQ = 1 #START ADJUST ALL SERIES if (array_pole[1] * glob_ratio_of_radius < omniabs(glob_h)) then # if number 4 h_new := array_pole[1] * glob_ratio_of_radius; term := 1; ratio := 1.0; while (term <= glob_max_terms) do # do number 1 array_y[term] := array_y[term]* ratio; array_y_higher[1,term] := array_y_higher[1,term]* ratio; array_x[term] := array_x[term]* ratio; ratio := ratio * h_new / omniabs(glob_h); term := term + 1; od;# end do number 1; glob_h := h_new; fi;# end if 4; #BOTTOM ADJUST ALL SERIES ; if (reached_interval()) then # if number 4 display_poles(); fi;# end if 4 end; # End Function number 11 # Begin Function number 12 get_norms := proc() global glob_max_terms, glob_iolevel, glob_yes_pole, glob_no_pole, glob_not_given, ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, #Top Generate Globals Decl MAX_UNCHANGED, glob_check_sign, glob_desired_digits_correct, glob_max_estimated_step_error, glob_ratio_of_radius, glob_percent_done, glob_subiter_method, glob_total_exp_sec, glob_optimal_expect_sec, glob_html_log, glob_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug, glob_display_flag, glob_djd_debug2, glob_sec_in_minute, glob_min_in_hour, glob_hours_in_day, glob_days_in_year, glob_sec_in_hour, glob_sec_in_day, glob_sec_in_year, glob_almost_1, glob_clock_sec, glob_clock_start_sec, glob_not_yet_finished, glob_initial_pass, glob_not_yet_start_msg, glob_reached_optimal_h, glob_optimal_done, glob_disp_incr, glob_h, glob_max_h, glob_min_h, glob_type_given_pole, glob_large_float, glob_last_good_h, glob_look_poles, glob_neg_h, glob_display_interval, glob_next_display, glob_dump_analytic, glob_abserr, glob_relerr, glob_max_hours, glob_max_iter, glob_max_rel_trunc_err, glob_max_trunc_err, glob_no_eqs, glob_optimal_clock_start_sec, glob_optimal_start, glob_small_float, glob_smallish_float, glob_unchanged_h_cnt, glob_warned, glob_warned2, glob_max_sec, glob_orig_start_sec, glob_start, glob_curr_iter_when_opt, glob_current_iter, glob_iter, glob_normmax, glob_max_minutes, #Bottom Generate Globals Decl #BEGIN CONST array_const_1, array_const_0D0, array_const_2D0, array_const_1D0, #END CONST array_y_init, array_norms, array_fact_1, array_pole, array_real_pole, array_complex_pole, array_1st_rel_error, array_last_rel_error, array_type_pole, array_type_real_pole, array_type_complex_pole, array_y, array_x, array_tmp0, array_tmp1_g, array_tmp1, array_tmp2, array_tmp3, array_tmp4_c1, array_tmp4_a1, array_tmp4_a2, array_tmp4, array_tmp5_g, array_tmp5, array_tmp6, array_tmp7, array_tmp8, array_tmp9, array_tmp10_g, array_tmp10, array_tmp11, array_tmp12_g, array_tmp12, array_tmp13, array_tmp14, array_tmp15, array_tmp16, array_m1, array_y_higher, array_y_higher_work, array_y_higher_work2, array_y_set_initial, array_poles, array_given_rad_poles, array_given_ord_poles, array_real_poles, array_complex_poles, array_fact_2, glob_last; local iii; if ( not glob_initial_pass) then # if number 4 iii := 1; while (iii <= glob_max_terms) do # do number 1 array_norms[iii] := 0.0; iii := iii + 1; od;# end do number 1; #TOP GET NORMS iii := 1; while (iii <= glob_max_terms) do # do number 1 if (omniabs(array_y[iii]) > array_norms[iii]) then # if number 5 array_norms[iii] := omniabs(array_y[iii]); fi;# end if 5; iii := iii + 1; od;# end do number 1 #BOTTOM GET NORMS ; fi;# end if 4; end; # End Function number 12 # Begin Function number 13 atomall := proc() global glob_max_terms, glob_iolevel, glob_yes_pole, glob_no_pole, glob_not_given, ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, #Top Generate Globals Decl MAX_UNCHANGED, glob_check_sign, glob_desired_digits_correct, glob_max_estimated_step_error, glob_ratio_of_radius, glob_percent_done, glob_subiter_method, glob_total_exp_sec, glob_optimal_expect_sec, glob_html_log, glob_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug, glob_display_flag, glob_djd_debug2, glob_sec_in_minute, glob_min_in_hour, glob_hours_in_day, glob_days_in_year, glob_sec_in_hour, glob_sec_in_day, glob_sec_in_year, glob_almost_1, glob_clock_sec, glob_clock_start_sec, glob_not_yet_finished, glob_initial_pass, glob_not_yet_start_msg, glob_reached_optimal_h, glob_optimal_done, glob_disp_incr, glob_h, glob_max_h, glob_min_h, glob_type_given_pole, glob_large_float, glob_last_good_h, glob_look_poles, glob_neg_h, glob_display_interval, glob_next_display, glob_dump_analytic, glob_abserr, glob_relerr, glob_max_hours, glob_max_iter, glob_max_rel_trunc_err, glob_max_trunc_err, glob_no_eqs, glob_optimal_clock_start_sec, glob_optimal_start, glob_small_float, glob_smallish_float, glob_unchanged_h_cnt, glob_warned, glob_warned2, glob_max_sec, glob_orig_start_sec, glob_start, glob_curr_iter_when_opt, glob_current_iter, glob_iter, glob_normmax, glob_max_minutes, #Bottom Generate Globals Decl #BEGIN CONST array_const_1, array_const_0D0, array_const_2D0, array_const_1D0, #END CONST array_y_init, array_norms, array_fact_1, array_pole, array_real_pole, array_complex_pole, array_1st_rel_error, array_last_rel_error, array_type_pole, array_type_real_pole, array_type_complex_pole, array_y, array_x, array_tmp0, array_tmp1_g, array_tmp1, array_tmp2, array_tmp3, array_tmp4_c1, array_tmp4_a1, array_tmp4_a2, array_tmp4, array_tmp5_g, array_tmp5, array_tmp6, array_tmp7, array_tmp8, array_tmp9, array_tmp10_g, array_tmp10, array_tmp11, array_tmp12_g, array_tmp12, array_tmp13, array_tmp14, array_tmp15, array_tmp16, array_m1, array_y_higher, array_y_higher_work, array_y_higher_work2, array_y_set_initial, array_poles, array_given_rad_poles, array_given_ord_poles, array_real_poles, array_complex_poles, array_fact_2, glob_last; local kkk, order_d, adj2, adj3 , temporary, term; #TOP ATOMALL #END OUTFILE1 #BEGIN ATOMHDR1 #emit pre sin 1 $eq_no = 1 array_tmp1[1] := sin(array_x[1]); array_tmp1_g[1] := cos(array_x[1]); #emit pre mult CONST - LINEAR $eq_no = 1 i = 1 array_tmp2[1] := array_const_2D0[1] * array_x[1]; #emit pre add LINEAR - CONST $eq_no = 1 i = 1 array_tmp3[1] := array_tmp2[1] + array_const_1D0[1]; #emit pre expt FULL - LINEAR $eq_no = 1 i = 1 array_tmp4[1] := expt(array_tmp1[1] , array_tmp3[1] ) ; array_tmp4_a1[1] := ln(array_tmp1[1] ) ; array_tmp4_a1[2] := array_tmp1[2] / array_tmp1[1]; #emit pre sin 1 $eq_no = 1 array_tmp5[1] := sin(array_x[1]); array_tmp5_g[1] := cos(array_x[1]); #emit pre ln 1 FULL $eq_no = 1 array_tmp6[1] := ln(array_tmp5[1]); #emit pre mult CONST FULL $eq_no = 1 i = 1 array_tmp7[1] := array_const_2D0[1] * array_tmp6[1]; #emit pre mult CONST - LINEAR $eq_no = 1 i = 1 array_tmp8[1] := array_const_2D0[1] * array_x[1]; #emit pre add LINEAR - CONST $eq_no = 1 i = 1 array_tmp9[1] := array_tmp8[1] + array_const_1D0[1]; #emit pre cos 1 $eq_no = 1 array_tmp10[1] := cos(array_x[1]); array_tmp10_g[1] := sin(array_x[1]); #emit pre mult LINEAR - FULL $eq_no = 1 i = 1 array_tmp11[1] := array_tmp9[1] * array_tmp10[1]; #emit pre sin 1 $eq_no = 1 array_tmp12[1] := sin(array_x[1]); array_tmp12_g[1] := cos(array_x[1]); #emit pre div FULL - FULL $eq_no = 1 i = 1 array_tmp13[1] := (array_tmp11[1] / (array_tmp12[1])); #emit pre add FULL FULL $eq_no = 1 i = 1 array_tmp14[1] := array_tmp7[1] + array_tmp13[1]; # emit pre mult FULL FULL $eq_no = 1 i = 1 array_tmp15[1] := (array_tmp4[1] * (array_tmp14[1])); #emit pre add CONST FULL $eq_no = 1 i = 1 array_tmp16[1] := array_const_0D0[1] + array_tmp15[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_tmp16[1] * expt(glob_h , (1)) * factorial_3(0,1); array_y[2] := temporary; array_y_higher[1,2] := temporary; temporary := temporary / glob_h * (1.0); array_y_higher[2,1] := temporary; fi;# end if 2; fi;# end if 1; kkk := 2; #END ATOMHDR1 #BEGIN ATOMHDR2 #emit pre sin ID_LINEAR iii = 2 $eq_no = 1 array_tmp1[2] := array_tmp1_g[1] * array_x[2] / 1; array_tmp1_g[2] := -array_tmp1[1] * array_x[2] / 1; #emit pre mult CONST - LINEAR $eq_no = 1 i = 2 array_tmp2[2] := array_const_2D0[1] * array_x[2]; #emit pre add LINEAR - CONST $eq_no = 1 i = 2 array_tmp3[2] := array_tmp2[2]; #emit pre expt FULL - LINEAR $eq_no = 1 i = 2 array_tmp4_a2[1] := (array_tmp4_a1[1] * array_tmp3[2] + array_tmp4_a1[2] * array_tmp3[1]) / glob_h; array_tmp4[2] := array_tmp4[1] * array_tmp4_a2[1] * glob_h; #emit pre sin ID_LINEAR iii = 2 $eq_no = 1 array_tmp5[2] := array_tmp5_g[1] * array_x[2] / 1; array_tmp5_g[2] := -array_tmp5[1] * array_x[2] / 1; #emit pre ln 2 FULL $eq_no = 1 array_tmp6[2] := array_tmp5[2] / array_tmp5[1]; #emit pre mult CONST FULL $eq_no = 1 i = 2 array_tmp7[2] := array_const_2D0[1] * array_tmp6[2]; #emit pre mult CONST - LINEAR $eq_no = 1 i = 2 array_tmp8[2] := array_const_2D0[1] * array_x[2]; #emit pre add LINEAR - CONST $eq_no = 1 i = 2 array_tmp9[2] := array_tmp8[2]; #emit pre cos ID_LINEAR iii = 2 $eq_no = 1 array_tmp10[2] := -array_tmp10_g[1] * array_x[2] / 1; array_tmp10_g[2] := array_tmp10[1] * array_x[2] / 1; #emit pre mult LINEAR FULL $eq_no = 1 i = 2 array_tmp11[2] := array_tmp10[1] * array_tmp9[2] + array_tmp10[2] * array_tmp9[1]; #emit pre sin ID_LINEAR iii = 2 $eq_no = 1 array_tmp12[2] := array_tmp12_g[1] * array_x[2] / 1; array_tmp12_g[2] := -array_tmp12[1] * array_x[2] / 1; #emit pre div FULL - FULL $eq_no = 1 i = 2 array_tmp13[2] := ((array_tmp11[2] - ats(2,array_tmp12,array_tmp13,2))/array_tmp12[1]); #emit pre add FULL FULL $eq_no = 1 i = 2 array_tmp14[2] := array_tmp7[2] + array_tmp13[2]; # emit pre mult FULL FULL $eq_no = 1 i = 2 array_tmp15[2] := ats(2,array_tmp4,array_tmp14,1); #emit pre add CONST FULL $eq_no = 1 i = 2 array_tmp16[2] := array_tmp15[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_tmp16[2] * expt(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 sin ID_LINEAR iii = 3 $eq_no = 1 array_tmp1[3] := array_tmp1_g[2] * array_x[2] / 2; array_tmp1_g[3] := -array_tmp1[2] * array_x[2] / 2; #emit pre expt FULL - LINEAR $eq_no = 1 i = 3 array_tmp4_a1[3] := (array_tmp1[3] -att(2,array_tmp1,array_tmp4_a1,2))/ array_tmp1[1]; array_tmp4_a2[2] := (array_tmp4_a1[3] * array_tmp3[1] + array_tmp4_a1[2] * array_tmp3[2]) * 2 / glob_h; array_tmp4[3] := ats(2,array_tmp4,array_tmp4_a2,1)*glob_h/2; #emit pre sin ID_LINEAR iii = 3 $eq_no = 1 array_tmp5[3] := array_tmp5_g[2] * array_x[2] / 2; array_tmp5_g[3] := -array_tmp5[2] * array_x[2] / 2; #emit pre ln ID_FULL iii = 3 $eq_no = 1 #emit pre ln 3 $eq_no = 1 array_tmp6[3] := ( array_tmp5[3] - att(2,array_tmp5,array_tmp6,2) ) / array_tmp5[1]; #emit pre mult CONST FULL $eq_no = 1 i = 3 array_tmp7[3] := array_const_2D0[1] * array_tmp6[3]; #emit pre cos ID_LINEAR iii = 3 $eq_no = 1 array_tmp10[3] := -array_tmp10_g[2] * array_x[2] / 2; array_tmp10_g[3] := array_tmp10[2] * array_x[2] / 2; #emit pre mult LINEAR FULL $eq_no = 1 i = 3 array_tmp11[3] := array_tmp10[2] * array_tmp9[2] + array_tmp10[3] * array_tmp9[1]; #emit pre sin ID_LINEAR iii = 3 $eq_no = 1 array_tmp12[3] := array_tmp12_g[2] * array_x[2] / 2; array_tmp12_g[3] := -array_tmp12[2] * array_x[2] / 2; #emit pre div FULL - FULL $eq_no = 1 i = 3 array_tmp13[3] := ((array_tmp11[3] - ats(3,array_tmp12,array_tmp13,2))/array_tmp12[1]); #emit pre add FULL FULL $eq_no = 1 i = 3 array_tmp14[3] := array_tmp7[3] + array_tmp13[3]; # emit pre mult FULL FULL $eq_no = 1 i = 3 array_tmp15[3] := ats(3,array_tmp4,array_tmp14,1); #emit pre add CONST FULL $eq_no = 1 i = 3 array_tmp16[3] := array_tmp15[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_tmp16[3] * expt(glob_h , (1)) * factorial_3(2,3); array_y[4] := temporary; array_y_higher[1,4] := temporary; temporary := temporary / glob_h * (3.0); array_y_higher[2,3] := temporary; fi;# end if 2; fi;# end if 1; kkk := 4; #END ATOMHDR3 #BEGIN ATOMHDR4 #emit pre sin ID_LINEAR iii = 4 $eq_no = 1 array_tmp1[4] := array_tmp1_g[3] * array_x[2] / 3; array_tmp1_g[4] := -array_tmp1[3] * array_x[2] / 3; #emit pre expt FULL - LINEAR $eq_no = 1 i = 4 array_tmp4_a1[4] := (array_tmp1[4] -att(3,array_tmp1,array_tmp4_a1,2))/ array_tmp1[1]; array_tmp4_a2[3] := (array_tmp4_a1[4] * array_tmp3[1] + array_tmp4_a1[3] * array_tmp3[2]) * 3 / glob_h; array_tmp4[4] := ats(3,array_tmp4,array_tmp4_a2,1)*glob_h/3; #emit pre sin ID_LINEAR iii = 4 $eq_no = 1 array_tmp5[4] := array_tmp5_g[3] * array_x[2] / 3; array_tmp5_g[4] := -array_tmp5[3] * array_x[2] / 3; #emit pre ln ID_FULL iii = 4 $eq_no = 1 #emit pre ln 4 $eq_no = 1 array_tmp6[4] := ( array_tmp5[4] - att(3,array_tmp5,array_tmp6,2) ) / array_tmp5[1]; #emit pre mult CONST FULL $eq_no = 1 i = 4 array_tmp7[4] := array_const_2D0[1] * array_tmp6[4]; #emit pre cos ID_LINEAR iii = 4 $eq_no = 1 array_tmp10[4] := -array_tmp10_g[3] * array_x[2] / 3; array_tmp10_g[4] := array_tmp10[3] * array_x[2] / 3; #emit pre mult LINEAR FULL $eq_no = 1 i = 4 array_tmp11[4] := array_tmp10[3] * array_tmp9[2] + array_tmp10[4] * array_tmp9[1]; #emit pre sin ID_LINEAR iii = 4 $eq_no = 1 array_tmp12[4] := array_tmp12_g[3] * array_x[2] / 3; array_tmp12_g[4] := -array_tmp12[3] * array_x[2] / 3; #emit pre div FULL - FULL $eq_no = 1 i = 4 array_tmp13[4] := ((array_tmp11[4] - ats(4,array_tmp12,array_tmp13,2))/array_tmp12[1]); #emit pre add FULL FULL $eq_no = 1 i = 4 array_tmp14[4] := array_tmp7[4] + array_tmp13[4]; # emit pre mult FULL FULL $eq_no = 1 i = 4 array_tmp15[4] := ats(4,array_tmp4,array_tmp14,1); #emit pre add CONST FULL $eq_no = 1 i = 4 array_tmp16[4] := array_tmp15[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_tmp16[4] * expt(glob_h , (1)) * factorial_3(3,4); array_y[5] := temporary; array_y_higher[1,5] := temporary; temporary := temporary / glob_h * (4.0); array_y_higher[2,4] := temporary; fi;# end if 2; fi;# end if 1; kkk := 5; #END ATOMHDR4 #BEGIN ATOMHDR5 #emit pre sin ID_LINEAR iii = 5 $eq_no = 1 array_tmp1[5] := array_tmp1_g[4] * array_x[2] / 4; array_tmp1_g[5] := -array_tmp1[4] * array_x[2] / 4; #emit pre expt FULL - LINEAR $eq_no = 1 i = 5 array_tmp4_a1[5] := (array_tmp1[5] -att(4,array_tmp1,array_tmp4_a1,2))/ array_tmp1[1]; array_tmp4_a2[4] := (array_tmp4_a1[5] * array_tmp3[1] + array_tmp4_a1[4] * array_tmp3[2]) * 4 / glob_h; array_tmp4[5] := ats(4,array_tmp4,array_tmp4_a2,1)*glob_h/4; #emit pre sin ID_LINEAR iii = 5 $eq_no = 1 array_tmp5[5] := array_tmp5_g[4] * array_x[2] / 4; array_tmp5_g[5] := -array_tmp5[4] * array_x[2] / 4; #emit pre ln ID_FULL iii = 5 $eq_no = 1 #emit pre ln 5 $eq_no = 1 array_tmp6[5] := ( array_tmp5[5] - att(4,array_tmp5,array_tmp6,2) ) / array_tmp5[1]; #emit pre mult CONST FULL $eq_no = 1 i = 5 array_tmp7[5] := array_const_2D0[1] * array_tmp6[5]; #emit pre cos ID_LINEAR iii = 5 $eq_no = 1 array_tmp10[5] := -array_tmp10_g[4] * array_x[2] / 4; array_tmp10_g[5] := array_tmp10[4] * array_x[2] / 4; #emit pre mult LINEAR FULL $eq_no = 1 i = 5 array_tmp11[5] := array_tmp10[4] * array_tmp9[2] + array_tmp10[5] * array_tmp9[1]; #emit pre sin ID_LINEAR iii = 5 $eq_no = 1 array_tmp12[5] := array_tmp12_g[4] * array_x[2] / 4; array_tmp12_g[5] := -array_tmp12[4] * array_x[2] / 4; #emit pre div FULL - FULL $eq_no = 1 i = 5 array_tmp13[5] := ((array_tmp11[5] - ats(5,array_tmp12,array_tmp13,2))/array_tmp12[1]); #emit pre add FULL FULL $eq_no = 1 i = 5 array_tmp14[5] := array_tmp7[5] + array_tmp13[5]; # emit pre mult FULL FULL $eq_no = 1 i = 5 array_tmp15[5] := ats(5,array_tmp4,array_tmp14,1); #emit pre add CONST FULL $eq_no = 1 i = 5 array_tmp16[5] := array_tmp15[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_tmp16[5] * expt(glob_h , (1)) * factorial_3(4,5); array_y[6] := temporary; array_y_higher[1,6] := temporary; temporary := temporary / glob_h * (5.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 sin LINEAR $eq_no = 1 array_tmp1[kkk] := array_tmp1_g[kkk - 1] * array_x[2] / (kkk - 1); array_tmp1_g[kkk] := -array_tmp1[kkk - 1] * array_x[2] / (kkk - 1); #emit expt FULL LINEAR $eq_no = 1 i = 1 array_tmp4_a1[kkk] := (array_tmp1[kkk] - att(kkk-1,array_tmp1,array_tmp4_a1,2))/array_tmp1[1]; array_tmp4_a2[kkk-1] := (array_tmp4_a1[kkk] * array_tmp3[1] + array_tmp4_a1[kkk-1] * array_tmp3[2]) * (kkk-1)/glob_h; array_tmp4[kkk] := ats(kkk-1,array_tmp4,array_tmp4_a2,1) * glob_h/(kkk-1); #emit sin LINEAR $eq_no = 1 array_tmp5[kkk] := array_tmp5_g[kkk - 1] * array_x[2] / (kkk - 1); array_tmp5_g[kkk] := -array_tmp5[kkk - 1] * array_x[2] / (kkk - 1); #emit ln FULL $eq_no = 1 array_tmp6[kkk] := (array_tmp5[kkk] - att(kkk-1,array_tmp5,array_tmp6,2))/array_tmp5[1]; #emit mult CONST FULL $eq_no = 1 i = 1 array_tmp7[kkk] := array_const_2D0[1] * array_tmp6[kkk]; #emit cos LINEAR $eq_no = 1 array_tmp10[kkk] := -array_tmp10_g[kkk - 1] * array_x[2] / (kkk - 1); array_tmp10_g[kkk] := array_tmp10[kkk - 1] * array_x[2] / (kkk - 1); #emit mult LINEAR FULL $eq_no = 1 i = 1 array_tmp11[kkk] := array_tmp10[kkk-1] * array_tmp9[2] + array_tmp10[kkk] * array_tmp9[1]; #emit sin LINEAR $eq_no = 1 array_tmp12[kkk] := array_tmp12_g[kkk - 1] * array_x[2] / (kkk - 1); array_tmp12_g[kkk] := -array_tmp12[kkk - 1] * array_x[2] / (kkk - 1); #emit div FULL FULL $eq_no = 1 array_tmp13[kkk] := ((array_tmp11[kkk] - ats(kkk,array_tmp12,array_tmp13,2))/array_tmp12[1]); #emit FULL - FULL add $eq_no = 1 array_tmp14[kkk] := array_tmp7[kkk] + array_tmp13[kkk]; #emit mult FULL FULL $eq_no = 1 array_tmp15[kkk] := ats(kkk,array_tmp4,array_tmp14,1); #emit NOT FULL - FULL add $eq_no = 1 array_tmp16[kkk] := array_tmp15[kkk]; #emit assign $eq_no = 1 order_d := 1; if (kkk + order_d < glob_max_terms) then # if number 1 if ( not array_y_set_initial[1,kkk + order_d]) then # if number 2 temporary := array_tmp16[kkk] * expt(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 := kkk + order_d - 1; adj3 := 2; while (term >= 1) do # do number 1 if (adj3 <= order_d + 1) then # if number 3 if (adj2 > 0) then # if number 4 temporary := temporary / glob_h * convfp(adj2); else temporary := temporary; fi;# end if 4; array_y_higher[adj3,term] := temporary; fi;# end if 3; term := term - 1; adj2 := adj2 - 1; adj3 := adj3 + 1; od;# end do number 1 fi;# end if 2 fi;# end if 1; kkk := kkk + 1; od;# end do number 1; #BOTTOM ATOMALL #END OUTFILE4 #BEGIN OUTFILE5 #BOTTOM ATOMALL ??? end; # End Function number 13 #BEGIN ATS LIBRARY BLOCK # Begin Function number 2 omniout_str := proc(iolevel,str) global glob_iolevel; if (glob_iolevel >= iolevel) then # if number 1 printf("%s\n",str); fi;# end if 1; end; # End Function number 2 # Begin Function number 3 omniout_str_noeol := proc(iolevel,str) global glob_iolevel; if (glob_iolevel >= iolevel) then # if number 1 printf("%s",str); fi;# end if 1; end; # End Function number 3 # Begin Function number 4 omniout_labstr := proc(iolevel,label,str) global glob_iolevel; if (glob_iolevel >= iolevel) then # if number 1 print(label,str); fi;# end if 1; end; # End Function number 4 # Begin Function number 5 omniout_float := proc(iolevel,prelabel,prelen,value,vallen,postlabel) global glob_iolevel; if (glob_iolevel >= iolevel) then # if number 1 if vallen = 4 then printf("%-30s = %-42.4g %s \n",prelabel,value, postlabel); else printf("%-30s = %-42.32g %s \n",prelabel,value, postlabel); fi;# end if 1; fi;# end if 0; end; # End Function number 5 # Begin Function number 6 omniout_int := proc(iolevel,prelabel,prelen,value,vallen,postlabel) global glob_iolevel; if (glob_iolevel >= iolevel) then # if number 0 if vallen = 5 then # if number 1 printf("%-30s = %-32d %s\n",prelabel,value, postlabel); else printf("%-30s = %-32d %s \n",prelabel,value, postlabel); fi;# end if 1; fi;# end if 0; end; # End Function number 6 # Begin Function number 7 omniout_float_arr := proc(iolevel,prelabel,elemnt,prelen,value,vallen,postlabel) global glob_iolevel; if (glob_iolevel >= iolevel) then # if number 0 print(prelabel,"[",elemnt,"]",value, postlabel); fi;# end if 0; end; # End Function number 7 # Begin Function number 8 dump_series := proc(iolevel,dump_label,series_name,arr_series,numb) global glob_iolevel; local i; if (glob_iolevel >= iolevel) then # if number 0 i := 1; while (i <= numb) do # do number 1 print(dump_label,series_name ,i,arr_series[i]); i := i + 1; od;# end do number 1 fi;# end if 0 end; # End Function number 8 # Begin Function number 9 dump_series_2 := proc(iolevel,dump_label,series_name2,arr_series2,numb,subnum,arr_x) global glob_iolevel; local i,sub,ts_term; if (glob_iolevel >= iolevel) then # if number 0 sub := 1; while (sub <= subnum) do # do number 1 i := 1; while (i <= numb) do # do number 2 print(dump_label,series_name2,sub,i,arr_series2[sub,i]); od;# end do number 2; sub := sub + 1; od;# end do number 1; fi;# end if 0; end; # End Function number 9 # Begin Function number 10 cs_info := proc(iolevel,str) global glob_iolevel,glob_correct_start_flag,glob_h,glob_reached_optimal_h; if (glob_iolevel >= iolevel) then # if number 0 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 if 0; end; # End Function number 10 # Begin Function number 11 logitem_time := proc(fd,secs_in) global glob_sec_in_day, glob_sec_in_hour, glob_sec_in_minute, glob_sec_in_year; local days_int, hours_int,minutes_int, sec_int, sec_temp, years_int; fprintf(fd,"