3D Math Data structures/SIMD

Janice Caron caron800 at googlemail.com
Sat Dec 22 09:42:55 PST 2007


On 12/22/07, 0ffh <frank at frankhirsch.youknow.what.todo.net> wrote:
> Is it not? Tell Jacques Hadamard!
> You should be a bit more careful what you write and, especially, how.
>
> > I googled
> > Jacques Hadamard and got that he was a mathematician, but beyond that,
> > I'm lost. What are you getting at?
>
> The element-wise product of matrices (which you called "just not
> mathemathical") bears his name.

Cool. I like learning new things. So, elementwise multiplication is
more properly called Hadamard multiplication is it? That's certainly
interesting.

I'm not not quite sure how I'm supposed to "tell Jacques Hadamard"
anything, though, given that he's been dead for forty four years. I
still don't completely understand what you were getting at, but I'll
try to be clearer about what /I/ meant. By "not mathematical", I meant
/in the context of overloading opMul() with it/ - that is, Hadamard
multiplication doesn't obey the rules which we normally associate with
multiplication.

Consider, for example, the simple equation two times two equals four.
(They don't get much easier than that). You could represent that in 2D
vectors using Hadamard multiplication as [2,0] * [2,0] = [4,0]. So
far, so good. But we also expect four divided by two to yield two.
How's that done here? Elementwise division of [4,0] by [2,0] would
involve zero divided by zero for the second element. More bizarrely,
a*b can equal zero, even when neither a nor b is zero. So while it
certainly is reasonable to call it a function, I continue to question
whether or not it is reasonable to call it multiplication. That's what
I meant.

If you're suggesting that I intended some slur on poor Mr Hadamard, I
assure you that's false. (Indeed - I hadn't even heard of him until
you mentioned his name). Rest assured, if he were alive today I would
be /more/ than happy to discuss mathematics with him. :-)



More information about the Digitalmars-d mailing list