You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not a bug. There is no negative zero for integer types: -0 is 0. The only reason this works in Matlab is that 0 is actually 0.0 and -0.0 does have a negative sign bit. In Julia, this doesn't happen because 0 is actually an integer.
We seem to convert -0 to 0. The signbit of 0 should be preserved, and -0 should be displayed if signbit is -1.
julia> signbit(0)
1
julia> signbit(-0)
1
MATLAB keeps the sign on zero, but doesn't display it, and even computes sin(-0) as -0.
x =
0000000000000000
x =
8000000000000000
This stems from the discussion as per http://math.mit.edu/~numericalmath/numericalmath/index.php/Sine, where
sin(-0) should be -0
The text was updated successfully, but these errors were encountered: