Printing table of coefficients and partial sums for each example

Mathematica program

(* Printing table of coefficients and partial sums for each example *)

sect = "ctable";
entity = "table";
"<A NAME=\"" <> sect <> "\"></A><TABLE BORDER=1 CELLPADDING=8 CELLSPACING=0 BGCOLOR=\"#FFFFFF\"><TR><TD>" // p;
"<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>" // p;
"<TR><TH ALIGN=\"CENTER\" VALIGN=\"MIDDLE\" BGCOLOR=\"#FFFFFF\" \
COLSPAN=3>Coefficients of Moller-Plesset perturbation series" <>
      "</TH></TR>" // p;
"<TR ALIGN=\"CENTER\" VALIGN=\"MIDDLE\" BGCOLOR=\"#FEF8CB\"><TH \
WIDTH=\"10%\"><I>n</I></TH>" <> 
      "<TH><I>E</I><SUB><I>n</I></SUB></TH><TH>Partial sum</TH></TR>" // p;
esum = 0;
Do[cn = func[[n]];
    esum = esum + cn;
    cnp = ToString[FortranForm[SetAccuracy[cn, 8]]];
    errn = Abs[(esum - enex)/enex];
    esump = If[errn > 0.2, "", printing`printF[esum, 8, 5]];
    "<TR ALIGN=\"CENTER\" VALIGN=\"MIDDLE\" BGCOLOR=\"#FFFFFF\"><TD \
WIDTH=\"10%\">" <>
        ToString[n] <> "</TD><TD><TT>" <> cnp <> "</TT></TD><TD><TT>" <> 
        esump <> "</TT></TD></TR>" // p;
    , {n, nm}];
enexp = printing`printF[enex, 8, 5];
"<TR ALIGN=\"CENTER\" VALIGN=\"MIDDLE\" BGCOLOR=\"#D5D5EA\"><TD \
COLSPAN=2>Exact energy</TD><TD><TT>" <> enexp <> "</TT></TD></TR>" // p;
"</TABLE></TD></TR></TABLE>" // p;

printprogr[sect]; printnav;

All Mathematica programs used to study M. - P. series Blank Work in UMassD BlankWaste icon Unpublished reports

Designed by A. Sergeev.