Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: perl6 rational number problem

by NetWallah (Canon)
on Nov 21, 2017 at 05:42 UTC ( [id://1203861]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    > my Rat @example =  1 , * ** 0.9999 ... Inf;
    [...]
    > @example[^4]
    Type check failed in assignment to @example; expected Rat but got Int
      in block <unit> at <unknown file>:1
    
  2. or download this
    > my Rat @example =  1.0, * ** 0.9999 ... Inf;
    [...]
    ...
    
    > @example[0]
    1
    
  3. or download this
    > my Rat @example =  1.0, * += 0.9999 ... Inf;
    [...]
    > @example[^4]
    (1 1.9999 2.9998 3.9997)
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-03-29 02:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found