Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^4: Small Perl 6 discoveries II, Rats

by afoken (Abbot)
on Sep 27, 2017 at 21:23 UTC ( #1200234=note: print w/replies, xml ) Need Help??


in reply to Re^3: Small Perl 6 discoveries II, Rats
in thread [Perl6] Small discoveries I, __DATA__

why does perl6 print all those wrong digits?

There is a well-hidden message in the "wrong" digits. Click here and follow the links.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
  • Comment on Re^4: Small Perl 6 discoveries II, Rats

Replies are listed 'Best First'.
Re^5: Small Perl 6 discoveries II, Rats
by Anonymous Monk on Sep 27, 2017 at 22:04 UTC
    Why the difference?
    > 111111111111111111111/1000000000000000000000 0.111111111111111 > .111111111111111111111 0.11111111111111111604544

      I would assume that one is a rational number while the other gets constructed and represented as a floating point number. I think you can somehow look into how Perl6 represents the values but I don't know it.

        Yes, but it's the reverse of what any sane person would expect.
        > (111111111111111111111/1000000000000000000000).WHAT
        (Num)
        > (.111111111111111111111).WHAT
        (Rat)
        

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1200234]
help
Chatterbox?
and the monks are mute...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2017-11-19 00:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (278 votes). Check out past polls.

    Notices?