On Wed Mar 03 08:30:35 2010, masak wrote:
> <masak> pugs: say 1/7/7/7/7/7/7/7*7
> <p6eval> pugs: OUTPUT«0.0000084998597523140868175675101360827546␤»
> <masak> rakudo: say 1/7/7/7/7/7/7/7*7 # also found by diakopter++
> <p6eval> rakudo f6092e: OUTPUT«1␤»
> * masak submits rakudobug
> <diakopter> I don't get that one
> <diakopter> it's not fully left-associative nor fully right-associative
> <masak> me neither. kudos to whoever gets it.
> <masak> hey, look at this!
> <frettled> hmm?
> <masak> rakudo: .say for 1/7*7, 1/7/7*7, 1/7/7/7*7, 1/7/7/7/7*7
> <p6eval> rakudo 4edd19: OUTPUT«1␤0.142857142857143␤1␤0.142857142857143␤»
> <masak> that explains it, I think.
> <masak> the 7's cancel each other out.
> <diakopter> right
> <diakopter> but how
> <masak> diakopter: it's as if / had higher prec than *
> <diakopter> they would cancel each other out if it were right-associative
> <diakopter> if "/" were right-assoc I mean
> <masak> maybe it is.
> <masak> well, something's wrong, at least.

This appears to be fixed in latest Rakudo:

04:31 <@jnthn> rakudo: say 1/7/7/7/7/7/7/7*7
04:31 <+p6eval> rakudo e40ee4: OUTPUT«8.49985975231409e-06␤»

Giving to moritz++ for spectests.

Thanks,

Jonathan

Reply via email to