summaryrefslogtreecommitdiffstats
path: root/lib/harmonic.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/harmonic.c')
-rw-r--r--lib/harmonic.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/harmonic.c b/lib/harmonic.c
index 2c69ee8..c9920c9 100644
--- a/lib/harmonic.c
+++ b/lib/harmonic.c
@@ -1,10 +1,10 @@
-// Harmonic
+// Harmonic Number
//
// harmonic
//
-// Harmonic mean
+// Harmonic number H(n) = Σ(1/k) for k=1..n
//
-// H = n / Σ(1/x_i)
+// H(n) = 1 + 1/2 + 1/3 + ... + 1/n
//
// Inputs: 1
// Outputs: 1