double GenHarmonic(int n, double m);
Generalized harmonic number H(n,m).
| # | Name | Type | Description |
|---|---|---|---|
| 1 | n | int | upper summation index; non-negative integer. |
| 2 | m | double | order (exponent); real. |
Returns: the generalized harmonic number H(n,m).
Remarks:
The generalized harmonic number is defined by the finite sum
H(n,m) = sum_(k=1)^n1/k^m .
Domain: n integer, m real. Defined behavior: returns the exact finite sum; H(n,1)=H_n (the ordinary harmonic number), , and for m > 1 the partial sums increase toward zeta(m) from below as n -> inf. For n <= 0 the empty sum is 0.
See Also: Probabilities::Harmonic
Declared in Dew::Math::Units::Probabilities · Dew.Math/Units.Probabilities.h · Cross-compiler