#BERNULLI. Bernoulli numbers
Bernoulli numbers
Your task is to compute natural logarithm of the absolute value of the Bernoulli number for many integer parameters N.
I/O format is the same as in BINARYIO.
Input
Array of unsigned 32 bit integers in binary format (use fread in C/C++)
To read unsigned N use fread(&N, sizeof(N), 1, stdin) instead of usual scanf("%u", &N) until the end of file.
For each test case 2 ≤ N < 232, N is even. There will be up to 1,250,000 numbers in input file.
Output
Array of doubles in binary format (use fwrite in C/C++)
To write double a use fwrite(&a, sizeof(a), 1, stdout) instead of usual printf("%lf\n", a).
For each N output ln(|BN|) with absolute or relative error less than 10-15
Example
Input:
4
10
50
Output:
-3,4011973816621553754132366916069
-2,580216829592325170273661603119
57,277060811865704087099873424857
Sample input and output are readable for your convenience!!!
TL = 5 * My time