Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: perl6 rational number problem

by NetWallah (Canon)
on Nov 21, 2017 at 05:42 UTC ( #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
Node Status?
node history
Node Type: note [id://1203861]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2018-01-18 18:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (214 votes). Check out past polls.

    Notices?