Hollander, M., and D. A. Wolfe. 1999. Nonparametric statistical methods
is supposed to have a discussion on tie handling for kendall's tau,
but I don't have access to it.
Searching some references again, I still get only ambiguous answers,
whether matching ties should be counted or not.
I guess we can stick with the current implementation if it produces
the same result as numerical recipes.
And I like it better if a vector has correlation 1 with itself.
But I found a verification for the calculation of the variance and the pvalue.
Josef