[perl #128584] [BUG] reduce subroutine returns NaN when calculating decimals with negative exponents

2016-10-07 Thread Zoffix Znet via RT
First a bit of deconfusion: negative exponents just mean x⁻² = 1/x². That works just fine and is not relevant to this ticket: m: say (-2) ** -2 rakudo-moar 605f27: OUTPUT«0.25␤» Fractional exponents mean the number is raised to the power of the numerator and then the

[perl #128584] [BUG] reduce subroutine returns NaN when calculating decimals with negative exponents

2016-10-07 Thread Zoffix Znet via RT
First a bit of deconfusion: negative exponents just mean x⁻² = 1/x². That works just fine and is not relevant to this ticket: m: say (-2) ** -2 rakudo-moar 605f27: OUTPUT«0.25␤» Fractional exponents mean the number is raised to the power of the numerator and then the

Re: [perl #128584] [BUG] reduce subroutine returns NaN when calculating decimals with negative exponents

2016-07-09 Thread Patrick R. Michaud via RT
On Sat, Jul 09, 2016 at 05:19:49AM -0700, Itsuki Toyota wrote: > See the following results > > $ perl6 -e 'say -1 ** -0.1' > -1 > $ perl6 -e 'say reduce * ** *, -1, (-0.1)' > NaN This is not a bug in "reduce" itself. Exponentiation has higher precedence than unary minus, so the first

Re: [perl #128584] [BUG] reduce subroutine returns NaN when calculating decimals with negative exponents

2016-07-09 Thread Patrick R. Michaud
On Sat, Jul 09, 2016 at 05:19:49AM -0700, Itsuki Toyota wrote: > See the following results > > $ perl6 -e 'say -1 ** -0.1' > -1 > $ perl6 -e 'say reduce * ** *, -1, (-0.1)' > NaN This is not a bug in "reduce" itself. Exponentiation has higher precedence than unary minus, so the first

[perl #128584] [BUG] reduce subroutine returns NaN when calculating decimals with negative exponents

2016-07-09 Thread via RT
# New Ticket Created by Itsuki Toyota # Please include the string: [perl #128584] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=128584 > See the following results $ perl6 -e 'say -1 ** -0.1' -1 $ perl6 -e 'say reduce * **