Path: utzoo!utgpu!water!watmath!clyde!feg From: feg@clyde.ATT.COM (Forrest Gehrke) Newsgroups: comp.lang.c Subject: Re: Power operator? Summary: Open the door a crack, comes deluge! Message-ID: <20084@clyde.ATT.COM> Date: 12 Jan 88 16:38:12 GMT References: <11169@brl-adm.ARPA> <10026@ut-sally.UUCP> <7007@brl-smoke.ARPA> <7014@brl-smoke.ARPA> Organization: AT&T Bell Labs, Whippany, NJ Lines: 26 In article <7014@brl-smoke.ARPA>, gwyn@brl-smoke.ARPA (Doug Gwyn ) writes: > In article <7007@brl-smoke.ARPA> I wrote: > >> a ^^ b > >I think this is about as good a notation as we can get ... > > However, as Karl pointer out, this would make a good logical exclusive-or > operator also, and I can see that the "strong argument" for exponentiation > would also apply, somewhat more weakly, to exclusive-or, which I've often > needed and have had to kludge ((a != 0) ^ (b != 0)). > > You see what a can of worms is opened up, once you start admitting > extensions? Or, to mix metaphors, once you let a foot get in the door? If the argument for adding extensions is to avoid kludges, then let me be next in line: how about complex algebra notation (a + jb)? Exponentiation of complex variables could make good use of the exponent operator---and no one has mentioned root extraction yet. We could turn C into Ada++ overnight! Forrest Gehrke