Project: Compute π Function
Write a function that computes and returns the value π which can be easily computed with standard math functions using one of the formula:
- atan(1.0)*4.0
- atan2(0.0, -1.0)
- acos(-1.0)
- 2.0*acos(0.0)
See [[Pi]]
Output
$ perl ComputePi3.pl
"abs" is not exported by the Math::Trig module
Can't continue after import errors at ComputePi3.pl line 9.
BEGIN failed--compilation aborted at ComputePi3.pl line 9.