Re: exponentiation operator (lack of)
- From: carlos@xxxxxxxxxxxx
- Date: 23 Dec 2005 13:30:56 -0800
> The FAQ points out a perfectly valid reason for omitting any sort
> of exponentiation operator. C is not alone among languages in
> doing this. Exponentiation is not the most prevalent of operators,
> and is normally a subroutine in almost any language.
Historically that is not quite correct. My first language was
Fortran IV, used for my PhD thesis at UCB. In the 70s I briefly used
Burroughs Algol (a derivative of Algol 60-68) and Gnu Pascal in the
80s. The exponentiation operators were **, ^ and **, respectively.
Those 3 languages were widely used in their heyday although
of course were not useful for low-level system programming.
Algol 60 is supposed to have influenced C indirectly,
but the ^ operator was renamed. As I noted, the lack is presently
felt in low-level numerical applications of C. These are
growing rapidly, especially in parallel & multicore processing.
One reason: the ability of C to interact closely with the hardware
and do resource management. This is critical in supercomputers.
Second reason: the "feed" end of the Fortran pipeline is emptying.
Example: our College of Engineering has not taught Fortran to
undergraduates since 1997 (why? industry feedback). Numerical
methods are taught to freshmen in C for low-level components
and Matlab for high level scripts. One of our PhD students joined
Mathworks two yrs ago, and she works primarily in C.
Giving this ongoing enlargement in the scope of C applications,
I see no reason why a new operator (** or ^^) could not be
introduced to meet those needs either in a future standard, or
in a "successor to C" , as discussed in another thread.
It should have a high precedence, just under the dot.
.
- Follow-Ups:
- Re: exponentiation operator (lack of)
- From: Dag-Erling Smørgrav
- Re: exponentiation operator (lack of)
- References:
- exponentiation operator (lack of)
- From: carlos
- Re: exponentiation operator (lack of)
- From: Robert Gamble
- Re: exponentiation operator (lack of)
- From: carlos
- Re: exponentiation operator (lack of)
- From: slebetman@xxxxxxxxx
- Re: exponentiation operator (lack of)
- From: jacob navia
- Re: exponentiation operator (lack of)
- From: slebetman@xxxxxxxxx
- Re: exponentiation operator (lack of)
- From: jacob navia
- Re: exponentiation operator (lack of)
- From: Chuck F.
- exponentiation operator (lack of)
- Prev by Date: pointer to flexible array of structures in other structure
- Next by Date: Re: exponentiation operator (lack of)
- Previous by thread: Re: exponentiation operator (lack of)
- Next by thread: Re: exponentiation operator (lack of)
- Index(es):
Relevant Pages
|