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

[perl #69076] [BUG] Strange tricks with Num.sin

0 views
Skip to first unread message

Solomon Foster

unread,
Sep 9, 2009, 10:20:30 PM9/9/09
to bugs-bi...@netlabs.develooper.com
# New Ticket Created by Solomon Foster
# Please include the string: [perl #69076]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=69076 >


colomon: rakudo: say 5.Num.sin('degrees');
p6eval: rakudo 446d49: OUTPUT«too many arguments passed (2) - 1 param
expected␤in Main (/tmp/ikAjKOkV3I:2)␤»
colomon: rakudo: say 5.0.sin('degrees');
p6eval: rakudo 446d49: OUTPUT«0.0871557427476582␤»
colomon: rakudo: say (5 * 1.0).sin('degrees');
p6eval: rakudo 446d49: OUTPUT«too many arguments passed (2) - 1 param
expected␤in Main (/tmp/DZhXZHeJmV:2)␤»

--
Solomon Foster: col...@gmail.com
HarmonyWare, Inc: http://www.harmonyware.com

Solomon Foster

unread,
Sep 26, 2009, 12:58:50 PM9/26/09
to perl6-bug...@perl.org
On Sat, Sep 26, 2009 at 12:47 PM, Patrick R. Michaud via RT
<perl6-bug...@perl.org> wrote:
> Whenever there seem to be odd type inconsistencies, it's often useful to
> put .PARROT on the results instead of .WHAT, just to see what types the
> underlying objects *really* are.
>
> (Rakudo does a few tricks here and there to make Parrot types act like
> Perl 6 types, but sometimes the illusion isn't perfect.)

Right, and I'm pretty sure I remember you showing me that back when
you fixed this bug two weeks ago. :)

Did you see the conversation I had with Moritz on the the similar
Complex problem on #perl6 yesterday? No rush whatsoever, I think your
PGE stuff is more important, and besides, I could use a few days where
working on Rakudo trig functions isn't stealing time from my $work.
(Rakudo is much more -Ofun than my $work is at the moment.)

Patrick R. Michaud

unread,
Sep 28, 2009, 10:42:42 AM9/28/09
to Solomon Foster, perl6-bug...@perl.org
On Sat, Sep 26, 2009 at 12:58:50PM -0400, Solomon Foster wrote:
> Did you see the conversation I had with Moritz on the the similar
> Complex problem on #perl6 yesterday?

Yes, I did see that. My suggestion at this point is for Rakudo
to make its own Complex class in the setting (similar to what has
been done for Rat), instead of attempting to inherit from Parrot's
built-in Complex PMC. We can delegate some operations to Parrot's
Complex PMC if that's more convenient, but it just feels as though
having a pure p6 implementation of Complex will be a lot more useful
and easier to maintain at this point.

Pm

Solomon Foster

unread,
Oct 29, 2009, 6:52:43 AM10/29/09
to perl6-bug...@perl.org
On Thu, Oct 29, 2009 at 4:38 AM, Moritz Lenz via RT
<perl6-bug...@perl.org> wrote:

> On Wed Sep 09 19:20:30 2009, col...@gmail.com wrote:
>> colomon: rakudo: say 5.Num.sin('degrees');
>> p6eval: rakudo 446d49: OUTPUT«too many arguments passed (2) - 1 param
>> expected␤in Main (/tmp/ikAjKOkV3I:2)␤»
>> colomon: rakudo: say 5.0.sin('degrees');
>> p6eval: rakudo 446d49: OUTPUT«0.0871557427476582␤»
>> colomon: rakudo: say (5 * 1.0).sin('degrees');
>> p6eval: rakudo 446d49: OUTPUT«too many arguments passed (2) - 1 param
>> expected␤in Main (/tmp/DZhXZHeJmV:2)␤»
>
> Since The Big Complex/Trig Refactor all these produce the same output.
>
> colomon, are you comfortable with our test coverage? If yes we can close
> this.

Yes, I think there are enough trig tests these days. :)

Thanks for cleaning these up.

0 new messages