refactored findPi and removed variable
refactored findPi with Machin's formula