use constant PI => 4 * atan2(1, 1); #### sub PI { 4 * atan2(1, 1); } #### sub PI { 3.1415926536; # to the precision available on the machine running the program }