Suppose we have a matrix library, I'd like to have two product operators, one is for matrix product, the other is for element wise product, just like what we do in matlab (A*B and A.*B). I'd like to save ** to that scenario. Btw I'm no Fortran user. ^^ is fine by me. <br>
<br><div class="gmail_quote">On Sat, Nov 7, 2009 at 5:56 PM, Walter Bright <span dir="ltr"><<a href="mailto:newshound1@digitalmars.com">newshound1@digitalmars.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Don wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
A little while ago I said I'd create a patch for ^^ as an exponentiation. A couple of people had requested that I make a post to the ng so they'd know when it happens. Here it is.<br>
<br>
This is opPow(), x ^^ y<br>
<br>
<a href="http://d.puremagic.com/issues/show_bug.cgi?id=3481" target="_blank">http://d.puremagic.com/issues/show_bug.cgi?id=3481</a><br>
</blockquote>
<br></div>
I don't understand the rationale for an exponentiation operator. It isn't optimization, because pow() could become an intrinsic that the compiler knows about. pow() is well known, ^^ isn't. (Fortran uses **)<br>
</blockquote></div><br>