This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: Inline PI function
authorTom Phoenix <rootbeer@teleport.com>
Mon, 10 Mar 1997 22:33:20 +0000 (14:33 -0800)
committerChip Salzenberg <chip@atlantic.net>
Sat, 8 Mar 1997 23:57:19 +0000 (11:57 +1200)
private-msgid: Pine.GSO.3.95q.970310143125.22489V-100000@kelly.teleport.com

pod/perlsub.pod

index 9d725ab..f2a5b8f 100644 (file)
@@ -764,7 +764,9 @@ affected.
 
 All of the following functions would be inlined.
 
-    sub PI ()          { 3.14159 }
+    sub pi ()          { 3.14159 }             # Not exact, but close.
+    sub PI ()          { 4 * atan2 1, 1 }      # As good as it gets,
+                                               # and it's inlined, too!
     sub ST_DEV ()      { 0 }
     sub ST_INO ()      { 1 }