Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: perl6 rational number problem

by Anonymous Monk
on Nov 21, 2017 at 08:55 UTC ( #1203867=note: print w/replies, xml ) Need Help??


in reply to perl6 rational number problem

You have to use FatRat instead of Rat.
> my Rat $x = 0.9 ** 20; Type check failed in assignment to $x; expected Rat but got Num (0.121 +576654590569e0) > my FatRat $y = FatRat(0.9) ** 20; 0.12157665459056928801

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1203867]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2018-04-23 18:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?