|\^/| Maple 18 (X86 64 WINDOWS)
._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2014
\ MAPLE / All rights reserved. Maple is a trademark of
<____ ____> Waterloo Maple Inc.
| Type ? for help.
#BEGIN OUTFILE1
# before write maple top matter
# before write_ats library and user def block
#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;
omniout_str := proc(iolevel, str)
global glob_iolevel;
if iolevel <= glob_iolevel then printf("%s\n", str) end if
end proc
# 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;
omniout_str_noeol := proc(iolevel, str)
global glob_iolevel;
if iolevel <= glob_iolevel then printf("%s", str) end if
end proc
# 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;
omniout_labstr := proc(iolevel, label, str)
global glob_iolevel;
if iolevel <= glob_iolevel then print(label, str) end if
end proc
# 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;
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
# 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;
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
# 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;
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
# End Function number 7
# Begin Function number 8
> 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,"
");
> if (secs_in >= 0) then # if number 0
> years_int := int_trunc(secs_in / glob_sec_in_year);
> sec_temp := int_trunc(secs_in) mod int_trunc(glob_sec_in_year);
> days_int := int_trunc(sec_temp / glob_sec_in_day) ;
> sec_temp := sec_temp mod int_trunc(glob_sec_in_day) ;
> hours_int := int_trunc(sec_temp / glob_sec_in_hour);
> sec_temp := sec_temp mod int_trunc(glob_sec_in_hour);
> minutes_int := int_trunc(sec_temp / glob_sec_in_minute);
> sec_int := sec_temp mod int_trunc(glob_sec_in_minute);
> if (years_int > 0) then # if number 1
> 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 2
> 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 3
> fprintf(fd,"%d Hours %d Minutes %d Seconds",hours_int,minutes_int,sec_int);
> elif
> (minutes_int > 0) then # if number 4
> fprintf(fd,"%d Minutes %d Seconds",minutes_int,sec_int);
> else
> fprintf(fd,"%d Seconds",sec_int);
> fi;# end if 4
> else
> fprintf(fd," 0.0 Seconds");
> fi;# end if 3
> fprintf(fd," | \n");
> end;
logitem_time := proc(fd, secs_in)
local days_int, hours_int, minutes_int, sec_int, sec_temp, years_int;
global
glob_sec_in_day, glob_sec_in_hour, glob_sec_in_minute, glob_sec_in_year;
fprintf(fd, "");
if 0 <= secs_in then
years_int := int_trunc(secs_in/glob_sec_in_year);
sec_temp := int_trunc(secs_in) mod int_trunc(glob_sec_in_year);
days_int := int_trunc(sec_temp/glob_sec_in_day);
sec_temp := sec_temp mod int_trunc(glob_sec_in_day);
hours_int := int_trunc(sec_temp/glob_sec_in_hour);
sec_temp := sec_temp mod int_trunc(glob_sec_in_hour);
minutes_int := int_trunc(sec_temp/glob_sec_in_minute);
sec_int := sec_temp mod int_trunc(glob_sec_in_minute);
if 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, " 0.0 Seconds")
end if;
fprintf(fd, " | \n")
end proc
# End Function number 8
# Begin Function number 9
> omniout_timestr := proc(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;
> if (secs_in >= 0) then # if number 3
> years_int := int_trunc(secs_in / glob_sec_in_year);
> sec_temp := (int_trunc(secs_in) mod int_trunc(glob_sec_in_year));
> days_int := int_trunc(sec_temp / glob_sec_in_day) ;
> sec_temp := (sec_temp mod int_trunc(glob_sec_in_day)) ;
> hours_int := int_trunc(sec_temp / glob_sec_in_hour);
> sec_temp := (sec_temp mod int_trunc(glob_sec_in_hour));
> minutes_int := int_trunc(sec_temp / glob_sec_in_minute);
> sec_int := (sec_temp mod int_trunc(glob_sec_in_minute));
> if (years_int > 0) then # if number 4
> 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 5
> 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 6
> printf(" = %d Hours %d Minutes %d Seconds\n",hours_int,minutes_int,sec_int);
> elif
> (minutes_int > 0) then # if number 7
> printf(" = %d Minutes %d Seconds\n",minutes_int,sec_int);
> else
> printf(" = %d Seconds\n",sec_int);
> fi;# end if 7
> else
> printf(" 0.0 Seconds\n");
> fi;# end if 6
> end;
omniout_timestr := proc(secs_in)
local days_int, hours_int, minutes_int, sec_int, sec_temp, years_int;
global
glob_sec_in_day, glob_sec_in_hour, glob_sec_in_minute, glob_sec_in_year;
if 0 <= secs_in then
years_int := int_trunc(secs_in/glob_sec_in_year);
sec_temp := int_trunc(secs_in) mod int_trunc(glob_sec_in_year);
days_int := int_trunc(sec_temp/glob_sec_in_day);
sec_temp := sec_temp mod int_trunc(glob_sec_in_day);
hours_int := int_trunc(sec_temp/glob_sec_in_hour);
sec_temp := sec_temp mod int_trunc(glob_sec_in_hour);
minutes_int := int_trunc(sec_temp/glob_sec_in_minute);
sec_int := sec_temp mod int_trunc(glob_sec_in_minute);
if 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(" 0.0 Seconds\n")
end if
end proc
# End Function number 9
# Begin Function number 10
> zero_ats_ar := proc(arr_a)
> global ATS_MAX_TERMS;
> local iii;
> iii := 1;
> while (iii <= ATS_MAX_TERMS) do # do number 1
> arr_a [iii] := glob__0;
> iii := iii + 1;
> od;# end do number 1
> end;
zero_ats_ar := proc(arr_a)
local iii;
global ATS_MAX_TERMS;
iii := 1;
while iii <= ATS_MAX_TERMS do arr_a[iii] := glob__0; iii := iii + 1
end do
end proc
# End Function number 10
# Begin Function number 11
> ats := proc(mmm_ats,arr_a,arr_b,jjj_ats)
> global ATS_MAX_TERMS;
> local iii_ats, lll_ats,ma_ats, ret_ats;
> ret_ats := glob__0;
> if (jjj_ats <= mmm_ats) then # if number 6
> ma_ats := mmm_ats + 1;
> iii_ats := jjj_ats;
> while (iii_ats <= mmm_ats) do # do number 1
> lll_ats := ma_ats - iii_ats;
> if ((lll_ats <= ATS_MAX_TERMS and (iii_ats <= ATS_MAX_TERMS) )) then # if number 7
> ret_ats := ret_ats + c(arr_a[iii_ats])*c(arr_b[lll_ats]);
> fi;# end if 7;
> iii_ats := iii_ats + 1;
> od;# end do number 1
> fi;# end if 6;
> ret_ats;
> end;
ats := proc(mmm_ats, arr_a, arr_b, jjj_ats)
local iii_ats, lll_ats, ma_ats, ret_ats;
global ATS_MAX_TERMS;
ret_ats := glob__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;
if lll_ats <= ATS_MAX_TERMS and iii_ats <= ATS_MAX_TERMS then
ret_ats := ret_ats + c(arr_a[iii_ats])*c(arr_b[lll_ats])
end if;
iii_ats := iii_ats + 1
end do
end if;
ret_ats
end proc
# End Function number 11
# Begin Function number 12
> att := proc(mmm_att,arr_aa,arr_bb,jjj_att)
> global ATS_MAX_TERMS;
> local al_att, iii_att,lll_att, ma_att, ret_att;
> ret_att := glob__0;
> if (jjj_att < mmm_att) then # if number 6
> ma_att := mmm_att + 2;
> iii_att := jjj_att;
> while ((iii_att < mmm_att) and (iii_att <= ATS_MAX_TERMS) ) do # do number 1
> lll_att := ma_att - iii_att;
> al_att := (lll_att - 1);
> if ((lll_att <= ATS_MAX_TERMS and (iii_att <= ATS_MAX_TERMS) )) then # if number 7
> ret_att := ret_att + c(arr_aa[iii_att])*c(arr_bb[lll_att])* c(al_att);
> fi;# end if 7;
> iii_att := iii_att + 1;
> od;# end do number 1;
> ret_att := ret_att / c(mmm_att) ;
> fi;# end if 6;
> ret_att;
> end;
att := proc(mmm_att, arr_aa, arr_bb, jjj_att)
local al_att, iii_att, lll_att, ma_att, ret_att;
global ATS_MAX_TERMS;
ret_att := glob__0;
if jjj_att < mmm_att then
ma_att := mmm_att + 2;
iii_att := jjj_att;
while iii_att < mmm_att and iii_att <= ATS_MAX_TERMS do
lll_att := ma_att - iii_att;
al_att := lll_att - 1;
if lll_att <= ATS_MAX_TERMS and iii_att <= ATS_MAX_TERMS then
ret_att :=
ret_att + c(arr_aa[iii_att])*c(arr_bb[lll_att])*c(al_att)
end if;
iii_att := iii_att + 1
end do;
ret_att := ret_att/c(mmm_att)
end if;
ret_att
end proc
# End Function number 12
# Begin Function number 13
> logditto := proc(file)
> fprintf(file,"");
> fprintf(file,"ditto");
> fprintf(file," | ");
> end;
logditto := proc(file)
fprintf(file, ""); fprintf(file, "ditto"); fprintf(file, " | ")
end proc
# End Function number 13
# Begin Function number 14
> logitem_integer := proc(file,n)
> fprintf(file,"");
> fprintf(file,"%d",n);
> fprintf(file," | ");
> end;
logitem_integer := proc(file, n)
fprintf(file, ""); fprintf(file, "%d", n); fprintf(file, " | ")
end proc
# End Function number 14
# Begin Function number 15
> logitem_str := proc(file,str)
> fprintf(file,"");
> fprintf(file,str);
> fprintf(file," | ");
> end;
logitem_str := proc(file, str)
fprintf(file, ""); fprintf(file, str); fprintf(file, " | ")
end proc
# End Function number 15
# Begin Function number 16
> logitem_good_digits := proc(file,rel_error)
> global glob_small_float,glob_prec;
> local good_digits;
> fprintf(file,"");
> fprintf(file,"%d",glob_min_good_digits);
> fprintf(file," | ");
> end;
logitem_good_digits := proc(file, rel_error)
local good_digits;
global glob_small_float, glob_prec;
fprintf(file, "");
fprintf(file, "%d", glob_min_good_digits);
fprintf(file, " | ")
end proc
# End Function number 16
# Begin Function number 17
> log_revs := proc(file,revs)
> fprintf(file,revs);
> end;
log_revs := proc(file, revs) fprintf(file, revs) end proc
# End Function number 17
# Begin Function number 18
> logitem_float := proc(file,x)
> fprintf(file,"");
> fprintf(file,"%g",x);
> fprintf(file," | ");
> end;
logitem_float := proc(file, x)
fprintf(file, ""); fprintf(file, "%g", x); fprintf(file, " | ")
end proc
# End Function number 18
# Begin Function number 19
> logitem_h_reason := proc(file)
> global glob_h_reason;
> fprintf(file,"");
> if (glob_h_reason = 1) then # if number 6
> fprintf(file,"Max H");
> elif
> (glob_h_reason = 2) then # if number 7
> fprintf(file,"Display Interval");
> elif
> (glob_h_reason = 3) then # if number 8
> fprintf(file,"Optimal");
> elif
> (glob_h_reason = 4) then # if number 9
> fprintf(file,"Pole Accuracy");
> elif
> (glob_h_reason = 5) then # if number 10
> fprintf(file,"Min H (Pole)");
> elif
> (glob_h_reason = 6) then # if number 11
> fprintf(file,"Pole");
> elif
> (glob_h_reason = 7) then # if number 12
> fprintf(file,"Opt Iter");
> else
> fprintf(file,"Impossible");
> fi;# end if 12
> fprintf(file," | ");
> end;
logitem_h_reason := proc(file)
global glob_h_reason;
fprintf(file, "");
if glob_h_reason = 1 then fprintf(file, "Max H")
elif glob_h_reason = 2 then fprintf(file, "Display Interval")
elif glob_h_reason = 3 then fprintf(file, "Optimal")
elif glob_h_reason = 4 then fprintf(file, "Pole Accuracy")
elif glob_h_reason = 5 then fprintf(file, "Min H (Pole)")
elif glob_h_reason = 6 then fprintf(file, "Pole")
elif glob_h_reason = 7 then fprintf(file, "Opt Iter")
else fprintf(file, "Impossible")
end if;
fprintf(file, " | ")
end proc
# End Function number 19
# Begin Function number 20
> logstart := proc(file)
> fprintf(file,"");
> end;
logstart := proc(file) fprintf(file, "
") end proc
# End Function number 20
# Begin Function number 21
> logend := proc(file)
> fprintf(file,"
\n");
> end;
logend := proc(file) fprintf(file, "\n") end proc
# End Function number 21
# Begin Function number 22
> chk_data := proc()
> global glob_max_iter,ALWAYS, ATS_MAX_TERMS;
> local errflag;
> errflag := false;
> if (glob_max_iter < 2) then # if number 12
> omniout_str(ALWAYS,"Illegal max_iter");
> errflag := true;
> fi;# end if 12;
> if (errflag) then # if number 12
> quit;
> fi;# end if 12
> end;
chk_data := proc()
local errflag;
global glob_max_iter, ALWAYS, ATS_MAX_TERMS;
errflag := false;
if glob_max_iter < 2 then
omniout_str(ALWAYS, "Illegal max_iter"); errflag := true
end if;
if errflag then quit end if
end proc
# End Function number 22
# Begin Function number 23
> comp_expect_sec := proc(t_end2,t_start2,t2,clock_sec2)
> global glob_small_float;
> local ms2, rrr, sec_left, sub1, sub2;
> ;
> ms2 := c(clock_sec2);
> sub1 := c(t_end2-t_start2);
> sub2 := c(t2-t_start2);
> if (sub1 = glob__0) then # if number 12
> sec_left := glob__0;
> else
> if (sub2 > glob__0) then # if number 13
> rrr := (sub1/sub2);
> sec_left := rrr * c(ms2) - c(ms2);
> else
> sec_left := glob__0;
> fi;# end if 13
> fi;# end if 12;
> sec_left;
> end;
comp_expect_sec := proc(t_end2, t_start2, t2, clock_sec2)
local ms2, rrr, sec_left, sub1, sub2;
global glob_small_float;
ms2 := c(clock_sec2);
sub1 := c(t_end2 - t_start2);
sub2 := c(t2 - t_start2);
if sub1 = glob__0 then sec_left := glob__0
else
if glob__0 < sub2 then
rrr := sub1/sub2; sec_left := rrr*c(ms2) - c(ms2)
else sec_left := glob__0
end if
end if;
sec_left
end proc
# End Function number 23
# Begin Function number 24
> 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 (sub2 > glob_small_float) then # if number 12
> rrr := (glob__100*sub2)/sub1;
> else
> rrr := 0.0;
> fi;# end if 12;
> rrr;
> end;
comp_percent := proc(t_end2, t_start2, t2)
local rrr, sub1, sub2;
global glob_small_float;
sub1 := t_end2 - t_start2;
sub2 := t2 - t_start2;
if glob_small_float < sub2 then rrr := glob__100*sub2/sub1
else rrr := 0.
end if;
rrr
end proc
# End Function number 24
# Begin Function number 25
> comp_rad_from_ratio := proc(term1,term2,last_no)
> #TOP TWO TERM RADIUS ANALYSIS
> global glob_h,glob_larger_float;
> local ret;
> if (float_abs(term2) > glob__0) then # if number 12
> ret := float_abs(term1 * glob_h / term2);
> else
> ret := glob_larger_float;
> fi;# end if 12;
> ret;
> #BOTTOM TWO TERM RADIUS ANALYSIS
> end;
comp_rad_from_ratio := proc(term1, term2, last_no)
local ret;
global glob_h, glob_larger_float;
if glob__0 < float_abs(term2) then ret := float_abs(term1*glob_h/term2)
else ret := glob_larger_float
end if;
ret
end proc
# End Function number 25
# Begin Function number 26
> comp_ord_from_ratio := proc(term1,term2,last_no)
> #TOP TWO TERM ORDER ANALYSIS
> global glob_h,glob_larger_float;
> local ret;
> if (float_abs(term2) > glob__0) then # if number 12
> ret := glob__1 + float_abs(term2) * c(last_no) * ln(float_abs(term1 * glob_h / term2))/ln(c(last_no));
> else
> ret := glob_larger_float;
> fi;# end if 12;
> ret;
> #BOTTOM TWO TERM ORDER ANALYSIS
> end;
comp_ord_from_ratio := proc(term1, term2, last_no)
local ret;
global glob_h, glob_larger_float;
if glob__0 < float_abs(term2) then ret := glob__1 + float_abs(term2)*
c(last_no)*ln(float_abs(term1*glob_h/term2))/ln(c(last_no))
else ret := glob_larger_float
end if;
ret
end proc
# End Function number 26
# Begin Function number 27
> c := proc(in_val)
> #To Force Conversion when needed
> local ret;
> ret := evalf(in_val);
> ret;
> #End Conversion
> end;
c := proc(in_val) local ret; ret := evalf(in_val); ret end proc
# End Function number 27
# Begin Function number 28
> comp_rad_from_three_terms := proc(term1,term2,term3,last_no)
> #TOP THREE TERM RADIUS ANALYSIS
> global glob_h,glob_larger_float;
> local ret,temp;
> temp := float_abs(term2*term2*c(last_no)+glob__m2*term2*term2-term1*term3*c(last_no)+term1*term3);
> if (float_abs(temp) > glob__0) then # if number 12
> ret := float_abs((term2*glob_h*term1)/(temp));
> else
> ret := glob_larger_float;
> fi;# end if 12;
> ret;
> #BOTTOM THREE TERM RADIUS ANALYSIS
> end;
comp_rad_from_three_terms := proc(term1, term2, term3, last_no)
local ret, temp;
global glob_h, glob_larger_float;
temp := float_abs(term2*term2*c(last_no) + glob__m2*term2*term2
- term1*term3*c(last_no) + term1*term3);
if glob__0 < float_abs(temp) then
ret := float_abs(term2*glob_h*term1/temp)
else ret := glob_larger_float
end if;
ret
end proc
# End Function number 28
# Begin Function number 29
> comp_ord_from_three_terms := proc(term1,term2,term3,last_no)
> #TOP THREE TERM ORDER ANALYSIS
> local ret;
> ret := float_abs((glob__4*term1*term3*c(last_no)-glob__3*term1*term3-glob__4*term2*term2*c(last_no)+glob__4*term2*term2+term2*term2*c(last_no*last_no)-term1*term3*c(last_no*last_no))/(term2*term2*c(last_no)-glob__2*term2*term2-term1*term3*c(last_no)+term1*term3));
> ret;
> #TOP THREE TERM ORDER ANALYSIS
> end;
comp_ord_from_three_terms := proc(term1, term2, term3, last_no)
local ret;
ret := float_abs((glob__4*term1*term3*c(last_no) - glob__3*term1*term3
- glob__4*term2*term2*c(last_no) + glob__4*term2*term2
+ term2*term2*c(last_no*last_no) - term1*term3*c(last_no*last_no))
/(term2*term2*c(last_no) - glob__2*term2*term2
- term1*term3*c(last_no) + term1*term3));
ret
end proc
# End Function number 29
# Begin Function number 30
> comp_rad_from_six_terms := proc(term1,term2,term3,term4,term5,term6,last_no)
> #TOP SIX TERM RADIUS ANALYSIS
> global glob_h,glob_larger_float,glob_six_term_ord_save;
> local ret,rm0,rm1,rm2,rm3,rm4,nr1,nr2,dr1,dr2,ds2,rad_c,ord_no,ds1,rcs;
> if ((term5 <> glob__0) and (term4 <> glob__0) and (term3 <> glob__0) and (term2 <> glob__0) and (term1 <> glob__0)) then # if number 12
> rm0 := term6/term5;
> rm1 := term5/term4;
> rm2 := term4/term3;
> rm3 := term3/term2;
> rm4 := term2/term1;
> nr1 := c(last_no-1)*rm0 - glob__2*c(last_no-2)*rm1 + c(last_no-3)*rm2;
> nr2 := c(last_no-2)*rm1 - glob__2*c(last_no-3)*rm2 + c(last_no-4)*rm3;
> dr1 := glob__m1/rm1 + glob__2/rm2 - glob__1/rm3;
> dr2 := glob__m1/rm2 + glob__2/rm3 - glob__1/rm4;
> ds1 := glob__3/rm1 - glob__8/rm2 + glob__5/rm3;
> ds2 := glob__3/rm2 - glob__8/rm3 + glob__5/rm4;
> if ((float_abs(nr1 * dr2 - nr2 * dr1) = glob__0) or (float_abs(dr1) = glob__0)) then # if number 13
> rad_c := glob_larger_float;
> ord_no := glob_larger_float;
> else
> if (float_abs(nr1*dr2 - nr2 * dr1) > glob__0) then # if number 14
> 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)/(glob__2*dr1) -c(last_no)/glob__2;
> if (float_abs(rcs) <> glob__0) then # if number 15
> if (rcs > glob__0) then # if number 16
> rad_c := sqrt(rcs) * float_abs(glob_h);
> else
> rad_c := glob_larger_float;
> ord_no := glob_larger_float;
> fi;# end if 16
> else
> rad_c := glob_larger_float;
> ord_no := glob_larger_float;
> fi;# end if 15
> else
> rad_c := glob_larger_float;
> ord_no := glob_larger_float;
> fi;# end if 14
> fi;# end if 13
> else
> rad_c := glob_larger_float;
> ord_no := glob_larger_float;
> fi;# end if 12;
> glob_six_term_ord_save := ord_no;
> rad_c;
> #BOTTOM SIX TERM RADIUS ANALYSIS
> end;
comp_rad_from_six_terms := proc(
term1, term2, term3, term4, term5, term6, last_no)
local ret, rm0, rm1, rm2, rm3, rm4, nr1, nr2, dr1, dr2, ds2, rad_c, ord_no,
ds1, rcs;
global glob_h, glob_larger_float, glob_six_term_ord_save;
if term5 <> glob__0 and term4 <> glob__0 and term3 <> glob__0 and
term2 <> glob__0 and term1 <> glob__0 then
rm0 := term6/term5;
rm1 := term5/term4;
rm2 := term4/term3;
rm3 := term3/term2;
rm4 := term2/term1;
nr1 := c(last_no - 1)*rm0 - glob__2*c(last_no - 2)*rm1
+ c(last_no - 3)*rm2;
nr2 := c(last_no - 2)*rm1 - glob__2*c(last_no - 3)*rm2
+ c(last_no - 4)*rm3;
dr1 := glob__m1/rm1 + glob__2/rm2 - glob__1/rm3;
dr2 := glob__m1/rm2 + glob__2/rm3 - glob__1/rm4;
ds1 := glob__3/rm1 - glob__8/rm2 + glob__5/rm3;
ds2 := glob__3/rm2 - glob__8/rm3 + glob__5/rm4;
if
float_abs(nr1*dr2 - nr2*dr1) = glob__0 or float_abs(dr1) = glob__0
then rad_c := glob_larger_float; ord_no := glob_larger_float
else
if glob__0 < float_abs(nr1*dr2 - nr2*dr1) then
rcs := (ds1*dr2 - ds2*dr1 + dr1*dr2)/(nr1*dr2 - nr2*dr1);
ord_no :=
(rcs*nr1 - ds1)/(glob__2*dr1) - c(last_no)/glob__2;
if float_abs(rcs) <> glob__0 then
if glob__0 < rcs then
rad_c := sqrt(rcs)*float_abs(glob_h)
else
rad_c := glob_larger_float;
ord_no := glob_larger_float
end if
else
rad_c := glob_larger_float; ord_no := glob_larger_float
end if
else rad_c := glob_larger_float; ord_no := glob_larger_float
end if
end if
else rad_c := glob_larger_float; ord_no := glob_larger_float
end if;
glob_six_term_ord_save := ord_no;
rad_c
end proc
# End Function number 30
# Begin Function number 31
> comp_ord_from_six_terms := proc(term1,term2,term3,term4,term5,term6,last_no)
> global glob_six_term_ord_save;
> #TOP SIX TERM ORDER ANALYSIS
> #TOP SAVED FROM SIX TERM RADIUS ANALYSIS
> glob_six_term_ord_save;
> #BOTTOM SIX TERM ORDER ANALYSIS
> end;
comp_ord_from_six_terms := proc(
term1, term2, term3, term4, term5, term6, last_no)
global glob_six_term_ord_save;
glob_six_term_ord_save
end proc
# End Function number 31
# Begin Function number 32
> factorial_2 := proc(nnn)
> ret := nnn!;
> ret;;
> end;
Warning, `ret` is implicitly declared local to procedure `factorial_2`
factorial_2 := proc(nnn) local ret; ret := nnn!; ret end proc
# End Function number 32
# Begin Function number 33
> factorial_1 := proc(nnn)
> global ATS_MAX_TERMS,array_fact_1;
> local ret;
> if (nnn <= ATS_MAX_TERMS) then # if number 12
> if (array_fact_1[nnn] = 0) then # if number 13
> ret := factorial_2(nnn);
> array_fact_1[nnn] := ret;
> else
> ret := array_fact_1[nnn];
> fi;# end if 13;
> else
> ret := factorial_2(nnn);
> fi;# end if 12;
> ret;
> end;
factorial_1 := proc(nnn)
local ret;
global ATS_MAX_TERMS, array_fact_1;
if nnn <= ATS_MAX_TERMS then
if array_fact_1[nnn] = 0 then
ret := factorial_2(nnn); array_fact_1[nnn] := ret
else ret := array_fact_1[nnn]
end if
else ret := factorial_2(nnn)
end if;
ret
end proc
# End Function number 33
# Begin Function number 34
> factorial_3 := proc(mmm,nnn)
> global ATS_MAX_TERMS,array_fact_2;
> local ret;
> if ((nnn <= ATS_MAX_TERMS) and (mmm <= ATS_MAX_TERMS)) then # if number 12
> if (array_fact_2[mmm,nnn] = 0) then # if number 13
> ret := factorial_1(mmm)/factorial_1(nnn);
> array_fact_2[mmm,nnn] := ret;
> else
> ret := array_fact_2[mmm,nnn];
> fi;# end if 13;
> else
> ret := factorial_2(mmm)/factorial_2(nnn);
> fi;# end if 12;
> ret;
> end;
factorial_3 := proc(mmm, nnn)
local ret;
global ATS_MAX_TERMS, array_fact_2;
if nnn <= ATS_MAX_TERMS and mmm <= ATS_MAX_TERMS then
if array_fact_2[mmm, nnn] = 0 then
ret := factorial_1(mmm)/factorial_1(nnn);
array_fact_2[mmm, nnn] := ret
else ret := array_fact_2[mmm, nnn]
end if
else ret := factorial_2(mmm)/factorial_2(nnn)
end if;
ret
end proc
# End Function number 34
# Begin Function number 35
> convfloat := proc(mmm)
> (mmm);
> end;
convfloat := proc(mmm) mmm end proc
# End Function number 35
# Begin Function number 36
> elapsed_time_seconds := proc()
> time();
> end;
elapsed_time_seconds := proc() time() end proc
# End Function number 36
# Begin Function number 37
> float_abs := proc(x)
> abs(x);
> end;
float_abs := proc(x) abs(x) end proc
# End Function number 37
# Begin Function number 38
> expt := proc(x,y)
> x^y;
> end;
expt := proc(x, y) x^y end proc
# End Function number 38
# Begin Function number 39
> neg := proc(x)
> -x;
> end;
neg := proc(x) -x end proc
# End Function number 39
# Begin Function number 40
> int_trunc := proc(x)
> trunc(x);
> end;
int_trunc := proc(x) trunc(x) end proc
# End Function number 40
# Begin Function number 41
> estimated_needed_step_error := proc(x_start,x_end,estimated_h,estimated_answer)
> local desired_abs_gbl_error,range,estimated_steps,step_error;
> global glob_desired_digits_correct,ALWAYS,ATS_MAX_TERMS;
> omniout_float(ALWAYS,"glob_desired_digits_correct",32,glob_desired_digits_correct,32,"");
> desired_abs_gbl_error := expt(glob__10,c( -glob_desired_digits_correct)) * c(float_abs(c(estimated_answer)));
> omniout_float(ALWAYS,"estimated_h",32,estimated_h,32,"");
> omniout_float(ALWAYS,"estimated_answer",32,estimated_answer,32,"");
> omniout_float(ALWAYS,"desired_abs_gbl_error",32,desired_abs_gbl_error,32,"");
> range := (x_end - x_start);
> omniout_float(ALWAYS,"range",32,range,32,"");
> estimated_steps := range / estimated_h;
> omniout_float(ALWAYS,"estimated_steps",32,estimated_steps,32,"");
> step_error := (c(float_abs(desired_abs_gbl_error) /sqrt(c( estimated_steps))/c(ATS_MAX_TERMS)));
> omniout_float(ALWAYS,"step_error",32,step_error,32,"");
> (step_error);;
> end;
estimated_needed_step_error := proc(
x_start, x_end, estimated_h, estimated_answer)
local desired_abs_gbl_error, range, estimated_steps, step_error;
global glob_desired_digits_correct, ALWAYS, ATS_MAX_TERMS;
omniout_float(ALWAYS, "glob_desired_digits_correct", 32,
glob_desired_digits_correct, 32, "");
desired_abs_gbl_error :=
expt(glob__10, c(-glob_desired_digits_correct))*
c(float_abs(c(estimated_answer)));
omniout_float(ALWAYS, "estimated_h", 32, estimated_h, 32, "");
omniout_float(ALWAYS, "estimated_answer", 32, estimated_answer, 32, "")
;
omniout_float(ALWAYS, "desired_abs_gbl_error", 32,
desired_abs_gbl_error, 32, "");
range := x_end - x_start;
omniout_float(ALWAYS, "range", 32, range, 32, "");
estimated_steps := range/estimated_h;
omniout_float(ALWAYS, "estimated_steps", 32, estimated_steps, 32, "");
step_error := c(float_abs(desired_abs_gbl_error)/(
sqrt(c(estimated_steps))*c(ATS_MAX_TERMS)));
omniout_float(ALWAYS, "step_error", 32, step_error, 32, "");
step_error
end proc
# End Function number 41
#END ATS LIBRARY BLOCK
#BEGIN USER FUNCTION BLOCK
#BEGIN BLOCK 3
#BEGIN USER DEF BLOCK
> exact_soln_y := proc(x)
> return(sin(sqrt(c(2.0)*c(x)+c(3.0)))-sqrt(c(2.0)*c(x)+c(3.0))*cos(sqrt(c(2.0)*c(x)+c(3.0))));
> end;
exact_soln_y := proc(x)
return sin(sqrt(c(2.0)*c(x) + c(3.0)))
- sqrt(c(2.0)*c(x) + c(3.0))*cos(sqrt(c(2.0)*c(x) + c(3.0)))
end proc
#END USER DEF BLOCK
#END BLOCK 3
#END USER FUNCTION BLOCK
# before write_aux functions
# Begin Function number 2
> display_poles := proc()
> local rad_given;
> global ALWAYS,glob_display_flag,glob_larger_float, glob_large_float, glob_diff_ord_fm, glob_diff_ord_fmm1, glob_diff_ord_fmm2, glob_diff_rc_fm, glob_diff_rc_fmm1, glob_diff_rc_fmm2, glob_guess_error_ord, glob_guess_error_rc, glob_type_given_pole,array_given_rad_poles,array_given_ord_poles,array_rad_test_poles,array_ord_test_poles,glob_least_3_sing,glob_least_6_sing,glob_least_given_sing,glob_least_ratio_sing,array_x ;
> if ((glob_type_given_pole = 1) or (glob_type_given_pole = 2)) then # if number 1
> rad_given := sqrt((array_x[1] - array_given_rad_poles[1,1]) * (array_x[1] - array_given_rad_poles[1,1]) + array_given_rad_poles[1,2] * array_given_rad_poles[1,2]);
> 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," ");
> if (rad_given < glob_least_given_sing) then # if number 2
> glob_least_given_sing := rad_given;
> fi;# end if 2;
> elif
> (glob_type_given_pole = 3) then # if number 2
> omniout_str(ALWAYS,"NO POLE (given) for Equation 1");
> elif
> (glob_type_given_pole = 5) then # if number 3
> omniout_str(ALWAYS,"SOME POLE (given) for Equation 1");
> else
> omniout_str(ALWAYS,"NO INFO (given) for Equation 1");
> fi;# end if 3;
> if (array_rad_test_poles[1,1] < glob_large_float) then # if number 3
> omniout_float(ALWAYS,"Radius of convergence (ratio test) for eq 1 ",4,array_rad_test_poles[1,1],4," ");
> if (array_rad_test_poles[1,1]< glob_least_ratio_sing) then # if number 4
> glob_least_ratio_sing := array_rad_test_poles[1,1];
> fi;# end if 4;
> omniout_float(ALWAYS,"Order of pole (ratio test) ",4, array_ord_test_poles[1,1],4," ");
> else
> omniout_str(ALWAYS,"NO POLE (ratio test) for Equation 1");
> fi;# end if 3;
> if ((array_rad_test_poles[1,2] > glob__small) and (array_rad_test_poles[1,2] < glob_large_float)) then # if number 3
> omniout_float(ALWAYS,"Radius of convergence (three term test) for eq 1 ",4,array_rad_test_poles[1,2],4," ");
> if (array_rad_test_poles[1,2]< glob_least_3_sing) then # if number 4
> glob_least_3_sing := array_rad_test_poles[1,2];
> fi;# end if 4;
> omniout_float(ALWAYS,"Order of pole (three term test) ",4, array_ord_test_poles[1,2],4," ");
> else
> omniout_str(ALWAYS,"NO REAL POLE (three term test) for Equation 1");
> fi;# end if 3;
> if ((array_rad_test_poles[1,3] > glob__small) and (array_rad_test_poles[1,3] < glob_large_float)) then # if number 3
> omniout_float(ALWAYS,"Radius of convergence (six term test) for eq 1 ",4,array_rad_test_poles[1,3],4," ");
> if (array_rad_test_poles[1,3]< glob_least_6_sing) then # if number 4
> glob_least_6_sing := array_rad_test_poles[1,3];
> fi;# end if 4;
> omniout_float(ALWAYS,"Order of pole (six term test) ",4, array_ord_test_poles[1,3],4," ");
> else
> omniout_str(ALWAYS,"NO COMPLEX POLE (six term test) for Equation 1");
> fi;# end if 3
> ;
> end;
display_poles := proc()
local rad_given;
global ALWAYS, glob_display_flag, glob_larger_float, glob_large_float,
glob_diff_ord_fm, glob_diff_ord_fmm1, glob_diff_ord_fmm2, glob_diff_rc_fm,
glob_diff_rc_fmm1, glob_diff_rc_fmm2, glob_guess_error_ord,
glob_guess_error_rc, glob_type_given_pole, array_given_rad_poles,
array_given_ord_poles, array_rad_test_poles, array_ord_test_poles,
glob_least_3_sing, glob_least_6_sing, glob_least_given_sing,
glob_least_ratio_sing, array_x;
if glob_type_given_pole = 1 or glob_type_given_pole = 2 then
rad_given := sqrt((array_x[1] - array_given_rad_poles[1, 1])*
(array_x[1] - array_given_rad_poles[1, 1])
+ array_given_rad_poles[1, 2]*array_given_rad_poles[1, 2]);
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, " ");
if rad_given < glob_least_given_sing then
glob_least_given_sing := rad_given
end if
elif glob_type_given_pole = 3 then
omniout_str(ALWAYS, "NO POLE (given) for Equation 1")
elif glob_type_given_pole = 5 then
omniout_str(ALWAYS, "SOME POLE (given) for Equation 1")
else omniout_str(ALWAYS, "NO INFO (given) for Equation 1")
end if;
if array_rad_test_poles[1, 1] < glob_large_float then
omniout_float(ALWAYS,
"Radius of convergence (ratio test) for eq 1 ", 4,
array_rad_test_poles[1, 1], 4, " ");
if array_rad_test_poles[1, 1] < glob_least_ratio_sing then
glob_least_ratio_sing := array_rad_test_poles[1, 1]
end if;
omniout_float(ALWAYS,
"Order of pole (ratio test) ", 4,
array_ord_test_poles[1, 1], 4, " ")
else omniout_str(ALWAYS, "NO POLE (ratio test) for Equation 1")
end if;
if glob__small < array_rad_test_poles[1, 2] and
array_rad_test_poles[1, 2] < glob_large_float then
omniout_float(ALWAYS,
"Radius of convergence (three term test) for eq 1 ", 4,
array_rad_test_poles[1, 2], 4, " ");
if array_rad_test_poles[1, 2] < glob_least_3_sing then
glob_least_3_sing := array_rad_test_poles[1, 2]
end if;
omniout_float(ALWAYS,
"Order of pole (three term test) ", 4,
array_ord_test_poles[1, 2], 4, " ")
else omniout_str(ALWAYS,
"NO REAL POLE (three term test) for Equation 1")
end if;
if glob__small < array_rad_test_poles[1, 3] and
array_rad_test_poles[1, 3] < glob_large_float then
omniout_float(ALWAYS,
"Radius of convergence (six term test) for eq 1 ", 4,
array_rad_test_poles[1, 3], 4, " ");
if array_rad_test_poles[1, 3] < glob_least_6_sing then
glob_least_6_sing := array_rad_test_poles[1, 3]
end if;
omniout_float(ALWAYS,
"Order of pole (six term test) ", 4,
array_ord_test_poles[1, 3], 4, " ")
else omniout_str(ALWAYS,
"NO COMPLEX POLE (six term test) for Equation 1")
end if
end proc
# End Function number 2
# Begin Function number 3
> my_check_sign := proc( x0 ,xf)
> local ret;
> if (xf > x0) then # if number 3
> ret := glob__1;
> else
> ret := glob__m1;
> fi;# end if 3;
> ret;;
> end;
my_check_sign := proc(x0, xf)
local ret;
if x0 < xf then ret := glob__1 else ret := glob__m1 end if; ret
end proc
# End Function number 3
# Begin Function number 4
> est_size_answer := proc()
> global
> ALWAYS,
> INFO,
> DEBUGL,
> DEBUGMASSIVE,
> glob_iolevel,
> glob_yes_pole,
> glob_no_pole,
> glob_not_given,
> glob_no_sing_tests,
> glob_ratio_test,
> glob_three_term_test,
> glob_six_term_test,
> glob_log_10,
#Top Generate Globals Decl
> MAX_UNCHANGED,
> glob__small,
> glob_small_float,
> glob_smallish_float,
> glob_large_float,
> glob_larger_float,
> glob__m2,
> glob__m1,
> glob__0,
> glob__1,
> glob__2,
> glob__3,
> glob__4,
> glob__5,
> glob__8,
> glob__10,
> glob__100,
> glob__pi,
> glob__0_5,
> glob__0_8,
> glob__m0_8,
> glob__0_25,
> glob__0_125,
> glob_prec,
> glob_check_sign,
> glob_desired_digits_correct,
> glob_max_estimated_step_error,
> glob_ratio_of_radius,
> glob_percent_done,
> glob_total_exp_sec,
> glob_optimal_expect_sec,
> glob_estimated_size_answer,
> glob_almost_1,
> glob_clock_sec,
> glob_clock_start_sec,
> glob_disp_incr,
> glob_h,
> glob_diff_rc_fm,
> glob_diff_rc_fmm1,
> glob_diff_rc_fmm2,
> glob_diff_ord_fm,
> glob_diff_ord_fmm1,
> glob_diff_ord_fmm2,
> glob_six_term_ord_save,
> glob_guess_error_rc,
> glob_guess_error_ord,
> glob_least_given_sing,
> glob_least_ratio_sing,
> glob_least_3_sing,
> glob_least_6_sing,
> glob_last_good_h,
> glob_max_h,
> glob_min_h,
> glob_display_interval,
> glob_abserr,
> glob_relerr,
> glob_min_pole_est,
> glob_max_rel_trunc_err,
> glob_max_trunc_err,
> glob_max_hours,
> glob_optimal_clock_start_sec,
> glob_optimal_start,
> glob_upper_ratio_limit,
> glob_lower_ratio_limit,
> glob_max_sec,
> glob_orig_start_sec,
> glob_normmax,
> glob_max_minutes,
> glob_next_display,
> glob_est_digits,
> glob_subiter_method,
> glob_html_log,
> glob_min_good_digits,
> glob_good_digits,
> glob_min_apfp_est_good_digits,
> glob_apfp_est_good_digits,
> glob_max_opt_iter,
> glob_dump,
> glob_djd_debug,
> glob_display_flag,
> glob_djd_debug2,
> glob_h_reason,
> 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_not_yet_finished,
> glob_initial_pass,
> glob_not_yet_start_msg,
> glob_reached_optimal_h,
> glob_optimal_done,
> glob_type_given_pole,
> glob_optimize,
> glob_look_poles,
> glob_dump_closed_form,
> glob_max_iter,
> glob_no_eqs,
> glob_unchanged_h_cnt,
> glob_warned,
> glob_warned2,
> glob_start,
> glob_iter,
#Bottom Generate Globals Decl
#BEGIN CONST
> array_const_1,
> array_const_0D0,
> array_const_2D0,
> array_const_3D0,
#END CONST
> array_y_init,
> array_norms,
> array_fact_1,
> array_1st_rel_error,
> array_last_rel_error,
> array_est_rel_error,
> array_max_est_error,
> array_type_pole,
> array_type_real_pole,
> array_type_complex_pole,
> array_est_digits,
> array_y,
> array_x,
> array_tmp0,
> array_tmp1,
> array_tmp2,
> array_tmp3,
> array_tmp4_g,
> array_tmp4,
> array_tmp5,
> array_m1,
> array_y_higher,
> array_y_higher_work,
> array_y_higher_work2,
> array_y_set_initial,
> array_given_rad_poles,
> array_given_ord_poles,
> array_rad_test_poles,
> array_ord_test_poles,
> array_fact_2,
> ATS_MAX_TERMS,
> glob_last;
> local min_size;
> min_size := glob_estimated_size_answer;
> if (float_abs(array_y[1]) < min_size) then # if number 3
> min_size := float_abs(array_y[1]);
> omniout_float(ALWAYS,"min_size",32,min_size,32,"");
> fi;# end if 3;
> if (min_size < glob__1) then # if number 3
> min_size := glob__1;
> omniout_float(ALWAYS,"min_size",32,min_size,32,"");
> fi;# end if 3;
> min_size;
> end;
est_size_answer := proc()
local min_size;
global ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, glob_iolevel, glob_yes_pole,
glob_no_pole, glob_not_given, glob_no_sing_tests, glob_ratio_test,
glob_three_term_test, glob_six_term_test, glob_log_10, MAX_UNCHANGED,
glob__small, glob_small_float, glob_smallish_float, glob_large_float,
glob_larger_float, glob__m2, glob__m1, glob__0, glob__1, glob__2, glob__3,
glob__4, glob__5, glob__8, glob__10, glob__100, glob__pi, glob__0_5,
glob__0_8, glob__m0_8, glob__0_25, glob__0_125, glob_prec, glob_check_sign,
glob_desired_digits_correct, glob_max_estimated_step_error,
glob_ratio_of_radius, glob_percent_done, glob_total_exp_sec,
glob_optimal_expect_sec, glob_estimated_size_answer, glob_almost_1,
glob_clock_sec, glob_clock_start_sec, glob_disp_incr, glob_h,
glob_diff_rc_fm, glob_diff_rc_fmm1, glob_diff_rc_fmm2, glob_diff_ord_fm,
glob_diff_ord_fmm1, glob_diff_ord_fmm2, glob_six_term_ord_save,
glob_guess_error_rc, glob_guess_error_ord, glob_least_given_sing,
glob_least_ratio_sing, glob_least_3_sing, glob_least_6_sing,
glob_last_good_h, glob_max_h, glob_min_h, glob_display_interval,
glob_abserr, glob_relerr, glob_min_pole_est, glob_max_rel_trunc_err,
glob_max_trunc_err, glob_max_hours, glob_optimal_clock_start_sec,
glob_optimal_start, glob_upper_ratio_limit, glob_lower_ratio_limit,
glob_max_sec, glob_orig_start_sec, glob_normmax, glob_max_minutes,
glob_next_display, glob_est_digits, glob_subiter_method, glob_html_log,
glob_min_good_digits, glob_good_digits, glob_min_apfp_est_good_digits,
glob_apfp_est_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug,
glob_display_flag, glob_djd_debug2, glob_h_reason, 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_not_yet_finished, glob_initial_pass,
glob_not_yet_start_msg, glob_reached_optimal_h, glob_optimal_done,
glob_type_given_pole, glob_optimize, glob_look_poles, glob_dump_closed_form,
glob_max_iter, glob_no_eqs, glob_unchanged_h_cnt, glob_warned, glob_warned2,
glob_start, glob_iter, array_const_1, array_const_0D0, array_const_2D0,
array_const_3D0, array_y_init, array_norms, array_fact_1,
array_1st_rel_error, array_last_rel_error, array_est_rel_error,
array_max_est_error, array_type_pole, array_type_real_pole,
array_type_complex_pole, array_est_digits, array_y, array_x, array_tmp0,
array_tmp1, array_tmp2, array_tmp3, array_tmp4_g, array_tmp4, array_tmp5,
array_m1, array_y_higher, array_y_higher_work, array_y_higher_work2,
array_y_set_initial, array_given_rad_poles, array_given_ord_poles,
array_rad_test_poles, array_ord_test_poles, array_fact_2, ATS_MAX_TERMS,
glob_last;
min_size := glob_estimated_size_answer;
if float_abs(array_y[1]) < min_size then
min_size := float_abs(array_y[1]);
omniout_float(ALWAYS, "min_size", 32, min_size, 32, "")
end if;
if min_size < glob__1 then
min_size := glob__1;
omniout_float(ALWAYS, "min_size", 32, min_size, 32, "")
end if;
min_size
end proc
# End Function number 4
# Begin Function number 5
> test_suggested_h := proc()
> global
> ALWAYS,
> INFO,
> DEBUGL,
> DEBUGMASSIVE,
> glob_iolevel,
> glob_yes_pole,
> glob_no_pole,
> glob_not_given,
> glob_no_sing_tests,
> glob_ratio_test,
> glob_three_term_test,
> glob_six_term_test,
> glob_log_10,
#Top Generate Globals Decl
> MAX_UNCHANGED,
> glob__small,
> glob_small_float,
> glob_smallish_float,
> glob_large_float,
> glob_larger_float,
> glob__m2,
> glob__m1,
> glob__0,
> glob__1,
> glob__2,
> glob__3,
> glob__4,
> glob__5,
> glob__8,
> glob__10,
> glob__100,
> glob__pi,
> glob__0_5,
> glob__0_8,
> glob__m0_8,
> glob__0_25,
> glob__0_125,
> glob_prec,
> glob_check_sign,
> glob_desired_digits_correct,
> glob_max_estimated_step_error,
> glob_ratio_of_radius,
> glob_percent_done,
> glob_total_exp_sec,
> glob_optimal_expect_sec,
> glob_estimated_size_answer,
> glob_almost_1,
> glob_clock_sec,
> glob_clock_start_sec,
> glob_disp_incr,
> glob_h,
> glob_diff_rc_fm,
> glob_diff_rc_fmm1,
> glob_diff_rc_fmm2,
> glob_diff_ord_fm,
> glob_diff_ord_fmm1,
> glob_diff_ord_fmm2,
> glob_six_term_ord_save,
> glob_guess_error_rc,
> glob_guess_error_ord,
> glob_least_given_sing,
> glob_least_ratio_sing,
> glob_least_3_sing,
> glob_least_6_sing,
> glob_last_good_h,
> glob_max_h,
> glob_min_h,
> glob_display_interval,
> glob_abserr,
> glob_relerr,
> glob_min_pole_est,
> glob_max_rel_trunc_err,
> glob_max_trunc_err,
> glob_max_hours,
> glob_optimal_clock_start_sec,
> glob_optimal_start,
> glob_upper_ratio_limit,
> glob_lower_ratio_limit,
> glob_max_sec,
> glob_orig_start_sec,
> glob_normmax,
> glob_max_minutes,
> glob_next_display,
> glob_est_digits,
> glob_subiter_method,
> glob_html_log,
> glob_min_good_digits,
> glob_good_digits,
> glob_min_apfp_est_good_digits,
> glob_apfp_est_good_digits,
> glob_max_opt_iter,
> glob_dump,
> glob_djd_debug,
> glob_display_flag,
> glob_djd_debug2,
> glob_h_reason,
> 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_not_yet_finished,
> glob_initial_pass,
> glob_not_yet_start_msg,
> glob_reached_optimal_h,
> glob_optimal_done,
> glob_type_given_pole,
> glob_optimize,
> glob_look_poles,
> glob_dump_closed_form,
> glob_max_iter,
> glob_no_eqs,
> glob_unchanged_h_cnt,
> glob_warned,
> glob_warned2,
> glob_start,
> glob_iter,
#Bottom Generate Globals Decl
#BEGIN CONST
> array_const_1,
> array_const_0D0,
> array_const_2D0,
> array_const_3D0,
#END CONST
> array_y_init,
> array_norms,
> array_fact_1,
> array_1st_rel_error,
> array_last_rel_error,
> array_est_rel_error,
> array_max_est_error,
> array_type_pole,
> array_type_real_pole,
> array_type_complex_pole,
> array_est_digits,
> array_y,
> array_x,
> array_tmp0,
> array_tmp1,
> array_tmp2,
> array_tmp3,
> array_tmp4_g,
> array_tmp4,
> array_tmp5,
> array_m1,
> array_y_higher,
> array_y_higher_work,
> array_y_higher_work2,
> array_y_set_initial,
> array_given_rad_poles,
> array_given_ord_poles,
> array_rad_test_poles,
> array_ord_test_poles,
> array_fact_2,
> ATS_MAX_TERMS,
> 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 := glob__small;
> no_terms := ATS_MAX_TERMS;
> hn_div_ho := glob__0_5;
> hn_div_ho_2 := glob__0_25;
> hn_div_ho_3 := glob__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 := float_abs(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 3
> max_estimated_step_error := est_tmp;
> fi;# end if 3;
> omniout_float(ALWAYS,"max_estimated_step_error",32,max_estimated_step_error,32,"");
> max_estimated_step_error;
> end;
test_suggested_h := proc()
local max_estimated_step_error, hn_div_ho, hn_div_ho_2, hn_div_ho_3,
no_terms, est_tmp;
global ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, glob_iolevel, glob_yes_pole,
glob_no_pole, glob_not_given, glob_no_sing_tests, glob_ratio_test,
glob_three_term_test, glob_six_term_test, glob_log_10, MAX_UNCHANGED,
glob__small, glob_small_float, glob_smallish_float, glob_large_float,
glob_larger_float, glob__m2, glob__m1, glob__0, glob__1, glob__2, glob__3,
glob__4, glob__5, glob__8, glob__10, glob__100, glob__pi, glob__0_5,
glob__0_8, glob__m0_8, glob__0_25, glob__0_125, glob_prec, glob_check_sign,
glob_desired_digits_correct, glob_max_estimated_step_error,
glob_ratio_of_radius, glob_percent_done, glob_total_exp_sec,
glob_optimal_expect_sec, glob_estimated_size_answer, glob_almost_1,
glob_clock_sec, glob_clock_start_sec, glob_disp_incr, glob_h,
glob_diff_rc_fm, glob_diff_rc_fmm1, glob_diff_rc_fmm2, glob_diff_ord_fm,
glob_diff_ord_fmm1, glob_diff_ord_fmm2, glob_six_term_ord_save,
glob_guess_error_rc, glob_guess_error_ord, glob_least_given_sing,
glob_least_ratio_sing, glob_least_3_sing, glob_least_6_sing,
glob_last_good_h, glob_max_h, glob_min_h, glob_display_interval,
glob_abserr, glob_relerr, glob_min_pole_est, glob_max_rel_trunc_err,
glob_max_trunc_err, glob_max_hours, glob_optimal_clock_start_sec,
glob_optimal_start, glob_upper_ratio_limit, glob_lower_ratio_limit,
glob_max_sec, glob_orig_start_sec, glob_normmax, glob_max_minutes,
glob_next_display, glob_est_digits, glob_subiter_method, glob_html_log,
glob_min_good_digits, glob_good_digits, glob_min_apfp_est_good_digits,
glob_apfp_est_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug,
glob_display_flag, glob_djd_debug2, glob_h_reason, 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_not_yet_finished, glob_initial_pass,
glob_not_yet_start_msg, glob_reached_optimal_h, glob_optimal_done,
glob_type_given_pole, glob_optimize, glob_look_poles, glob_dump_closed_form,
glob_max_iter, glob_no_eqs, glob_unchanged_h_cnt, glob_warned, glob_warned2,
glob_start, glob_iter, array_const_1, array_const_0D0, array_const_2D0,
array_const_3D0, array_y_init, array_norms, array_fact_1,
array_1st_rel_error, array_last_rel_error, array_est_rel_error,
array_max_est_error, array_type_pole, array_type_real_pole,
array_type_complex_pole, array_est_digits, array_y, array_x, array_tmp0,
array_tmp1, array_tmp2, array_tmp3, array_tmp4_g, array_tmp4, array_tmp5,
array_m1, array_y_higher, array_y_higher_work, array_y_higher_work2,
array_y_set_initial, array_given_rad_poles, array_given_ord_poles,
array_rad_test_poles, array_ord_test_poles, array_fact_2, ATS_MAX_TERMS,
glob_last;
max_estimated_step_error := glob__small;
no_terms := ATS_MAX_TERMS;
hn_div_ho := glob__0_5;
hn_div_ho_2 := glob__0_25;
hn_div_ho_3 := glob__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 := float_abs(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 max_estimated_step_error <= est_tmp then
max_estimated_step_error := est_tmp
end if;
omniout_float(ALWAYS, "max_estimated_step_error", 32,
max_estimated_step_error, 32, "");
max_estimated_step_error
end proc
# End Function number 5
# Begin Function number 6
> track_estimated_error := proc()
> global
> ALWAYS,
> INFO,
> DEBUGL,
> DEBUGMASSIVE,
> glob_iolevel,
> glob_yes_pole,
> glob_no_pole,
> glob_not_given,
> glob_no_sing_tests,
> glob_ratio_test,
> glob_three_term_test,
> glob_six_term_test,
> glob_log_10,
#Top Generate Globals Decl
> MAX_UNCHANGED,
> glob__small,
> glob_small_float,
> glob_smallish_float,
> glob_large_float,
> glob_larger_float,
> glob__m2,
> glob__m1,
> glob__0,
> glob__1,
> glob__2,
> glob__3,
> glob__4,
> glob__5,
> glob__8,
> glob__10,
> glob__100,
> glob__pi,
> glob__0_5,
> glob__0_8,
> glob__m0_8,
> glob__0_25,
> glob__0_125,
> glob_prec,
> glob_check_sign,
> glob_desired_digits_correct,
> glob_max_estimated_step_error,
> glob_ratio_of_radius,
> glob_percent_done,
> glob_total_exp_sec,
> glob_optimal_expect_sec,
> glob_estimated_size_answer,
> glob_almost_1,
> glob_clock_sec,
> glob_clock_start_sec,
> glob_disp_incr,
> glob_h,
> glob_diff_rc_fm,
> glob_diff_rc_fmm1,
> glob_diff_rc_fmm2,
> glob_diff_ord_fm,
> glob_diff_ord_fmm1,
> glob_diff_ord_fmm2,
> glob_six_term_ord_save,
> glob_guess_error_rc,
> glob_guess_error_ord,
> glob_least_given_sing,
> glob_least_ratio_sing,
> glob_least_3_sing,
> glob_least_6_sing,
> glob_last_good_h,
> glob_max_h,
> glob_min_h,
> glob_display_interval,
> glob_abserr,
> glob_relerr,
> glob_min_pole_est,
> glob_max_rel_trunc_err,
> glob_max_trunc_err,
> glob_max_hours,
> glob_optimal_clock_start_sec,
> glob_optimal_start,
> glob_upper_ratio_limit,
> glob_lower_ratio_limit,
> glob_max_sec,
> glob_orig_start_sec,
> glob_normmax,
> glob_max_minutes,
> glob_next_display,
> glob_est_digits,
> glob_subiter_method,
> glob_html_log,
> glob_min_good_digits,
> glob_good_digits,
> glob_min_apfp_est_good_digits,
> glob_apfp_est_good_digits,
> glob_max_opt_iter,
> glob_dump,
> glob_djd_debug,
> glob_display_flag,
> glob_djd_debug2,
> glob_h_reason,
> 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_not_yet_finished,
> glob_initial_pass,
> glob_not_yet_start_msg,
> glob_reached_optimal_h,
> glob_optimal_done,
> glob_type_given_pole,
> glob_optimize,
> glob_look_poles,
> glob_dump_closed_form,
> glob_max_iter,
> glob_no_eqs,
> glob_unchanged_h_cnt,
> glob_warned,
> glob_warned2,
> glob_start,
> glob_iter,
#Bottom Generate Globals Decl
#BEGIN CONST
> array_const_1,
> array_const_0D0,
> array_const_2D0,
> array_const_3D0,
#END CONST
> array_y_init,
> array_norms,
> array_fact_1,
> array_1st_rel_error,
> array_last_rel_error,
> array_est_rel_error,
> array_max_est_error,
> array_type_pole,
> array_type_real_pole,
> array_type_complex_pole,
> array_est_digits,
> array_y,
> array_x,
> array_tmp0,
> array_tmp1,
> array_tmp2,
> array_tmp3,
> array_tmp4_g,
> array_tmp4,
> array_tmp5,
> array_m1,
> array_y_higher,
> array_y_higher_work,
> array_y_higher_work2,
> array_y_set_initial,
> array_given_rad_poles,
> array_given_ord_poles,
> array_rad_test_poles,
> array_ord_test_poles,
> array_fact_2,
> ATS_MAX_TERMS,
> glob_last;
> local hn_div_ho,hn_div_ho_2,hn_div_ho_3,no_terms,est_tmp;
> no_terms := ATS_MAX_TERMS;
> hn_div_ho := glob__0_5;
> hn_div_ho_2 := glob__0_25;
> hn_div_ho_3 := glob__0_125;
> est_tmp := c(float_abs(array_y[no_terms-3])) + c(float_abs(array_y[no_terms - 2])) * c(hn_div_ho) + c(float_abs(array_y[no_terms - 1])) * c(hn_div_ho_2) + c(float_abs(array_y[no_terms])) * c(hn_div_ho_3);
> if (glob_prec * c(float_abs(array_y[1])) > c(est_tmp)) then # if number 3
> est_tmp := c(glob_prec) * c(float_abs(array_y[1]));
> fi;# end if 3;
> if (c(est_tmp) >= c(array_max_est_error[1])) then # if number 3
> array_max_est_error[1] := c(est_tmp);
> fi;# end if 3
> ;
> end;
track_estimated_error := proc()
local hn_div_ho, hn_div_ho_2, hn_div_ho_3, no_terms, est_tmp;
global ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, glob_iolevel, glob_yes_pole,
glob_no_pole, glob_not_given, glob_no_sing_tests, glob_ratio_test,
glob_three_term_test, glob_six_term_test, glob_log_10, MAX_UNCHANGED,
glob__small, glob_small_float, glob_smallish_float, glob_large_float,
glob_larger_float, glob__m2, glob__m1, glob__0, glob__1, glob__2, glob__3,
glob__4, glob__5, glob__8, glob__10, glob__100, glob__pi, glob__0_5,
glob__0_8, glob__m0_8, glob__0_25, glob__0_125, glob_prec, glob_check_sign,
glob_desired_digits_correct, glob_max_estimated_step_error,
glob_ratio_of_radius, glob_percent_done, glob_total_exp_sec,
glob_optimal_expect_sec, glob_estimated_size_answer, glob_almost_1,
glob_clock_sec, glob_clock_start_sec, glob_disp_incr, glob_h,
glob_diff_rc_fm, glob_diff_rc_fmm1, glob_diff_rc_fmm2, glob_diff_ord_fm,
glob_diff_ord_fmm1, glob_diff_ord_fmm2, glob_six_term_ord_save,
glob_guess_error_rc, glob_guess_error_ord, glob_least_given_sing,
glob_least_ratio_sing, glob_least_3_sing, glob_least_6_sing,
glob_last_good_h, glob_max_h, glob_min_h, glob_display_interval,
glob_abserr, glob_relerr, glob_min_pole_est, glob_max_rel_trunc_err,
glob_max_trunc_err, glob_max_hours, glob_optimal_clock_start_sec,
glob_optimal_start, glob_upper_ratio_limit, glob_lower_ratio_limit,
glob_max_sec, glob_orig_start_sec, glob_normmax, glob_max_minutes,
glob_next_display, glob_est_digits, glob_subiter_method, glob_html_log,
glob_min_good_digits, glob_good_digits, glob_min_apfp_est_good_digits,
glob_apfp_est_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug,
glob_display_flag, glob_djd_debug2, glob_h_reason, 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_not_yet_finished, glob_initial_pass,
glob_not_yet_start_msg, glob_reached_optimal_h, glob_optimal_done,
glob_type_given_pole, glob_optimize, glob_look_poles, glob_dump_closed_form,
glob_max_iter, glob_no_eqs, glob_unchanged_h_cnt, glob_warned, glob_warned2,
glob_start, glob_iter, array_const_1, array_const_0D0, array_const_2D0,
array_const_3D0, array_y_init, array_norms, array_fact_1,
array_1st_rel_error, array_last_rel_error, array_est_rel_error,
array_max_est_error, array_type_pole, array_type_real_pole,
array_type_complex_pole, array_est_digits, array_y, array_x, array_tmp0,
array_tmp1, array_tmp2, array_tmp3, array_tmp4_g, array_tmp4, array_tmp5,
array_m1, array_y_higher, array_y_higher_work, array_y_higher_work2,
array_y_set_initial, array_given_rad_poles, array_given_ord_poles,
array_rad_test_poles, array_ord_test_poles, array_fact_2, ATS_MAX_TERMS,
glob_last;
no_terms := ATS_MAX_TERMS;
hn_div_ho := glob__0_5;
hn_div_ho_2 := glob__0_25;
hn_div_ho_3 := glob__0_125;
est_tmp := c(float_abs(array_y[no_terms - 3]))
+ c(float_abs(array_y[no_terms - 2]))*c(hn_div_ho)
+ c(float_abs(array_y[no_terms - 1]))*c(hn_div_ho_2)
+ c(float_abs(array_y[no_terms]))*c(hn_div_ho_3);
if c(est_tmp) < glob_prec*c(float_abs(array_y[1])) then
est_tmp := c(glob_prec)*c(float_abs(array_y[1]))
end if;
if c(array_max_est_error[1]) <= c(est_tmp) then
array_max_est_error[1] := c(est_tmp)
end if
end proc
# End Function number 6
# Begin Function number 7
> reached_interval := proc()
> global
> ALWAYS,
> INFO,
> DEBUGL,
> DEBUGMASSIVE,
> glob_iolevel,
> glob_yes_pole,
> glob_no_pole,
> glob_not_given,
> glob_no_sing_tests,
> glob_ratio_test,
> glob_three_term_test,
> glob_six_term_test,
> glob_log_10,
#Top Generate Globals Decl
> MAX_UNCHANGED,
> glob__small,
> glob_small_float,
> glob_smallish_float,
> glob_large_float,
> glob_larger_float,
> glob__m2,
> glob__m1,
> glob__0,
> glob__1,
> glob__2,
> glob__3,
> glob__4,
> glob__5,
> glob__8,
> glob__10,
> glob__100,
> glob__pi,
> glob__0_5,
> glob__0_8,
> glob__m0_8,
> glob__0_25,
> glob__0_125,
> glob_prec,
> glob_check_sign,
> glob_desired_digits_correct,
> glob_max_estimated_step_error,
> glob_ratio_of_radius,
> glob_percent_done,
> glob_total_exp_sec,
> glob_optimal_expect_sec,
> glob_estimated_size_answer,
> glob_almost_1,
> glob_clock_sec,
> glob_clock_start_sec,
> glob_disp_incr,
> glob_h,
> glob_diff_rc_fm,
> glob_diff_rc_fmm1,
> glob_diff_rc_fmm2,
> glob_diff_ord_fm,
> glob_diff_ord_fmm1,
> glob_diff_ord_fmm2,
> glob_six_term_ord_save,
> glob_guess_error_rc,
> glob_guess_error_ord,
> glob_least_given_sing,
> glob_least_ratio_sing,
> glob_least_3_sing,
> glob_least_6_sing,
> glob_last_good_h,
> glob_max_h,
> glob_min_h,
> glob_display_interval,
> glob_abserr,
> glob_relerr,
> glob_min_pole_est,
> glob_max_rel_trunc_err,
> glob_max_trunc_err,
> glob_max_hours,
> glob_optimal_clock_start_sec,
> glob_optimal_start,
> glob_upper_ratio_limit,
> glob_lower_ratio_limit,
> glob_max_sec,
> glob_orig_start_sec,
> glob_normmax,
> glob_max_minutes,
> glob_next_display,
> glob_est_digits,
> glob_subiter_method,
> glob_html_log,
> glob_min_good_digits,
> glob_good_digits,
> glob_min_apfp_est_good_digits,
> glob_apfp_est_good_digits,
> glob_max_opt_iter,
> glob_dump,
> glob_djd_debug,
> glob_display_flag,
> glob_djd_debug2,
> glob_h_reason,
> 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_not_yet_finished,
> glob_initial_pass,
> glob_not_yet_start_msg,
> glob_reached_optimal_h,
> glob_optimal_done,
> glob_type_given_pole,
> glob_optimize,
> glob_look_poles,
> glob_dump_closed_form,
> glob_max_iter,
> glob_no_eqs,
> glob_unchanged_h_cnt,
> glob_warned,
> glob_warned2,
> glob_start,
> glob_iter,
#Bottom Generate Globals Decl
#BEGIN CONST
> array_const_1,
> array_const_0D0,
> array_const_2D0,
> array_const_3D0,
#END CONST
> array_y_init,
> array_norms,
> array_fact_1,
> array_1st_rel_error,
> array_last_rel_error,
> array_est_rel_error,
> array_max_est_error,
> array_type_pole,
> array_type_real_pole,
> array_type_complex_pole,
> array_est_digits,
> array_y,
> array_x,
> array_tmp0,
> array_tmp1,
> array_tmp2,
> array_tmp3,
> array_tmp4_g,
> array_tmp4,
> array_tmp5,
> array_m1,
> array_y_higher,
> array_y_higher_work,
> array_y_higher_work2,
> array_y_set_initial,
> array_given_rad_poles,
> array_given_ord_poles,
> array_rad_test_poles,
> array_ord_test_poles,
> array_fact_2,
> ATS_MAX_TERMS,
> glob_last;
> local ret;
> if ((glob_check_sign * array_x[1]) >= (glob_check_sign * glob_next_display - glob_h/glob__10)) then # if number 3
> ret := true;
> else
> ret := false;
> fi;# end if 3;
> return(ret);
> end;
reached_interval := proc()
local ret;
global ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, glob_iolevel, glob_yes_pole,
glob_no_pole, glob_not_given, glob_no_sing_tests, glob_ratio_test,
glob_three_term_test, glob_six_term_test, glob_log_10, MAX_UNCHANGED,
glob__small, glob_small_float, glob_smallish_float, glob_large_float,
glob_larger_float, glob__m2, glob__m1, glob__0, glob__1, glob__2, glob__3,
glob__4, glob__5, glob__8, glob__10, glob__100, glob__pi, glob__0_5,
glob__0_8, glob__m0_8, glob__0_25, glob__0_125, glob_prec, glob_check_sign,
glob_desired_digits_correct, glob_max_estimated_step_error,
glob_ratio_of_radius, glob_percent_done, glob_total_exp_sec,
glob_optimal_expect_sec, glob_estimated_size_answer, glob_almost_1,
glob_clock_sec, glob_clock_start_sec, glob_disp_incr, glob_h,
glob_diff_rc_fm, glob_diff_rc_fmm1, glob_diff_rc_fmm2, glob_diff_ord_fm,
glob_diff_ord_fmm1, glob_diff_ord_fmm2, glob_six_term_ord_save,
glob_guess_error_rc, glob_guess_error_ord, glob_least_given_sing,
glob_least_ratio_sing, glob_least_3_sing, glob_least_6_sing,
glob_last_good_h, glob_max_h, glob_min_h, glob_display_interval,
glob_abserr, glob_relerr, glob_min_pole_est, glob_max_rel_trunc_err,
glob_max_trunc_err, glob_max_hours, glob_optimal_clock_start_sec,
glob_optimal_start, glob_upper_ratio_limit, glob_lower_ratio_limit,
glob_max_sec, glob_orig_start_sec, glob_normmax, glob_max_minutes,
glob_next_display, glob_est_digits, glob_subiter_method, glob_html_log,
glob_min_good_digits, glob_good_digits, glob_min_apfp_est_good_digits,
glob_apfp_est_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug,
glob_display_flag, glob_djd_debug2, glob_h_reason, 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_not_yet_finished, glob_initial_pass,
glob_not_yet_start_msg, glob_reached_optimal_h, glob_optimal_done,
glob_type_given_pole, glob_optimize, glob_look_poles, glob_dump_closed_form,
glob_max_iter, glob_no_eqs, glob_unchanged_h_cnt, glob_warned, glob_warned2,
glob_start, glob_iter, array_const_1, array_const_0D0, array_const_2D0,
array_const_3D0, array_y_init, array_norms, array_fact_1,
array_1st_rel_error, array_last_rel_error, array_est_rel_error,
array_max_est_error, array_type_pole, array_type_real_pole,
array_type_complex_pole, array_est_digits, array_y, array_x, array_tmp0,
array_tmp1, array_tmp2, array_tmp3, array_tmp4_g, array_tmp4, array_tmp5,
array_m1, array_y_higher, array_y_higher_work, array_y_higher_work2,
array_y_set_initial, array_given_rad_poles, array_given_ord_poles,
array_rad_test_poles, array_ord_test_poles, array_fact_2, ATS_MAX_TERMS,
glob_last;
if glob_check_sign*glob_next_display - glob_h/glob__10 <=
glob_check_sign*array_x[1] then ret := true
else ret := false
end if;
return ret
end proc
# End Function number 7
# Begin Function number 8
> display_alot := proc(iter)
> global
> ALWAYS,
> INFO,
> DEBUGL,
> DEBUGMASSIVE,
> glob_iolevel,
> glob_yes_pole,
> glob_no_pole,
> glob_not_given,
> glob_no_sing_tests,
> glob_ratio_test,
> glob_three_term_test,
> glob_six_term_test,
> glob_log_10,
#Top Generate Globals Decl
> MAX_UNCHANGED,
> glob__small,
> glob_small_float,
> glob_smallish_float,
> glob_large_float,
> glob_larger_float,
> glob__m2,
> glob__m1,
> glob__0,
> glob__1,
> glob__2,
> glob__3,
> glob__4,
> glob__5,
> glob__8,
> glob__10,
> glob__100,
> glob__pi,
> glob__0_5,
> glob__0_8,
> glob__m0_8,
> glob__0_25,
> glob__0_125,
> glob_prec,
> glob_check_sign,
> glob_desired_digits_correct,
> glob_max_estimated_step_error,
> glob_ratio_of_radius,
> glob_percent_done,
> glob_total_exp_sec,
> glob_optimal_expect_sec,
> glob_estimated_size_answer,
> glob_almost_1,
> glob_clock_sec,
> glob_clock_start_sec,
> glob_disp_incr,
> glob_h,
> glob_diff_rc_fm,
> glob_diff_rc_fmm1,
> glob_diff_rc_fmm2,
> glob_diff_ord_fm,
> glob_diff_ord_fmm1,
> glob_diff_ord_fmm2,
> glob_six_term_ord_save,
> glob_guess_error_rc,
> glob_guess_error_ord,
> glob_least_given_sing,
> glob_least_ratio_sing,
> glob_least_3_sing,
> glob_least_6_sing,
> glob_last_good_h,
> glob_max_h,
> glob_min_h,
> glob_display_interval,
> glob_abserr,
> glob_relerr,
> glob_min_pole_est,
> glob_max_rel_trunc_err,
> glob_max_trunc_err,
> glob_max_hours,
> glob_optimal_clock_start_sec,
> glob_optimal_start,
> glob_upper_ratio_limit,
> glob_lower_ratio_limit,
> glob_max_sec,
> glob_orig_start_sec,
> glob_normmax,
> glob_max_minutes,
> glob_next_display,
> glob_est_digits,
> glob_subiter_method,
> glob_html_log,
> glob_min_good_digits,
> glob_good_digits,
> glob_min_apfp_est_good_digits,
> glob_apfp_est_good_digits,
> glob_max_opt_iter,
> glob_dump,
> glob_djd_debug,
> glob_display_flag,
> glob_djd_debug2,
> glob_h_reason,
> 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_not_yet_finished,
> glob_initial_pass,
> glob_not_yet_start_msg,
> glob_reached_optimal_h,
> glob_optimal_done,
> glob_type_given_pole,
> glob_optimize,
> glob_look_poles,
> glob_dump_closed_form,
> glob_max_iter,
> glob_no_eqs,
> glob_unchanged_h_cnt,
> glob_warned,
> glob_warned2,
> glob_start,
> glob_iter,
#Bottom Generate Globals Decl
#BEGIN CONST
> array_const_1,
> array_const_0D0,
> array_const_2D0,
> array_const_3D0,
#END CONST
> array_y_init,
> array_norms,
> array_fact_1,
> array_1st_rel_error,
> array_last_rel_error,
> array_est_rel_error,
> array_max_est_error,
> array_type_pole,
> array_type_real_pole,
> array_type_complex_pole,
> array_est_digits,
> array_y,
> array_x,
> array_tmp0,
> array_tmp1,
> array_tmp2,
> array_tmp3,
> array_tmp4_g,
> array_tmp4,
> array_tmp5,
> array_m1,
> array_y_higher,
> array_y_higher_work,
> array_y_higher_work2,
> array_y_set_initial,
> array_given_rad_poles,
> array_given_ord_poles,
> array_rad_test_poles,
> array_ord_test_poles,
> array_fact_2,
> ATS_MAX_TERMS,
> glob_last;
> local abserr, closed_form_val_y, ind_var, numeric_val, relerr, term_no, est_rel_err;
> #TOP DISPLAY ALOT
> if (reached_interval()) then # if number 3
> if (iter >= 0) then # if number 4
> ind_var := array_x[1];
> omniout_float(ALWAYS,"x[1] ",33,ind_var,20," ");
> closed_form_val_y := evalf(exact_soln_y(ind_var));
> omniout_float(ALWAYS,"y[1] (closed_form) ",33,closed_form_val_y,20," ");
> term_no := 1;
> numeric_val := array_y[term_no];
> abserr := float_abs(numeric_val - closed_form_val_y);
> omniout_float(ALWAYS,"y[1] (numeric) ",33,numeric_val,20," ");
> if (c(float_abs(closed_form_val_y)) > c(glob_prec)) then # if number 5
> relerr := abserr*glob__100/float_abs(closed_form_val_y);
> if (c(relerr) > c(glob_prec)) then # if number 6
> glob_good_digits := -int_trunc(log10(c(relerr))) + 3;
> else
> glob_good_digits := Digits;
> fi;# end if 6;
> else
> relerr := glob__m1 ;
> glob_good_digits := -16;
> fi;# end if 5;
> if (glob_good_digits < glob_min_good_digits) then # if number 5
> glob_min_good_digits := glob_good_digits;
> fi;# end if 5;
> if (glob_apfp_est_good_digits < glob_min_apfp_est_good_digits) then # if number 5
> glob_min_apfp_est_good_digits := glob_apfp_est_good_digits;
> fi;# end if 5;
> if (evalf(float_abs(numeric_val)) > glob_prec) then # if number 5
> est_rel_err := evalf(array_max_est_error[1]*100.0 * sqrt(glob_iter)*24*ATS_MAX_TERMS/float_abs(numeric_val));
> if (evalf(est_rel_err) > glob_prec) then # if number 6
> glob_est_digits := -int_trunc(log10(est_rel_err)) + 3;
> else
> glob_est_digits := Digits;
> fi;# end if 6;
> else
> relerr := glob__m1 ;
> glob_est_digits := -16;
> fi;# end if 5;
> array_est_digits[1] := glob_est_digits;
> if (glob_iter = 1) then # if number 5
> array_1st_rel_error[1] := relerr;
> else
> array_last_rel_error[1] := relerr;
> fi;# end if 5;
> array_est_rel_error[1] := est_rel_err;
> omniout_float(ALWAYS,"absolute error ",4,abserr,20," ");
> omniout_float(ALWAYS,"relative error ",4,relerr,20,"%");
> omniout_int(INFO,"Desired digits ",32,glob_desired_digits_correct,4," ");
> omniout_int(INFO,"Estimated correct digits ",32,glob_est_digits,4," ");
> omniout_int(INFO,"Correct digits ",32,glob_good_digits,4," ")
> ;
> omniout_float(ALWAYS,"h ",4,glob_h,20," ");
> fi;# end if 4;
> #BOTTOM DISPLAY ALOT
> fi;# end if 3;
> end;
display_alot := proc(iter)
local abserr, closed_form_val_y, ind_var, numeric_val, relerr, term_no,
est_rel_err;
global ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, glob_iolevel, glob_yes_pole,
glob_no_pole, glob_not_given, glob_no_sing_tests, glob_ratio_test,
glob_three_term_test, glob_six_term_test, glob_log_10, MAX_UNCHANGED,
glob__small, glob_small_float, glob_smallish_float, glob_large_float,
glob_larger_float, glob__m2, glob__m1, glob__0, glob__1, glob__2, glob__3,
glob__4, glob__5, glob__8, glob__10, glob__100, glob__pi, glob__0_5,
glob__0_8, glob__m0_8, glob__0_25, glob__0_125, glob_prec, glob_check_sign,
glob_desired_digits_correct, glob_max_estimated_step_error,
glob_ratio_of_radius, glob_percent_done, glob_total_exp_sec,
glob_optimal_expect_sec, glob_estimated_size_answer, glob_almost_1,
glob_clock_sec, glob_clock_start_sec, glob_disp_incr, glob_h,
glob_diff_rc_fm, glob_diff_rc_fmm1, glob_diff_rc_fmm2, glob_diff_ord_fm,
glob_diff_ord_fmm1, glob_diff_ord_fmm2, glob_six_term_ord_save,
glob_guess_error_rc, glob_guess_error_ord, glob_least_given_sing,
glob_least_ratio_sing, glob_least_3_sing, glob_least_6_sing,
glob_last_good_h, glob_max_h, glob_min_h, glob_display_interval,
glob_abserr, glob_relerr, glob_min_pole_est, glob_max_rel_trunc_err,
glob_max_trunc_err, glob_max_hours, glob_optimal_clock_start_sec,
glob_optimal_start, glob_upper_ratio_limit, glob_lower_ratio_limit,
glob_max_sec, glob_orig_start_sec, glob_normmax, glob_max_minutes,
glob_next_display, glob_est_digits, glob_subiter_method, glob_html_log,
glob_min_good_digits, glob_good_digits, glob_min_apfp_est_good_digits,
glob_apfp_est_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug,
glob_display_flag, glob_djd_debug2, glob_h_reason, 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_not_yet_finished, glob_initial_pass,
glob_not_yet_start_msg, glob_reached_optimal_h, glob_optimal_done,
glob_type_given_pole, glob_optimize, glob_look_poles, glob_dump_closed_form,
glob_max_iter, glob_no_eqs, glob_unchanged_h_cnt, glob_warned, glob_warned2,
glob_start, glob_iter, array_const_1, array_const_0D0, array_const_2D0,
array_const_3D0, array_y_init, array_norms, array_fact_1,
array_1st_rel_error, array_last_rel_error, array_est_rel_error,
array_max_est_error, array_type_pole, array_type_real_pole,
array_type_complex_pole, array_est_digits, array_y, array_x, array_tmp0,
array_tmp1, array_tmp2, array_tmp3, array_tmp4_g, array_tmp4, array_tmp5,
array_m1, array_y_higher, array_y_higher_work, array_y_higher_work2,
array_y_set_initial, array_given_rad_poles, array_given_ord_poles,
array_rad_test_poles, array_ord_test_poles, array_fact_2, ATS_MAX_TERMS,
glob_last;
if reached_interval() then
if 0 <= iter then
ind_var := array_x[1];
omniout_float(ALWAYS, "x[1] ", 33,
ind_var, 20, " ");
closed_form_val_y := evalf(exact_soln_y(ind_var));
omniout_float(ALWAYS, "y[1] (closed_form) ", 33,
closed_form_val_y, 20, " ");
term_no := 1;
numeric_val := array_y[term_no];
abserr := float_abs(numeric_val - closed_form_val_y);
omniout_float(ALWAYS, "y[1] (numeric) ", 33,
numeric_val, 20, " ");
if c(glob_prec) < c(float_abs(closed_form_val_y)) then
relerr := abserr*glob__100/float_abs(closed_form_val_y);
if c(glob_prec) < c(relerr) then
glob_good_digits := -int_trunc(log10(c(relerr))) + 3
else glob_good_digits := Digits
end if
else relerr := glob__m1; glob_good_digits := -16
end if;
if glob_good_digits < glob_min_good_digits then
glob_min_good_digits := glob_good_digits
end if;
if glob_apfp_est_good_digits < glob_min_apfp_est_good_digits
then glob_min_apfp_est_good_digits := glob_apfp_est_good_digits
end if;
if glob_prec < evalf(float_abs(numeric_val)) then
est_rel_err := evalf(array_max_est_error[1]*100.0*
sqrt(glob_iter)*24*ATS_MAX_TERMS/float_abs(numeric_val))
;
if glob_prec < evalf(est_rel_err) then
glob_est_digits := -int_trunc(log10(est_rel_err)) + 3
else glob_est_digits := Digits
end if
else relerr := glob__m1; glob_est_digits := -16
end if;
array_est_digits[1] := glob_est_digits;
if glob_iter = 1 then array_1st_rel_error[1] := relerr
else array_last_rel_error[1] := relerr
end if;
array_est_rel_error[1] := est_rel_err;
omniout_float(ALWAYS, "absolute error ", 4,
abserr, 20, " ");
omniout_float(ALWAYS, "relative error ", 4,
relerr, 20, "%");
omniout_int(INFO, "Desired digits ", 32,
glob_desired_digits_correct, 4, " ");
omniout_int(INFO, "Estimated correct digits ", 32,
glob_est_digits, 4, " ");
omniout_int(INFO, "Correct digits ", 32,
glob_good_digits, 4, " ");
omniout_float(ALWAYS, "h ", 4,
glob_h, 20, " ")
end if
end if
end proc
# End Function number 8
# Begin Function number 9
> prog_report := proc(x_start,x_end)
> global
> ALWAYS,
> INFO,
> DEBUGL,
> DEBUGMASSIVE,
> glob_iolevel,
> glob_yes_pole,
> glob_no_pole,
> glob_not_given,
> glob_no_sing_tests,
> glob_ratio_test,
> glob_three_term_test,
> glob_six_term_test,
> glob_log_10,
#Top Generate Globals Decl
> MAX_UNCHANGED,
> glob__small,
> glob_small_float,
> glob_smallish_float,
> glob_large_float,
> glob_larger_float,
> glob__m2,
> glob__m1,
> glob__0,
> glob__1,
> glob__2,
> glob__3,
> glob__4,
> glob__5,
> glob__8,
> glob__10,
> glob__100,
> glob__pi,
> glob__0_5,
> glob__0_8,
> glob__m0_8,
> glob__0_25,
> glob__0_125,
> glob_prec,
> glob_check_sign,
> glob_desired_digits_correct,
> glob_max_estimated_step_error,
> glob_ratio_of_radius,
> glob_percent_done,
> glob_total_exp_sec,
> glob_optimal_expect_sec,
> glob_estimated_size_answer,
> glob_almost_1,
> glob_clock_sec,
> glob_clock_start_sec,
> glob_disp_incr,
> glob_h,
> glob_diff_rc_fm,
> glob_diff_rc_fmm1,
> glob_diff_rc_fmm2,
> glob_diff_ord_fm,
> glob_diff_ord_fmm1,
> glob_diff_ord_fmm2,
> glob_six_term_ord_save,
> glob_guess_error_rc,
> glob_guess_error_ord,
> glob_least_given_sing,
> glob_least_ratio_sing,
> glob_least_3_sing,
> glob_least_6_sing,
> glob_last_good_h,
> glob_max_h,
> glob_min_h,
> glob_display_interval,
> glob_abserr,
> glob_relerr,
> glob_min_pole_est,
> glob_max_rel_trunc_err,
> glob_max_trunc_err,
> glob_max_hours,
> glob_optimal_clock_start_sec,
> glob_optimal_start,
> glob_upper_ratio_limit,
> glob_lower_ratio_limit,
> glob_max_sec,
> glob_orig_start_sec,
> glob_normmax,
> glob_max_minutes,
> glob_next_display,
> glob_est_digits,
> glob_subiter_method,
> glob_html_log,
> glob_min_good_digits,
> glob_good_digits,
> glob_min_apfp_est_good_digits,
> glob_apfp_est_good_digits,
> glob_max_opt_iter,
> glob_dump,
> glob_djd_debug,
> glob_display_flag,
> glob_djd_debug2,
> glob_h_reason,
> 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_not_yet_finished,
> glob_initial_pass,
> glob_not_yet_start_msg,
> glob_reached_optimal_h,
> glob_optimal_done,
> glob_type_given_pole,
> glob_optimize,
> glob_look_poles,
> glob_dump_closed_form,
> glob_max_iter,
> glob_no_eqs,
> glob_unchanged_h_cnt,
> glob_warned,
> glob_warned2,
> glob_start,
> glob_iter,
#Bottom Generate Globals Decl
#BEGIN CONST
> array_const_1,
> array_const_0D0,
> array_const_2D0,
> array_const_3D0,
#END CONST
> array_y_init,
> array_norms,
> array_fact_1,
> array_1st_rel_error,
> array_last_rel_error,
> array_est_rel_error,
> array_max_est_error,
> array_type_pole,
> array_type_real_pole,
> array_type_complex_pole,
> array_est_digits,
> array_y,
> array_x,
> array_tmp0,
> array_tmp1,
> array_tmp2,
> array_tmp3,
> array_tmp4_g,
> array_tmp4,
> array_tmp5,
> array_m1,
> array_y_higher,
> array_y_higher_work,
> array_y_higher_work2,
> array_y_set_initial,
> array_given_rad_poles,
> array_given_ord_poles,
> array_rad_test_poles,
> array_ord_test_poles,
> array_fact_2,
> ATS_MAX_TERMS,
> 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 := (clock_sec1) - (glob_orig_start_sec);
> glob_clock_sec := (clock_sec1) - (glob_clock_start_sec);
> left_sec := (glob_max_sec) + (glob_orig_start_sec) - (clock_sec1);
> expect_sec := comp_expect_sec((x_end),(x_start),(array_x[1]) + (glob_h) ,( clock_sec1) - (glob_orig_start_sec));
> opt_clock_sec := ( clock_sec1) - (glob_optimal_clock_start_sec);
> glob_optimal_expect_sec := comp_expect_sec((x_end),(x_start),(array_x[1]) +( glob_h) ,( opt_clock_sec));
> glob_total_exp_sec := glob_optimal_expect_sec + c(total_clock_sec);
> percent_done := comp_percent((x_end),(x_start),(array_x[1]) + (glob_h));
> glob_percent_done := percent_done;
> omniout_str_noeol(INFO,"Total Elapsed Time ");
> omniout_timestr((total_clock_sec));
> omniout_str_noeol(INFO,"Elapsed Time(since restart) ");
> omniout_timestr((glob_clock_sec));
> if (c(percent_done) < glob__100) then # if number 3
> omniout_str_noeol(INFO,"Expected Time Remaining ");
> omniout_timestr((expect_sec));
> omniout_str_noeol(INFO,"Optimized Time Remaining ");
> omniout_timestr((glob_optimal_expect_sec));
> omniout_str_noeol(INFO,"Expected Total Time ");
> omniout_timestr((glob_total_exp_sec));
> fi;# end if 3;
> omniout_str_noeol(INFO,"Time to Timeout ");
> omniout_timestr((left_sec));
> omniout_float(INFO, "Percent Done ",33,percent_done,4,"%");
> #BOTTOM PROGRESS REPORT
> end;
prog_report := proc(x_start, x_end)
local clock_sec, opt_clock_sec, clock_sec1, expect_sec, left_sec,
percent_done, total_clock_sec;
global ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, glob_iolevel, glob_yes_pole,
glob_no_pole, glob_not_given, glob_no_sing_tests, glob_ratio_test,
glob_three_term_test, glob_six_term_test, glob_log_10, MAX_UNCHANGED,
glob__small, glob_small_float, glob_smallish_float, glob_large_float,
glob_larger_float, glob__m2, glob__m1, glob__0, glob__1, glob__2, glob__3,
glob__4, glob__5, glob__8, glob__10, glob__100, glob__pi, glob__0_5,
glob__0_8, glob__m0_8, glob__0_25, glob__0_125, glob_prec, glob_check_sign,
glob_desired_digits_correct, glob_max_estimated_step_error,
glob_ratio_of_radius, glob_percent_done, glob_total_exp_sec,
glob_optimal_expect_sec, glob_estimated_size_answer, glob_almost_1,
glob_clock_sec, glob_clock_start_sec, glob_disp_incr, glob_h,
glob_diff_rc_fm, glob_diff_rc_fmm1, glob_diff_rc_fmm2, glob_diff_ord_fm,
glob_diff_ord_fmm1, glob_diff_ord_fmm2, glob_six_term_ord_save,
glob_guess_error_rc, glob_guess_error_ord, glob_least_given_sing,
glob_least_ratio_sing, glob_least_3_sing, glob_least_6_sing,
glob_last_good_h, glob_max_h, glob_min_h, glob_display_interval,
glob_abserr, glob_relerr, glob_min_pole_est, glob_max_rel_trunc_err,
glob_max_trunc_err, glob_max_hours, glob_optimal_clock_start_sec,
glob_optimal_start, glob_upper_ratio_limit, glob_lower_ratio_limit,
glob_max_sec, glob_orig_start_sec, glob_normmax, glob_max_minutes,
glob_next_display, glob_est_digits, glob_subiter_method, glob_html_log,
glob_min_good_digits, glob_good_digits, glob_min_apfp_est_good_digits,
glob_apfp_est_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug,
glob_display_flag, glob_djd_debug2, glob_h_reason, 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_not_yet_finished, glob_initial_pass,
glob_not_yet_start_msg, glob_reached_optimal_h, glob_optimal_done,
glob_type_given_pole, glob_optimize, glob_look_poles, glob_dump_closed_form,
glob_max_iter, glob_no_eqs, glob_unchanged_h_cnt, glob_warned, glob_warned2,
glob_start, glob_iter, array_const_1, array_const_0D0, array_const_2D0,
array_const_3D0, array_y_init, array_norms, array_fact_1,
array_1st_rel_error, array_last_rel_error, array_est_rel_error,
array_max_est_error, array_type_pole, array_type_real_pole,
array_type_complex_pole, array_est_digits, array_y, array_x, array_tmp0,
array_tmp1, array_tmp2, array_tmp3, array_tmp4_g, array_tmp4, array_tmp5,
array_m1, array_y_higher, array_y_higher_work, array_y_higher_work2,
array_y_set_initial, array_given_rad_poles, array_given_ord_poles,
array_rad_test_poles, array_ord_test_poles, array_fact_2, ATS_MAX_TERMS,
glob_last;
clock_sec1 := elapsed_time_seconds();
total_clock_sec := clock_sec1 - glob_orig_start_sec;
glob_clock_sec := clock_sec1 - glob_clock_start_sec;
left_sec := glob_max_sec + glob_orig_start_sec - clock_sec1;
expect_sec := comp_expect_sec(x_end, x_start, array_x[1] + glob_h,
clock_sec1 - glob_orig_start_sec);
opt_clock_sec := clock_sec1 - glob_optimal_clock_start_sec;
glob_optimal_expect_sec :=
comp_expect_sec(x_end, x_start, array_x[1] + glob_h, opt_clock_sec)
;
glob_total_exp_sec := glob_optimal_expect_sec + c(total_clock_sec);
percent_done := comp_percent(x_end, x_start, array_x[1] + glob_h);
glob_percent_done := percent_done;
omniout_str_noeol(INFO, "Total Elapsed Time ");
omniout_timestr(total_clock_sec);
omniout_str_noeol(INFO, "Elapsed Time(since restart) ");
omniout_timestr(glob_clock_sec);
if c(percent_done) < glob__100 then
omniout_str_noeol(INFO, "Expected Time Remaining ");
omniout_timestr(expect_sec);
omniout_str_noeol(INFO, "Optimized Time Remaining ");
omniout_timestr(glob_optimal_expect_sec);
omniout_str_noeol(INFO, "Expected Total Time ");
omniout_timestr(glob_total_exp_sec)
end if;
omniout_str_noeol(INFO, "Time to Timeout ");
omniout_timestr(left_sec);
omniout_float(INFO, "Percent Done ", 33,
percent_done, 4, "%")
end proc
# End Function number 9
# Begin Function number 10
> check_for_pole := proc()
> global
> ALWAYS,
> INFO,
> DEBUGL,
> DEBUGMASSIVE,
> glob_iolevel,
> glob_yes_pole,
> glob_no_pole,
> glob_not_given,
> glob_no_sing_tests,
> glob_ratio_test,
> glob_three_term_test,
> glob_six_term_test,
> glob_log_10,
#Top Generate Globals Decl
> MAX_UNCHANGED,
> glob__small,
> glob_small_float,
> glob_smallish_float,
> glob_large_float,
> glob_larger_float,
> glob__m2,
> glob__m1,
> glob__0,
> glob__1,
> glob__2,
> glob__3,
> glob__4,
> glob__5,
> glob__8,
> glob__10,
> glob__100,
> glob__pi,
> glob__0_5,
> glob__0_8,
> glob__m0_8,
> glob__0_25,
> glob__0_125,
> glob_prec,
> glob_check_sign,
> glob_desired_digits_correct,
> glob_max_estimated_step_error,
> glob_ratio_of_radius,
> glob_percent_done,
> glob_total_exp_sec,
> glob_optimal_expect_sec,
> glob_estimated_size_answer,
> glob_almost_1,
> glob_clock_sec,
> glob_clock_start_sec,
> glob_disp_incr,
> glob_h,
> glob_diff_rc_fm,
> glob_diff_rc_fmm1,
> glob_diff_rc_fmm2,
> glob_diff_ord_fm,
> glob_diff_ord_fmm1,
> glob_diff_ord_fmm2,
> glob_six_term_ord_save,
> glob_guess_error_rc,
> glob_guess_error_ord,
> glob_least_given_sing,
> glob_least_ratio_sing,
> glob_least_3_sing,
> glob_least_6_sing,
> glob_last_good_h,
> glob_max_h,
> glob_min_h,
> glob_display_interval,
> glob_abserr,
> glob_relerr,
> glob_min_pole_est,
> glob_max_rel_trunc_err,
> glob_max_trunc_err,
> glob_max_hours,
> glob_optimal_clock_start_sec,
> glob_optimal_start,
> glob_upper_ratio_limit,
> glob_lower_ratio_limit,
> glob_max_sec,
> glob_orig_start_sec,
> glob_normmax,
> glob_max_minutes,
> glob_next_display,
> glob_est_digits,
> glob_subiter_method,
> glob_html_log,
> glob_min_good_digits,
> glob_good_digits,
> glob_min_apfp_est_good_digits,
> glob_apfp_est_good_digits,
> glob_max_opt_iter,
> glob_dump,
> glob_djd_debug,
> glob_display_flag,
> glob_djd_debug2,
> glob_h_reason,
> 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_not_yet_finished,
> glob_initial_pass,
> glob_not_yet_start_msg,
> glob_reached_optimal_h,
> glob_optimal_done,
> glob_type_given_pole,
> glob_optimize,
> glob_look_poles,
> glob_dump_closed_form,
> glob_max_iter,
> glob_no_eqs,
> glob_unchanged_h_cnt,
> glob_warned,
> glob_warned2,
> glob_start,
> glob_iter,
#Bottom Generate Globals Decl
#BEGIN CONST
> array_const_1,
> array_const_0D0,
> array_const_2D0,
> array_const_3D0,
#END CONST
> array_y_init,
> array_norms,
> array_fact_1,
> array_1st_rel_error,
> array_last_rel_error,
> array_est_rel_error,
> array_max_est_error,
> array_type_pole,
> array_type_real_pole,
> array_type_complex_pole,
> array_est_digits,
> array_y,
> array_x,
> array_tmp0,
> array_tmp1,
> array_tmp2,
> array_tmp3,
> array_tmp4_g,
> array_tmp4,
> array_tmp5,
> array_m1,
> array_y_higher,
> array_y_higher_work,
> array_y_higher_work2,
> array_y_set_initial,
> array_given_rad_poles,
> array_given_ord_poles,
> array_rad_test_poles,
> array_ord_test_poles,
> array_fact_2,
> ATS_MAX_TERMS,
> glob_last;
> local cnt, dr1, dr2, ds1, ds2, hdrc, m, n, nr1, nr2, ord_no, term1, term2, term3, part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, rad_c, rcs, rm0, rm1, rm2, rm3, rm4, found_sing, h_new, ratio, term, local_test, tmp_rad,tmp_ord, tmp_ratio, prev_tmp_rad, last_no;
> #TOP CHECK FOR POLE
> tmp_rad := glob_larger_float;
> prev_tmp_rad := glob_larger_float;
> tmp_ratio := glob_larger_float;
> rad_c := glob_larger_float;
> array_rad_test_poles[1,1] := glob_larger_float;
> array_ord_test_poles[1,1] := glob_larger_float;
> found_sing := 1;
> last_no := ATS_MAX_TERMS - 1 - 10;
> cnt := 0;
> while (last_no < ATS_MAX_TERMS-3 and found_sing = 1) do # do number 1
> tmp_rad := comp_rad_from_ratio(array_y_higher[1,last_no-1],array_y_higher[1,last_no],last_no);
> if (float_abs(prev_tmp_rad) > glob__0) then # if number 3
> tmp_ratio := tmp_rad / prev_tmp_rad;
> else
> tmp_ratio := glob_large_float;
> fi;# end if 3;
> if ((cnt > 0 ) and (tmp_ratio < glob_upper_ratio_limit) and (tmp_ratio > glob_lower_ratio_limit)) then # if number 3
> rad_c := tmp_rad;
> elif
> (cnt = 0) then # if number 4
> rad_c := tmp_rad;
> elif
> (cnt > 0) then # if number 5
> found_sing := 0;
> fi;# end if 5;
> prev_tmp_rad := tmp_rad;;
> cnt := cnt + 1;
> last_no := last_no + 1;
> od;# end do number 1;
> if (found_sing = 1) then # if number 5
> if (rad_c < array_rad_test_poles[1,1]) then # if number 6
> array_rad_test_poles[1,1] := rad_c;
> last_no := last_no - 1;
> tmp_ord := comp_ord_from_ratio(array_y_higher[1,last_no-1],array_y_higher[1,last_no],last_no);
> array_rad_test_poles[1,1] := rad_c;
> array_ord_test_poles[1,1] := tmp_ord;
> fi;# end if 6;
> fi;# end if 5;
> #BOTTOM general radius test1
> tmp_rad := glob_larger_float;
> prev_tmp_rad := glob_larger_float;
> tmp_ratio := glob_larger_float;
> rad_c := glob_larger_float;
> array_rad_test_poles[1,2] := glob_larger_float;
> array_ord_test_poles[1,2] := glob_larger_float;
> found_sing := 1;
> last_no := ATS_MAX_TERMS - 1 - 10;
> cnt := 0;
> while (last_no < ATS_MAX_TERMS-4 and found_sing = 1) do # do number 1
> tmp_rad := comp_rad_from_three_terms(array_y_higher[1,last_no-2],array_y_higher[1,last_no-1],array_y_higher[1,last_no],last_no);
> if (float_abs(prev_tmp_rad) > glob__0) then # if number 5
> tmp_ratio := tmp_rad / prev_tmp_rad;
> else
> tmp_ratio := glob_large_float;
> fi;# end if 5;
> if ((cnt > 0 ) and (tmp_ratio < glob_upper_ratio_limit) and (tmp_ratio > glob_lower_ratio_limit)) then # if number 5
> rad_c := tmp_rad;
> elif
> (cnt = 0) then # if number 6
> rad_c := tmp_rad;
> elif
> (cnt > 0) then # if number 7
> found_sing := 0;
> fi;# end if 7;
> prev_tmp_rad := tmp_rad;;
> cnt := cnt + 1;
> last_no := last_no + 1;
> od;# end do number 1;
> if (found_sing = 1) then # if number 7
> if (rad_c < array_rad_test_poles[1,2]) then # if number 8
> array_rad_test_poles[1,2] := rad_c;
> last_no := last_no - 1;
> tmp_ord := comp_ord_from_three_terms(array_y_higher[1,last_no-2],array_y_higher[1,last_no-1],array_y_higher[1,last_no],last_no);
> array_rad_test_poles[1,2] := rad_c;
> if (rad_c < glob_min_pole_est) then # if number 9
> glob_min_pole_est := rad_c;
> fi;# end if 9;
> array_ord_test_poles[1,2] := tmp_ord;
> fi;# end if 8;
> fi;# end if 7;
> #BOTTOM general radius test1
> tmp_rad := glob_larger_float;
> prev_tmp_rad := glob_larger_float;
> tmp_ratio := glob_larger_float;
> rad_c := glob_larger_float;
> array_rad_test_poles[1,3] := glob_larger_float;
> array_ord_test_poles[1,3] := glob_larger_float;
> found_sing := 1;
> last_no := ATS_MAX_TERMS - 1 - 10;
> cnt := 0;
> while (last_no < ATS_MAX_TERMS-7 and found_sing = 1) do # do number 1
> tmp_rad := comp_rad_from_six_terms(array_y_higher[1,last_no-5],array_y_higher[1,last_no-4],array_y_higher[1,last_no-3],array_y_higher[1,last_no-2],array_y_higher[1,last_no-1],array_y_higher[1,last_no],last_no);
> if (float_abs(prev_tmp_rad) > glob__0) then # if number 7
> tmp_ratio := tmp_rad / prev_tmp_rad;
> else
> tmp_ratio := glob_large_float;
> fi;# end if 7;
> if ((cnt > 0 ) and (tmp_ratio < glob_upper_ratio_limit) and (tmp_ratio > glob_lower_ratio_limit)) then # if number 7
> rad_c := tmp_rad;
> elif
> (cnt = 0) then # if number 8
> rad_c := tmp_rad;
> elif
> (cnt > 0) then # if number 9
> found_sing := 0;
> fi;# end if 9;
> prev_tmp_rad := tmp_rad;;
> cnt := cnt + 1;
> last_no := last_no + 1;
> od;# end do number 1;
> if (found_sing = 1) then # if number 9
> if (rad_c < array_rad_test_poles[1,3]) then # if number 10
> array_rad_test_poles[1,3] := rad_c;
> last_no := last_no - 1;
> tmp_ord := comp_ord_from_six_terms(array_y_higher[1,last_no-5],array_y_higher[1,last_no-4],array_y_higher[1,last_no-3],array_y_higher[1,last_no-2],array_y_higher[1,last_no-1],array_y_higher[1,last_no],last_no);
> array_rad_test_poles[1,3] := rad_c;
> if (rad_c < glob_min_pole_est) then # if number 11
> glob_min_pole_est := rad_c;
> fi;# end if 11;
> array_ord_test_poles[1,3] := tmp_ord;
> fi;# end if 10;
> fi;# end if 9;
> #BOTTOM general radius test1
> #START ADJUST ALL SERIES
> if (float_abs(glob_min_pole_est) * glob_ratio_of_radius < float_abs(glob_h)) then # if number 9
> h_new := glob_check_sign * glob_min_pole_est * glob_ratio_of_radius;
> omniout_str(ALWAYS,"SETTING H FOR POLE");
> glob_h_reason := 6;
> if (glob_check_sign * glob_min_h > glob_check_sign * h_new) then # if number 10
> omniout_str(ALWAYS,"SETTING H FOR MIN H");
> h_new := glob_min_h;
> glob_h_reason := 5;
> fi;# end if 10;
> term := 1;
> ratio := c(1.0);
> while (term <= ATS_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 / float_abs(glob_h);
> term := term + 1;
> od;# end do number 1;
> glob_h := h_new;
> fi;# end if 9;
> #BOTTOM ADJUST ALL SERIES
> ;
> if (reached_interval()) then # if number 9
> display_poles();
> fi;# end if 9
> end;
check_for_pole := proc()
local cnt, dr1, dr2, ds1, ds2, hdrc, m, n, nr1, nr2, ord_no, term1, term2,
term3, part1, part2, part3, part4, part5, part6, part7, part8, part9,
part10, part11, part12, part13, part14, rad_c, rcs, rm0, rm1, rm2, rm3, rm4,
found_sing, h_new, ratio, term, local_test, tmp_rad, tmp_ord, tmp_ratio,
prev_tmp_rad, last_no;
global ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, glob_iolevel, glob_yes_pole,
glob_no_pole, glob_not_given, glob_no_sing_tests, glob_ratio_test,
glob_three_term_test, glob_six_term_test, glob_log_10, MAX_UNCHANGED,
glob__small, glob_small_float, glob_smallish_float, glob_large_float,
glob_larger_float, glob__m2, glob__m1, glob__0, glob__1, glob__2, glob__3,
glob__4, glob__5, glob__8, glob__10, glob__100, glob__pi, glob__0_5,
glob__0_8, glob__m0_8, glob__0_25, glob__0_125, glob_prec, glob_check_sign,
glob_desired_digits_correct, glob_max_estimated_step_error,
glob_ratio_of_radius, glob_percent_done, glob_total_exp_sec,
glob_optimal_expect_sec, glob_estimated_size_answer, glob_almost_1,
glob_clock_sec, glob_clock_start_sec, glob_disp_incr, glob_h,
glob_diff_rc_fm, glob_diff_rc_fmm1, glob_diff_rc_fmm2, glob_diff_ord_fm,
glob_diff_ord_fmm1, glob_diff_ord_fmm2, glob_six_term_ord_save,
glob_guess_error_rc, glob_guess_error_ord, glob_least_given_sing,
glob_least_ratio_sing, glob_least_3_sing, glob_least_6_sing,
glob_last_good_h, glob_max_h, glob_min_h, glob_display_interval,
glob_abserr, glob_relerr, glob_min_pole_est, glob_max_rel_trunc_err,
glob_max_trunc_err, glob_max_hours, glob_optimal_clock_start_sec,
glob_optimal_start, glob_upper_ratio_limit, glob_lower_ratio_limit,
glob_max_sec, glob_orig_start_sec, glob_normmax, glob_max_minutes,
glob_next_display, glob_est_digits, glob_subiter_method, glob_html_log,
glob_min_good_digits, glob_good_digits, glob_min_apfp_est_good_digits,
glob_apfp_est_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug,
glob_display_flag, glob_djd_debug2, glob_h_reason, 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_not_yet_finished, glob_initial_pass,
glob_not_yet_start_msg, glob_reached_optimal_h, glob_optimal_done,
glob_type_given_pole, glob_optimize, glob_look_poles, glob_dump_closed_form,
glob_max_iter, glob_no_eqs, glob_unchanged_h_cnt, glob_warned, glob_warned2,
glob_start, glob_iter, array_const_1, array_const_0D0, array_const_2D0,
array_const_3D0, array_y_init, array_norms, array_fact_1,
array_1st_rel_error, array_last_rel_error, array_est_rel_error,
array_max_est_error, array_type_pole, array_type_real_pole,
array_type_complex_pole, array_est_digits, array_y, array_x, array_tmp0,
array_tmp1, array_tmp2, array_tmp3, array_tmp4_g, array_tmp4, array_tmp5,
array_m1, array_y_higher, array_y_higher_work, array_y_higher_work2,
array_y_set_initial, array_given_rad_poles, array_given_ord_poles,
array_rad_test_poles, array_ord_test_poles, array_fact_2, ATS_MAX_TERMS,
glob_last;
tmp_rad := glob_larger_float;
prev_tmp_rad := glob_larger_float;
tmp_ratio := glob_larger_float;
rad_c := glob_larger_float;
array_rad_test_poles[1, 1] := glob_larger_float;
array_ord_test_poles[1, 1] := glob_larger_float;
found_sing := 1;
last_no := ATS_MAX_TERMS - 11;
cnt := 0;
while last_no < ATS_MAX_TERMS - 3 and found_sing = 1 do
tmp_rad := comp_rad_from_ratio(array_y_higher[1, last_no - 1],
array_y_higher[1, last_no], last_no);
if glob__0 < float_abs(prev_tmp_rad) then
tmp_ratio := tmp_rad/prev_tmp_rad
else tmp_ratio := glob_large_float
end if;
if 0 < cnt and tmp_ratio < glob_upper_ratio_limit and
glob_lower_ratio_limit < tmp_ratio then rad_c := tmp_rad
elif cnt = 0 then rad_c := tmp_rad
elif 0 < cnt then found_sing := 0
end if;
prev_tmp_rad := tmp_rad;
cnt := cnt + 1;
last_no := last_no + 1
end do;
if found_sing = 1 then
if rad_c < array_rad_test_poles[1, 1] then
array_rad_test_poles[1, 1] := rad_c;
last_no := last_no - 1;
tmp_ord := comp_ord_from_ratio(array_y_higher[1, last_no - 1],
array_y_higher[1, last_no], last_no);
array_rad_test_poles[1, 1] := rad_c;
array_ord_test_poles[1, 1] := tmp_ord
end if
end if;
tmp_rad := glob_larger_float;
prev_tmp_rad := glob_larger_float;
tmp_ratio := glob_larger_float;
rad_c := glob_larger_float;
array_rad_test_poles[1, 2] := glob_larger_float;
array_ord_test_poles[1, 2] := glob_larger_float;
found_sing := 1;
last_no := ATS_MAX_TERMS - 11;
cnt := 0;
while last_no < ATS_MAX_TERMS - 4 and found_sing = 1 do
tmp_rad := comp_rad_from_three_terms(
array_y_higher[1, last_no - 2], array_y_higher[1, last_no - 1],
array_y_higher[1, last_no], last_no);
if glob__0 < float_abs(prev_tmp_rad) then
tmp_ratio := tmp_rad/prev_tmp_rad
else tmp_ratio := glob_large_float
end if;
if 0 < cnt and tmp_ratio < glob_upper_ratio_limit and
glob_lower_ratio_limit < tmp_ratio then rad_c := tmp_rad
elif cnt = 0 then rad_c := tmp_rad
elif 0 < cnt then found_sing := 0
end if;
prev_tmp_rad := tmp_rad;
cnt := cnt + 1;
last_no := last_no + 1
end do;
if found_sing = 1 then
if rad_c < array_rad_test_poles[1, 2] then
array_rad_test_poles[1, 2] := rad_c;
last_no := last_no - 1;
tmp_ord := comp_ord_from_three_terms(
array_y_higher[1, last_no - 2],
array_y_higher[1, last_no - 1], array_y_higher[1, last_no],
last_no);
array_rad_test_poles[1, 2] := rad_c;
if rad_c < glob_min_pole_est then glob_min_pole_est := rad_c
end if;
array_ord_test_poles[1, 2] := tmp_ord
end if
end if;
tmp_rad := glob_larger_float;
prev_tmp_rad := glob_larger_float;
tmp_ratio := glob_larger_float;
rad_c := glob_larger_float;
array_rad_test_poles[1, 3] := glob_larger_float;
array_ord_test_poles[1, 3] := glob_larger_float;
found_sing := 1;
last_no := ATS_MAX_TERMS - 11;
cnt := 0;
while last_no < ATS_MAX_TERMS - 7 and found_sing = 1 do
tmp_rad := comp_rad_from_six_terms(array_y_higher[1, last_no - 5],
array_y_higher[1, last_no - 4], array_y_higher[1, last_no - 3],
array_y_higher[1, last_no - 2], array_y_higher[1, last_no - 1],
array_y_higher[1, last_no], last_no);
if glob__0 < float_abs(prev_tmp_rad) then
tmp_ratio := tmp_rad/prev_tmp_rad
else tmp_ratio := glob_large_float
end if;
if 0 < cnt and tmp_ratio < glob_upper_ratio_limit and
glob_lower_ratio_limit < tmp_ratio then rad_c := tmp_rad
elif cnt = 0 then rad_c := tmp_rad
elif 0 < cnt then found_sing := 0
end if;
prev_tmp_rad := tmp_rad;
cnt := cnt + 1;
last_no := last_no + 1
end do;
if found_sing = 1 then
if rad_c < array_rad_test_poles[1, 3] then
array_rad_test_poles[1, 3] := rad_c;
last_no := last_no - 1;
tmp_ord := comp_ord_from_six_terms(
array_y_higher[1, last_no - 5],
array_y_higher[1, last_no - 4],
array_y_higher[1, last_no - 3],
array_y_higher[1, last_no - 2],
array_y_higher[1, last_no - 1], array_y_higher[1, last_no],
last_no);
array_rad_test_poles[1, 3] := rad_c;
if rad_c < glob_min_pole_est then glob_min_pole_est := rad_c
end if;
array_ord_test_poles[1, 3] := tmp_ord
end if
end if;
if
float_abs(glob_min_pole_est)*glob_ratio_of_radius < float_abs(glob_h)
then
h_new := glob_check_sign*glob_min_pole_est*glob_ratio_of_radius;
omniout_str(ALWAYS, "SETTING H FOR POLE");
glob_h_reason := 6;
if glob_check_sign*h_new < glob_check_sign*glob_min_h then
omniout_str(ALWAYS, "SETTING H FOR MIN H");
h_new := glob_min_h;
glob_h_reason := 5
end if;
term := 1;
ratio := c(1.0);
while term <= ATS_MAX_TERMS do
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/float_abs(glob_h);
term := term + 1
end do;
glob_h := h_new
end if;
if reached_interval() then display_poles() end if
end proc
# End Function number 10
# Begin Function number 11
> atomall := proc()
> global
> ALWAYS,
> INFO,
> DEBUGL,
> DEBUGMASSIVE,
> glob_iolevel,
> glob_yes_pole,
> glob_no_pole,
> glob_not_given,
> glob_no_sing_tests,
> glob_ratio_test,
> glob_three_term_test,
> glob_six_term_test,
> glob_log_10,
#Top Generate Globals Decl
> MAX_UNCHANGED,
> glob__small,
> glob_small_float,
> glob_smallish_float,
> glob_large_float,
> glob_larger_float,
> glob__m2,
> glob__m1,
> glob__0,
> glob__1,
> glob__2,
> glob__3,
> glob__4,
> glob__5,
> glob__8,
> glob__10,
> glob__100,
> glob__pi,
> glob__0_5,
> glob__0_8,
> glob__m0_8,
> glob__0_25,
> glob__0_125,
> glob_prec,
> glob_check_sign,
> glob_desired_digits_correct,
> glob_max_estimated_step_error,
> glob_ratio_of_radius,
> glob_percent_done,
> glob_total_exp_sec,
> glob_optimal_expect_sec,
> glob_estimated_size_answer,
> glob_almost_1,
> glob_clock_sec,
> glob_clock_start_sec,
> glob_disp_incr,
> glob_h,
> glob_diff_rc_fm,
> glob_diff_rc_fmm1,
> glob_diff_rc_fmm2,
> glob_diff_ord_fm,
> glob_diff_ord_fmm1,
> glob_diff_ord_fmm2,
> glob_six_term_ord_save,
> glob_guess_error_rc,
> glob_guess_error_ord,
> glob_least_given_sing,
> glob_least_ratio_sing,
> glob_least_3_sing,
> glob_least_6_sing,
> glob_last_good_h,
> glob_max_h,
> glob_min_h,
> glob_display_interval,
> glob_abserr,
> glob_relerr,
> glob_min_pole_est,
> glob_max_rel_trunc_err,
> glob_max_trunc_err,
> glob_max_hours,
> glob_optimal_clock_start_sec,
> glob_optimal_start,
> glob_upper_ratio_limit,
> glob_lower_ratio_limit,
> glob_max_sec,
> glob_orig_start_sec,
> glob_normmax,
> glob_max_minutes,
> glob_next_display,
> glob_est_digits,
> glob_subiter_method,
> glob_html_log,
> glob_min_good_digits,
> glob_good_digits,
> glob_min_apfp_est_good_digits,
> glob_apfp_est_good_digits,
> glob_max_opt_iter,
> glob_dump,
> glob_djd_debug,
> glob_display_flag,
> glob_djd_debug2,
> glob_h_reason,
> 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_not_yet_finished,
> glob_initial_pass,
> glob_not_yet_start_msg,
> glob_reached_optimal_h,
> glob_optimal_done,
> glob_type_given_pole,
> glob_optimize,
> glob_look_poles,
> glob_dump_closed_form,
> glob_max_iter,
> glob_no_eqs,
> glob_unchanged_h_cnt,
> glob_warned,
> glob_warned2,
> glob_start,
> glob_iter,
#Bottom Generate Globals Decl
#BEGIN CONST
> array_const_1,
> array_const_0D0,
> array_const_2D0,
> array_const_3D0,
#END CONST
> array_y_init,
> array_norms,
> array_fact_1,
> array_1st_rel_error,
> array_last_rel_error,
> array_est_rel_error,
> array_max_est_error,
> array_type_pole,
> array_type_real_pole,
> array_type_complex_pole,
> array_est_digits,
> array_y,
> array_x,
> array_tmp0,
> array_tmp1,
> array_tmp2,
> array_tmp3,
> array_tmp4_g,
> array_tmp4,
> array_tmp5,
> array_m1,
> array_y_higher,
> array_y_higher_work,
> array_y_higher_work2,
> array_y_set_initial,
> array_given_rad_poles,
> array_given_ord_poles,
> array_rad_test_poles,
> array_ord_test_poles,
> array_fact_2,
> ATS_MAX_TERMS,
> glob_last;
> local kkk, order_d, adj2, adj3 , temporary, term;
> #TOP ATOMALL
> # before write maple main top matter
> # before generate constants assign
> # before generate globals assign
> #END OUTFILE1
> #BEGIN OUTFILE2
> #END OUTFILE2
> #BEGIN ATOMHDR1
> #emit pre mult CONST - LINEAR $eq_no = 1 i = 1
> array_tmp1[1] := array_const_2D0[1] * array_x[1];
> #emit pre add LINEAR - CONST $eq_no = 1 i = 1
> array_tmp2[1] := array_tmp1[1] + array_const_3D0[1];
> #emit pre sqrt 1 $eq_no = 1
> array_tmp3[1] := sqrt(array_tmp2[1]);
> array_tmp4_g[1] := cos(array_tmp3[1]);
> array_tmp4[1] := sin(array_tmp3[1]);
> #emit pre add CONST FULL $eq_no = 1 i = 1
> array_tmp5[1] := array_const_0D0[1] + array_tmp4[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 <= ATS_MAX_TERMS) then # if number 2
> temporary := c(array_tmp5[1]) * (expt((glob_h) , c(1))) * c(factorial_3(0,1));
> if (2 <= ATS_MAX_TERMS) then # if number 3
> array_y[2] := temporary;
> array_y_higher[1,2] := temporary;
> fi;# end if 3;
> temporary := c(temporary) / c(glob_h) * c(1);
> array_y_higher[2,1] := c(temporary);
> fi;# end if 2;
> fi;# end if 1;
> kkk := 2;
> #END ATOMHDR1
> #BEGIN ATOMHDR2
> #emit pre mult CONST - LINEAR $eq_no = 1 i = 2
> array_tmp1[2] := array_const_2D0[1] * array_x[2];
> #emit pre add LINEAR - CONST $eq_no = 1 i = 2
> array_tmp2[2] := array_tmp1[2];
> #emit pre sqrt 2 $eq_no = 1
> array_tmp3[2] := array_tmp2[2] / array_tmp3[1]/glob__2;
> #emit pre sin FULL $eq_no = 1
> array_tmp4_g[2] := (neg(att(1,array_tmp4,array_tmp3,1)));
> array_tmp4[2] := (att(1,array_tmp4_g,array_tmp3,1));
> #emit pre add CONST FULL $eq_no = 1 i = 2
> array_tmp5[2] := array_tmp4[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 <= ATS_MAX_TERMS) then # if number 2
> temporary := c(array_tmp5[2]) * (expt((glob_h) , c(1))) * c(factorial_3(1,2));
> if (3 <= ATS_MAX_TERMS) then # if number 3
> array_y[3] := temporary;
> array_y_higher[1,3] := temporary;
> fi;# end if 3;
> temporary := c(temporary) / c(glob_h) * c(2);
> array_y_higher[2,2] := c(temporary);
> fi;# end if 2;
> fi;# end if 1;
> kkk := 3;
> #END ATOMHDR2
> #BEGIN ATOMHDR3
> #emit pre sqrt ID_LINEAR iii = 3 $eq_no = 1
> array_tmp3[3] := 0;
> array_tmp3[3] := neg(ats(3,array_tmp3,array_tmp3,2)) / array_tmp3[1] /glob__2;
> #emit pre sin FULL $eq_no = 1
> array_tmp4_g[3] := (neg(att(2,array_tmp4,array_tmp3,1)));
> array_tmp4[3] := (att(2,array_tmp4_g,array_tmp3,1));
> #emit pre add CONST FULL $eq_no = 1 i = 3
> array_tmp5[3] := array_tmp4[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 <= ATS_MAX_TERMS) then # if number 2
> temporary := c(array_tmp5[3]) * (expt((glob_h) , c(1))) * c(factorial_3(2,3));
> if (4 <= ATS_MAX_TERMS) then # if number 3
> array_y[4] := temporary;
> array_y_higher[1,4] := temporary;
> fi;# end if 3;
> temporary := c(temporary) / c(glob_h) * c(3);
> array_y_higher[2,3] := c(temporary);
> fi;# end if 2;
> fi;# end if 1;
> kkk := 4;
> #END ATOMHDR3
> #BEGIN ATOMHDR4
> #emit pre sqrt ID_LINEAR iii = 4 $eq_no = 1
> array_tmp3[4] := 0;
> array_tmp3[4] := neg(ats(4,array_tmp3,array_tmp3,2)) / array_tmp3[1] /glob__2;
> #emit pre sin FULL $eq_no = 1
> array_tmp4_g[4] := (neg(att(3,array_tmp4,array_tmp3,1)));
> array_tmp4[4] := (att(3,array_tmp4_g,array_tmp3,1));
> #emit pre add CONST FULL $eq_no = 1 i = 4
> array_tmp5[4] := array_tmp4[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 <= ATS_MAX_TERMS) then # if number 2
> temporary := c(array_tmp5[4]) * (expt((glob_h) , c(1))) * c(factorial_3(3,4));
> if (5 <= ATS_MAX_TERMS) then # if number 3
> array_y[5] := temporary;
> array_y_higher[1,5] := temporary;
> fi;# end if 3;
> temporary := c(temporary) / c(glob_h) * c(4);
> array_y_higher[2,4] := c(temporary);
> fi;# end if 2;
> fi;# end if 1;
> kkk := 5;
> #END ATOMHDR4
> #BEGIN ATOMHDR5
> #emit pre sqrt ID_LINEAR iii = 5 $eq_no = 1
> array_tmp3[5] := 0;
> array_tmp3[5] := neg(ats(5,array_tmp3,array_tmp3,2)) / array_tmp3[1] /glob__2;
> #emit pre sin FULL $eq_no = 1
> array_tmp4_g[5] := (neg(att(4,array_tmp4,array_tmp3,1)));
> array_tmp4[5] := (att(4,array_tmp4_g,array_tmp3,1));
> #emit pre add CONST FULL $eq_no = 1 i = 5
> array_tmp5[5] := array_tmp4[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 <= ATS_MAX_TERMS) then # if number 2
> temporary := c(array_tmp5[5]) * (expt((glob_h) , c(1))) * c(factorial_3(4,5));
> if (6 <= ATS_MAX_TERMS) then # if number 3
> array_y[6] := temporary;
> array_y_higher[1,6] := temporary;
> fi;# end if 3;
> temporary := c(temporary) / c(glob_h) * c(5);
> array_y_higher[2,5] := c(temporary);
> fi;# end if 2;
> fi;# end if 1;
> kkk := 6;
> #END ATOMHDR5
> #BEGIN OUTFILE3
> #Top Atomall While Loop-- outfile3
> while (kkk <= ATS_MAX_TERMS) do # do number 1
> #END OUTFILE3
> #BEGIN OUTFILE4
> #emit sqrt LINEAR $eq_no = 1
> array_tmp3[kkk] := 0;
> array_tmp3[kkk] := neg(ats(kkk,array_tmp3,array_tmp3,2)) /array_tmp3[1] / glob__2;
> #emit sin FULL $eq_no = 1
> array_tmp4[kkk] := att(kkk-1,array_tmp4_g,array_tmp3,1);
> array_tmp4_g[kkk] := neg(att(kkk-1,array_tmp4,array_tmp3,1));
> #emit NOT FULL - FULL add $eq_no = 1
> array_tmp5[kkk] := array_tmp4[kkk];
> #emit assign $eq_no = 1
> order_d := 1;
> if (kkk + order_d <= ATS_MAX_TERMS) then # if number 1
> if ( not array_y_set_initial[1,kkk + order_d]) then # if number 2
> temporary := c(array_tmp5[kkk]) * expt((glob_h) , c(order_d)) * c(factorial_3((kkk - 1),(kkk + order_d - 1)));
> array_y[kkk + order_d] := c(temporary);
> array_y_higher[1,kkk + order_d] := c(temporary);
> term := kkk + order_d - 1;
> adj2 := kkk + order_d - 1;
> adj3 := 2;
> while ((term >= 1) and (term <= ATS_MAX_TERMS) and (adj3 < order_d + 1)) do # do number 1
> if (adj3 <= order_d + 1) then # if number 3
> if (adj2 > 0) then # if number 4
> temporary := c(temporary) / c(glob_h) * c(adj2);
> else
> temporary := c(temporary);
> fi;# end if 4;
> array_y_higher[adj3,term] := c(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;
atomall := proc()
local kkk, order_d, adj2, adj3, temporary, term;
global ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, glob_iolevel, glob_yes_pole,
glob_no_pole, glob_not_given, glob_no_sing_tests, glob_ratio_test,
glob_three_term_test, glob_six_term_test, glob_log_10, MAX_UNCHANGED,
glob__small, glob_small_float, glob_smallish_float, glob_large_float,
glob_larger_float, glob__m2, glob__m1, glob__0, glob__1, glob__2, glob__3,
glob__4, glob__5, glob__8, glob__10, glob__100, glob__pi, glob__0_5,
glob__0_8, glob__m0_8, glob__0_25, glob__0_125, glob_prec, glob_check_sign,
glob_desired_digits_correct, glob_max_estimated_step_error,
glob_ratio_of_radius, glob_percent_done, glob_total_exp_sec,
glob_optimal_expect_sec, glob_estimated_size_answer, glob_almost_1,
glob_clock_sec, glob_clock_start_sec, glob_disp_incr, glob_h,
glob_diff_rc_fm, glob_diff_rc_fmm1, glob_diff_rc_fmm2, glob_diff_ord_fm,
glob_diff_ord_fmm1, glob_diff_ord_fmm2, glob_six_term_ord_save,
glob_guess_error_rc, glob_guess_error_ord, glob_least_given_sing,
glob_least_ratio_sing, glob_least_3_sing, glob_least_6_sing,
glob_last_good_h, glob_max_h, glob_min_h, glob_display_interval,
glob_abserr, glob_relerr, glob_min_pole_est, glob_max_rel_trunc_err,
glob_max_trunc_err, glob_max_hours, glob_optimal_clock_start_sec,
glob_optimal_start, glob_upper_ratio_limit, glob_lower_ratio_limit,
glob_max_sec, glob_orig_start_sec, glob_normmax, glob_max_minutes,
glob_next_display, glob_est_digits, glob_subiter_method, glob_html_log,
glob_min_good_digits, glob_good_digits, glob_min_apfp_est_good_digits,
glob_apfp_est_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug,
glob_display_flag, glob_djd_debug2, glob_h_reason, 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_not_yet_finished, glob_initial_pass,
glob_not_yet_start_msg, glob_reached_optimal_h, glob_optimal_done,
glob_type_given_pole, glob_optimize, glob_look_poles, glob_dump_closed_form,
glob_max_iter, glob_no_eqs, glob_unchanged_h_cnt, glob_warned, glob_warned2,
glob_start, glob_iter, array_const_1, array_const_0D0, array_const_2D0,
array_const_3D0, array_y_init, array_norms, array_fact_1,
array_1st_rel_error, array_last_rel_error, array_est_rel_error,
array_max_est_error, array_type_pole, array_type_real_pole,
array_type_complex_pole, array_est_digits, array_y, array_x, array_tmp0,
array_tmp1, array_tmp2, array_tmp3, array_tmp4_g, array_tmp4, array_tmp5,
array_m1, array_y_higher, array_y_higher_work, array_y_higher_work2,
array_y_set_initial, array_given_rad_poles, array_given_ord_poles,
array_rad_test_poles, array_ord_test_poles, array_fact_2, ATS_MAX_TERMS,
glob_last;
array_tmp1[1] := array_const_2D0[1]*array_x[1];
array_tmp2[1] := array_tmp1[1] + array_const_3D0[1];
array_tmp3[1] := sqrt(array_tmp2[1]);
array_tmp4_g[1] := cos(array_tmp3[1]);
array_tmp4[1] := sin(array_tmp3[1]);
array_tmp5[1] := array_const_0D0[1] + array_tmp4[1];
if not array_y_set_initial[1, 2] then
if 1 <= ATS_MAX_TERMS then
temporary :=
c(array_tmp5[1])*expt(glob_h, c(1))*c(factorial_3(0, 1));
if 2 <= ATS_MAX_TERMS then
array_y[2] := temporary; array_y_higher[1, 2] := temporary
end if;
temporary := c(temporary)*c(1)/c(glob_h);
array_y_higher[2, 1] := c(temporary)
end if
end if;
kkk := 2;
array_tmp1[2] := array_const_2D0[1]*array_x[2];
array_tmp2[2] := array_tmp1[2];
array_tmp3[2] := array_tmp2[2]/(array_tmp3[1]*glob__2);
array_tmp4_g[2] := neg(att(1, array_tmp4, array_tmp3, 1));
array_tmp4[2] := att(1, array_tmp4_g, array_tmp3, 1);
array_tmp5[2] := array_tmp4[2];
if not array_y_set_initial[1, 3] then
if 2 <= ATS_MAX_TERMS then
temporary :=
c(array_tmp5[2])*expt(glob_h, c(1))*c(factorial_3(1, 2));
if 3 <= ATS_MAX_TERMS then
array_y[3] := temporary; array_y_higher[1, 3] := temporary
end if;
temporary := c(temporary)*c(2)/c(glob_h);
array_y_higher[2, 2] := c(temporary)
end if
end if;
kkk := 3;
array_tmp3[3] := 0;
array_tmp3[3] :=
neg(ats(3, array_tmp3, array_tmp3, 2))/(array_tmp3[1]*glob__2);
array_tmp4_g[3] := neg(att(2, array_tmp4, array_tmp3, 1));
array_tmp4[3] := att(2, array_tmp4_g, array_tmp3, 1);
array_tmp5[3] := array_tmp4[3];
if not array_y_set_initial[1, 4] then
if 3 <= ATS_MAX_TERMS then
temporary :=
c(array_tmp5[3])*expt(glob_h, c(1))*c(factorial_3(2, 3));
if 4 <= ATS_MAX_TERMS then
array_y[4] := temporary; array_y_higher[1, 4] := temporary
end if;
temporary := c(temporary)*c(3)/c(glob_h);
array_y_higher[2, 3] := c(temporary)
end if
end if;
kkk := 4;
array_tmp3[4] := 0;
array_tmp3[4] :=
neg(ats(4, array_tmp3, array_tmp3, 2))/(array_tmp3[1]*glob__2);
array_tmp4_g[4] := neg(att(3, array_tmp4, array_tmp3, 1));
array_tmp4[4] := att(3, array_tmp4_g, array_tmp3, 1);
array_tmp5[4] := array_tmp4[4];
if not array_y_set_initial[1, 5] then
if 4 <= ATS_MAX_TERMS then
temporary :=
c(array_tmp5[4])*expt(glob_h, c(1))*c(factorial_3(3, 4));
if 5 <= ATS_MAX_TERMS then
array_y[5] := temporary; array_y_higher[1, 5] := temporary
end if;
temporary := c(temporary)*c(4)/c(glob_h);
array_y_higher[2, 4] := c(temporary)
end if
end if;
kkk := 5;
array_tmp3[5] := 0;
array_tmp3[5] :=
neg(ats(5, array_tmp3, array_tmp3, 2))/(array_tmp3[1]*glob__2);
array_tmp4_g[5] := neg(att(4, array_tmp4, array_tmp3, 1));
array_tmp4[5] := att(4, array_tmp4_g, array_tmp3, 1);
array_tmp5[5] := array_tmp4[5];
if not array_y_set_initial[1, 6] then
if 5 <= ATS_MAX_TERMS then
temporary :=
c(array_tmp5[5])*expt(glob_h, c(1))*c(factorial_3(4, 5));
if 6 <= ATS_MAX_TERMS then
array_y[6] := temporary; array_y_higher[1, 6] := temporary
end if;
temporary := c(temporary)*c(5)/c(glob_h);
array_y_higher[2, 5] := c(temporary)
end if
end if;
kkk := 6;
while kkk <= ATS_MAX_TERMS do
array_tmp3[kkk] := 0;
array_tmp3[kkk] := neg(ats(kkk, array_tmp3, array_tmp3, 2))/(
array_tmp3[1]*glob__2);
array_tmp4[kkk] := att(kkk - 1, array_tmp4_g, array_tmp3, 1);
array_tmp4_g[kkk] := neg(att(kkk - 1, array_tmp4, array_tmp3, 1));
array_tmp5[kkk] := array_tmp4[kkk];
order_d := 1;
if kkk + order_d <= ATS_MAX_TERMS then
if not array_y_set_initial[1, kkk + order_d] then
temporary := c(array_tmp5[kkk])*expt(glob_h, c(order_d))*
c(factorial_3(kkk - 1, kkk + order_d - 1));
array_y[kkk + order_d] := c(temporary);
array_y_higher[1, kkk + order_d] := c(temporary);
term := kkk + order_d - 1;
adj2 := kkk + order_d - 1;
adj3 := 2;
while
1 <= term and term <= ATS_MAX_TERMS and adj3 < order_d + 1
do
if adj3 <= order_d + 1 then
if 0 < adj2 then
temporary := c(temporary)*c(adj2)/c(glob_h)
else temporary := c(temporary)
end if;
array_y_higher[adj3, term] := c(temporary)
end if;
term := term - 1;
adj2 := adj2 - 1;
adj3 := adj3 + 1
end do
end if
end if;
kkk := kkk + 1
end do
end proc
# End Function number 12
#END OUTFILE5
# Begin Function number 12
> main := proc()
> #BEGIN OUTFIEMAIN
> local d1,d2,d3,d4,est_err_2,niii,done_once,max_terms,display_max,
> term,ord,order_diff,term_no,html_log_file,iiif,jjjf,
> rows,r_order,sub_iter,calc_term,iii,temp_sum,current_iter,
> x_start,x_end
> ,it,last_min_pole_est, opt_iter, tmp,subiter, est_needed_step_err,estimated_step_error,min_value,est_answer,found_h,repeat_it;
> global
> ALWAYS,
> INFO,
> DEBUGL,
> DEBUGMASSIVE,
> glob_iolevel,
> glob_yes_pole,
> glob_no_pole,
> glob_not_given,
> glob_no_sing_tests,
> glob_ratio_test,
> glob_three_term_test,
> glob_six_term_test,
> glob_log_10,
> #Top Generate Globals Decl
> MAX_UNCHANGED,
> glob__small,
> glob_small_float,
> glob_smallish_float,
> glob_large_float,
> glob_larger_float,
> glob__m2,
> glob__m1,
> glob__0,
> glob__1,
> glob__2,
> glob__3,
> glob__4,
> glob__5,
> glob__8,
> glob__10,
> glob__100,
> glob__pi,
> glob__0_5,
> glob__0_8,
> glob__m0_8,
> glob__0_25,
> glob__0_125,
> glob_prec,
> glob_check_sign,
> glob_desired_digits_correct,
> glob_max_estimated_step_error,
> glob_ratio_of_radius,
> glob_percent_done,
> glob_total_exp_sec,
> glob_optimal_expect_sec,
> glob_estimated_size_answer,
> glob_almost_1,
> glob_clock_sec,
> glob_clock_start_sec,
> glob_disp_incr,
> glob_h,
> glob_diff_rc_fm,
> glob_diff_rc_fmm1,
> glob_diff_rc_fmm2,
> glob_diff_ord_fm,
> glob_diff_ord_fmm1,
> glob_diff_ord_fmm2,
> glob_six_term_ord_save,
> glob_guess_error_rc,
> glob_guess_error_ord,
> glob_least_given_sing,
> glob_least_ratio_sing,
> glob_least_3_sing,
> glob_least_6_sing,
> glob_last_good_h,
> glob_max_h,
> glob_min_h,
> glob_display_interval,
> glob_abserr,
> glob_relerr,
> glob_min_pole_est,
> glob_max_rel_trunc_err,
> glob_max_trunc_err,
> glob_max_hours,
> glob_optimal_clock_start_sec,
> glob_optimal_start,
> glob_upper_ratio_limit,
> glob_lower_ratio_limit,
> glob_max_sec,
> glob_orig_start_sec,
> glob_normmax,
> glob_max_minutes,
> glob_next_display,
> glob_est_digits,
> glob_subiter_method,
> glob_html_log,
> glob_min_good_digits,
> glob_good_digits,
> glob_min_apfp_est_good_digits,
> glob_apfp_est_good_digits,
> glob_max_opt_iter,
> glob_dump,
> glob_djd_debug,
> glob_display_flag,
> glob_djd_debug2,
> glob_h_reason,
> 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_not_yet_finished,
> glob_initial_pass,
> glob_not_yet_start_msg,
> glob_reached_optimal_h,
> glob_optimal_done,
> glob_type_given_pole,
> glob_optimize,
> glob_look_poles,
> glob_dump_closed_form,
> glob_max_iter,
> glob_no_eqs,
> glob_unchanged_h_cnt,
> glob_warned,
> glob_warned2,
> glob_start,
> glob_iter,
> #Bottom Generate Globals Decl
> #BEGIN CONST
> array_const_1,
> array_const_0D0,
> array_const_2D0,
> array_const_3D0,
> #END CONST
> array_y_init,
> array_norms,
> array_fact_1,
> array_1st_rel_error,
> array_last_rel_error,
> array_est_rel_error,
> array_max_est_error,
> array_type_pole,
> array_type_real_pole,
> array_type_complex_pole,
> array_est_digits,
> array_y,
> array_x,
> array_tmp0,
> array_tmp1,
> array_tmp2,
> array_tmp3,
> array_tmp4_g,
> array_tmp4,
> array_tmp5,
> array_m1,
> array_y_higher,
> array_y_higher_work,
> array_y_higher_work2,
> array_y_set_initial,
> array_given_rad_poles,
> array_given_ord_poles,
> array_rad_test_poles,
> array_ord_test_poles,
> array_fact_2,
> ATS_MAX_TERMS,
> glob_last;
> ATS_MAX_TERMS := 40;
> # before first input block
> #BEGIN FIRST INPUT BLOCK
> #BEGIN BLOCK 1
> #BEGIN FIRST INPUT BLOCK
> Digits:=32;
> max_terms:=40;
> #END BLOCK 1
> #END FIRST INPUT BLOCK
> #START OF INITS AFTER INPUT BLOCK
> glob_html_log := true;
> #END OF INITS AFTER INPUT BLOCK
> # before generate arrays
> array_y_init:= Array(0..(40),[]);
> array_norms:= Array(0..(40),[]);
> array_fact_1:= Array(0..(40),[]);
> array_1st_rel_error:= Array(0..(2),[]);
> array_last_rel_error:= Array(0..(2),[]);
> array_est_rel_error:= Array(0..(2),[]);
> array_max_est_error:= Array(0..(2),[]);
> array_type_pole:= Array(0..(2),[]);
> array_type_real_pole:= Array(0..(2),[]);
> array_type_complex_pole:= Array(0..(2),[]);
> array_est_digits:= Array(0..(2),[]);
> array_y:= Array(0..(40),[]);
> array_x:= Array(0..(40),[]);
> array_tmp0:= Array(0..(40),[]);
> array_tmp1:= Array(0..(40),[]);
> array_tmp2:= Array(0..(40),[]);
> array_tmp3:= Array(0..(40),[]);
> array_tmp4_g:= Array(0..(40),[]);
> array_tmp4:= Array(0..(40),[]);
> array_tmp5:= Array(0..(40),[]);
> array_m1:= Array(0..(40),[]);
> array_y_higher := Array(0..(2) ,(0..40+ 1),[]);
> array_y_higher_work := Array(0..(2) ,(0..40+ 1),[]);
> array_y_higher_work2 := Array(0..(2) ,(0..40+ 1),[]);
> array_y_set_initial := Array(0..(2) ,(0..40+ 1),[]);
> array_given_rad_poles := Array(0..(2) ,(0..3+ 1),[]);
> array_given_ord_poles := Array(0..(2) ,(0..3+ 1),[]);
> array_rad_test_poles := Array(0..(2) ,(0..4+ 1),[]);
> array_ord_test_poles := Array(0..(2) ,(0..4+ 1),[]);
> array_fact_2 := Array(0..(40) ,(0..40+ 1),[]);
> # before generate constants
> # before generate globals definition
> #Top Generate Globals Definition
> #Bottom Generate Globals Deninition
> # before generate const definition
> # before arrays initialized
> term := 1;
> while (term <= 40) do # do number 1
> array_y_init[term] := c(0.0);
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 40) do # do number 1
> array_norms[term] := c(0.0);
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 40) do # do number 1
> array_fact_1[term] := c(0.0);
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 2) do # do number 1
> array_1st_rel_error[term] := c(0.0);
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 2) do # do number 1
> array_last_rel_error[term] := c(0.0);
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 2) do # do number 1
> array_est_rel_error[term] := c(0.0);
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 2) do # do number 1
> array_max_est_error[term] := c(0.0);
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 2) do # do number 1
> array_type_pole[term] := 0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 2) do # do number 1
> array_type_real_pole[term] := 0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 2) do # do number 1
> array_type_complex_pole[term] := 0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 2) do # do number 1
> array_est_digits[term] := 0;
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 40) do # do number 1
> array_y[term] := c(0.0);
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 40) do # do number 1
> array_x[term] := c(0.0);
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 40) do # do number 1
> array_tmp0[term] := c(0.0);
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 40) do # do number 1
> array_tmp1[term] := c(0.0);
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 40) do # do number 1
> array_tmp2[term] := c(0.0);
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 40) do # do number 1
> array_tmp3[term] := c(0.0);
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 40) do # do number 1
> array_tmp4_g[term] := c(0.0);
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 40) do # do number 1
> array_tmp4[term] := c(0.0);
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 40) do # do number 1
> array_tmp5[term] := c(0.0);
> term := term + 1;
> od;# end do number 1;
> term := 1;
> while (term <= 40) do # do number 1
> array_m1[term] := c(0.0);
> term := term + 1;
> od;# end do number 1;
> ord := 1;
> while (ord <=2) do # do number 1
> term := 1;
> while (term <= 40) do # do number 2
> array_y_higher[ord,term] := c(0.0);
> term := term + 1;
> od;# end do number 2;
> ord := ord + 1;
> od;# end do number 1;
> ord := 1;
> while (ord <=2) do # do number 1
> term := 1;
> while (term <= 40) do # do number 2
> array_y_higher_work[ord,term] := c(0.0);
> term := term + 1;
> od;# end do number 2;
> ord := ord + 1;
> od;# end do number 1;
> ord := 1;
> while (ord <=2) do # do number 1
> term := 1;
> while (term <= 40) do # do number 2
> array_y_higher_work2[ord,term] := c(0.0);
> term := term + 1;
> od;# end do number 2;
> ord := ord + 1;
> od;# end do number 1;
> ord := 1;
> while (ord <=2) do # do number 1
> term := 1;
> while (term <= 40) do # do number 2
> array_y_set_initial[ord,term] := c(0.0);
> term := term + 1;
> od;# end do number 2;
> ord := ord + 1;
> od;# end do number 1;
> ord := 1;
> while (ord <=2) do # do number 1
> term := 1;
> while (term <= 3) do # do number 2
> array_given_rad_poles[ord,term] := c(0.0);
> term := term + 1;
> od;# end do number 2;
> ord := ord + 1;
> od;# end do number 1;
> ord := 1;
> while (ord <=2) do # do number 1
> term := 1;
> while (term <= 3) do # do number 2
> array_given_ord_poles[ord,term] := c(0.0);
> term := term + 1;
> od;# end do number 2;
> ord := ord + 1;
> od;# end do number 1;
> ord := 1;
> while (ord <=2) do # do number 1
> term := 1;
> while (term <= 4) do # do number 2
> array_rad_test_poles[ord,term] := c(0.0);
> term := term + 1;
> od;# end do number 2;
> ord := ord + 1;
> od;# end do number 1;
> ord := 1;
> while (ord <=2) do # do number 1
> term := 1;
> while (term <= 4) do # do number 2
> array_ord_test_poles[ord,term] := c(0.0);
> term := term + 1;
> od;# end do number 2;
> ord := ord + 1;
> od;# end do number 1;
> ord := 1;
> while (ord <=40) do # do number 1
> term := 1;
> while (term <= 40) do # do number 2
> array_fact_2[ord,term] := c(0.0);
> term := term + 1;
> od;# end do number 2;
> ord := ord + 1;
> od;# end do number 1;
> # before symbols initialized
> #BEGIN SYMBOLS INITIALIZATED
> zero_ats_ar(array_y);
> zero_ats_ar(array_x);
> zero_ats_ar(array_tmp0);
> zero_ats_ar(array_tmp1);
> zero_ats_ar(array_tmp2);
> zero_ats_ar(array_tmp3);
> zero_ats_ar(array_tmp4_g);
> zero_ats_ar(array_tmp4);
> zero_ats_ar(array_tmp5);
> zero_ats_ar(array_m1);
> zero_ats_ar(array_const_1);
> array_const_1[1] := c(1);
> zero_ats_ar(array_const_0D0);
> array_const_0D0[1] := c(0.0);
> zero_ats_ar(array_const_2D0);
> array_const_2D0[1] := c(2.0);
> zero_ats_ar(array_const_3D0);
> array_const_3D0[1] := c(3.0);
> zero_ats_ar(array_m1);
> array_m1[1] := glob__m1;
> #END SYMBOLS INITIALIZATED
> # before generate factorials init
> #Initing Factorial Tables
> iiif := 0;
> while (iiif <= ATS_MAX_TERMS) do # do number 1
> jjjf := 0;
> while (jjjf <= ATS_MAX_TERMS) do # do number 2
> array_fact_1[iiif] := 0;
> array_fact_2[iiif,jjjf] := 0;
> jjjf := jjjf + 1;
> od;# end do number 2;
> iiif := iiif + 1;
> od;# end do number 1;
> #Done Initing Factorial Table
> ALWAYS := 1;
> INFO := 2;
> DEBUGL := 3;
> DEBUGMASSIVE := 4;
> glob_iolevel := 5;
> glob_yes_pole := 4;
> glob_no_pole := 3;
> glob_not_given := 0;
> glob_no_sing_tests := 4;
> glob_ratio_test := 1;
> glob_three_term_test := 2;
> glob_six_term_test := 3;
> glob_log_10 := log(c(10.0));
> MAX_UNCHANGED := 10;
> glob__small := c(0.1e-50);
> glob_small_float := c(0.1e-50);
> glob_smallish_float := c(0.1e-60);
> glob_large_float := c(1.0e100);
> glob_larger_float := c(1.1e100);
> glob__m2 := c(-2);
> glob__m1 := c(-1);
> glob__0 := c(0);
> glob__1 := c(1);
> glob__2 := c(2);
> glob__3 := c(3);
> glob__4 := c(4);
> glob__5 := c(5);
> glob__8 := c(8);
> glob__10 := c(10);
> glob__100 := c(100);
> glob__pi := c(0.0);
> glob__0_5 := c(0.5);
> glob__0_8 := c(0.8);
> glob__m0_8 := c(-0.8);
> glob__0_25 := c(0.25);
> glob__0_125 := c(0.125);
> glob_prec := c(1.0e-16);
> glob_check_sign := c(1.0);
> glob_desired_digits_correct := c(8.0);
> glob_max_estimated_step_error := c(0.0);
> glob_ratio_of_radius := c(0.1);
> glob_percent_done := c(0.0);
> glob_total_exp_sec := c(0.1);
> glob_optimal_expect_sec := c(0.1);
> glob_estimated_size_answer := c(100.0);
> glob_almost_1 := c(0.9990);
> glob_clock_sec := c(0.0);
> glob_clock_start_sec := c(0.0);
> glob_disp_incr := c(0.1);
> glob_h := c(0.1);
> glob_diff_rc_fm := c(0.1);
> glob_diff_rc_fmm1 := c(0.1);
> glob_diff_rc_fmm2 := c(0.1);
> glob_diff_ord_fm := c(0.1);
> glob_diff_ord_fmm1 := c(0.1);
> glob_diff_ord_fmm2 := c(0.1);
> glob_six_term_ord_save := c(0.1);
> glob_guess_error_rc := c(0.1);
> glob_guess_error_ord := c(0.1);
> glob_least_given_sing := c(9.9e200);
> glob_least_ratio_sing := c(9.9e200);
> glob_least_3_sing := c(9.9e100);
> glob_least_6_sing := c(9.9e100);
> glob_last_good_h := c(0.1);
> glob_max_h := c(0.1);
> glob_min_h := c(0.000001);
> glob_display_interval := c(0.1);
> glob_abserr := c(0.1e-10);
> glob_relerr := c(0.1e-10);
> glob_min_pole_est := c(0.1e+10);
> glob_max_rel_trunc_err := c(0.1e-10);
> glob_max_trunc_err := c(0.1e-10);
> glob_max_hours := c(0.0);
> glob_optimal_clock_start_sec := c(0.0);
> glob_optimal_start := c(0.0);
> glob_upper_ratio_limit := c(1.0001);
> glob_lower_ratio_limit := c(0.9999);
> glob_max_sec := c(10000.0);
> glob_orig_start_sec := c(0.0);
> glob_normmax := c(0.0);
> glob_max_minutes := c(0.0);
> glob_next_display := c(0.0);
> glob_est_digits := 1;
> glob_subiter_method := 3;
> glob_html_log := true;
> glob_min_good_digits := 99999;
> glob_good_digits := 0;
> glob_min_apfp_est_good_digits := 99999;
> glob_apfp_est_good_digits := 0;
> glob_max_opt_iter := 10;
> glob_dump := false;
> glob_djd_debug := true;
> glob_display_flag := true;
> glob_djd_debug2 := true;
> glob_h_reason := 0;
> glob_sec_in_minute := 60 ;
> glob_min_in_hour := 60;
> glob_hours_in_day := 24;
> glob_days_in_year := 365;
> glob_sec_in_hour := 3600;
> glob_sec_in_day := 86400;
> glob_sec_in_year := 31536000;
> glob_not_yet_finished := true;
> glob_initial_pass := true;
> glob_not_yet_start_msg := true;
> glob_reached_optimal_h := false;
> glob_optimal_done := false;
> glob_type_given_pole := 0;
> glob_optimize := false;
> glob_look_poles := false;
> glob_dump_closed_form := false;
> glob_max_iter := 1000;
> glob_no_eqs := 0;
> glob_unchanged_h_cnt := 0;
> glob_warned := false;
> glob_warned2 := false;
> glob_start := 0;
> glob_iter := 0;
> # before generate set diff initial
> 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;
> array_y_set_initial[1,31] := false;
> array_y_set_initial[1,32] := false;
> array_y_set_initial[1,33] := false;
> array_y_set_initial[1,34] := false;
> array_y_set_initial[1,35] := false;
> array_y_set_initial[1,36] := false;
> array_y_set_initial[1,37] := false;
> array_y_set_initial[1,38] := false;
> array_y_set_initial[1,39] := false;
> array_y_set_initial[1,40] := false;
> # before generate init omniout const
> ALWAYS := 1;
> INFO := 2;
> DEBUGL := 3;
> DEBUGMASSIVE := 4;
> ATS_MAX_TERMS := 40;
> glob_iolevel := INFO;
> # set default block
> #Write Set Defaults
> glob_orig_start_sec := elapsed_time_seconds();
> 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/sin_sqrt_linpostode.ode#################");
> omniout_str(ALWAYS,"diff ( y , x , 1 ) = sin ( sqrt ( 2.0 * x + 3.0 ) ) ; ");
> omniout_str(ALWAYS,"!");
> omniout_str(ALWAYS,"#BEGIN FIRST INPUT BLOCK");
> omniout_str(ALWAYS,"Digits:=32;");
> omniout_str(ALWAYS,"max_terms:=40;");
> omniout_str(ALWAYS,"!");
> omniout_str(ALWAYS,"#END FIRST INPUT BLOCK");
> omniout_str(ALWAYS,"#BEGIN SECOND INPUT BLOCK");
> omniout_str(ALWAYS,"x_start := c(2.0);");
> omniout_str(ALWAYS,"x_end := c(3.0) ;");
> omniout_str(ALWAYS,"array_y_init[0 + 1] := exact_soln_y(x_start);");
> omniout_str(ALWAYS,"glob_look_poles := true;");
> omniout_str(ALWAYS,"glob_max_h := c(0.0001);");
> omniout_str(ALWAYS,"glob_upper_ratio_limit := c(1.001);");
> omniout_str(ALWAYS,"glob_lower_ratio_limit := c(0.999);");
> omniout_str(ALWAYS,"");
> omniout_str(ALWAYS,"");
> omniout_str(ALWAYS,"");
> omniout_str(ALWAYS,"");
> omniout_str(ALWAYS,"");
> omniout_str(ALWAYS,"");
> omniout_str(ALWAYS,"");
> omniout_str(ALWAYS,"");
> omniout_str(ALWAYS,"glob_type_given_pole := 1;");
> omniout_str(ALWAYS,"");
> omniout_str(ALWAYS,"array_given_rad_poles[1,1] := c(-1.5);");
> omniout_str(ALWAYS,"");
> omniout_str(ALWAYS,"array_given_rad_poles[1,2] := c(0.0);");
> omniout_str(ALWAYS,"");
> omniout_str(ALWAYS,"array_given_ord_poles[1,1] := c(0.5);");
> omniout_str(ALWAYS,"");
> omniout_str(ALWAYS,"array_given_ord_poles[1,2] := c(0.0);");
> omniout_str(ALWAYS,"");
> omniout_str(ALWAYS,"#END SECOND INPUT BLOCK");
> omniout_str(ALWAYS,"#BEGIN OVERRIDE BLOCK");
> omniout_str(ALWAYS,"glob_desired_digits_correct:=8;");
> omniout_str(ALWAYS,"glob_max_minutes:=(3.0);");
> omniout_str(ALWAYS,"glob_subiter_method:=3;");
> omniout_str(ALWAYS,"glob_max_iter:=100000;");
> omniout_str(ALWAYS,"glob_upper_ratio_limit:=c(1.000001);");
> omniout_str(ALWAYS,"glob_lower_ratio_limit:=c(0.999999);");
> omniout_str(ALWAYS,"glob_look_poles:=true;");
> omniout_str(ALWAYS,"glob_h:=c(0.001);");
> omniout_str(ALWAYS,"glob_display_interval:=c(0.01);");
> 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,"");
> omniout_str(ALWAYS,"return(sin(sqrt(c(2.0)*c(x)+c(3.0)))-sqrt(c(2.0)*c(x)+c(3.0))*cos(sqrt(c(2.0)*c(x)+c(3.0))));");
> omniout_str(ALWAYS,"end;");
> 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 := glob__0;
> glob_smallish_float := glob__0;
> glob_large_float := c(1.0e100);
> glob_larger_float := c( 1.1e100);
> glob_almost_1 := c( 0.99);
> # before second block
> #TOP SECOND INPUT BLOCK
> #BEGIN SECOND INPUT BLOCK
> #BEGIN BLOCK 2
> #END FIRST INPUT BLOCK
> #BEGIN SECOND INPUT BLOCK
> x_start := c(2.0);
> x_end := c(3.0) ;
> array_y_init[0 + 1] := exact_soln_y(x_start);
> glob_look_poles := true;
> glob_max_h := c(0.0001);
> glob_upper_ratio_limit := c(1.001);
> glob_lower_ratio_limit := c(0.999);
> glob_type_given_pole := 1;
> array_given_rad_poles[1,1] := c(-1.5);
> array_given_rad_poles[1,2] := c(0.0);
> array_given_ord_poles[1,1] := c(0.5);
> array_given_ord_poles[1,2] := c(0.0);
> #END SECOND INPUT BLOCK
> #BEGIN OVERRIDE BLOCK
> glob_desired_digits_correct:=8;
> glob_max_minutes:=(3.0);
> glob_subiter_method:=3;
> glob_max_iter:=100000;
> glob_upper_ratio_limit:=c(1.000001);
> glob_lower_ratio_limit:=c(0.999999);
> glob_look_poles:=true;
> glob_h:=c(0.001);
> glob_display_interval:=c(0.01);
> #END OVERRIDE BLOCK
> #END BLOCK 2
> #END SECOND INPUT BLOCK
> #BEGIN INITS AFTER SECOND INPUT BLOCK
> glob_last_good_h := glob_h;
> glob_max_sec := (60.0) * (glob_max_minutes) + (3600.0) * (glob_max_hours);
> # after second input block
> glob_check_sign := c(my_check_sign(x_start,x_end));
> glob__pi := arccos(glob__m1);
> glob_prec = expt(10.0,c(-Digits));
> if (glob_optimize) then # if number 9
> #BEGIN OPTIMIZE CODE
> omniout_str(ALWAYS,"START of Optimize");
> #Start Series -- INITIALIZE FOR OPTIMIZE
> found_h := false;
> glob_min_pole_est := glob_larger_float;
> last_min_pole_est := glob_larger_float;
> glob_least_given_sing := glob_larger_float;
> glob_least_ratio_sing := glob_larger_float;
> glob_least_3_sing := glob_larger_float;
> glob_least_6_sing := glob_larger_float;
> glob_min_h := float_abs(glob_min_h) * glob_check_sign;
> glob_max_h := float_abs(glob_max_h) * glob_check_sign;
> glob_h := float_abs(glob_min_h) * glob_check_sign;
> glob_display_interval := c((float_abs(c(glob_display_interval))) * (glob_check_sign));
> display_max := c(x_end) - c(x_start)/glob__10;
> if ((glob_display_interval) > (display_max)) then # if number 10
> glob_display_interval := c(display_max);
> fi;# end if 10;
> chk_data();
> min_value := glob_larger_float;
> est_answer := est_size_answer();
> opt_iter := 1;
> est_needed_step_err := estimated_needed_step_error(x_start,x_end,glob_h,est_answer);
> omniout_float(ALWAYS,"est_needed_step_err",32,est_needed_step_err,16,"");
> estimated_step_error := glob_small_float;
> while ((opt_iter <= 100) and ( not found_h)) do # do number 1
> omniout_int(ALWAYS,"opt_iter",32,opt_iter,4,"");
> array_x[1] := c(x_start);
> array_x[2] := c(glob_h);
> glob_next_display := c(x_start);
> 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] * expt(glob_h , c(term_no - 1)) / c(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;
> if (term_no < ATS_MAX_TERMS) then # if number 10
> array_y_higher[r_order,term_no] := array_y_init[it]* expt(glob_h , c(term_no - 1)) / (c(factorial_1(term_no - 1)));
> fi;# end if 10;
> term_no := term_no + 1;
> od;# end do number 3;
> r_order := r_order + 1;
> od;# end do number 2
> ;
> atomall();
> if (glob_check_sign * glob_min_h >= glob_check_sign * glob_h) then # if number 10
> omniout_str(ALWAYS,"SETTING H FOR MIN H");
> glob_h := glob_check_sign * float_abs(glob_min_h);
> glob_h_reason := 1;
> found_h := true;
> fi;# end if 10;
> if (glob_check_sign * glob_display_interval <= glob_check_sign * glob_h) then # if number 10
> omniout_str(ALWAYS,"SETTING H FOR DISPLAY INTERVAL");
> glob_h_reason := 2;
> glob_h := glob_display_interval;
> found_h := true;
> fi;# end if 10;
> if (glob_look_poles) then # if number 10
> check_for_pole();
> fi;# end if 10;
> if ( not found_h) then # if number 10
> est_answer := est_size_answer();
> est_needed_step_err := estimated_needed_step_error(x_start,x_end,glob_h,est_answer);
> omniout_float(ALWAYS,"est_needed_step_err",32,est_needed_step_err,16,"");
> estimated_step_error := test_suggested_h();
> omniout_float(ALWAYS,"estimated_step_error",32,estimated_step_error,32,"");
> if (estimated_step_error < est_needed_step_err) then # if number 11
> omniout_str(ALWAYS,"Double H and LOOP");
> glob_h := glob_h*glob__2;
> else
> omniout_str(ALWAYS,"Found H for OPTIMAL");
> found_h := true;
> glob_h_reason := 3;
> glob_h := glob_h/glob__2;
> fi;# end if 11;
> fi;# end if 10;
> opt_iter := opt_iter + 1;
> od;# end do number 1;
> if (( not found_h) and (opt_iter = 1)) then # if number 10
> omniout_str(ALWAYS,"Beginning glob_h too large.");
> found_h := false;
> fi;# end if 10;
> if (glob_check_sign * glob_max_h <= glob_check_sign * glob_h) then # if number 10
> omniout_str(ALWAYS,"SETTING H FOR MAX H");
> glob_h := glob_check_sign * float_abs(glob_max_h);
> glob_h_reason := 1;
> found_h := true;
> fi;# end if 10;
> else
> found_h := true;
> glob_h := glob_h * glob_check_sign;
> fi;# end if 9;
> #END OPTIMIZE CODE
> if (glob_html_log) then # if number 9
> html_log_file := fopen("entry.html",WRITE,TEXT);
> fi;# end if 9;
> #BEGIN SOLUTION CODE
> if (found_h) then # if number 9
> omniout_str(ALWAYS,"START of Soultion");
> #Start Series -- INITIALIZE FOR SOLUTION
> array_x[1] := c(x_start);
> array_x[2] := c(glob_h);
> glob_next_display := c(x_start);
> glob_min_pole_est := glob_larger_float;
> glob_least_given_sing := glob_larger_float;
> glob_least_ratio_sing := glob_larger_float;
> glob_least_3_sing := glob_larger_float;
> glob_least_6_sing := glob_larger_float;
> order_diff := 1;
> #Start Series array_y
> term_no := 1;
> while (term_no <= order_diff) do # do number 1
> array_y[term_no] := array_y_init[term_no] * expt(glob_h , c(term_no - 1)) / c(factorial_1(term_no - 1));
> term_no := term_no + 1;
> od;# end do number 1;
> rows := order_diff;
> r_order := 1;
> while (r_order <= rows) do # do number 1
> term_no := 1;
> while (term_no <= (rows - r_order + 1)) do # do number 2
> it := term_no + r_order - 1;
> if (term_no < ATS_MAX_TERMS) then # if number 10
> array_y_higher[r_order,term_no] := array_y_init[it]* expt(glob_h , c(term_no - 1)) / (c(factorial_1(term_no - 1)));
> fi;# end if 10;
> term_no := term_no + 1;
> od;# end do number 2;
> r_order := r_order + 1;
> od;# end do number 1
> ;
> current_iter := 1;
> glob_clock_start_sec := elapsed_time_seconds();
> glob_clock_sec := elapsed_time_seconds();
> glob_iter := 0;
> omniout_str(DEBUGL," ");
> glob_reached_optimal_h := true;
> glob_optimal_clock_start_sec := elapsed_time_seconds();
> while ((glob_iter < glob_max_iter) and (glob_check_sign * array_x[1] < glob_check_sign * x_end ) and (((glob_clock_sec) - (glob_orig_start_sec)) < (glob_max_sec))) do # do number 1
> #left paren 0001C
> if (reached_interval()) then # if number 10
> omniout_str(INFO," ");
> omniout_str(INFO,"TOP MAIN SOLVE Loop");
> fi;# end if 10;
> glob_iter := glob_iter + 1;
> glob_clock_sec := elapsed_time_seconds();
> track_estimated_error();
> atomall();
> track_estimated_error();
> display_alot(current_iter);
> if (glob_look_poles) then # if number 10
> check_for_pole();
> fi;# end if 10;
> if (reached_interval()) then # if number 10
> glob_next_display := glob_next_display + glob_display_interval;
> fi;# end if 10;
> array_x[1] := array_x[1] + glob_h;
> array_x[2] := glob_h;
> #Jump Series array_y;
> order_diff := 2;
> #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 := ATS_MAX_TERMS;
> while (iii >= calc_term) do # do number 2
> array_y_higher_work[2,iii] := array_y_higher[2,iii] / expt(glob_h , c(calc_term - 1)) / c(factorial_3(iii - calc_term , iii - 1));
> iii := iii - 1;
> od;# end do number 2;
> #AFTER ADJUST SUBSERIES EQ =1
> #BEFORE SUM SUBSERIES EQ =1
> temp_sum := glob__0;
> ord := 2;
> calc_term := 1;
> #sum_subseriesarray_y
> iii := ATS_MAX_TERMS;
> while (iii >= calc_term) do # do number 2
> temp_sum := temp_sum + array_y_higher_work[ord,iii];
> iii := iii - 1;
> od;# end do number 2;
> array_y_higher_work2[ord,calc_term] := temp_sum * expt(glob_h , c(calc_term - 1)) / c(factorial_1(calc_term - 1));
> #AFTER SUM SUBSERIES EQ =1
> #BEFORE ADJUST SUBSERIES EQ =1
> ord := 1;
> calc_term := 2;
> #adjust_subseriesarray_y
> iii := ATS_MAX_TERMS;
> while (iii >= calc_term) do # do number 2
> array_y_higher_work[1,iii] := array_y_higher[1,iii] / expt(glob_h , c(calc_term - 1)) / c(factorial_3(iii - calc_term , iii - 1));
> iii := iii - 1;
> od;# end do number 2;
> #AFTER ADJUST SUBSERIES EQ =1
> #BEFORE SUM SUBSERIES EQ =1
> temp_sum := glob__0;
> ord := 1;
> calc_term := 2;
> #sum_subseriesarray_y
> iii := ATS_MAX_TERMS;
> while (iii >= calc_term) do # do number 2
> temp_sum := temp_sum + array_y_higher_work[ord,iii];
> iii := iii - 1;
> od;# end do number 2;
> array_y_higher_work2[ord,calc_term] := temp_sum * expt(glob_h , c(calc_term - 1)) / c(factorial_1(calc_term - 1));
> #AFTER SUM SUBSERIES EQ =1
> #BEFORE ADJUST SUBSERIES EQ =1
> ord := 1;
> calc_term := 1;
> #adjust_subseriesarray_y
> iii := ATS_MAX_TERMS;
> while (iii >= calc_term) do # do number 2
> array_y_higher_work[1,iii] := array_y_higher[1,iii] / expt(glob_h , c(calc_term - 1)) / c(factorial_3(iii - calc_term , iii - 1));
> iii := iii - 1;
> od;# end do number 2;
> #AFTER ADJUST SUBSERIES EQ =1
> #BEFORE SUM SUBSERIES EQ =1
> temp_sum := glob__0;
> ord := 1;
> calc_term := 1;
> #sum_subseriesarray_y
> iii := ATS_MAX_TERMS;
> while (iii >= calc_term) do # do number 2
> temp_sum := temp_sum + array_y_higher_work[ord,iii];
> iii := iii - 1;
> od;# end do number 2;
> array_y_higher_work2[ord,calc_term] := temp_sum * expt(glob_h , c(calc_term - 1)) / c(factorial_1(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 := ATS_MAX_TERMS;
> while (term_no >= 1) do # do number 2
> array_y[term_no] := array_y_higher_work2[1,term_no];
> ord := 1;
> while (ord <= order_diff) do # do number 3
> array_y_higher[ord,term_no] := array_y_higher_work2[ord,term_no];
> ord := ord + 1;
> od;# end do number 3;
> term_no := term_no - 1;
> od;# end do number 2;
> #END PART 2 HEVE MOVED TERMS to REGULAR Array
> ;
> od;# end do number 1;#right paren 0001C
> omniout_str(ALWAYS,"Finished!");
> if (glob_iter >= glob_max_iter) then # if number 10
> omniout_str(ALWAYS,"Maximum Iterations Reached before Solution Completed!");
> fi;# end if 10;
> if (elapsed_time_seconds() - (glob_orig_start_sec) >= (glob_max_sec )) then # if number 10
> omniout_str(ALWAYS,"Maximum Time Reached before Solution Completed!");
> fi;# end if 10;
> glob_clock_sec := elapsed_time_seconds();
> omniout_str(INFO,"diff ( y , x , 1 ) = sin ( sqrt ( 2.0 * x + 3.0 ) ) ; ");
> omniout_int(INFO,"Iterations ",32,glob_iter,4," ")
> ;
> prog_report(x_start,x_end);
> if (glob_html_log) then # if number 10
> logstart(html_log_file);
> logitem_str(html_log_file,"2015-05-01T22:35:41-05:00")
> ;
> logitem_str(html_log_file,"Maple")
> ;
> logitem_str(html_log_file,"sin_sqrt_lin")
> ;
> logitem_str(html_log_file,"diff ( y , x , 1 ) = sin ( sqrt ( 2.0 * x + 3.0 ) ) ; ")
> ;
> logitem_float(html_log_file,x_start)
> ;
> logitem_float(html_log_file,x_end)
> ;
> logitem_float(html_log_file,array_x[1])
> ;
> logitem_float(html_log_file,glob_h)
> ;
> logitem_h_reason(html_log_file)
> ;
> logitem_integer(html_log_file,Digits)
> ;
> ;
> logitem_float(html_log_file,glob_desired_digits_correct)
> ;
> if (array_est_digits[1] <> -16) then # if number 11
> logitem_integer(html_log_file,array_est_digits[1])
> ;
> else
> logitem_str(html_log_file,"Unknown")
> ;
> fi;# end if 11;
> if (glob_min_good_digits <> -16) then # if number 11
> logitem_integer(html_log_file,glob_min_good_digits)
> ;
> else
> logitem_str(html_log_file,"Unknown")
> ;
> fi;# end if 11;
> if (glob_good_digits <> -16) then # if number 11
> logitem_integer(html_log_file,glob_good_digits)
> ;
> else
> logitem_str(html_log_file,"Unknown")
> ;
> fi;# end if 11;
> logitem_str(html_log_file,"NA")
> ;
> logitem_str(html_log_file,"NA")
> ;
> logitem_integer(html_log_file,ATS_MAX_TERMS)
> ;
> if (glob_type_given_pole = 0) then # if number 11
> logitem_str(html_log_file,"Not Given")
> ;
> logitem_str(html_log_file,"NA")
> ;
> elif
> (glob_type_given_pole = 4) then # if number 12
> logitem_str(html_log_file,"No Solution")
> ;
> logitem_str(html_log_file,"NA")
> ;
> elif
> (glob_type_given_pole = 5) then # if number 13
> logitem_str(html_log_file,"Some Pole")
> ;
> logitem_str(html_log_file,"????")
> ;
> elif
> (glob_type_given_pole = 3) then # if number 14
> logitem_str(html_log_file,"No Pole")
> ;
> logitem_str(html_log_file,"NA")
> ;
> elif
> (glob_type_given_pole = 1) then # if number 15
> logitem_str(html_log_file,"Real Sing")
> ;
> logitem_float(html_log_file,glob_least_given_sing)
> ;
> elif
> (glob_type_given_pole = 2) then # if number 16
> logitem_str(html_log_file,"Complex Sing")
> ;
> logitem_float(html_log_file,glob_least_given_sing)
> ;
> fi;# end if 16;
> if (glob_least_ratio_sing < glob_large_float) then # if number 16
> logitem_float(html_log_file,glob_least_ratio_sing)
> ;
> else
> logitem_str(html_log_file,"NONE")
> ;
> fi;# end if 16;
> if (glob_least_3_sing < glob_large_float) then # if number 16
> logitem_float(html_log_file,glob_least_3_sing)
> ;
> else
> logitem_str(html_log_file,"NONE")
> ;
> fi;# end if 16;
> if (glob_least_6_sing < glob_large_float) then # if number 16
> logitem_float(html_log_file,glob_least_6_sing)
> ;
> else
> logitem_str(html_log_file,"NONE")
> ;
> fi;# end if 16;
> logitem_integer(html_log_file,glob_iter)
> ;
> logitem_time(html_log_file,(glob_clock_sec))
> ;
> if (c(glob_percent_done) < glob__100) then # if number 16
> logitem_time(html_log_file,(glob_total_exp_sec))
> ;
> 0;
> else
> logitem_str(html_log_file,"Done")
> ;
> 0;
> fi;# end if 16;
> log_revs(html_log_file," 308.maple.seems.ok | ")
> ;
> logitem_str(html_log_file,"sin_sqrt_lin diffeq.mxt")
> ;
> logitem_str(html_log_file,"sin_sqrt_lin maple results")
> ;
> logitem_str(html_log_file,"Poor Accuracy & PROBLEM - found complex singularity instead of real - COULD BE RIGHT!!!")
> ;
> logend(html_log_file)
> ;
> ;
> fi;# end if 15;
> if (glob_html_log) then # if number 15
> fclose(html_log_file);
> fi;# end if 15
> ;
> ;;
> fi;# end if 14
> #END OUTFILEMAIN
> end;
main := proc()
local d1, d2, d3, d4, est_err_2, niii, done_once, max_terms, display_max,
term, ord, order_diff, term_no, html_log_file, iiif, jjjf, rows, r_order,
sub_iter, calc_term, iii, temp_sum, current_iter, x_start, x_end, it,
last_min_pole_est, opt_iter, tmp, subiter, est_needed_step_err,
estimated_step_error, min_value, est_answer, found_h, repeat_it;
global ALWAYS, INFO, DEBUGL, DEBUGMASSIVE, glob_iolevel, glob_yes_pole,
glob_no_pole, glob_not_given, glob_no_sing_tests, glob_ratio_test,
glob_three_term_test, glob_six_term_test, glob_log_10, MAX_UNCHANGED,
glob__small, glob_small_float, glob_smallish_float, glob_large_float,
glob_larger_float, glob__m2, glob__m1, glob__0, glob__1, glob__2, glob__3,
glob__4, glob__5, glob__8, glob__10, glob__100, glob__pi, glob__0_5,
glob__0_8, glob__m0_8, glob__0_25, glob__0_125, glob_prec, glob_check_sign,
glob_desired_digits_correct, glob_max_estimated_step_error,
glob_ratio_of_radius, glob_percent_done, glob_total_exp_sec,
glob_optimal_expect_sec, glob_estimated_size_answer, glob_almost_1,
glob_clock_sec, glob_clock_start_sec, glob_disp_incr, glob_h,
glob_diff_rc_fm, glob_diff_rc_fmm1, glob_diff_rc_fmm2, glob_diff_ord_fm,
glob_diff_ord_fmm1, glob_diff_ord_fmm2, glob_six_term_ord_save,
glob_guess_error_rc, glob_guess_error_ord, glob_least_given_sing,
glob_least_ratio_sing, glob_least_3_sing, glob_least_6_sing,
glob_last_good_h, glob_max_h, glob_min_h, glob_display_interval,
glob_abserr, glob_relerr, glob_min_pole_est, glob_max_rel_trunc_err,
glob_max_trunc_err, glob_max_hours, glob_optimal_clock_start_sec,
glob_optimal_start, glob_upper_ratio_limit, glob_lower_ratio_limit,
glob_max_sec, glob_orig_start_sec, glob_normmax, glob_max_minutes,
glob_next_display, glob_est_digits, glob_subiter_method, glob_html_log,
glob_min_good_digits, glob_good_digits, glob_min_apfp_est_good_digits,
glob_apfp_est_good_digits, glob_max_opt_iter, glob_dump, glob_djd_debug,
glob_display_flag, glob_djd_debug2, glob_h_reason, 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_not_yet_finished, glob_initial_pass,
glob_not_yet_start_msg, glob_reached_optimal_h, glob_optimal_done,
glob_type_given_pole, glob_optimize, glob_look_poles, glob_dump_closed_form,
glob_max_iter, glob_no_eqs, glob_unchanged_h_cnt, glob_warned, glob_warned2,
glob_start, glob_iter, array_const_1, array_const_0D0, array_const_2D0,
array_const_3D0, array_y_init, array_norms, array_fact_1,
array_1st_rel_error, array_last_rel_error, array_est_rel_error,
array_max_est_error, array_type_pole, array_type_real_pole,
array_type_complex_pole, array_est_digits, array_y, array_x, array_tmp0,
array_tmp1, array_tmp2, array_tmp3, array_tmp4_g, array_tmp4, array_tmp5,
array_m1, array_y_higher, array_y_higher_work, array_y_higher_work2,
array_y_set_initial, array_given_rad_poles, array_given_ord_poles,
array_rad_test_poles, array_ord_test_poles, array_fact_2, ATS_MAX_TERMS,
glob_last;
ATS_MAX_TERMS := 40;
Digits := 32;
max_terms := 40;
glob_html_log := true;
array_y_init := Array(0 .. 40, []);
array_norms := Array(0 .. 40, []);
array_fact_1 := Array(0 .. 40, []);
array_1st_rel_error := Array(0 .. 2, []);
array_last_rel_error := Array(0 .. 2, []);
array_est_rel_error := Array(0 .. 2, []);
array_max_est_error := Array(0 .. 2, []);
array_type_pole := Array(0 .. 2, []);
array_type_real_pole := Array(0 .. 2, []);
array_type_complex_pole := Array(0 .. 2, []);
array_est_digits := Array(0 .. 2, []);
array_y := Array(0 .. 40, []);
array_x := Array(0 .. 40, []);
array_tmp0 := Array(0 .. 40, []);
array_tmp1 := Array(0 .. 40, []);
array_tmp2 := Array(0 .. 40, []);
array_tmp3 := Array(0 .. 40, []);
array_tmp4_g := Array(0 .. 40, []);
array_tmp4 := Array(0 .. 40, []);
array_tmp5 := Array(0 .. 40, []);
array_m1 := Array(0 .. 40, []);
array_y_higher := Array(0 .. 2, 0 .. 41, []);
array_y_higher_work := Array(0 .. 2, 0 .. 41, []);
array_y_higher_work2 := Array(0 .. 2, 0 .. 41, []);
array_y_set_initial := Array(0 .. 2, 0 .. 41, []);
array_given_rad_poles := Array(0 .. 2, 0 .. 4, []);
array_given_ord_poles := Array(0 .. 2, 0 .. 4, []);
array_rad_test_poles := Array(0 .. 2, 0 .. 5, []);
array_ord_test_poles := Array(0 .. 2, 0 .. 5, []);
array_fact_2 := Array(0 .. 40, 0 .. 41, []);
term := 1;
while term <= 40 do array_y_init[term] := c(0.); term := term + 1
end do;
term := 1;
while term <= 40 do array_norms[term] := c(0.); term := term + 1 end do
;
term := 1;
while term <= 40 do array_fact_1[term] := c(0.); term := term + 1
end do;
term := 1;
while term <= 2 do array_1st_rel_error[term] := c(0.); term := term + 1
end do;
term := 1;
while term <= 2 do
array_last_rel_error[term] := c(0.); term := term + 1
end do;
term := 1;
while term <= 2 do array_est_rel_error[term] := c(0.); term := term + 1
end do;
term := 1;
while term <= 2 do array_max_est_error[term] := c(0.); term := term + 1
end do;
term := 1;
while term <= 2 do array_type_pole[term] := 0; term := term + 1 end do;
term := 1;
while term <= 2 do array_type_real_pole[term] := 0; term := term + 1
end do;
term := 1;
while term <= 2 do array_type_complex_pole[term] := 0; term := term + 1
end do;
term := 1;
while term <= 2 do array_est_digits[term] := 0; term := term + 1 end do
;
term := 1;
while term <= 40 do array_y[term] := c(0.); term := term + 1 end do;
term := 1;
while term <= 40 do array_x[term] := c(0.); term := term + 1 end do;
term := 1;
while term <= 40 do array_tmp0[term] := c(0.); term := term + 1 end do;
term := 1;
while term <= 40 do array_tmp1[term] := c(0.); term := term + 1 end do;
term := 1;
while term <= 40 do array_tmp2[term] := c(0.); term := term + 1 end do;
term := 1;
while term <= 40 do array_tmp3[term] := c(0.); term := term + 1 end do;
term := 1;
while term <= 40 do array_tmp4_g[term] := c(0.); term := term + 1
end do;
term := 1;
while term <= 40 do array_tmp4[term] := c(0.); term := term + 1 end do;
term := 1;
while term <= 40 do array_tmp5[term] := c(0.); term := term + 1 end do;
term := 1;
while term <= 40 do array_m1[term] := c(0.); term := term + 1 end do;
ord := 1;
while ord <= 2 do
term := 1;
while term <= 40 do
array_y_higher[ord, term] := c(0.); term := term + 1
end do;
ord := ord + 1
end do;
ord := 1;
while ord <= 2 do
term := 1;
while term <= 40 do
array_y_higher_work[ord, term] := c(0.); term := term + 1
end do;
ord := ord + 1
end do;
ord := 1;
while ord <= 2 do
term := 1;
while term <= 40 do
array_y_higher_work2[ord, term] := c(0.); term := term + 1
end do;
ord := ord + 1
end do;
ord := 1;
while ord <= 2 do
term := 1;
while term <= 40 do
array_y_set_initial[ord, term] := c(0.); term := term + 1
end do;
ord := ord + 1
end do;
ord := 1;
while ord <= 2 do
term := 1;
while term <= 3 do
array_given_rad_poles[ord, term] := c(0.); term := term + 1
end do;
ord := ord + 1
end do;
ord := 1;
while ord <= 2 do
term := 1;
while term <= 3 do
array_given_ord_poles[ord, term] := c(0.); term := term + 1
end do;
ord := ord + 1
end do;
ord := 1;
while ord <= 2 do
term := 1;
while term <= 4 do
array_rad_test_poles[ord, term] := c(0.); term := term + 1
end do;
ord := ord + 1
end do;
ord := 1;
while ord <= 2 do
term := 1;
while term <= 4 do
array_ord_test_poles[ord, term] := c(0.); term := term + 1
end do;
ord := ord + 1
end do;
ord := 1;
while ord <= 40 do
term := 1;
while term <= 40 do
array_fact_2[ord, term] := c(0.); term := term + 1
end do;
ord := ord + 1
end do;
zero_ats_ar(array_y);
zero_ats_ar(array_x);
zero_ats_ar(array_tmp0);
zero_ats_ar(array_tmp1);
zero_ats_ar(array_tmp2);
zero_ats_ar(array_tmp3);
zero_ats_ar(array_tmp4_g);
zero_ats_ar(array_tmp4);
zero_ats_ar(array_tmp5);
zero_ats_ar(array_m1);
zero_ats_ar(array_const_1);
array_const_1[1] := c(1);
zero_ats_ar(array_const_0D0);
array_const_0D0[1] := c(0.);
zero_ats_ar(array_const_2D0);
array_const_2D0[1] := c(2.0);
zero_ats_ar(array_const_3D0);
array_const_3D0[1] := c(3.0);
zero_ats_ar(array_m1);
array_m1[1] := glob__m1;
iiif := 0;
while iiif <= ATS_MAX_TERMS do
jjjf := 0;
while jjjf <= ATS_MAX_TERMS do
array_fact_1[iiif] := 0;
array_fact_2[iiif, jjjf] := 0;
jjjf := jjjf + 1
end do;
iiif := iiif + 1
end do;
ALWAYS := 1;
INFO := 2;
DEBUGL := 3;
DEBUGMASSIVE := 4;
glob_iolevel := 5;
glob_yes_pole := 4;
glob_no_pole := 3;
glob_not_given := 0;
glob_no_sing_tests := 4;
glob_ratio_test := 1;
glob_three_term_test := 2;
glob_six_term_test := 3;
glob_log_10 := log(c(10.0));
MAX_UNCHANGED := 10;
glob__small := c(0.1*10^(-50));
glob_small_float := c(0.1*10^(-50));
glob_smallish_float := c(0.1*10^(-60));
glob_large_float := c(0.10*10^101);
glob_larger_float := c(0.11*10^101);
glob__m2 := c(-2);
glob__m1 := c(-1);
glob__0 := c(0);
glob__1 := c(1);
glob__2 := c(2);
glob__3 := c(3);
glob__4 := c(4);
glob__5 := c(5);
glob__8 := c(8);
glob__10 := c(10);
glob__100 := c(100);
glob__pi := c(0.);
glob__0_5 := c(0.5);
glob__0_8 := c(0.8);
glob__m0_8 := c(-0.8);
glob__0_25 := c(0.25);
glob__0_125 := c(0.125);
glob_prec := c(0.10*10^(-15));
glob_check_sign := c(1.0);
glob_desired_digits_correct := c(8.0);
glob_max_estimated_step_error := c(0.);
glob_ratio_of_radius := c(0.1);
glob_percent_done := c(0.);
glob_total_exp_sec := c(0.1);
glob_optimal_expect_sec := c(0.1);
glob_estimated_size_answer := c(100.0);
glob_almost_1 := c(0.9990);
glob_clock_sec := c(0.);
glob_clock_start_sec := c(0.);
glob_disp_incr := c(0.1);
glob_h := c(0.1);
glob_diff_rc_fm := c(0.1);
glob_diff_rc_fmm1 := c(0.1);
glob_diff_rc_fmm2 := c(0.1);
glob_diff_ord_fm := c(0.1);
glob_diff_ord_fmm1 := c(0.1);
glob_diff_ord_fmm2 := c(0.1);
glob_six_term_ord_save := c(0.1);
glob_guess_error_rc := c(0.1);
glob_guess_error_ord := c(0.1);
glob_least_given_sing := c(0.99*10^201);
glob_least_ratio_sing := c(0.99*10^201);
glob_least_3_sing := c(0.99*10^101);
glob_least_6_sing := c(0.99*10^101);
glob_last_good_h := c(0.1);
glob_max_h := c(0.1);
glob_min_h := c(0.1*10^(-5));
glob_display_interval := c(0.1);
glob_abserr := c(0.1*10^(-10));
glob_relerr := c(0.1*10^(-10));
glob_min_pole_est := c(0.1*10^10);
glob_max_rel_trunc_err := c(0.1*10^(-10));
glob_max_trunc_err := c(0.1*10^(-10));
glob_max_hours := c(0.);
glob_optimal_clock_start_sec := c(0.);
glob_optimal_start := c(0.);
glob_upper_ratio_limit := c(1.0001);
glob_lower_ratio_limit := c(0.9999);
glob_max_sec := c(10000.0);
glob_orig_start_sec := c(0.);
glob_normmax := c(0.);
glob_max_minutes := c(0.);
glob_next_display := c(0.);
glob_est_digits := 1;
glob_subiter_method := 3;
glob_html_log := true;
glob_min_good_digits := 99999;
glob_good_digits := 0;
glob_min_apfp_est_good_digits := 99999;
glob_apfp_est_good_digits := 0;
glob_max_opt_iter := 10;
glob_dump := false;
glob_djd_debug := true;
glob_display_flag := true;
glob_djd_debug2 := true;
glob_h_reason := 0;
glob_sec_in_minute := 60;
glob_min_in_hour := 60;
glob_hours_in_day := 24;
glob_days_in_year := 365;
glob_sec_in_hour := 3600;
glob_sec_in_day := 86400;
glob_sec_in_year := 31536000;
glob_not_yet_finished := true;
glob_initial_pass := true;
glob_not_yet_start_msg := true;
glob_reached_optimal_h := false;
glob_optimal_done := false;
glob_type_given_pole := 0;
glob_optimize := false;
glob_look_poles := false;
glob_dump_closed_form := false;
glob_max_iter := 1000;
glob_no_eqs := 0;
glob_unchanged_h_cnt := 0;
glob_warned := false;
glob_warned2 := false;
glob_start := 0;
glob_iter := 0;
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;
array_y_set_initial[1, 31] := false;
array_y_set_initial[1, 32] := false;
array_y_set_initial[1, 33] := false;
array_y_set_initial[1, 34] := false;
array_y_set_initial[1, 35] := false;
array_y_set_initial[1, 36] := false;
array_y_set_initial[1, 37] := false;
array_y_set_initial[1, 38] := false;
array_y_set_initial[1, 39] := false;
array_y_set_initial[1, 40] := false;
ALWAYS := 1;
INFO := 2;
DEBUGL := 3;
DEBUGMASSIVE := 4;
ATS_MAX_TERMS := 40;
glob_iolevel := INFO;
glob_orig_start_sec := elapsed_time_seconds();
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/sin_sqrt_linpostode.ode#################");
omniout_str(ALWAYS, "diff ( y , x , 1 ) = sin ( sqrt ( 2.0 \
* x + 3.0 ) ) ; ");
omniout_str(ALWAYS, "!");
omniout_str(ALWAYS, "#BEGIN FIRST INPUT BLOCK");
omniout_str(ALWAYS, "Digits:=32;");
omniout_str(ALWAYS, "max_terms:=40;");
omniout_str(ALWAYS, "!");
omniout_str(ALWAYS, "#END FIRST INPUT BLOCK");
omniout_str(ALWAYS, "#BEGIN SECOND INPUT BLOCK");
omniout_str(ALWAYS, "x_start := c(2.0);");
omniout_str(ALWAYS, "x_end := c(3.0) ;");
omniout_str(ALWAYS, "array_y_init[0 + 1] := exact_soln_y(x_start);");
omniout_str(ALWAYS, "glob_look_poles := true;");
omniout_str(ALWAYS, "glob_max_h := c(0.0001);");
omniout_str(ALWAYS, "glob_upper_ratio_limit := c(1.001);");
omniout_str(ALWAYS, "glob_lower_ratio_limit := c(0.999);");
omniout_str(ALWAYS, "");
omniout_str(ALWAYS, "");
omniout_str(ALWAYS, "");
omniout_str(ALWAYS, "");
omniout_str(ALWAYS, "");
omniout_str(ALWAYS, "");
omniout_str(ALWAYS, "");
omniout_str(ALWAYS, "");
omniout_str(ALWAYS, "glob_type_given_pole := 1;");
omniout_str(ALWAYS, "");
omniout_str(ALWAYS, "array_given_rad_poles[1,1] := c(-1.5);");
omniout_str(ALWAYS, "");
omniout_str(ALWAYS, "array_given_rad_poles[1,2] := c(0.0);");
omniout_str(ALWAYS, "");
omniout_str(ALWAYS, "array_given_ord_poles[1,1] := c(0.5);");
omniout_str(ALWAYS, "");
omniout_str(ALWAYS, "array_given_ord_poles[1,2] := c(0.0);");
omniout_str(ALWAYS, "");
omniout_str(ALWAYS, "#END SECOND INPUT BLOCK");
omniout_str(ALWAYS, "#BEGIN OVERRIDE BLOCK");
omniout_str(ALWAYS, "glob_desired_digits_correct:=8;");
omniout_str(ALWAYS, "glob_max_minutes:=(3.0);");
omniout_str(ALWAYS, "glob_subiter_method:=3;");
omniout_str(ALWAYS, "glob_max_iter:=100000;");
omniout_str(ALWAYS, "glob_upper_ratio_limit:=c(1.000001);");
omniout_str(ALWAYS, "glob_lower_ratio_limit:=c(0.999999);");
omniout_str(ALWAYS, "glob_look_poles:=true;");
omniout_str(ALWAYS, "glob_h:=c(0.001);");
omniout_str(ALWAYS, "glob_display_interval:=c(0.01);");
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, "");
omniout_str(ALWAYS, "return(sin(sqrt(c(2.0)*c(x)+c(3.0)))-sqrt(c(2.0)\
*c(x)+c(3.0))*cos(sqrt(c(2.0)*c(x)+c(3.0))));");
omniout_str(ALWAYS, "end;");
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 := glob__0;
glob_smallish_float := glob__0;
glob_large_float := c(0.10*10^101);
glob_larger_float := c(0.11*10^101);
glob_almost_1 := c(0.99);
x_start := c(2.0);
x_end := c(3.0);
array_y_init[1] := exact_soln_y(x_start);
glob_look_poles := true;
glob_max_h := c(0.0001);
glob_upper_ratio_limit := c(1.001);
glob_lower_ratio_limit := c(0.999);
glob_type_given_pole := 1;
array_given_rad_poles[1, 1] := c(-1.5);
array_given_rad_poles[1, 2] := c(0.);
array_given_ord_poles[1, 1] := c(0.5);
array_given_ord_poles[1, 2] := c(0.);
glob_desired_digits_correct := 8;
glob_max_minutes := 3.0;
glob_subiter_method := 3;
glob_max_iter := 100000;
glob_upper_ratio_limit := c(1.000001);
glob_lower_ratio_limit := c(0.999999);
glob_look_poles := true;
glob_h := c(0.001);
glob_display_interval := c(0.01);
glob_last_good_h := glob_h;
glob_max_sec := 60.0*glob_max_minutes + 3600.0*glob_max_hours;
glob_check_sign := c(my_check_sign(x_start, x_end));
glob__pi := arccos(glob__m1);
glob_prec = expt(10.0, c(-Digits));
if glob_optimize then
omniout_str(ALWAYS, "START of Optimize");
found_h := false;
glob_min_pole_est := glob_larger_float;
last_min_pole_est := glob_larger_float;
glob_least_given_sing := glob_larger_float;
glob_least_ratio_sing := glob_larger_float;
glob_least_3_sing := glob_larger_float;
glob_least_6_sing := glob_larger_float;
glob_min_h := float_abs(glob_min_h)*glob_check_sign;
glob_max_h := float_abs(glob_max_h)*glob_check_sign;
glob_h := float_abs(glob_min_h)*glob_check_sign;
glob_display_interval :=
c(float_abs(c(glob_display_interval))*glob_check_sign);
display_max := c(x_end) - c(x_start)/glob__10;
if display_max < glob_display_interval then
glob_display_interval := c(display_max)
end if;
chk_data();
min_value := glob_larger_float;
est_answer := est_size_answer();
opt_iter := 1;
est_needed_step_err :=
estimated_needed_step_error(x_start, x_end, glob_h, est_answer)
;
omniout_float(ALWAYS, "est_needed_step_err", 32,
est_needed_step_err, 16, "");
estimated_step_error := glob_small_float;
while opt_iter <= 100 and not found_h do
omniout_int(ALWAYS, "opt_iter", 32, opt_iter, 4, "");
array_x[1] := c(x_start);
array_x[2] := c(glob_h);
glob_next_display := c(x_start);
order_diff := 1;
term_no := 1;
while term_no <= order_diff do
array_y[term_no] := array_y_init[term_no]*
expt(glob_h, c(term_no - 1))/
c(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;
if term_no < ATS_MAX_TERMS then
array_y_higher[r_order, term_no] :=
array_y_init[it]*expt(glob_h, c(term_no - 1))/
c(factorial_1(term_no - 1))
end if;
term_no := term_no + 1
end do;
r_order := r_order + 1
end do;
atomall();
if glob_check_sign*glob_h <= glob_check_sign*glob_min_h then
omniout_str(ALWAYS, "SETTING H FOR MIN H");
glob_h := float_abs(glob_min_h)*glob_check_sign;
glob_h_reason := 1;
found_h := true
end if;
if
glob_check_sign*glob_display_interval <= glob_check_sign*glob_h
then
omniout_str(ALWAYS, "SETTING H FOR DISPLAY INTERVAL");
glob_h_reason := 2;
glob_h := glob_display_interval;
found_h := true
end if;
if glob_look_poles then check_for_pole() end if;
if not found_h then
est_answer := est_size_answer();
est_needed_step_err := estimated_needed_step_error(x_start,
x_end, glob_h, est_answer);
omniout_float(ALWAYS, "est_needed_step_err", 32,
est_needed_step_err, 16, "");
estimated_step_error := test_suggested_h();
omniout_float(ALWAYS, "estimated_step_error", 32,
estimated_step_error, 32, "");
if estimated_step_error < est_needed_step_err then
omniout_str(ALWAYS, "Double H and LOOP");
glob_h := glob_h*glob__2
else
omniout_str(ALWAYS, "Found H for OPTIMAL");
found_h := true;
glob_h_reason := 3;
glob_h := glob_h/glob__2
end if
end if;
opt_iter := opt_iter + 1
end do;
if not found_h and opt_iter = 1 then
omniout_str(ALWAYS, "Beginning glob_h too large.");
found_h := false
end if;
if glob_check_sign*glob_max_h <= glob_check_sign*glob_h then
omniout_str(ALWAYS, "SETTING H FOR MAX H");
glob_h := float_abs(glob_max_h)*glob_check_sign;
glob_h_reason := 1;
found_h := true
end if
else found_h := true; glob_h := glob_check_sign*glob_h
end if;
if glob_html_log then html_log_file := fopen("entry.html", WRITE, TEXT)
end if;
if found_h then
omniout_str(ALWAYS, "START of Soultion");
array_x[1] := c(x_start);
array_x[2] := c(glob_h);
glob_next_display := c(x_start);
glob_min_pole_est := glob_larger_float;
glob_least_given_sing := glob_larger_float;
glob_least_ratio_sing := glob_larger_float;
glob_least_3_sing := glob_larger_float;
glob_least_6_sing := glob_larger_float;
order_diff := 1;
term_no := 1;
while term_no <= order_diff do
array_y[term_no] := array_y_init[term_no]*
expt(glob_h, c(term_no - 1))/c(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;
if term_no < ATS_MAX_TERMS then
array_y_higher[r_order, term_no] := array_y_init[it]*
expt(glob_h, c(term_no - 1))/
c(factorial_1(term_no - 1))
end if;
term_no := term_no + 1
end do;
r_order := r_order + 1
end do;
current_iter := 1;
glob_clock_start_sec := elapsed_time_seconds();
glob_clock_sec := elapsed_time_seconds();
glob_iter := 0;
omniout_str(DEBUGL, " ");
glob_reached_optimal_h := true;
glob_optimal_clock_start_sec := elapsed_time_seconds();
while glob_iter < glob_max_iter and
glob_check_sign*array_x[1] < glob_check_sign*x_end and
glob_clock_sec - glob_orig_start_sec < glob_max_sec do
if reached_interval() then
omniout_str(INFO, " ");
omniout_str(INFO, "TOP MAIN SOLVE Loop")
end if;
glob_iter := glob_iter + 1;
glob_clock_sec := elapsed_time_seconds();
track_estimated_error();
atomall();
track_estimated_error();
display_alot(current_iter);
if glob_look_poles then check_for_pole() end if;
if reached_interval() then glob_next_display :=
glob_next_display + glob_display_interval
end if;
array_x[1] := array_x[1] + glob_h;
array_x[2] := glob_h;
order_diff := 2;
ord := 2;
calc_term := 1;
iii := ATS_MAX_TERMS;
while calc_term <= iii do
array_y_higher_work[2, iii] := array_y_higher[2, iii]/(
expt(glob_h, c(calc_term - 1))*
c(factorial_3(iii - calc_term, iii - 1)));
iii := iii - 1
end do;
temp_sum := glob__0;
ord := 2;
calc_term := 1;
iii := ATS_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*
expt(glob_h, c(calc_term - 1))/
c(factorial_1(calc_term - 1));
ord := 1;
calc_term := 2;
iii := ATS_MAX_TERMS;
while calc_term <= iii do
array_y_higher_work[1, iii] := array_y_higher[1, iii]/(
expt(glob_h, c(calc_term - 1))*
c(factorial_3(iii - calc_term, iii - 1)));
iii := iii - 1
end do;
temp_sum := glob__0;
ord := 1;
calc_term := 2;
iii := ATS_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*
expt(glob_h, c(calc_term - 1))/
c(factorial_1(calc_term - 1));
ord := 1;
calc_term := 1;
iii := ATS_MAX_TERMS;
while calc_term <= iii do
array_y_higher_work[1, iii] := array_y_higher[1, iii]/(
expt(glob_h, c(calc_term - 1))*
c(factorial_3(iii - calc_term, iii - 1)));
iii := iii - 1
end do;
temp_sum := glob__0;
ord := 1;
calc_term := 1;
iii := ATS_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*
expt(glob_h, c(calc_term - 1))/
c(factorial_1(calc_term - 1));
term_no := ATS_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
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 glob_max_sec <= elapsed_time_seconds() - 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 ) = sin ( sqrt ( 2.\
0 * x + 3.0 ) ) ; ");
omniout_int(INFO, "Iterations ", 32, glob_iter,
4, " ");
prog_report(x_start, x_end);
if glob_html_log then
logstart(html_log_file);
logitem_str(html_log_file, "2015-05-01T22:35:41-05:00");
logitem_str(html_log_file, "Maple");
logitem_str(html_log_file,
"sin_sqrt_lin");
logitem_str(html_log_file, "diff ( y , x , 1 ) = si\
n ( sqrt ( 2.0 * x + 3.0 ) ) ; ");
logitem_float(html_log_file, x_start);
logitem_float(html_log_file, x_end);
logitem_float(html_log_file, array_x[1]);
logitem_float(html_log_file, glob_h);
logitem_h_reason(html_log_file);
logitem_integer(html_log_file, Digits);
logitem_float(html_log_file, glob_desired_digits_correct);
if array_est_digits[1] <> -16 then
logitem_integer(html_log_file, array_est_digits[1])
else logitem_str(html_log_file, "Unknown")
end if;
if glob_min_good_digits <> -16 then
logitem_integer(html_log_file, glob_min_good_digits)
else logitem_str(html_log_file, "Unknown")
end if;
if glob_good_digits <> -16 then
logitem_integer(html_log_file, glob_good_digits)
else logitem_str(html_log_file, "Unknown")
end if;
logitem_str(html_log_file, "NA");
logitem_str(html_log_file, "NA");
logitem_integer(html_log_file, ATS_MAX_TERMS);
if glob_type_given_pole = 0 then
logitem_str(html_log_file, "Not Given");
logitem_str(html_log_file, "NA")
elif glob_type_given_pole = 4 then
logitem_str(html_log_file, "No Solution");
logitem_str(html_log_file, "NA")
elif glob_type_given_pole = 5 then
logitem_str(html_log_file, "Some Pole");
logitem_str(html_log_file, "????")
elif glob_type_given_pole = 3 then
logitem_str(html_log_file, "No Pole");
logitem_str(html_log_file, "NA")
elif glob_type_given_pole = 1 then
logitem_str(html_log_file, "Real Sing");
logitem_float(html_log_file, glob_least_given_sing)
elif glob_type_given_pole = 2 then
logitem_str(html_log_file, "Complex Sing");
logitem_float(html_log_file, glob_least_given_sing)
end if;
if glob_least_ratio_sing < glob_large_float then
logitem_float(html_log_file, glob_least_ratio_sing)
else logitem_str(html_log_file, "NONE")
end if;
if glob_least_3_sing < glob_large_float then
logitem_float(html_log_file, glob_least_3_sing)
else logitem_str(html_log_file, "NONE")
end if;
if glob_least_6_sing < glob_large_float then
logitem_float(html_log_file, glob_least_6_sing)
else logitem_str(html_log_file, "NONE")
end if;
logitem_integer(html_log_file, glob_iter);
logitem_time(html_log_file, glob_clock_sec);
if c(glob_percent_done) < glob__100 then
logitem_time(html_log_file, glob_total_exp_sec); 0
else logitem_str(html_log_file, "Done"); 0
end if;
log_revs(html_log_file, " 308.maple.seems.ok | ");
logitem_str(html_log_file, "sin_sqrt_lin diffeq.mxt");
logitem_str(html_log_file, "sin_sqrt_lin maple results");
logitem_str(html_log_file, "Poor Accuracy & PROBLEM - found c\
omplex singularity instead of real - COULD BE RIGHT!!!");
logend(html_log_file)
end if;
if glob_html_log then fclose(html_log_file) end if
end if
end proc
# End Function number 12
> main();
##############ECHO OF PROBLEM#################
##############temp/sin_sqrt_linpostode.ode#################
diff ( y , x , 1 ) = sin ( sqrt ( 2.0 * x + 3.0 ) ) ;
!
#BEGIN FIRST INPUT BLOCK
Digits:=32;
max_terms:=40;
!
#END FIRST INPUT BLOCK
#BEGIN SECOND INPUT BLOCK
x_start := c(2.0);
x_end := c(3.0) ;
array_y_init[0 + 1] := exact_soln_y(x_start);
glob_look_poles := true;
glob_max_h := c(0.0001);
glob_upper_ratio_limit := c(1.001);
glob_lower_ratio_limit := c(0.999);
glob_type_given_pole := 1;
array_given_rad_poles[1,1] := c(-1.5);
array_given_rad_poles[1,2] := c(0.0);
array_given_ord_poles[1,1] := c(0.5);
array_given_ord_poles[1,2] := c(0.0);
#END SECOND INPUT BLOCK
#BEGIN OVERRIDE BLOCK
glob_desired_digits_correct:=8;
glob_max_minutes:=(3.0);
glob_subiter_method:=3;
glob_max_iter:=100000;
glob_upper_ratio_limit:=c(1.000001);
glob_lower_ratio_limit:=c(0.999999);
glob_look_poles:=true;
glob_h:=c(0.001);
glob_display_interval:=c(0.01);
#END OVERRIDE BLOCK
!
#BEGIN USER DEF BLOCK
exact_soln_y := proc(x)
return(sin(sqrt(c(2.0)*c(x)+c(3.0)))-sqrt(c(2.0)*c(x)+c(3.0))*cos(sqrt(c(2.0)*c(x)+c(3.0))));
end;
#END USER DEF BLOCK
#######END OF ECHO OF PROBLEM#################
START of Soultion
TOP MAIN SOLVE Loop
memory used=3.9MB, alloc=40.3MB, time=0.09
x[1] = 2
y[1] (closed_form) = 2.8028919695910200650978160660308
y[1] (numeric) = 2.8028919695910200650978160660308
absolute error = 0
relative error = 0 %
Desired digits = 8
Estimated correct digits = 14
Correct digits = 32
h = 0.001
Radius of convergence (given) for eq 1 = 3.5
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.01
y[1] (closed_form) = 2.807633062296781837535243575243
y[1] (numeric) = 2.8076347250948816135175758886353
absolute error = 1.6627980997759823323133923e-06
relative error = 5.9224195715081505761407236862055e-05 %
Desired digits = 8
Estimated correct digits = 13
Correct digits = 7
h = 0.001
Radius of convergence (given) for eq 1 = 3.51
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=34.5MB, alloc=44.3MB, time=0.44
TOP MAIN SOLVE Loop
x[1] = 2.02
y[1] (closed_form) = 2.8123408902813763454076340303486
y[1] (numeric) = 2.8123442168735966008542644641567
absolute error = 3.3265922202554466304338081e-06
relative error = 0.00011828552618749639342978940378182 %
Desired digits = 8
Estimated correct digits = 13
Correct digits = 6
h = 0.001
Radius of convergence (given) for eq 1 = 3.52
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.03
y[1] (closed_form) = 2.817015433909019013547671498075
y[1] (numeric) = 2.8170204252635210951901285560872
absolute error = 4.9913545020816424570580122e-06
relative error = 0.00017718591250866565000555676499325 %
Desired digits = 8
Estimated correct digits = 13
Correct digits = 6
h = 0.001
Radius of convergence (given) for eq 1 = 3.53
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=78.2MB, alloc=52.3MB, time=0.91
TOP MAIN SOLVE Loop
x[1] = 2.04
y[1] (closed_form) = 2.8216566740992080296305186513018
y[1] (numeric) = 2.8216633311564774039270581229724
absolute error = 6.6570572693742965394716706e-06
relative error = 0.00023592725970105878847828151852251 %
Desired digits = 8
Estimated correct digits = 13
Correct digits = 6
h = 0.001
Radius of convergence (given) for eq 1 = 3.54
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.05
y[1] (closed_form) = 2.8262645923230697609947736424075
y[1] (numeric) = 2.8262729159960980683235241928997
absolute error = 8.3236730283073287505504922e-06
relative error = 0.00029451145695688817837539705875411 %
Desired digits = 8
Estimated correct digits = 13
Correct digits = 6
h = 0.001
Radius of convergence (given) for eq 1 = 3.55
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.06
y[1] (closed_form) = 2.8308391705997324532190684047992
y[1] (numeric) = 2.8308491617741981552430205322461
absolute error = 9.9911744657020239521274469e-06
relative error = 0.000352940377873368410594192973588 %
Desired digits = 8
Estimated correct digits = 13
Correct digits = 6
h = 0.001
Radius of convergence (given) for eq 1 = 3.56
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=121.9MB, alloc=52.3MB, time=1.38
TOP MAIN SOLVE Loop
x[1] = 2.07
y[1] (closed_form) = 2.8353803914927279036737687390522
y[1] (numeric) = 2.83539205102717553911456855936
absolute error = 1.16595344476354407998203078e-05
relative error = 0.00041121588068460565901365240267868 %
Desired digits = 8
Estimated correct digits = 13
Correct digits = 6
h = 0.001
Radius of convergence (given) for eq 1 = 3.57
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.08
y[1] (closed_form) = 2.8398882381064208076048174288604
y[1] (numeric) = 2.8399015668324388714471959070855
absolute error = 1.33287260180638423784782251e-05
relative error = 0.00046933980849018070280384292073642 %
Desired digits = 8
Estimated correct digits = 13
Correct digits = 6
h = 0.001
Radius of convergence (given) for eq 1 = 3.58
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=165.5MB, alloc=52.3MB, time=1.84
TOP MAIN SOLVE Loop
x[1] = 2.09
y[1] (closed_form) = 2.8443626940824654785697587443392
y[1] (numeric) = 2.8443776928048629395069902800672
absolute error = 1.49987223974609372315357280e-05
relative error = 0.00052731398948048800511181772252083 %
Desired digits = 8
Estimated correct digits = 13
Correct digits = 6
h = 0.001
Radius of convergence (given) for eq 1 = 3.59
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.1
y[1] (closed_form) = 2.8488037435962896492358958727572
y[1] (numeric) = 2.8488204130932711199588633756921
absolute error = 1.66694969814707229675029349e-05
relative error = 0.0005851402371588920051418960987005 %
Desired digits = 8
Estimated correct digits = 13
Correct digits = 6
h = 0.001
Radius of convergence (given) for eq 1 = 3.6
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=209.1MB, alloc=52.3MB, time=2.31
TOP MAIN SOLVE Loop
x[1] = 2.11
y[1] (closed_form) = 2.8532113713536050626688274937379
y[1] (numeric) = 2.8532297123769446373970017660804
absolute error = 1.83410233395747281742723425e-05
relative error = 0.00064282035056076057082361839837119 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 6
h = 0.001
Radius of convergence (given) for eq 1 = 3.61
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.12
y[1] (closed_form) = 2.8575855625869445682877177754595
y[1] (numeric) = 2.8576055758621583417395663175258
absolute error = 2.00132752137734518485420663e-05
relative error = 0.00070035611446943437755208010698185 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 6
h = 0.001
Radius of convergence (given) for eq 1 = 3.62
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=252.8MB, alloc=52.3MB, time=2.78
TOP MAIN SOLVE Loop
x[1] = 2.13
y[1] (closed_form) = 2.8619263030522254406429747231502
y[1] (numeric) = 2.8619479892787427224459297802821
absolute error = 2.16862265172818029550571319e-05
relative error = 0.00075774929962918982419222458519111 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 6
h = 0.001
Radius of convergence (given) for eq 1 = 3.63
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.14
y[1] (closed_form) = 2.8662335790253386430839124352231
y[1] (numeric) = 2.8662569388766718814299825625842
absolute error = 2.33598513332383460701273611e-05
relative error = 0.00081500166295525196997990995942769 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 6
h = 0.001
Radius of convergence (given) for eq 1 = 3.64
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.15
y[1] (closed_form) = 2.8705073772987637622297897636165
y[1] (numeric) = 2.8705324114226771903921272890738
absolute error = 2.50341239134281623375254573e-05
relative error = 0.00087211494774091287446589764002635 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 6
h = 0.001
Radius of convergence (given) for eq 1 = 3.65
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=296.5MB, alloc=52.3MB, time=3.25
TOP MAIN SOLVE Loop
x[1] = 2.16
y[1] (closed_form) = 2.8747476851782093429386572449241
y[1] (numeric) = 2.8747743941968863620768311409365
absolute error = 2.67090186770191381738960124e-05
relative error = 0.00092909088386180964659035522786135 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 6
h = 0.001
Radius of convergence (given) for eq 1 = 3.66
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.17
y[1] (closed_form) = 2.8789544904792783571859826105347
y[1] (numeric) = 2.8789828749894876686832892819144
absolute error = 2.83845102093114973066713797e-05
relative error = 0.00098593118797741545771878390483711 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 6
h = 0.001
Radius of convergence (given) for eq 1 = 3.67
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=340.1MB, alloc=52.3MB, time=3.70
TOP MAIN SOLVE Loop
x[1] = 2.18
y[1] (closed_form) = 2.8831277815241585439203106172622
y[1] (numeric) = 2.8831578420974190443151222302098
absolute error = 3.00605732605003948116129476e-05
relative error = 0.001042637563729795746406449321373 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.68
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.19
y[1] (closed_form) = 2.8872675471383373605574652870142
y[1] (numeric) = 2.8872992843210818119523061467751
absolute error = 3.17371827444513948408597609e-05
relative error = 0.0010992117019396808391951081617418 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.69
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=383.7MB, alloc=52.3MB, time=4.17
TOP MAIN SOLVE Loop
x[1] = 2.2
y[1] (closed_form) = 2.8913737766473412903092145340874
y[1] (numeric) = 2.8914071909610787789659116534474
absolute error = 3.34143137374886566971193600e-05
relative error = 0.0011556552807999052313069978215331 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.7
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.21
y[1] (closed_form) = 2.895446459873499253018054612928
y[1] (numeric) = 2.8954815518149764486748713059589
absolute error = 3.50919414771956568166930309e-05
relative error = 0.0012119699660662628131263626745635 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.71
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
memory used=427.4MB, alloc=52.3MB, time=4.64
x[1] = 2.22
y[1] (closed_form) = 2.8994855871327298705879749170792
y[1] (numeric) = 2.8995223571740910988650495884329
absolute error = 3.67700413612282770746713537e-05
relative error = 0.0012681574112458263923031860017266 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.72
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.23
y[1] (closed_form) = 2.9034911492313523414628471867364
y[1] (numeric) = 2.9035295978202984815554683028089
absolute error = 3.84485889461400926211160725e-05
relative error = 0.0013242192577827789466470895424523 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.73
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.24
y[1] (closed_form) = 2.907463137462920681910537258545
y[1] (numeric) = 2.9075032650228669016057358383569
absolute error = 4.01275599462196951985798119e-05
relative error = 0.0013801571352418031491857748985199 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.74
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=471.1MB, alloc=52.3MB, time=5.11
TOP MAIN SOLVE Loop
x[1] = 2.25
y[1] (closed_form) = 2.9114015436050810951230281855251
y[1] (numeric) = 2.9114433505353134350136082803038
absolute error = 4.18069302323398905800947787e-05
relative error = 0.0014359726614890748333401357369202 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.75
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.26
y[1] (closed_form) = 2.915306359916452232341813479176
y[1] (numeric) = 2.9153498465922830509532174238194
absolute error = 4.34866758308186114039446434e-05
relative error = 0.0014916674428709052126290850421063 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.76
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=514.8MB, alloc=52.3MB, time=5.56
TOP MAIN SOLVE Loop
x[1] = 2.27
y[1] (closed_form) = 2.9191775791335281133645881143178
y[1] (numeric) = 2.9192227459064504047538563653539
absolute error = 4.51667729222913892682510361e-05
relative error = 0.0015472430743900758351862402143085 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.77
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.28
y[1] (closed_form) = 2.9230151944676034768848302103747
y[1] (numeric) = 2.9230620416654440721173159708251
absolute error = 4.68471978405952324857604504e-05
relative error = 0.0016027011398799094381857389610858 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.78
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=558.3MB, alloc=52.3MB, time=6.03
TOP MAIN SOLVE Loop
x[1] = 2.29
y[1] (closed_form) = 2.9268191996017213341612036147568
y[1] (numeric) = 2.9268677275287929979195918994551
absolute error = 4.85279270716637583882846983e-05
relative error = 0.0016580432121761190705859271837715 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.79
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.3
y[1] (closed_form) = 2.9305895886876425025097753858551
y[1] (numeric) = 2.9306397976248949359412874638437
absolute error = 5.02089372524334315120779886e-05
relative error = 0.0017132708532864770739698770579885 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.8
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
memory used=601.8MB, alloc=52.3MB, time=6.48
x[1] = 2.31
y[1] (closed_form) = 2.9343263563428368980597661115991
y[1] (numeric) = 2.9343782465480066588211571617403
absolute error = 5.18902051697607613910501412e-05
relative error = 0.0017683856145583447502648263824594 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.81
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.32
y[1] (closed_form) = 2.9380294976474963701138486013407
y[1] (numeric) = 2.9380830693552557204298837188066
absolute error = 5.35717077593503160351174659e-05
relative error = 0.0018233890368441028013442723712308 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.82
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.33
y[1] (closed_form) = 2.9416990081415688623077755319417
y[1] (numeric) = 2.9417542615636735557172526871705
absolute error = 5.52534221046934094771552288e-05
relative error = 0.0018782826506645218985532980568971 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.83
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=645.1MB, alloc=52.3MB, time=6.95
TOP MAIN SOLVE Loop
x[1] = 2.34
y[1] (closed_form) = 2.9453348838218136885722236501641
y[1] (numeric) = 2.9453918191472497058962585397831
absolute error = 5.69353254360173240348896190e-05
relative error = 0.0019330679763701120296572388323832 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.84
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.35
y[1] (closed_form) = 2.9489371211388777146630468933954
y[1] (numeric) = 2.9489957385340069595932014743744
absolute error = 5.86173951292449301545809790e-05
relative error = 0.0019877465243004885762139759912695 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.85
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=688.5MB, alloc=52.3MB, time=7.41
TOP MAIN SOLVE Loop
x[1] = 2.36
y[1] (closed_form) = 2.9525057169943922387454707263323
y[1] (numeric) = 2.9525660166030972033143531360033
absolute error = 6.02996087049645688824096710e-05
relative error = 0.0020423197949417923955391277078667 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.86
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.37
y[1] (closed_form) = 2.9560406687380903671939546561265
y[1] (numeric) = 2.9561026506819177772581026216497
absolute error = 6.19819438274100641479655232e-05
relative error = 0.00209678927908220051790925613645 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.87
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=731.8MB, alloc=52.3MB, time=7.88
TOP MAIN SOLVE Loop
x[1] = 2.38
y[1] (closed_form) = 2.9595419741649446844033013817622
y[1] (numeric) = 2.9596056385432481351374444060495
absolute error = 6.36643783034507341430242873e-05
relative error = 0.0021511564579655634210786074888573 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.88
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.39
y[1] (closed_form) = 2.9630096315123250179988844168454
y[1] (numeric) = 2.9630749784024066092720231292319
absolute error = 6.53468900815912731387123865e-05
relative error = 0.0022054228034432042102268984908156 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.89
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
memory used=775.1MB, alloc=52.3MB, time=8.34
x[1] = 2.4
y[1] (closed_form) = 2.9664436394571761033853697293399
y[1] (numeric) = 2.9665106689144270847624757660546
absolute error = 6.70294572509813771060367147e-05
relative error = 0.0022595897781239144117754020564097 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.9
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.41
y[1] (closed_form) = 2.9698439971132149540847731623126
y[1] (numeric) = 2.9699127091712553890732625545219
absolute error = 6.87120580404349884893922093e-05
relative error = 0.0023136588355221804837810635763671 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.91
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.42
y[1] (closed_form) = 2.9732107040281477467868604813376
y[1] (numeric) = 2.9732810986989652058242913214368
absolute error = 7.03946708174590374308400992e-05
relative error = 0.0023676314202046745535271939050985 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.92
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=818.4MB, alloc=52.3MB, time=8.80
TOP MAIN SOLVE Loop
x[1] = 2.43
y[1] (closed_form) = 2.9765437601809060324684817062674
y[1] (numeric) = 2.9766158374549933240271371456733
absolute error = 7.20772740872915586554394059e-05
relative error = 0.0024215089679350423141664022430337 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.93
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.44
y[1] (closed_form) = 2.979843165978902087334141686799
y[1] (numeric) = 2.9799169258253940363992471474612
absolute error = 7.37598464919490651054606622e-05
relative error = 0.0024752929058170204465369545440127 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.94
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=861.9MB, alloc=52.3MB, time=9.26
TOP MAIN SOLVE Loop
x[1] = 2.45
y[1] (closed_form) = 2.9831089222553032196886356771449
y[1] (numeric) = 2.9831843646221125027498903207013
absolute error = 7.54423668092830612546435564e-05
relative error = 0.0025289846524359153792756888123578 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.95
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.46
y[1] (closed_form) = 2.9863410302663248511745985513408
y[1] (numeric) = 2.9864181550802768967554420432224
absolute error = 7.71248139520455808434918816e-05
relative error = 0.0025825856179984746598047061525268 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.96
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=905.1MB, alloc=52.3MB, time=9.72
TOP MAIN SOLVE Loop
x[1] = 2.47
y[1] (closed_form) = 2.989539491688542193093991802493
y[1] (numeric) = 2.9896182988555091567295454281257
absolute error = 7.88071669669636355536256327e-05
relative error = 0.0026360972044711816803984928201378 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.97
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.48
y[1] (closed_form) = 2.9927043086162203407835323693407
y[1] (numeric) = 2.9927847980212541632464164803585
absolute error = 8.04894050338224628841110178e-05
relative error = 0.0026895208057170039870734095357909 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.98
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
memory used=948.5MB, alloc=52.3MB, time=10.17
x[1] = 2.49
y[1] (closed_form) = 2.9958354835586626112304869923252
y[1] (numeric) = 2.9959176550661271686936931207045
absolute error = 8.21715074645574632061283793e-05
relative error = 0.0027428578076306248942201958212726 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 3.99
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.5
y[1] (closed_form) = 2.9989330194375769512977374688319
y[1] (numeric) = 2.9990168728912793060153924328127
absolute error = 8.38534537023547176549639808e-05
relative error = 0.0027961095882721876344667644160616 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.51
y[1] (closed_form) = 3.0019969195844602460761752965617
y[1] (numeric) = 3.0020824548077810060563460543274
absolute error = 8.55352233207599801707577657e-05
relative error = 0.0028492775179995807909643053144972 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.01
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=991.8MB, alloc=52.3MB, time=10.64
TOP MAIN SOLVE Loop
x[1] = 2.52
y[1] (closed_form) = 3.005027187738000358998905697555
y[1] (numeric) = 3.0051144045340231550375280218679
absolute error = 8.72167960227960386223243129e-05
relative error = 0.0029023629595992932878923156345714 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.02
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.53
y[1] (closed_form) = 3.0080238280414957374360156133097
y[1] (numeric) = 3.0081127261931358257775579061994
absolute error = 8.88981516400883415422928897e-05
relative error = 0.0029553672684158667542417185547791 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.03
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=1035.2MB, alloc=52.3MB, time=11.09
TOP MAIN SOLVE Loop
x[1] = 2.54
y[1] (closed_form) = 3.0109868450402924195413607225435
y[1] (numeric) = 3.0110774243104244183299280979326
absolute error = 9.05792701319987885673753891e-05
relative error = 0.0030082917924799726256300212382565 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.04
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.55
y[1] (closed_form) = 3.0139162436792382801445139588338
y[1] (numeric) = 3.0140085038108230477287293040264
absolute error = 9.22601315847675842153451926e-05
relative error = 0.0030611378726351409088048071311434 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.05
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=1078.5MB, alloc=52.3MB, time=11.55
TOP MAIN SOLVE Loop
x[1] = 2.56
y[1] (closed_form) = 3.016812029300154355472242096559
y[1] (numeric) = 3.0169059700163650185283829561375
absolute error = 9.39407162106630561408595785e-05
relative error = 0.0031139068426631671033839511881494 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.06
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.57
y[1] (closed_form) = 3.0196742076393230884451762908526
y[1] (numeric) = 3.0197698286436702277856724251304
absolute error = 9.56210043471393404961342778e-05
relative error = 0.0031666000294082233550506915186396 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.07
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
memory used=1121.8MB, alloc=52.3MB, time=12.02
x[1] = 2.58
y[1] (closed_form) = 3.0225027848249933382272446744742
y[1] (numeric) = 3.022600085801449340065724894245
absolute error = 9.73009764560018384802197708e-05
relative error = 0.0032192187528996995036625602293283 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.08
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.59
y[1] (closed_form) = 3.025297767374901999608457265882
y[1] (numeric) = 3.0253967479880245799580500271215
absolute error = 9.89806131225803495927612395e-05
relative error = 0.0032717643264737992883440617695 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.09
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.6
y[1] (closed_form) = 3.0280591621938120796762821639536
y[1] (numeric) = 3.0281598220888669894647973261774
absolute error = 0.0001006598950549097885151622238
relative error = 0.0033242380568939165794180639653821 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.1
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=1165.1MB, alloc=52.3MB, time=12.47
TOP MAIN SOLVE Loop
x[1] = 2.61
y[1] (closed_form) = 3.0307869765710670810776237676972
y[1] (numeric) = 3.0308893153741499994715482864885
absolute error = 0.0001023388030829183939245187913
relative error = 0.0033766412444698161237994531450757 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.11
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.62
y[1] (closed_form) = 3.033481218178161542992795101142
y[1] (numeric) = 3.0335852354963191663316991390981
absolute error = 0.0001040173181576233389040379561
relative error = 0.0034289751831756429160410317883967 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.12
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=1208.5MB, alloc=52.3MB, time=12.94
TOP MAIN SOLVE Loop
x[1] = 2.63
y[1] (closed_form) = 3.036141895066327592735344070281
y[1] (numeric) = 3.0362475904876779263892924519424
absolute error = 0.0001056954213503336539483816614
relative error = 0.003481241160766783941405120146005 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.13
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.64
y[1] (closed_form) = 3.0387690156641373626576149627052
y[1] (numeric) = 3.0388763887579892230324889182941
absolute error = 0.0001073730938518603748739555889
relative error = 0.0035334404588956056799588364187405 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.14
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=1251.8MB, alloc=52.3MB, time=13.39
TOP MAIN SOLVE Loop
x[1] = 2.65
y[1] (closed_form) = 3.0413625887751211287819597723721
y[1] (numeric) = 3.0414716390920928626111928219905
absolute error = 0.0001090503169717338292330496184
relative error = 0.0035855743532260904115851869274293 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.15
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.66
y[1] (closed_form) = 3.0439226235754010292920079685517
y[1] (numeric) = 3.0440333506475384572681053514747
absolute error = 0.000110727072137427976097382923
relative error = 0.0036376441135473940207990326015106 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.16
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
memory used=1295.1MB, alloc=52.3MB, time=13.84
x[1] = 2.67
y[1] (closed_form) = 3.0464491296113402227077982338639
y[1] (numeric) = 3.0465615329522338144231196843321
absolute error = 0.0001124033408935917153214504682
relative error = 0.0036896510038863476671942535857927 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.17
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.68
y[1] (closed_form) = 3.0489421167972073472333029006404
y[1] (numeric) = 3.0490561959021086343169224390176
absolute error = 0.0001140791049012870836195383772
relative error = 0.0037415962826189253620678500130484 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.18
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.69
y[1] (closed_form) = 3.0514015954128561444053582636486
y[1] (numeric) = 3.0515173497587933786613510566356
absolute error = 0.000115754345937234255992792987
relative error = 0.0037934812025806991741143234988345 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.19
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=1338.5MB, alloc=52.3MB, time=14.31
TOP MAIN SOLVE Loop
x[1] = 2.7
y[1] (closed_form) = 3.0538275761014201117896662907204
y[1] (numeric) = 3.0539450051473131750618909937323
absolute error = 0.0001174290458930632722247030119
relative error = 0.0038453070111763034769095990790167 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.2
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.71
y[1] (closed_form) = 3.0562200698670220510627620283603
y[1] (numeric) = 3.0563391730537966234720872158594
absolute error = 0.0001191031867745724093251874991
relative error = 0.0038970749504879293480620729564797 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.21
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=1381.9MB, alloc=52.3MB, time=14.76
TOP MAIN SOLVE Loop
x[1] = 2.72
y[1] (closed_form) = 3.0585790880724983793890448096369
y[1] (numeric) = 3.0586998648231993725109903765327
absolute error = 0.0001207767507009931219455668958
relative error = 0.00394878625738286993425709969073 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.22
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.73
y[1] (closed_form) = 3.0609046424371380735495410587096
y[1] (numeric) = 3.0610270921570423350234504733237
absolute error = 0.0001224497199042614739094146141
relative error = 0.0040004421636201373078221483063636 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.23
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=1425.2MB, alloc=52.3MB, time=15.22
TOP MAIN SOLVE Loop
x[1] = 2.74
y[1] (closed_form) = 3.0631967450344361178043853014839
y[1] (numeric) = 3.0633208671111644137894933191233
absolute error = 0.0001241220767282959851080176394
relative error = 0.004052043895956171058758446433278 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.24
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.75
y[1] (closed_form) = 3.065455408289861327974449761243
y[1] (numeric) = 3.0655812020934896097935440457193
absolute error = 0.0001257938036282818190942844763
relative error = 0.0041035926762496585912902946079396 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.25
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=1468.5MB, alloc=52.3MB, time=15.69
TOP MAIN SOLVE Loop
x[1] = 2.76
y[1] (closed_form) = 3.0676806449786384257094902042807
y[1] (numeric) = 3.0678081098618083869472659908426
absolute error = 0.0001274648831699612377757865619
relative error = 0.0041550897215654868257479947033018 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.26
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.77
y[1] (closed_form) = 3.0698724682235442383709679604081
y[1] (numeric) = 3.070001603521573168621624517274
absolute error = 0.0001291352980289302506565568659
relative error = 0.0042065362442778447449005636527623 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.27
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.78
y[1] (closed_form) = 3.0720308914927179013977097817416
y[1] (numeric) = 3.0721616965237078427848184226054
absolute error = 0.0001308050309899413871086408638
relative error = 0.0042579334521724959685695258500256 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.28
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=1511.8MB, alloc=52.3MB, time=16.14
TOP MAIN SOLVE Loop
x[1] = 2.79
y[1] (closed_form) = 3.0741559285974849414421261238821
y[1] (numeric) = 3.0742884026624311539632946609088
absolute error = 0.0001324740649462125211685370267
relative error = 0.0043092825485482402913678038045037 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.29
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.8
y[1] (closed_form) = 3.0762475936901951199641655850108
y[1] (numeric) = 3.0763817360730938616435164908682
absolute error = 0.0001341423828987416793509058574
relative error = 0.004360584732317582875603973776748 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.3
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=1555.1MB, alloc=52.3MB, time=16.59
TOP MAIN SOLVE Loop
x[1] = 2.81
y[1] (closed_form) = 3.0783059012620739183498731573542
y[1] (numeric) = 3.0784417112300295461128257479689
absolute error = 0.0001358099679556277629525906147
relative error = 0.0044118411981066295546609674225188 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.31
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.82
y[1] (closed_form) = 3.0803308661410875469816707966689
y[1] (numeric) = 3.0804683429444189440989551913067
absolute error = 0.0001374768033313971172843946378
relative error = 0.0044630531363542264713917890054615 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.32
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=1598.3MB, alloc=52.3MB, time=17.06
TOP MAIN SOLVE Loop
x[1] = 2.83
y[1] (closed_form) = 3.0823225034898213620286125279964
y[1] (numeric) = 3.0824616463621676979098290362814
absolute error = 0.000139142872346335881216508285
relative error = 0.0045142217334103620511680768660484 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.33
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.84
y[1] (closed_form) = 3.0842808288033715750471987066321
y[1] (numeric) = 3.0844216369617974030985549816411
absolute error = 0.000140808158425828051356275009
relative error = 0.0045653481716338490900683855316475 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.34
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=1641.7MB, alloc=52.3MB, time=17.52
TOP MAIN SOLVE Loop
x[1] = 2.85
y[1] (closed_form) = 3.0862058579072501417871749962797
y[1] (numeric) = 3.0863483305523498409832694229491
absolute error = 0.0001424726450996991960944266694
relative error = 0.0046164336294893045252027763637282 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.35
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.86
y[1] (closed_form) = 3.0880976069553027178823951204769
y[1] (numeric) = 3.0882417432713042836380534126899
absolute error = 0.000144136316001565755658292213
relative error = 0.0046674792816434442462423481582394 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.36
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.87
y[1] (closed_form) = 3.0899560924276395703745907757988
y[1] (numeric) = 3.0901018915825077602397888503853
absolute error = 0.0001457991548681898651980745865
relative error = 0.0047184862990607101047631144570786 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.37
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=1685.0MB, alloc=52.3MB, time=17.98
TOP MAIN SOLVE Loop
x[1] = 2.88
y[1] (closed_form) = 3.0917813311285793352680599527921
y[1] (numeric) = 3.0919287922741181749068653282222
absolute error = 0.0001474611455388396388053754301
relative error = 0.0047694558490982460809322126246755 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.38
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.89
y[1] (closed_form) = 3.0935733401846055125461434974681
y[1] (numeric) = 3.093722462456560167399365494657
absolute error = 0.0001491222719546548532219971889
relative error = 0.0048203890956002403752724981164893 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.39
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=1728.4MB, alloc=52.3MB, time=18.44
TOP MAIN SOLVE Loop
x[1] = 2.9
y[1] (closed_form) = 3.0953321370423355912961909000569
y[1] (numeric) = 3.095482919560493609267032833495
absolute error = 0.0001507825181580179708419334381
relative error = 0.0048712871989916500066533786525921 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.4
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.91
y[1] (closed_form) = 3.0970577394665026987887966020033
y[1] (numeric) = 3.0972101813347946292312372326219
absolute error = 0.0001524418682919304424406306186
relative error = 0.0049221513163713243161880267624437 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.41
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=1771.6MB, alloc=52.3MB, time=18.91
TOP MAIN SOLVE Loop
x[1] = 2.92
y[1] (closed_form) = 3.0987501655379496685396890062773
y[1] (numeric) = 3.0989042658445490627705723289728
absolute error = 0.0001541003065993942308833226955
relative error = 0.0049729826016045436002890749388435 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.42
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.93
y[1] (closed_form) = 3.1004094336516354235490422629241
y[1] (numeric) = 3.1005651914690582220469110167694
absolute error = 0.0001557578174227984978687538453
relative error = 0.0050237822054149889246681461057968 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.43
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=1815.0MB, alloc=52.3MB, time=19.36
TOP MAIN SOLVE Loop
x[1] = 2.94
y[1] (closed_form) = 3.102035562514653572063417252919
y[1] (numeric) = 3.1021929768998568834599734102527
absolute error = 0.0001574143852033113965561573337
relative error = 0.0050745512754761590044830562892868 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.44
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.95
y[1] (closed_form) = 3.1036285711442631143402796515863
y[1] (numeric) = 3.1037876411387433912539818419445
absolute error = 0.0001590699944802769137021903582
relative error = 0.0051252909565022498740665029417929 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.45
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.96
y[1] (closed_form) = 3.1051884788659311600143414323259
y[1] (numeric) = 3.1053492034958217767200423012571
absolute error = 0.0001607246298906167057008689312
relative error = 0.0051760023903385129126400360657537 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.46
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=1858.3MB, alloc=52.3MB, time=19.81
TOP MAIN SOLVE Loop
x[1] = 2.97
y[1] (closed_form) = 3.1067153053113875567690749558561
y[1] (numeric) = 3.1068776835875557936427485890165
absolute error = 0.0001623782761682368736736331604
relative error = 0.0052266867160511066400578285742975 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.47
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
TOP MAIN SOLVE Loop
x[1] = 2.98
y[1] (closed_form) = 3.1082090704166913321058986284207
y[1] (numeric) = 3.1083731013348347717293973545397
absolute error = 0.000164030918143439623498726119
relative error = 0.0052773450700164575488691168826114 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.48
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
memory used=1901.5MB, alloc=52.3MB, time=20.28
TOP MAIN SOLVE Loop
x[1] = 2.99
y[1] (closed_form) = 3.1096697944203088510779683119049
y[1] (numeric) = 3.1098354769610511908353676207013
absolute error = 0.0001656825407423397573993087964
relative error = 0.0053279785860101450957711998742965 %
Desired digits = 8
Estimated correct digits = 12
Correct digits = 5
h = 0.001
Radius of convergence (given) for eq 1 = 4.49
Order of pole (given) = 0.5
NO POLE (ratio test) for Equation 1
NO REAL POLE (three term test) for Equation 1
NO COMPLEX POLE (six term test) for Equation 1
Finished!
diff ( y , x , 1 ) = sin ( sqrt ( 2.0 * x + 3.0 ) ) ;
Iterations = 1000
Total Elapsed Time = 20 Seconds
Elapsed Time(since restart) = 20 Seconds
Time to Timeout = 2 Minutes 39 Seconds
Percent Done = 100.1 %
> quit
memory used=1933.9MB, alloc=52.3MB, time=20.61