Derive the value of PI constant in cpp