[IMP-dev] math functions in c++