p10 in c++, created math library class singleton also