Population variance functionality implemented in C++