http://qs321.pair.com?node_id=223177


in reply to How can I get sine, cosine, and tangent to return values in degrees?

Rather than have a line like this
my $pi = 3.14159265358979;
which requires you to choose how many digits of pi you (or your operating system) want, and even may require (for some, at least) that you look up the value of pi, I would suggest that a line like this instead will do the right thing.
my $pi = 4*atan2(1,1);