Marking as "Won't Fix" and closing.

Is there anything that we want to change in Octave for this bug report, or should it be marked "Won't Fix"?.

Yes.
Although these results are still significantly different from MATLAB.
>> atan2 (0, 0)
ans = 3.1416
>> angle(00i)
ans = 3.1416
>>

Yeah, so Matlab doesn't throw away the signed zero, it just doesn't display it. And then it uses it inconsistenly.
I think it's a bug in Octave that the constant 00i is narrowed to a real value. That seems bad to me, but most people don't seem to care about that.


>> x = 1/Inf
x =
0

I just found this web page that discusses signed zeros in MATLAB. It's not very encouraging.
https://www.advanpix.com/2016/04/28/branchcutsandsignedzerosinmatlab/
So this is probably more a WTF!? MATLAB issue than a bug.

Finally, what does Matlab do for the following:

Response using myatan2 mex:
MATLAB

Response using myfunc mex:
MATLAB

Also, with the attached MEX file myatan2.c, please try the following with Matlab and report back what it displays:
(file #40581)

I think this is more of an issue about automatic narrowing and whether Matlab keeps the sign bit on an IEEE 0.
Because storing complex numbers requires double the amount of storage (real and imaginary 8byte numbers), Octave automatically tries to compact to a real array whenever the complex part is equal to zero. Try the failing code in two steps:
In the first stage, Octave compacts the value to '0'. And the angle of 0 is pi. Does Matlab keep the signbit for zero values? What does the following return in Matlab?
In Octave

Could someone please take the attached MEX file, myfunc.c, and try it with Matlab and report back what it displays for the following:
(file #40580)

Octave 4.2.1
MATLAB
