It is the exponentiation operator:
$ perl -E 'say 3 ** 2;'
9
Cheers,
Laurent.
Le mer. 3 nov. 2021 Γ 20:05, Wes Peng a Γ©crit :
> What's the "**" operator in perl? I most of the time use R for math, not
> familiar with this operation.
>
> Thanks
>
> On Sun, Oct 31, 2021 at 3:38 AM Sean McAfee w
What's the "**" operator in perl? I most of the time use R for math, not
familiar with this operation.
Thanks
On Sun, Oct 31, 2021 at 3:38 AM Sean McAfee wrote:
> Recently I was golfing the "hyperfactorial," defined for a number π as
> π**π Γ (π-1)**(π-1) Γ (π-2)**(π-2) Γ ... Γ 1. I created a
On Mon, Nov 1, 2021 at 2:38 AM Ralph Mellor wrote:
>
> `R` reverses associativity, which is *another* way that `R` is a
> nicely designed metaoperator, though this latter aspect is not
> relevant to why it worked for the solution you came up with?
Ah no. Of course it has to do the reversal or it
On Sun, Oct 31, 2021 at 6:10 PM Sean McAfee wrote:
>
> the main point of my message was about the R metaoperator and the
> associativity of the operator it creates.
OK. Fwiw this was something I didn't know, or had forgotten, and I
find it delightful.
The main point of *my* comment was that I d
On Sat, Oct 30, 2021 at 9:21 PM Wes Peng wrote:
> What's the "**" operator in perl? I most of the time use R for math, not
> familiar with this operation.
>
It's exponentiation: https://docs.raku.org/language/operators#infix_**
That wasn't a Raku expression I used it in, though, just my attempt
On Sat, Oct 30, 2021 at 9:03 PM Ralph Mellor
wrote:
> On Sat, Oct 30, 2021 at 8:38 PM Sean McAfee wrote:
> > Anyway, pretty cool!
>
> I agree it's cool, at least in a golfing sense.
>
> But is your explanation right?
>
> The *range* operator (`..`), if the rhs is less than the left,
> yields an
On Sat, Oct 30, 2021 at 8:38 PM Sean McAfee wrote:
>
> It worked! But I couldn't quite see how.
>
> Anyway, pretty cool!
I agree it's cool, at least in a golfing sense.
But is your explanation right?
The *range* operator (`..`), if the rhs is less than the left,
yields an empty list rather tha
Recently I was golfing the "hyperfactorial," defined for a number π as
π**π Γ (π-1)**(π-1) Γ (π-2)**(π-2) Γ ... Γ 1. I created a quite
concise Raku function:
{ [*] [\*] $_...1 }
The only problem was that this function returns zero for a zero input,
whereas the hyperfactorial of 0 is supposed