opPow, opDollar

Mo Chen sth4nth at gmail.com
Sat Nov 7 02:32:23 PST 2009


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.

On Sat, Nov 7, 2009 at 5:56 PM, Walter Bright <newshound1 at digitalmars.com>wrote:

> Don wrote:
>
>> 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.
>>
>> This is opPow(),  x ^^ y
>>
>> http://d.puremagic.com/issues/show_bug.cgi?id=3481
>>
>
> 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 **)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20091107/b3f70976/attachment.html>


More information about the Digitalmars-d mailing list