Wait, I think I've seen this advert before!
[quote Television]
As a busy mum...
[/quote]
That's it!!
It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
#include
#define MAXLONGLONG 0x7FFFFFFFFFFFFFFF
/* Returns GCD(a, b) using Euclid's algorithm of antiquity */
long int euclid(long unsigned int a, long unsigned int b)
{ return a%b==0 ? b : euclid(b, a%b); }
/* Returns n choose m */
long int combin(long int n, long int m)
{
long int i;
long unsigned int N=1;
long unsigned int D=1;
if (m+m>n) m=n-m;
if (m < 0) N=0;
for (i=0; i{
long unsigned int t = euclid(n-i, m-i);
long unsigned int u = euclid(D, (n-i)/t);
long unsigned int v = euclid(N, (m-i)/t);
if (MAXLONGLONG / (N/v) <= (n-i)/t/u) { N=-1; break; }
N = N/v * ((n-i)/t/u);
D = D/u * ((m-i)/t/v);
}
return N;
}
void testcombin(long int n, long int m)
{ printf("%ld choose %ld = %ld\n", n, m, combin(n, m)); }
void main(void)
{
testcombin(2, -1);
testcombin(2, 3);
testcombin(6, 0);
testcombin(6, 2);
testcombin(10, 7);
testcombin(15, 7);
testcombin(63, 30);
testcombin(66, 33);
testcombin(121976, 4);
testcombin(3810778, 3);
testcombin(4294967295, 2);
testcombin(4294967296, 2); // 2^32 choose 2 = 2^63. One too big.
}
2 choose -1 = 0
2 choose 3 = 0
6 choose 0 = 1
6 choose 2 = 15
10 choose 7 = 120
15 choose 7 = 6435
63 choose 30 = 860778005594247069
66 choose 33 = 7219428434016265740
121976 choose 4 = 9222845730360011050
3810778 choose 3 = 9223364155031292776
4294967295 choose 2 = 9223372030412324865
4294967296 choose 2 = -1