So I was looking at the function for some reason, and noticed that it said it is equal to for complex numbers, so I thought “isn’t that just the same as normalizing a vector?”, and wanted to test my theory . So I did
Sign
z
|z|
In[]:=
Reduce[ReIm[Sign[z]]==Normalize[ReIm[z]]]
∀
z,z∈
Out[]=
False
Hmm, that’s odd, wonder what is going on here, so I went on to find what the difference was
In[]:=
FindInstance[ReIm[Sign[z]]!=Normalize[ReIm[z]],z∈,3]
Out[]=
{{z0}}
So it’s just when ? Why would that be different?
z==0
In[]:=
{ReIm[Sign[0+0]],Normalize[ReIm[0+0]]}
Out[]=
{{0,0},{0,0}}
So this confused me quite a bit, after playing around for a bit, I found the following
In[]:=
{ReIm[0],ReIm[z]/.z->0}{Normalize[{0,0}],Normalize[z]/.z->{0,0}}{Normalize[ReIm[0]],Normalize[ReIm[z]]/.z->0}
Out[]=
{{0,0},{0,0}}
Out[]=
{{0,0},{0,0}}
1
0
1
0
Out[]=
{{0,0},{Indeterminate,Indeterminate}}
So for some reason, ReIm and Normalize works... most of the time, unless they are chained together, and only when inputted with a and not when passed in as a parameter.
Does anyone know why this is?
Does anyone know why this is?
