> perl5 -E 'say 3e-1 - .3' 0
In this case, the floating values for 3e-1 and .3 are both "wrong," i.e. not really equal to mathematical .3, but since they have the same error, subtracting one from the other happens to return 0. So the result seems correct, but only because the two inaccuracies compensate each other.
> perl6 -e 'say 3e-1 - .3' 5.55111512312578e-17
Here, voluntarily or not, you mix up two different types. 3e-1 is a floating-point value (and, as such, liable to inaccuracies, as we all know), whereas .3 is a rational, and is entirely accurate.

For example, printing the first 100 digits of .3 under Perl 6:

> printf "%.100f\n", .3; 0.30000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000 >
Subtracting a rational from an inaccurate float is just wrong, it is like adding apples and oranges.

In reply to Re^6: Small Perl 6 discoveries II, Rats by Laurent_R
in thread [Perl6] Small discoveries I, __DATA__ by holli

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.