identificationdivision. program-id. zeta. * Riemann zeta function of two arguments * from Cephes-Library, zetaf.c author. "JD". date-written. 27.8.2006. date-compiled. datadivision. working-storagesection. 78 MAXNUMF value1e8. 78 MACHEPF value1e8. 78 DOMAIN value7. * Expansion coefficients * for Euler-Maclaurin summation formula * (2k)! / B2k * where B2k are Bernoulli numbers 77 AR pic s9(4)v9(4) occurs12 values are 12.0,
-720.0, 30240.0,
-1209600.0, 47900160.0,
-1.892437580318379e9, 7.47242496e10,
-2.9501307279181e12, 1.1646782814350e14,
-4.5979787224074e15, 1.8152105401943e17,
-7.1661652561756e18. 77 i pic9(8). 77 x pic s9(4)v9(4). 77 q pic s9(4)v9(4). 77 a pic s9(4)v9(4). 77 b pic s9(4)v9(4). 77 k pic s9(4)v9(4). 77 s pic s9(4)v9(4). 77 w pic s9(4)v9(4). 77 t pic s9(4)v9(4). 77 te pic s9(4)v9(4). linkagesection. 77 xx pic s9(4)v9(4). 77 qq pic s9(4)v9(4). 77 res pic s9(4)v9(4). proceduredivisionusing xx, qq returning res. move xx to x move qq to q if( x = 1.0 ) move MAXNUMF to res stoprun. if( x < 1.0 ) call mtherr using"zetaf", DOMAIN move0.0to res stoprun * Euler-Maclaurin summation formula */ if( x < 25.0 ) move9.0to w movefunction powf( q, -x ) to s move q to a performvarying i from0by1until i>=9 add1.0to a movefunction powf( a, -x ) to b add b to s if b/s < MACHEPF goto done end-perform. move a to w compute s=s + b*w/(x-1.0); compute s=s - 0.5 * b; move1.0to a move0.0to k performvarying i from0by1until i>=12 compute a=a * x + k compute b=b / w; compute t = a*b/AR(i) add t to s compute te=t/s movefunction fabsf(te) to t if t < MACHEPF goto done add1.0to k compute a = a* x + k compute b = b/ w add1.0to k end-perform.
done. move s to res stoprun * * Basic sum of inverse powers */
pseres. movefunction powf(q,-x) to s move q to a performwithtestafter until b/s <= MACHEPF add2.0to a movefunction powf( a, -x ) to b add b to s end-perform movefunction powf( 2.0, -x ) to b compute s = (s + b)/(1.0-b); move s to res stoprun end-program saegezahn.
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-06-09)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.