Snippets created by Pavel Tatarintsev

  • Fast Fibonacci numbers calculation

    This snippet based on Binet's formula combined with fast power algorithm. Four multiplications run in parallel, thus processor with four cores recommended. Bitwise operators improve divisions and multiplications by pow of 2.

    0 people like this

    Posted: 3 months ago by Pavel Tatarintsev

  • Distribution of Random hyperharmonic series

    The random hyperharmonic series is the infinite series S = Sum(1,inf,d(i)/i^pow), where integer pow is greater than 1, and d(i) are independent, identically distributed random variables with property P(d(i)=0) = P(d(i)=1) = 0.5. Cumulative function F(x) = P(S < x) for even powers can be build by combination of analytical and numerical computations.

    0 people like this

    Posted: 6 days ago by Pavel Tatarintsev