Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Rat.perl (was: [pugs-commits] r29121 - docs/Perl6/Spec)

0 views
Skip to first unread message

Moritz Lenz

unread,
Nov 18, 2009, 2:49:57 AM11/18/09
to Perl6
pugs-c...@feather.perl6.nl wrote:
> +The C<.perl> method will produce a decimal number if the denominator is
> +a multiple of 10. Otherwise it will normalize and return a rational
> +literal of the form -47/3.

Did you mean "a power of 10" instead? I can't see how it makes sense
right now.

This would be the .perl representation by current spec:

08:46 <@moritz_> rakudo: say 357/12540
08:46 <+p6eval> rakudo 7347ec: 0.0284688995215311␤

instead of

08:44 <@moritz_> rakudo: say (357/12540).perl
08:44 <+p6eval> rakudo 7347ec: 119/4180␤

At least I don't see the point of special-casing one trailing zero in
the denominator.

Cheers,
Moritz

--
Moritz Lenz
http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

0 new messages