Update pi.cpp

added comments