It is a problem when people conflate mathematical notation with the real
world. There are many areas of mathematics that use all kinds of notations
including the same notation to mean very different things. 

Very often characters are borrowed without telling people how to think of
them or pronounce them. A squiggle on a blackboard may turn out to be a
capital ZETA in Greek, or simply some Roman letter written in an exaggerated
Italic Script that looks different every time someone writes it on the
board. All kinds of brackets are invented. You have vertical notations in
which position above and below a line implies division. You have notations
for square or other roots around numbers and expressions. You can have
invented abstract operators that represent an unspecified operation and may
look like a circle around an asterisk and son on. The list of notations can
be immense.

So, when computing began, there was no way to capture this richness and in
many cases, that remains so today. How many people spend hours trying to
describe what an equation should look like using tools like Latex or
templates in an equation Editor such as in MS WORD?

For programming languages the twist is that languages along the lines of
LISP could be written where everything was a function and maybe the only
symbols needed where parentheses of one kind and a double quote and perhaps
a few others. No need really for a plus sign when you has a function like
(plus 1 2) to do it. Obviously, you could write just about anything complex
and the reader might have a hard time interpreting it as meaningful while
the computer had no problem whatsoever.

Many programming languages were built to try to handle at least simple cases
in a more compact or intuitive manner. Yet, they pretty much all have had to
come up with lots of precedence rules and it is easy to get wrong programs
without judicious use of parentheses especially when precedence rules may
not follow the intuition of mathematicians writing on blackboards. 

On the flip side, some computer languages allow notations not normally seen
in mathematics such as assigning implicit values partway through an
expression that are then specified by some notation elsewhere. An example
might be a regular expression to check if any word in your text appears
twice.

When doing programming, it is important to remember that the computer will
often accept mistakes and the onus is on the programmer, or tools that
supply warnings. Otherwise, GIGO.

-----Original Message-----
From: R-help <r-help-boun...@r-project.org> On Behalf Of Ebert,Timothy Aaron
Sent: Saturday, August 30, 2025 9:13 AM
To: Richard O'Keefe <rao...@gmail.com>; Leo Mada <leo.m...@syonic.eu>
Cc: Leo Mada via R-help <r-help@r-project.org>
Subject: Re: [R] The "**" exponentiation operator.

The use of * and ^ are from computer programming languages. They are not
valid notation in mathematics, but have become so commonly used that they
seem ok. In mathematics x (a variable or parameter) and x (a multiplication
sign) are distinguished by a change in font or using italics or more
traditionally the bottom of the multiplication sign "x" is raised above
baseline (I do not know how on my keyboard). There are two other options, a
centered dot (on my keyboard a superscript period), or juxtaposition (ab is
a times b). On a 1970's keyboard (or earlier) the "x" for multiplication was
not available. The centered dot was not available. Even on my modern
keyboard I am not sure how to get these symbols as they should be without
considerable additional effort or where I would find the symbol in the ASCII
code. In juxtaposition how do I tell if ab is a times b versus a new
variable "ab"?
In early programming * was used because it was available. I have found
suggestions that a raised "x" is now available, but I have no idea where it
is and I do not want to look through the complete character set for several
fonts looking. Furthermore, maintaining * is necessary for backwards
compatibility.

Today I have a button in my word processing program to give superscripts.
The 1963 ASCII did not have a ^ but it was added in 1967. A programming
language needs a specific character to interpret. Something like A3 has a
hidden character to indicate a superscript, though in the basic text of this
email I could not find a way to do it. That difficulty alone makes A^3 more
interpretable than A3.

ChatGPT finishes the story by saying that some early computer languages
(ALGOL 60, some Fortran dialects) used ^. However C used the ^ for a bitwise
XOR operation. In developing standards ** was chosen to avoid conflict with
other uses and because it was easy to define in writing the machine language
program that becomes a higher level programming language.

It has been some time since a journal required that I change the * to a
proper multiplication sign. However, I do not publish that many equations
and I try to remember to use x. Some reviewers also complain if * is used.

In the end we could have a war, or next best a global committee meeting to
settle on a global convention where everyone agrees. Or we could learn that
there are several ways to do this and move on. Some use ^ others ** and
still others use a function like pow().


Tim

-----Original Message-----
From: R-help <r-help-boun...@r-project.org> On Behalf Of Richard O'Keefe
Sent: Saturday, August 30, 2025 3:09 AM
To: Leo Mada <leo.m...@syonic.eu>
Cc: Leo Mada via R-help <r-help@r-project.org>
Subject: Re: [R] The "**" exponentiation operator.

[External Email]

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@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://gith/
> ub.com%2Fdiscoleo%2FR%2Fblob%2Fmaster%2FMath%2FPoly.System.S5.Ht.Formu
> las.Derivation.Coeffs.R&data=05%7C02%7Ctebert%40ufl.edu%7C88a1e085284e
> 420a305f08dde794288f%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C6389
> 21345712706542%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiI
> wLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7
> C%7C&sdata=xbTb0RLU%2B9nd4p%2FHDI9wjuWGRUT1fuCvvKkZ%2F0MVBVA%3D&reserv
> ed=0
>
> 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://gith/
> ub.com%2Fdiscoleo%2FR%2Fblob%2Fmaster%2FMath.NewTerminology.wiki&data=
> 05%7C02%7Ctebert%40ufl.edu%7C88a1e085284e420a305f08dde794288f%7C0d4da0
> f84a314d76ace60a62331e1b84%7C0%7C0%7C638921345712727384%7CUnknown%7CTW
> FpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIs
> IkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=3d0gxPeq9A28Bjs%2F
> FPmJnBbmGFj%2FWUC8WWl3ZYopqCk%3D&reserved=0
>
> 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://gith/
> ub.com%2Fdiscoleo%2FR%2Fblob%2Fmaster%2FMath%2FPoly.System.md&data=05%
> 7C02%7Ctebert%40ufl.edu%7C88a1e085284e420a305f08dde794288f%7C0d4da0f84
> a314d76ace60a62331e1b84%7C0%7C0%7C638921345712740965%7CUnknown%7CTWFpb
> GZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkF
> OIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=%2BCCv%2FBe4VQis9oU8G
> 6G2ySubXvWTBKk%2BDAsxK59w0co%3D&reserved=0
>
> Again, I did not have time to write anything more thoroughly.
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat/
> .ethz.ch%2Fmailman%2Flistinfo%2Fr-help&data=05%7C02%7Ctebert%40ufl.edu
> %7C88a1e085284e420a305f08dde794288f%7C0d4da0f84a314d76ace60a62331e1b84
> %7C0%7C0%7C638921345712751683%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGki
> OnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ
> %3D%3D%7C0%7C%7C%7C&sdata=Nzz%2FqykXOD%2FUBS%2FuqFQ32ep25luAoMIkDt0V64
> as6Qo%3D&reserved=0 PLEASE do read the posting guide
> https://www/.
> r-project.org%2Fposting-guide.html&data=05%7C02%7Ctebert%40ufl.edu%7C8
> 8a1e085284e420a305f08dde794288f%7C0d4da0f84a314d76ace60a62331e1b84%7C0
> %7C0%7C638921345712762858%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRy
> dWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%
> 3D%7C0%7C%7C%7C&sdata=c3d8uzSK2FAnJscLbX9w3thsp0NFVsdpHR%2FXn4SDW80%3D
> &reserved=0 and provide commented, minimal, self-contained,
> reproducible code.

______________________________________________
R-help@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.

______________________________________________
R-help@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.

______________________________________________
R-help@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.

Reply via email to