Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!decwrl!waikato.ac.nz!comp.vuw.ac.nz!am.dsir.govt.nz!robert From: robert@am.dsir.govt.nz (Robert Davies) Newsgroups: comp.lang.c++ Subject: Re: taking powers with "^" Message-ID: <1991Jun23.210456.27280@am.dsir.govt.nz> Date: 23 Jun 91 21:04:56 GMT References: <1920003@hpsad.HP.COM> <1991Jun22.144159.18138@mathcs.sjsu.edu> Organization: DSIR Applied Mathematics, Wellington, NZ Lines: 14 Wouldn't it be nice if C++ introduced a new operator - eg @ or @@ for taking powers. eg 2 @@ 3 would be 8. As already noted, I think it is very dangerous to use ^ as an overloaded operator for taking powers. Especially as 2 ^ 3 gets something completely different. (I know that C was considered to difficult/dangerous for numerical people who should stick to Fortran, so there was no need for a power operator. But with C++ perhaps this policy should be reconsidered.) Robert