by John on (#5E3ZD)
Here’s a frivolous problem whose solution illustrates three features of Perl: Arbitrary precision floating point Lazy quantifiers in regular expressions Returning the positions of matched groups. Our problem is to look for the digits 3, 1, 4, and 1 in the decimal part of π. First, we get the first 100 digits of π after […]The post Finding pi in pi with Perl first appeared on John D. Cook.