Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
An apparent 67.
#000000001111111111222222222233333333334444444444555555555566666666 #234567890123456789012345678901234567890123456789012345678901234567 $i=43;$p=1;eval'$x'.chr($i).'=4/$p;$p+=2;$i^=6'for 1..10**5;print$x
update :
#0000000011111111112222222222333333333344444444445555555555 #2345678901234567890123456789012345678901234567890123456789 $o=1;$t=3;for(1..1e5){$e+=(4/$o)-(4/$t);$o+=4;$t+=4}print$e

Simplify, simplify... :)
update :
to Chmrr : (1**5) yeah, I saw that in another solution and felt rather sheepish. As to the exact value of the number, I felt it appropriate to use something approximate to Ovid's original algorithm.

In reply to Re: Golf -- compute PI (boo) by boo_radley
in thread Golf -- compute PI by Ovid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-25 13:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found