double psi(x) double x;
{ double p, q, nz, s, w, y, z; int i, n, negative;
negative = 0;
nz = 0.0;
if (x <= 0.0) {
negative = 1;
q = x;
p = floor(q); if (p == q) {
mtherr("psi", SING); return (MAXNUM);
} /* Remove the zeros of tan(PI x) *bysubtractingthenearestintegerfromx
*/
nz = q - p; if (nz != 0.5) { if (nz > 0.5) {
p += 1.0;
nz = q - p;
}
nz = PI / tan(PI * nz);
} else {
nz = 0.0;
}
x = 1.0 - x;
}
/* check for positive integer up to 10 */ if ((x <= 10.0) && (x == floor(x))) {
y = 0.0;
n = x; for (i = 1; i < n; i++) {
w = i;
y += 1.0 / w;
}
y -= EUL; goto done;
}
s = x;
w = 0.0; while (s < 10.0) {
w += 1.0 / s;
s += 1.0;
}
if (s < 1.0e17) {
z = 1.0 / (s * s);
y = z * polevl(z, A, 6);
} else
y = 0.0;
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.