> That's not the fibonacci sequence, that's just a regular sigma(i)
> (i=1..n) sequence. And if you were to generate the sequence numbers at
> compile-time I might agree with you, if you also were to avoid using
> inline asms.
If the sigma(i) method is to stay, please note that
sigma(1 <= i <= n | i) = n*(n+1) / 2
for all n > 0 (trivial proof by induction).
That is, no need to loop; in this case, with n = num - 1
k = ((num - 1) * num) / 2
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/