[R] The "**" exponentiation operator.

Richard O'Keefe r@oknz @end|ng |rom gm@||@com
Sat Aug 30 09:09:02 CEST 2025


I did mathematics up to University level and finally petered out at
Category Theory, which I never got the hang of.
Here's the fun: I *never* saw the asterisk used for multiplication in
my mathematics or physics courses.
And I never saw any operator at all used for exponentiation.
Asterisk was a superscript operator for conjugation or duals.  Had
nothing to do with products.

Fortran COBOL, and PL/I used. and still use, * for multiplication and
** for exponentiation.
APL used × for multiplication and * for exponentiation.

Could I recommend that R allow × as a synonym for * ?  It has been the
mathematical sign for
multiplication for >400 years, when a sign is used, and it's been
available on computers for decades.

On Sat, 30 Aug 2025 at 03:05, Leo Mada via R-help <r-help using r-project.org> wrote:
>
> Dear Rolf,
>
> I join this discussion a little bit late.
>
> Indeed, the '**' operator is a very poor choice for exponentiation. I can give some examples to justify my claim. Notice that '**' and '*' would almost always get mixed in real mathematics.
>
> Fortunately, I am used to "^"; otherwise, I would have had a very hard time to  debug the *monster*:
> https://github.com/discoleo/R/blob/master/Math/Poly.System.S5.Ht.Formulas.Derivation.Coeffs.R
>
> Those are the coefficients of a polynomial of order 7 (see below for further information). And I have plenty of examples.
>
> Unfortunately, some "programming" languages mix '*' and '**'; which makes any work with polynomials a nightmare!
>
> I "found" something on this topic - hope everyone gets a little bit amused:
> https://github.com/discoleo/R/blob/master/Math.NewTerminology.wiki
>
> Sincerely,
>
> Leonard
>
> ===========
> Regarding the *Monster*:
>
> It enables to solve a particular system with 5 variables with cyclic symmetry:
> x1+x2+x3+x4+x5 = R1
> # Note: this is NOT the full E2
> x1*x2+x2*x3+x3*x4+x4*x5+x5*x1 = R2
> E3 = R3
> E4 = R4
> E5 (= x1*x2*x3*x4*x5) = R5;
>
> This system can be transformed into a system that can be solved using a polynomial of lower order than the original system.
>
> Unfortunately, I do not have a methemtical theory yet for the Ht5 System. I worked it out the hard way; it is almost finished, but I did not have any more time during the last 2 years.
>
> For some (very) basic details, see:
> https://github.com/discoleo/R/blob/master/Math/Poly.System.md
>
> Again, I did not have time to write anything more thoroughly.
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list