I was surprised to hear of negative zero as I vaguely recall a long-ago demonstration of how, in twos complement notation, the negative of zero is zero. However, a little research turns up an IEEE 754 standard mandating the signed zeros. It makes sense in the context of numeric overflow - see http://www.johndcook.com/blog/2010/06/15/why-computers-have-signed-zero/ .
On Wed, Jan 16, 2013 at 9:05 AM, Roger Hui <rogerhui.can...@gmail.com>wrote: > Negative zero, eh? Tried it once; didn't like it. > > Stay away from negative zero. You are *that* close to NaN (and hence > eternal damnation). > > > > On Wed, Jan 16, 2013 at 4:26 AM, Henry Rich <henryhr...@nc.rr.com> wrote: > > > On my awaking, there was a whiff of sulfur in the air, and a greenish > > haze... and somehow in my mind the idea that that last program won't > work, > > because of the possibility of negative zero. I'll stay relegated to imp > > status. > > > > Henry Rich > > > > > > On 1/15/2013 6:20 PM, Henry Rich wrote: > > > >> Nah, that's not beyond impish. The devilish solution is to take the > >> bitwise OR of the matrix with its conjugate transpose (but that's easier > >> in assembler language than in J: > >> (23 b.&.(a.&i.)&.(2&(3!:5))&.+. +@|:)) > >> ). And you need to be sure that the zeros on the lower diagonal and > >> below are true zeros! > >> > >> Henry Rich > >> > >> On 1/15/2013 6:03 PM, km wrote: > >> > >>> Oh, boy! (v1`v2) } y <--> (v1 y) } (v2 y) > >>> > >>> Brief and devilish, take care for your soul, Henry! > >>> > >>> --Kip > >>> > >> > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- Devon McCormick, CFA ^me^ at acm. org is my preferred e-mail ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm