
I am Gaurav Deshmukh, CSE second year student. I am interested in the idea of adding support to Bernoulli's number to special functions in Boost.Math for GSoC-2013.
Hi Gaurav. Thank you for your interest in this project.
I have tried to implement naive Akiyama–Tanigawa algorithm for second Bernoulli numbers using multi-precision boost class *'number' (cpp_dec_float_50**)*. I have attached two files. The header file *bernoulli.hpp* contains the function to calculate second bernoulli number for n<3000. *exampe.cpp *is made to test the bernoulli.hpp .
It's pretty good work, but I have a few suggestions. 1) You should reserve the known size of the vector with its known size (n) up front using the reserve() member. It has better performance than successively calling push_back() on an unreserved vector. 2) You have an implementation for cpp_dec_float. Very good. But please try to make a template solution such as: template<typename float_type> bernoulli(unsigned n) { // ... } Test it a bit for float, double, and cpp_dec_float. There is quite a bit of interest in this project. I do however, encourage you to work up your application and apply for this project. Get back to me and Paul with any questions you may have. Good luck! Sincerely, Chris.