Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: A natural occurrence

by jdalbec (Deacon)
on Mar 04, 2006 at 16:03 UTC ( [id://534483]=note: print w/replies, xml ) Need Help??


in reply to Re: A natural occurrence
in thread A natural occurrence

How is 2, 3 .. sqrt($p) different from 2 .. sqrt($p)?

Update: I guess that applies to .718281 as well. Not to mention any all-0 string. In benizi's golf below I think 2..sqrt would work just as well because he starts at position 2 (skipping the decimal point) and explicitly excludes any string starting with a 0.

Replies are listed 'Best First'.
Re^3: A natural occurrence
by japhy (Canon) on Mar 04, 2006 at 21:57 UTC
    In the particular case of 2.71828, its square root is less than 2, so 2 .. sqrt($p) is no good for us.

    Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
    How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://534483]
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found