Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Irrational numbers

by grondilu (Friar)
on Dec 17, 2012 at 16:44 UTC ( #1009200=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    sub zeta($s) { [\+] map -> \n { 1 / n**$s }, 1..* }
    say zeta(2)[1000];
  2. or download this
    sub infix:<+>(Irrational $x, Irrational $y) { gather while True {
            (state $n)++;
            take $x[$n] + $y[$n];
  3. or download this
    sub infix:<==>(Irrational $x, Irrational $y) {
        while True {
            (state $n)++;
            return $x[$n] == $y[$n];
  4. or download this
    package Real;
    # the accuracy number below is only for display.
    print $e + $one, "\n";
    print $e * $e, "\n";
    print ($three + $one) * Arctan(1);

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://1009200]
Approved by davido
Front-paged by Tommy
[Discipulus]: a solution would be disabiltate sig as default and let users to show them
[karlgoethebier]: now it's getting weird...
[GotToBTru]: 'getting'?
[Discipulus]: why karlgoethebier ?
[GotToBTru]: ugh .. what's the term for comparing versions of an algorithm to determine which is most efficient?

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (16)
As of 2017-06-22 12:46 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (519 votes). Check out past polls.