What is the symbol used for exponentiation in different programming languages?

  • Context: High School 
  • Thread starter Thread starter LightbulbSun
  • Start date Start date
  • Tags Tags
    Mean Symbol
Click For Summary

Discussion Overview

The discussion centers on the symbol used for exponentiation across different programming languages, exploring its usage in various contexts, including mathematics, calculators, and programming environments.

Discussion Character

  • Debate/contested

Main Points Raised

  • Some participants suggest that the caret (^) symbol is commonly understood to mean "to the power of" in informal contexts.
  • Others argue that the caret is not a standard mathematical or physics symbol, but rather a workaround for writing superscripts in environments where they are not available.
  • It is noted that the caret is used in some calculators and spreadsheet programs like Microsoft Excel.
  • Some participants mention that the caret notation for exponentiation originated from BASIC, while FORTRAN uses the double asterisk (**) for the same purpose.
  • Python is identified as another language that uses the double asterisk (**) for exponentiation.
  • There is a mention that in some programming languages, the caret symbol may represent exclusive or (XOR) instead of exponentiation.
  • One participant claims that the caret notation is well enough institutionalized to be considered standard notation, despite historical figures like Newton and Euler not recognizing it.

Areas of Agreement / Disagreement

Participants express differing views on the status of the caret symbol as a standard notation, with some asserting its informal acceptance while others emphasize its non-standard nature. The discussion remains unresolved regarding the universality of the symbol across programming languages.

Contextual Notes

There are limitations regarding the definitions of "standard" notation and the contexts in which different symbols are used, as well as the potential for confusion with other operators in programming languages.

LightbulbSun
Messages
64
Reaction score
2
Example:

Acceleration= distance / time ^ 2
 
Mathematics news on Phys.org
In that context it presumably means "to the power of".
 
nicksauce said:
In that context it presumably means "to the power of".

Thanks. :smile:
 
It is NOT a standard mathematics (or physics) symbol but is used on the internet when you aren't able to write superscripts.
 
HallsofIvy said:
It is NOT a standard mathematics (or physics) symbol but is used on the internet when you aren't able to write superscripts.

It's also used on some calculators, and some spreadsheet programs like Microsoft Excel.
 
Math Is Hard said:
It's also used on some calculators, and some spreadsheet programs like Microsoft Excel.
And in TeX and in Matlab and in Mathematica and ...

However, in some computer languages it means exclusive or.
 
HallsofIvy said:
It is NOT a standard mathematics (or physics) symbol but is used on the internet when you aren't able to write superscripts.

It's well enough institutionalized you could call it standard notation. No, Newton and Euler wouldn't know what it meant, but anyone who's ever used a hand calculator would.
 
The ^ notation for exponentiation came out of BASIC. FORTRAN uses ** for the same purpose, but most other high-level programming languages that I know of don't have a corresponding operator.
 
Mark44 said:
The ^ notation for exponentiation came out of BASIC. FORTRAN uses ** for the same purpose, but most other high-level programming languages that I know of don't have a corresponding operator.

Python uses ** for exponentiation.
 

Similar threads

  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 21 ·
Replies
21
Views
5K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 11 ·
Replies
11
Views
1K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K